• Laurent Vivier's avatar
    KVM: Cleanup string I/O instruction emulation · e70669ab
    Laurent Vivier authored
    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: default avatarLaurent Vivier <Laurent.Vivier@bull.net>
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    e70669ab
x86_emulate.c 39.3 KB