aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-03-18 09:20:23 -0400
committerAvi Kivity <avi@redhat.com>2010-05-17 05:16:25 -0400
commitcf8f70bfe38b326bb80b10f76d6544f571040229 (patch)
treed646456d773a887ca592d174b3d45a57d2779d85 /arch/x86/include/asm/kvm_host.h
parentd9271123a46011af26da680baeb7fdf67b498abf (diff)
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>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r--arch/x86/include/asm/kvm_host.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index b99cec1547c..776d3e202b5 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -590,8 +590,7 @@ int kvm_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data);
590 590
591struct x86_emulate_ctxt; 591struct x86_emulate_ctxt;
592 592
593int kvm_emulate_pio(struct kvm_vcpu *vcpu, int in, 593int kvm_fast_pio_out(struct kvm_vcpu *vcpu, int size, unsigned short port);
594 int size, unsigned port);
595int kvm_emulate_pio_string(struct kvm_vcpu *vcpu, int in, 594int kvm_emulate_pio_string(struct kvm_vcpu *vcpu, int in,
596 int size, unsigned long count, int down, 595 int size, unsigned long count, int down,
597 gva_t address, int rep, unsigned port); 596 gva_t address, int rep, unsigned port);