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>
Showing
- arch/x86/include/asm/kvm_emulate.h 7 additions, 0 deletionsarch/x86/include/asm/kvm_emulate.h
- arch/x86/include/asm/kvm_host.h 1 addition, 2 deletionsarch/x86/include/asm/kvm_host.h
- arch/x86/kvm/emulate.c 24 additions, 26 deletionsarch/x86/kvm/emulate.c
- arch/x86/kvm/svm.c 7 additions, 13 deletionsarch/x86/kvm/svm.c
- arch/x86/kvm/vmx.c 8 additions, 10 deletionsarch/x86/kvm/vmx.c
- arch/x86/kvm/x86.c 131 additions, 82 deletionsarch/x86/kvm/x86.c
Loading
Please register or sign in to comment