]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
KVM: disable writeback for 0x0f 0x01 instructions.
authorAurelien Jarno <aurelien@aurel32.net>
Wed, 25 Jul 2007 08:19:54 +0000 (10:19 +0200)
committerAvi Kivity <avi@qumranet.com>
Wed, 25 Jul 2007 08:26:13 +0000 (11:26 +0300)
0x0f 0x01 instructions (ie lgdt, lidt, smsw, lmsw and invlpg) does
not use writeback. This patch set no_wb=1 when emulating those
instructions.

This fixes a regression booting the FreeBSD kernel on AMD.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/x86_emulate.c

index 21ce977899371c310fe01855c6a7092b2e0816b3..cbbb9c5cfc86fe3e84ea78d8bffff62861b2eb15 100644 (file)
@@ -1183,6 +1183,8 @@ pop_instruction:
 twobyte_insn:
        switch (b) {
        case 0x01: /* lgdt, lidt, lmsw */
+               /* Disable writeback. */
+               no_wb = 1;
                switch (modrm_reg) {
                        u16 size;
                        unsigned long address;