summaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorAvi Kivity2007-03-14 14:54:54 +0100
committerAvi Kivity2007-05-03 09:52:32 +0200
commite7df56e4a00358b6975fae3b70dc9df1282d427a (patch)
tree76a19e32d603dcc0936313fbb9e5a1de759a159d /drivers/kvm/kvm.h
parentKVM: SVM: Only save/restore MSRs when needed (diff)
downloadkernel-qcow2-linux-e7df56e4a00358b6975fae3b70dc9df1282d427a.tar.gz
kernel-qcow2-linux-e7df56e4a00358b6975fae3b70dc9df1282d427a.tar.xz
kernel-qcow2-linux-e7df56e4a00358b6975fae3b70dc9df1282d427a.zip
KVM: Remove extraneous guest entry on mmio read
When emulating an mmio read, we actually emulate twice: once to determine the physical address of the mmio, and, after we've exited to userspace to get the mmio value, we emulate again to place the value in the result register and update any flags. But we don't really need to enter the guest again for that, only to take an immediate vmexit. So, if we detect that we're doing an mmio read, emulate a single instruction before entering the guest again. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index f99e89e185b2..41634fde8e13 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -310,6 +310,7 @@ struct kvm_vcpu {
int mmio_size;
unsigned char mmio_data[8];
gpa_t mmio_phys_addr;
+ gva_t mmio_fault_cr2;
struct kvm_pio_request pio;
void *pio_data;