All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: booke: Use the lower four bytes while restoring guest readable SPRGs.
@ 2012-04-04 10:48 b16395
  0 siblings, 0 replies; only message in thread
From: b16395 @ 2012-04-04 10:48 UTC (permalink / raw)
  To: kvm-ppc

From: Varun Sethi <Varun.Sethi@freescale.com>

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 <Varun.Sethi@freescale.com>
---
 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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-04 10:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-04 10:48 [PATCH] KVM: PPC: booke: Use the lower four bytes while restoring guest readable SPRGs b16395

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.