aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/book3s_64_interrupts.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/book3s_64_interrupts.S')
-rw-r--r--arch/powerpc/kvm/book3s_64_interrupts.S22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/kvm/book3s_64_interrupts.S b/arch/powerpc/kvm/book3s_64_interrupts.S
index 66e3b1179b32..3c0ba5513077 100644
--- a/arch/powerpc/kvm/book3s_64_interrupts.S
+++ b/arch/powerpc/kvm/book3s_64_interrupts.S
@@ -221,15 +221,8 @@ no_dcbz32_off:
221 mflr r5 221 mflr r5
222 std r5, VCPU_LR(r7) 222 std r5, VCPU_LR(r7)
223 223
224 /* XXX convert to safe function call */
225
226 /* Restore host msr -> SRR1 */ 224 /* Restore host msr -> SRR1 */
227 ld r6, VCPU_HOST_MSR(r7) 225 ld r6, VCPU_HOST_MSR(r7)
228 mtsrr1 r6
229
230 /* Restore host IP -> SRR0 */
231 ld r5, VCPU_HOST_RETIP(r7)
232 mtsrr0 r5
233 226
234 /* 227 /*
235 * For some interrupts, we need to call the real Linux 228 * For some interrupts, we need to call the real Linux
@@ -246,8 +239,9 @@ no_dcbz32_off:
246 cmpwi r12, BOOK3S_INTERRUPT_DECREMENTER 239 cmpwi r12, BOOK3S_INTERRUPT_DECREMENTER
247 beq call_linux_handler 240 beq call_linux_handler
248 241
249 /* Back to Interruptable Mode! (goto kvm_return_point) */ 242 /* Back to EE=1 */
250 RFI 243 mtmsr r6
244 b kvm_return_point
251 245
252call_linux_handler: 246call_linux_handler:
253 247
@@ -260,10 +254,16 @@ call_linux_handler:
260 * interrupt handler! 254 * interrupt handler!
261 * 255 *
262 * R3 still contains the exit code, 256 * R3 still contains the exit code,
263 * R6 VCPU_HOST_RETIP and 257 * R5 VCPU_HOST_RETIP and
264 * R7 VCPU_HOST_MSR 258 * R6 VCPU_HOST_MSR
265 */ 259 */
266 260
261 /* Restore host IP -> SRR0 */
262 ld r5, VCPU_HOST_RETIP(r7)
263
264 /* XXX Better move to a safe function?
265 * What if we get an HTAB flush in between mtsrr0 and mtsrr1? */
266
267 mtlr r12 267 mtlr r12
268 268
269 ld r4, VCPU_TRAMPOLINE_LOWMEM(r7) 269 ld r4, VCPU_TRAMPOLINE_LOWMEM(r7)