summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-02-16 15:34:55 +0100
committerAvi Kivity <avi@redhat.com>2012-04-08 11:55:08 +0200
commit73ede8d32be6adc298fe3c2716e77c352c504c8c (patch)
treebcdb5c6a80d11cc63715deef86866bc006756f6c /arch/powerpc/kvm
parentKVM: PPC: booke: BOOKE_IRQPRIO_MAX is n+1 (diff)
downloadlinux-73ede8d32be6adc298fe3c2716e77c352c504c8c.tar.xz
linux-73ede8d32be6adc298fe3c2716e77c352c504c8c.zip
KVM: PPC: bookehv: fix exit timing
When using exit timing stats, we clobber r9 in the NEED_EMU case, so better move that part down a few lines and fix it that way. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r--arch/powerpc/kvm/bookehv_interrupts.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/kvm/bookehv_interrupts.S b/arch/powerpc/kvm/bookehv_interrupts.S
index e9e735057939..e4a117263357 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
@@ -83,10 +83,6 @@
stw r10, VCPU_GUEST_PID(r4)
mtspr SPRN_PID, r8
- .if \flags & NEED_EMU
- lwz r9, VCPU_KVM(r4)
- .endif
-
#ifdef CONFIG_KVM_EXIT_TIMING
/* save exit time */
1: mfspr r7, SPRN_TBRU
@@ -98,6 +94,10 @@
PPC_STL r9, VCPU_TIMING_EXIT_TBU(r4)
#endif
+ .if \flags & NEED_EMU
+ lwz r9, VCPU_KVM(r4)
+ .endif
+
oris r8, r6, MSR_CE@h
#ifndef CONFIG_64BIT
stw r6, (VCPU_SHARED_MSR + 4)(r11)