diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-05 00:20:31 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-19 21:03:22 -0400 |
commit | a5d4f3ad3a28cf046836b9bfae61d532b8f77036 (patch) | |
tree | 6940ace9422e91459d819b385dacf9b2ab44bd50 /arch/powerpc/kvm | |
parent | 2dd60d79e0202628a47af9812a84d502cc63628c (diff) |
powerpc: Base support for exceptions using HSRR0/1
Pass the register type to the prolog, also provides alternate "HV"
version of hardware interrupt (0x500) and adjust LPES accordingly
We tag those interrupts by setting bit 0x2 in the trap number
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_rmhandlers.S | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/book3s_segment.S | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/arch/powerpc/kvm/book3s_rmhandlers.S b/arch/powerpc/kvm/book3s_rmhandlers.S index b0ff5ff76e25..046e1f3d4432 100644 --- a/arch/powerpc/kvm/book3s_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_rmhandlers.S | |||
@@ -112,6 +112,7 @@ INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_MACHINE_CHECK | |||
112 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_DATA_STORAGE | 112 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_DATA_STORAGE |
113 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_INST_STORAGE | 113 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_INST_STORAGE |
114 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_EXTERNAL | 114 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_EXTERNAL |
115 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_EXTERNAL_HV | ||
115 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_ALIGNMENT | 116 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_ALIGNMENT |
116 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_PROGRAM | 117 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_PROGRAM |
117 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_FP_UNAVAIL | 118 | INTERRUPT_TRAMPOLINE BOOK3S_INTERRUPT_FP_UNAVAIL |
diff --git a/arch/powerpc/kvm/book3s_segment.S b/arch/powerpc/kvm/book3s_segment.S index 7c52ed0b7051..d842795d0f23 100644 --- a/arch/powerpc/kvm/book3s_segment.S +++ b/arch/powerpc/kvm/book3s_segment.S | |||
@@ -155,9 +155,15 @@ kvmppc_handler_trampoline_exit: | |||
155 | PPC_LL r2, (SHADOW_VCPU_OFF + SVCPU_HOST_R2)(r13) | 155 | PPC_LL r2, (SHADOW_VCPU_OFF + SVCPU_HOST_R2)(r13) |
156 | 156 | ||
157 | /* Save guest PC and MSR */ | 157 | /* Save guest PC and MSR */ |
158 | mfsrr0 r3 | 158 | andi. r0,r12,0x2 |
159 | beq 1f | ||
160 | mfspr r3,SPRN_HSRR0 | ||
161 | mfspr r4,SPRN_HSRR1 | ||
162 | andi. r12,r12,0x3ffd | ||
163 | b 2f | ||
164 | 1: mfsrr0 r3 | ||
159 | mfsrr1 r4 | 165 | mfsrr1 r4 |
160 | 166 | 2: | |
161 | PPC_STL r3, (SHADOW_VCPU_OFF + SVCPU_PC)(r13) | 167 | PPC_STL r3, (SHADOW_VCPU_OFF + SVCPU_PC)(r13) |
162 | PPC_STL r4, (SHADOW_VCPU_OFF + SVCPU_SHADOW_SRR1)(r13) | 168 | PPC_STL r4, (SHADOW_VCPU_OFF + SVCPU_SHADOW_SRR1)(r13) |
163 | 169 | ||