KVM: PPC: Book3S HV: Fix typo in saving DSCR
Subsystems (3)
PATCH 1/1 KVM: PPC: Book3S HV: Fix typo in saving DSCR
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.
---
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(-)
arch/powerpc/kvm/book3s_hv_rmhandlers.S +1 -1
@@ -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)
Signature · 1 line
1.8.4.rc3
Quoted 8 lines · Paul Mackerras
This fixes a typo in the code that saves the guest DSCR (Data Stream Control Register) into the
kvm_vcpu_archstruct 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 [email protected] [v3.1+]Signed-off-by Paul Mackerras <[email protected]>
Gleb, Paolo, can you please queue this directly?
Alex
Quoted 22 lines
---
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(-)arch/powerpc/kvm/book3s_hv_rmhandlers.S +0
-0@@ -1190,7 +1190,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
BEGIN_FTR_SECTIONmfspr r8, SPRN_DSCR ld r7, HSTATE_DSCR(r13)arch/powerpc/kvm/book3s_hv_rmhandlers.S +1
-1- std r8, VCPU_DSCR(r7) + std r8, VCPU_DSCR(r9)mtspr
SPRN_DSCR, r7END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)Signature · 1 line
1.8.4.rc3
Paolo Bonzini
maintainerIl 04/10/2013 15:10, Alexander Graf ha scritto:
Quoted 9 lines · Paul Mackerras
Quoted 7 lines
This fixes a typo in the code that saves the guest DSCR (Data Stream Control Register) into the
kvm_vcpu_archstruct 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.
Quoted 6 lines
Quoted 2 lines
Cc [email protected] [v3.1+]Signed-off-by Paul Mackerras <[email protected]>Acked-by Alexander Graf <[email protected]>Gleb, Paolo, can you please queue this directly?
Sure. I'll wait for feedback on the other patch though.
Paolo