Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

KVM: PPC: 44x: fix DCR read/write

When remembering the direction of a DCR transaction, we should write
to the same variable that we interpret on later when doing vcpu_run
again.

Signed-off-by: Alexander Graf <agraf@suse.de>
Cc: stable@vger.kernel.org

+2
+2
arch/powerpc/kvm/44x_emulate.c
··· 46 46 vcpu->run->dcr.dcrn = dcrn; 47 47 vcpu->run->dcr.data = kvmppc_get_gpr(vcpu, rs); 48 48 vcpu->run->dcr.is_write = 1; 49 + vcpu->arch.dcr_is_write = 1; 49 50 vcpu->arch.dcr_needed = 1; 50 51 kvmppc_account_exit(vcpu, DCR_EXITS); 51 52 return EMULATE_DO_DCR; ··· 81 80 vcpu->run->dcr.dcrn = dcrn; 82 81 vcpu->run->dcr.data = 0; 83 82 vcpu->run->dcr.is_write = 0; 83 + vcpu->arch.dcr_is_write = 0; 84 84 vcpu->arch.io_gpr = rt; 85 85 vcpu->arch.dcr_needed = 1; 86 86 kvmppc_account_exit(vcpu, DCR_EXITS);