diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-07-17 12:26:59 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-10-13 04:18:19 -0400 |
commit | 8fc0d085f521a2a76418f8f569cf1cd27f0e43d4 (patch) | |
tree | f4820bd9da8c2e1f7059f5709e3ac6097ff218f6 /drivers/kvm/kvm_main.c | |
parent | 9eb829ced8c6f2e43a3a644ddf1279ffeee38a33 (diff) |
KVM: Set exit_reason to KVM_EXIT_MMIO where run->mmio is initialized.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 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 | } |