While restoring the hardware copies of guest SPRG4-7 registers we must use the
the lower 4 bytes of the 64 bit sotware copies maintained by KVM.

Signed-off-by: Varun Sethi <[email protected]>
---
 arch/powerpc/kvm/booke_interrupts.S |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kvm/booke_interrupts.S 
b/arch/powerpc/kvm/booke_interrupts.S
index c8c4b87..feda1bb 100644
--- a/arch/powerpc/kvm/booke_interrupts.S
+++ b/arch/powerpc/kvm/booke_interrupts.S
@@ -419,13 +419,13 @@ lightweight_exit:
         * written directly to the shared area, so we
         * need to reload them here with the guest's values.
         */
-       lwz     r3, VCPU_SHARED_SPRG4(r5)
+       lwz     r3, (VCPU_SHARED_SPRG4 + 4)(r5)
        mtspr   SPRN_SPRG4W, r3
-       lwz     r3, VCPU_SHARED_SPRG5(r5)
+       lwz     r3, (VCPU_SHARED_SPRG5 + 4)(r5)
        mtspr   SPRN_SPRG5W, r3
-       lwz     r3, VCPU_SHARED_SPRG6(r5)
+       lwz     r3, (VCPU_SHARED_SPRG6 + 4)(r5)
        mtspr   SPRN_SPRG6W, r3
-       lwz     r3, VCPU_SHARED_SPRG7(r5)
+       lwz     r3, (VCPU_SHARED_SPRG7 + 4)(r5)
        mtspr   SPRN_SPRG7W, r3
 
 #ifdef CONFIG_KVM_EXIT_TIMING
-- 
1.7.2.2


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to