Patchwork kvm/ppc: don't call complete_mmio_load when it's a store

login
register
mail settings
Submitter Scott Wood
Date April 16, 2013, 1:07 a.m.
Message ID <1366074431-13992-1-git-send-email-scottwood@freescale.com>
Download mbox | patch
Permalink /patch/236815/
State New
Headers show

Comments

Scott Wood - April 16, 2013, 1:07 a.m.
complete_mmio_load writes back the mmio result into the
destination register.  Doing this on a store results in
register corruption.

Signed-off-by: Scott Wood <scottwood@freescale.com>
---
 arch/powerpc/kvm/powerpc.c |    1 -
 1 file changed, 1 deletion(-)
Alexander Graf - April 16, 2013, 3:54 p.m.
On 16.04.2013, at 03:07, Scott Wood wrote:

> complete_mmio_load writes back the mmio result into the
> destination register.  Doing this on a store results in
> register corruption.
> 
> Signed-off-by: Scott Wood <scottwood@freescale.com>

Thanks, applied to kvm-ppc-queue. Since nobody really is using in-kernel devices yet I don't think we need to rush this into the next stable kernel release.


Alex

> ---
> arch/powerpc/kvm/powerpc.c |    1 -
> 1 file changed, 1 deletion(-)
> 
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 16b4595..a822659 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -683,7 +683,6 @@ int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu,
> 
> 	if (!kvm_io_bus_write(vcpu->kvm, KVM_MMIO_BUS, run->mmio.phys_addr,
> 			      bytes, &run->mmio.data)) {
> -		kvmppc_complete_mmio_load(vcpu, run);
> 		vcpu->mmio_needed = 0;
> 		return EMULATE_DONE;
> 	}
> -- 
> 1.7.10.4
> 
> 

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 16b4595..a822659 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -683,7 +683,6 @@  int kvmppc_handle_store(struct kvm_run *run, struct kvm_vcpu *vcpu,
 
 	if (!kvm_io_bus_write(vcpu->kvm, KVM_MMIO_BUS, run->mmio.phys_addr,
 			      bytes, &run->mmio.data)) {
-		kvmppc_complete_mmio_load(vcpu, run);
 		vcpu->mmio_needed = 0;
 		return EMULATE_DONE;
 	}