KVM: PPC: bookehv: fix exit timing
authorAlexander Graf <agraf@suse.de>
Thu, 16 Feb 2012 14:34:55 +0000 (14:34 +0000)
committerAvi Kivity <avi@redhat.com>
Sun, 8 Apr 2012 09:55:08 +0000 (12:55 +0300)
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>
arch/powerpc/kvm/bookehv_interrupts.S

index e9e7350579393f0f43662933ca37146dc4ec0dd2..e4a117263357155f3b20143f91513a45ac52af3a 100644 (file)
        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
        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)