diff options
Diffstat (limited to 'arch/powerpc/kernel/head_32.S')
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index e025e89fe93e..98c4b29a56f4 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/asm-offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | #include <asm/ptrace.h> | 34 | #include <asm/ptrace.h> |
35 | #include <asm/bug.h> | 35 | #include <asm/bug.h> |
36 | #include <asm/kvm_book3s_asm.h> | ||
36 | 37 | ||
37 | /* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ | 38 | /* 601 only have IBAT; cr0.eq is set on 601 when using this macro */ |
38 | #define LOAD_BAT(n, reg, RA, RB) \ | 39 | #define LOAD_BAT(n, reg, RA, RB) \ |
@@ -303,6 +304,7 @@ __secondary_hold_acknowledge: | |||
303 | */ | 304 | */ |
304 | #define EXCEPTION(n, label, hdlr, xfer) \ | 305 | #define EXCEPTION(n, label, hdlr, xfer) \ |
305 | . = n; \ | 306 | . = n; \ |
307 | DO_KVM n; \ | ||
306 | label: \ | 308 | label: \ |
307 | EXCEPTION_PROLOG; \ | 309 | EXCEPTION_PROLOG; \ |
308 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 310 | addi r3,r1,STACK_FRAME_OVERHEAD; \ |
@@ -358,6 +360,7 @@ i##n: \ | |||
358 | * -- paulus. | 360 | * -- paulus. |
359 | */ | 361 | */ |
360 | . = 0x200 | 362 | . = 0x200 |
363 | DO_KVM 0x200 | ||
361 | mtspr SPRN_SPRG_SCRATCH0,r10 | 364 | mtspr SPRN_SPRG_SCRATCH0,r10 |
362 | mtspr SPRN_SPRG_SCRATCH1,r11 | 365 | mtspr SPRN_SPRG_SCRATCH1,r11 |
363 | mfcr r10 | 366 | mfcr r10 |
@@ -381,6 +384,7 @@ i##n: \ | |||
381 | 384 | ||
382 | /* Data access exception. */ | 385 | /* Data access exception. */ |
383 | . = 0x300 | 386 | . = 0x300 |
387 | DO_KVM 0x300 | ||
384 | DataAccess: | 388 | DataAccess: |
385 | EXCEPTION_PROLOG | 389 | EXCEPTION_PROLOG |
386 | mfspr r10,SPRN_DSISR | 390 | mfspr r10,SPRN_DSISR |
@@ -397,6 +401,7 @@ DataAccess: | |||
397 | 401 | ||
398 | /* Instruction access exception. */ | 402 | /* Instruction access exception. */ |
399 | . = 0x400 | 403 | . = 0x400 |
404 | DO_KVM 0x400 | ||
400 | InstructionAccess: | 405 | InstructionAccess: |
401 | EXCEPTION_PROLOG | 406 | EXCEPTION_PROLOG |
402 | andis. r0,r9,0x4000 /* no pte found? */ | 407 | andis. r0,r9,0x4000 /* no pte found? */ |
@@ -413,6 +418,7 @@ InstructionAccess: | |||
413 | 418 | ||
414 | /* Alignment exception */ | 419 | /* Alignment exception */ |
415 | . = 0x600 | 420 | . = 0x600 |
421 | DO_KVM 0x600 | ||
416 | Alignment: | 422 | Alignment: |
417 | EXCEPTION_PROLOG | 423 | EXCEPTION_PROLOG |
418 | mfspr r4,SPRN_DAR | 424 | mfspr r4,SPRN_DAR |
@@ -427,6 +433,7 @@ Alignment: | |||
427 | 433 | ||
428 | /* Floating-point unavailable */ | 434 | /* Floating-point unavailable */ |
429 | . = 0x800 | 435 | . = 0x800 |
436 | DO_KVM 0x800 | ||
430 | FPUnavailable: | 437 | FPUnavailable: |
431 | BEGIN_FTR_SECTION | 438 | BEGIN_FTR_SECTION |
432 | /* | 439 | /* |
@@ -450,6 +457,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_FPU_UNAVAILABLE) | |||
450 | 457 | ||
451 | /* System call */ | 458 | /* System call */ |
452 | . = 0xc00 | 459 | . = 0xc00 |
460 | DO_KVM 0xc00 | ||
453 | SystemCall: | 461 | SystemCall: |
454 | EXCEPTION_PROLOG | 462 | EXCEPTION_PROLOG |
455 | EXC_XFER_EE_LITE(0xc00, DoSyscall) | 463 | EXC_XFER_EE_LITE(0xc00, DoSyscall) |
@@ -467,9 +475,11 @@ SystemCall: | |||
467 | * by executing an altivec instruction. | 475 | * by executing an altivec instruction. |
468 | */ | 476 | */ |
469 | . = 0xf00 | 477 | . = 0xf00 |
478 | DO_KVM 0xf00 | ||
470 | b PerformanceMonitor | 479 | b PerformanceMonitor |
471 | 480 | ||
472 | . = 0xf20 | 481 | . = 0xf20 |
482 | DO_KVM 0xf20 | ||
473 | b AltiVecUnavailable | 483 | b AltiVecUnavailable |
474 | 484 | ||
475 | /* | 485 | /* |
@@ -882,6 +892,10 @@ __secondary_start: | |||
882 | RFI | 892 | RFI |
883 | #endif /* CONFIG_SMP */ | 893 | #endif /* CONFIG_SMP */ |
884 | 894 | ||
895 | #ifdef CONFIG_KVM_BOOK3S_HANDLER | ||
896 | #include "../kvm/book3s_rmhandlers.S" | ||
897 | #endif | ||
898 | |||
885 | /* | 899 | /* |
886 | * Those generic dummy functions are kept for CPUs not | 900 | * Those generic dummy functions are kept for CPUs not |
887 | * included in CONFIG_6xx | 901 | * included in CONFIG_6xx |