• Luca Tettamanti's avatar
    KVM: Fix x86 emulator writeback · 02c03a32
    Luca Tettamanti authored
    When the old value and new one are the same the emulator skips the
    write; this is undesirable when the destination is a MMIO area and the
    write shall be performed regardless of the previous value. This
    optimization breaks e.g. a Linux guest APIC compiled without
    X86_GOOD_APIC.
    
    Remove the check and perform the writeback stage in the emulation unless
    it's explicitly disabled (currently push and some 2 bytes instructions
    may disable the writeback).
    Signed-Off-By: default avatarLuca Tettamanti <kronos.it@gmail.com>
    Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
    02c03a32
x86_emulate.c 37.2 KB