diff options
author | Alexander Graf <agraf@suse.de> | 2012-10-06 03:56:35 +0200 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-10-30 10:54:50 +0100 |
commit | e43a028752fed049e4bd94ef895542f96d79fa74 (patch) | |
tree | 718d76db085d79f482722b158eb8fa05f1dd9444 | |
parent | 8ca40a70a70988c0bdea106c894843f763ca2989 (diff) | |
download | linux-3.10-e43a028752fed049e4bd94ef895542f96d79fa74.tar.gz linux-3.10-e43a028752fed049e4bd94ef895542f96d79fa74.tar.bz2 linux-3.10-e43a028752fed049e4bd94ef895542f96d79fa74.zip |
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
-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 1a793c4c4a6..35ec0a8547d 100644 --- a/arch/powerpc/kvm/44x_emulate.c +++ b/arch/powerpc/kvm/44x_emulate.c @@ -46,6 +46,7 @@ static int emulate_mtdcr(struct kvm_vcpu *vcpu, int rs, int dcrn) vcpu->run->dcr.dcrn = dcrn; vcpu->run->dcr.data = kvmppc_get_gpr(vcpu, rs); vcpu->run->dcr.is_write = 1; + vcpu->arch.dcr_is_write = 1; vcpu->arch.dcr_needed = 1; kvmppc_account_exit(vcpu, DCR_EXITS); return EMULATE_DO_DCR; @@ -80,6 +81,7 @@ static int emulate_mfdcr(struct kvm_vcpu *vcpu, int rt, int dcrn) vcpu->run->dcr.dcrn = dcrn; vcpu->run->dcr.data = 0; vcpu->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); |