]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86 emulator: fix in/out emulation.
authorGleb Natapov <gleb@redhat.com>
Thu, 18 Mar 2010 13:20:23 +0000 (15:20 +0200)
committerAvi Kivity <avi@redhat.com>
Mon, 17 May 2010 09:16:25 +0000 (12:16 +0300)
commit17b6f25ebd93287ad270c38a56829e1b4641e0d5
treed646456d773a887ca592d174b3d45a57d2779d85
parent740311f3e53dfb544fa33e92ddd74f763795163d
KVM: x86 emulator: fix in/out emulation.

in/out emulation is broken now. The breakage is different depending
on where IO device resides. If it is in userspace emulator reports
emulation failure since it incorrectly interprets kvm_emulate_pio()
return value. If IO device is in the kernel emulation of 'in' will do
nothing since kvm_emulate_pio() stores result directly into vcpu
registers, so emulator will overwrite result of emulation during
commit of shadowed register.

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