Skip to contentSkip to conversation

KVM: PPC: booke: Use the lower four bytes while restoring guest readable SPRGs.

PATCH New [email protected] 1 participant 1 message Apr 4, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PPC: booke: Use the lower four bytes while restoring guest readable SPRGs.

From: Varun Sethi <[email protected]>

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.

---
 arch/powerpc/kvm/booke_interrupts.S |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/kvm/booke_interrupts.S +4 -4
index c8c4b87..feda1bb 100644
@@ -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
Signature · 1 line
1.7.2.2