All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: Book3S HV: Fix typo in saving DSCR
@ 2013-09-20 23:53 ` Paul Mackerras
  0 siblings, 0 replies; 6+ messages in thread
From: Paul Mackerras @ 2013-09-20 23:53 UTC (permalink / raw)
  To: Alexander Graf, kvm; +Cc: kvm-ppc

This fixes a typo in the code that saves the guest DSCR (Data Stream
Control Register) into the kvm_vcpu_arch struct on guest exit.  The
effect of the typo was that the DSCR value was saved in the wrong place,
so changes to the DSCR by the guest didn't persist across guest exit
and entry, and some host kernel memory got corrupted.

Cc: stable@vger.kernel.org [v3.1+]
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
Please send this upstream to Linus for inclusion in 3.12.

 arch/powerpc/kvm/book3s_hv_rmhandlers.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index 8e0f28f..852e694 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1190,7 +1190,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
 BEGIN_FTR_SECTION
 	mfspr	r8, SPRN_DSCR
 	ld	r7, HSTATE_DSCR(r13)
-	std	r8, VCPU_DSCR(r7)
+	std	r8, VCPU_DSCR(r9)
 	mtspr	SPRN_DSCR, r7
 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
 
-- 
1.8.4.rc3


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

end of thread, other threads:[~2013-10-07 12:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 23:53 [PATCH] KVM: PPC: Book3S HV: Fix typo in saving DSCR Paul Mackerras
2013-09-20 23:53 ` Paul Mackerras
2013-10-04 13:10 ` Alexander Graf
2013-10-04 13:10   ` Alexander Graf
2013-10-07 12:07   ` Paolo Bonzini
2013-10-07 12:07     ` Paolo Bonzini

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.