]> pilppa.com Git - linux-2.6-omap-h63xx.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)
commite70669abd4e60dfea3ac1639848e20e2b8dd1255
tree4625f787efdf5f586514cd6306e045a97edb490e
parent9fdaaac38e8c8a63c6383b807b91fea2d51da95d
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