]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Remove extraneous guest entry on mmio read
authorAvi Kivity <avi@qumranet.com>
Wed, 14 Mar 2007 13:54:54 +0000 (15:54 +0200)
committerAvi Kivity <avi@qumranet.com>
Thu, 3 May 2007 07:52:32 +0000 (10:52 +0300)
commit36b15b847a4a73c633ccea02bcfb55c009aee566
tree76a19e32d603dcc0936313fbb9e5a1de759a159d
parentaea211009dcf5ecc6a8ebd072bb556cbd7848f83
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>
drivers/kvm/kvm.h
drivers/kvm/kvm_main.c