]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Cleanup string I/O instruction emulation
authorLaurent Vivier <Laurent.Vivier@bull.net>
Sun, 5 Aug 2007 07:36:40 +0000 (10:36 +0300)
committerAvi Kivity <avi@qumranet.com>
Sat, 13 Oct 2007 08:18:23 +0000 (10:18 +0200)
commit9b696d7fb458262d4e1b21a624eadffa6d8935db
tree4625f787efdf5f586514cd6306e045a97edb490e
parent1717effe52b8a832238f6d40dbd85fc608f2ade4
KVM: Cleanup string I/O instruction emulation

Both vmx and svm decode the I/O instructions, and both botch the job,
requiring the instruction prefixes to be fetched in order to completely
decode the instruction.

So, if we see a string I/O instruction, use the x86 emulator to decode it,
as it already has all the prefix decoding machinery.

This patch defines ins/outs opcodes in x86_emulate.c and calls
emulate_instruction() from io_interception() (svm.c) and from handle_io()
(vmx.c).  It removes all vmx/svm prefix instruction decoders
(get_addr_size(), io_get_override(), io_address(), get_io_count())

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c
drivers/kvm/svm.c
drivers/kvm/vmx.c
drivers/kvm/x86_emulate.c