diff options
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 | ||||
-rw-r--r-- | drivers/kvm/svm.c | 1 | ||||
-rw-r--r-- | drivers/kvm/vmx.c | 1 |
3 files changed, 1 insertions, 3 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index fc63de25d9b0..193197fb399e 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -1276,6 +1276,7 @@ int emulate_instruction(struct kvm_vcpu *vcpu, | |||
1276 | r = x86_emulate_memop(&emulate_ctxt, &emulate_ops); | 1276 | r = x86_emulate_memop(&emulate_ctxt, &emulate_ops); |
1277 | 1277 | ||
1278 | if ((r || vcpu->mmio_is_write) && run) { | 1278 | if ((r || vcpu->mmio_is_write) && run) { |
1279 | run->exit_reason = KVM_EXIT_MMIO; | ||
1279 | run->mmio.phys_addr = vcpu->mmio_phys_addr; | 1280 | run->mmio.phys_addr = vcpu->mmio_phys_addr; |
1280 | memcpy(run->mmio.data, vcpu->mmio_data, 8); | 1281 | memcpy(run->mmio.data, vcpu->mmio_data, 8); |
1281 | run->mmio.len = vcpu->mmio_size; | 1282 | run->mmio.len = vcpu->mmio_size; |
@@ -1937,7 +1938,6 @@ static int kvm_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
1937 | /* | 1938 | /* |
1938 | * Read-modify-write. Back to userspace. | 1939 | * Read-modify-write. Back to userspace. |
1939 | */ | 1940 | */ |
1940 | kvm_run->exit_reason = KVM_EXIT_MMIO; | ||
1941 | r = 0; | 1941 | r = 0; |
1942 | goto out; | 1942 | goto out; |
1943 | } | 1943 | } |
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 5c058fa1c8ad..850a1b1d86c5 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c | |||
@@ -928,7 +928,6 @@ static int pf_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
928 | return 1; | 928 | return 1; |
929 | case EMULATE_DO_MMIO: | 929 | case EMULATE_DO_MMIO: |
930 | ++vcpu->stat.mmio_exits; | 930 | ++vcpu->stat.mmio_exits; |
931 | kvm_run->exit_reason = KVM_EXIT_MMIO; | ||
932 | return 0; | 931 | return 0; |
933 | case EMULATE_FAIL: | 932 | case EMULATE_FAIL: |
934 | vcpu_printf(vcpu, "%s: emulate fail\n", __FUNCTION__); | 933 | vcpu_printf(vcpu, "%s: emulate fail\n", __FUNCTION__); |
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index f3e78187e892..2c4f01bea1fb 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c | |||
@@ -1610,7 +1610,6 @@ static int handle_exception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
1610 | return 1; | 1610 | return 1; |
1611 | case EMULATE_DO_MMIO: | 1611 | case EMULATE_DO_MMIO: |
1612 | ++vcpu->stat.mmio_exits; | 1612 | ++vcpu->stat.mmio_exits; |
1613 | kvm_run->exit_reason = KVM_EXIT_MMIO; | ||
1614 | return 0; | 1613 | return 0; |
1615 | case EMULATE_FAIL: | 1614 | case EMULATE_FAIL: |
1616 | vcpu_printf(vcpu, "%s: emulate fail\n", __FUNCTION__); | 1615 | vcpu_printf(vcpu, "%s: emulate fail\n", __FUNCTION__); |