KVM: Fix x86 emulator writeback
authorLuca Tettamanti <kronos.it@gmail.com>
Tue, 19 Jun 2007 20:41:20 +0000 (22:41 +0200)
committerAvi Kivity <avi@qumranet.com>
Mon, 16 Jul 2007 09:05:48 +0000 (12:05 +0300)
commit02c03a326a5df825cc01de426f72e160db2b9538
tree6b6e765fbe03832a7fd68c4c28e7f105875d40ed
parent74906345ff9f84f2b3b772d368c7e49f4ba27456
KVM: Fix x86 emulator writeback

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: Luca Tettamanti <kronos.it@gmail.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/x86_emulate.c