diff options
author | Alexander Graf <agraf@suse.de> | 2012-10-06 03:56:35 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-01-03 03:32:59 +0000 |
commit | b2b7d3370d2b9ed53c9f8f9e77ae1b017cb8dd4b (patch) | |
tree | de7a512da8b2732b2248443e116a6d67d91873fd | |
parent | 247a0b330ef3bb2e642d4bec5c04aee589733a4a (diff) | |
download | linux-stable-b2b7d3370d2b9ed53c9f8f9e77ae1b017cb8dd4b.tar.gz linux-stable-b2b7d3370d2b9ed53c9f8f9e77ae1b017cb8dd4b.tar.bz2 linux-stable-b2b7d3370d2b9ed53c9f8f9e77ae1b017cb8dd4b.zip |
KVM: PPC: 44x: fix DCR read/write
commit e43a028752fed049e4bd94ef895542f96d79fa74 upstream.
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>
[bwh: Backported to 3.2: adjust context, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | arch/powerpc/kvm/44x_emulate.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/44x_emulate.c b/arch/powerpc/kvm/44x_emulate.c index 549bb2c9a47a..ded8a1a04264 100644 --- a/arch/powerpc/kvm/44x_emulate.c +++ b/arch/powerpc/kvm/44x_emulate.c @@ -79,6 +79,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, run->dcr.dcrn = dcrn; run->dcr.data = 0; run->dcr.is_write = 0; + vcpu->arch.dcr_is_write = 0; vcpu->arch.io_gpr = rt; vcpu->arch.dcr_needed = 1; kvmppc_account_exit(vcpu, DCR_EXITS); @@ -100,6 +101,7 @@ int kvmppc_core_emulate_op(struct kvm_run *run, struct kvm_vcpu *vcpu, run->dcr.dcrn = dcrn; run->dcr.data = kvmppc_get_gpr(vcpu, rs); run->dcr.is_write = 1; + vcpu->arch.dcr_is_write = 1; vcpu->arch.dcr_needed = 1; kvmppc_account_exit(vcpu, DCR_EXITS); emulated = EMULATE_DO_DCR; |