Commit cfc860253abd73e1681696c08ea268d33285a2c4

Authored by Paul Mackerras
Committed by Paolo Bonzini
1 parent d0d538b9d1

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.

Cc: stable@vger.kernel.org [v3.1+]
Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

arch/powerpc/kvm/book3s_hv_rmhandlers.S
... ... @@ -1066,7 +1066,7 @@
1066 1066 BEGIN_FTR_SECTION
1067 1067 mfspr r8, SPRN_DSCR
1068 1068 ld r7, HSTATE_DSCR(r13)
1069   - std r8, VCPU_DSCR(r7)
  1069 + std r8, VCPU_DSCR(r9)
1070 1070 mtspr SPRN_DSCR, r7
1071 1071 END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206)
1072 1072