public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kvm: ppc: booke: Restore SPRG3 when entering guest
@ 2014-07-16  6:02 Bharat Bhushan
  2014-07-17 16:10 ` Alexander Graf
  0 siblings, 1 reply; 16+ messages in thread
From: Bharat Bhushan @ 2014-07-16  6:02 UTC (permalink / raw)
  To: agraf, kvm-ppc; +Cc: kvm, scottwood, stuart.yoder, Bharat Bhushan

SPRG3 is guest accessible and SPRG3 can be clobbered by host
or another guest, So this need to be restored when loading
guest state.

Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
---
 arch/powerpc/kvm/booke_interrupts.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/powerpc/kvm/booke_interrupts.S b/arch/powerpc/kvm/booke_interrupts.S
index 2c6deb5ef..0d3403f 100644
--- a/arch/powerpc/kvm/booke_interrupts.S
+++ b/arch/powerpc/kvm/booke_interrupts.S
@@ -459,6 +459,8 @@ lightweight_exit:
 	 * written directly to the shared area, so we
 	 * need to reload them here with the guest's values.
 	 */
+	PPC_LD(r3, VCPU_SHARED_SPRG3, r5)
+	mtspr	SPRN_SPRG3, r3
 	PPC_LD(r3, VCPU_SHARED_SPRG4, r5)
 	mtspr	SPRN_SPRG4W, r3
 	PPC_LD(r3, VCPU_SHARED_SPRG5, r5)
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-07-18 14:01 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-16  6:02 [PATCH] kvm: ppc: booke: Restore SPRG3 when entering guest Bharat Bhushan
2014-07-17 16:10 ` Alexander Graf
2014-07-17 16:24   ` Bharat.Bhushan
2014-07-17 16:27     ` Alexander Graf
2014-07-17 16:29       ` Alexander Graf
2014-07-18  0:28         ` Scott Wood
2014-07-18  0:33           ` Alexander Graf
2014-07-18  0:36             ` Scott Wood
2014-07-18  0:37               ` Alexander Graf
2014-07-18  0:49                 ` Scott Wood
2014-07-18  9:57                   ` Bharat.Bhushan
2014-07-18 10:55                     ` Alexander Graf
2014-07-18 13:42                       ` Bharat.Bhushan
2014-07-18 14:01                       ` Bharat.Bhushan
2014-07-18 11:14                   ` Alexander Graf
2014-07-17 16:32       ` Bharat.Bhushan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox