KVM: emulator: do not needlesly sync registers from emulator ctxt to vcpu
authorGleb Natapov <gleb@redhat.com>
Thu, 31 Mar 2011 10:06:41 +0000 (12:06 +0200)
committerAvi Kivity <avi@redhat.com>
Wed, 11 May 2011 11:57:08 +0000 (07:57 -0400)
commit7ae441eac521b2006c9f03c4f2a23582c07fd76d
treede57202d5fefed3a7bff36c8ac688bd1fc86f5b8
parent618ff15de19109af126b33d90d7eaec27e61c691
KVM: emulator: do not needlesly sync registers from emulator ctxt to vcpu

Currently we sync registers back and forth before/after exiting
to userspace for IO, but during IO device model shouldn't need to
read/write the registers, so we can as well skip those sync points. The
only exaception is broken vmware backdor interface. The new code sync
registers content during IO only if registers are read from/written to
by userspace in the middle of the IO operation and this almost never
happens in practise.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c