From: Aurelien Jarno Date: Wed, 25 Jul 2007 08:19:54 +0000 (+0200) Subject: KVM: disable writeback for 0x0f 0x01 instructions. X-Git-Tag: MMI-PSA29.97-13-9~41160^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d37c85571904a622cbabc7a2e04b8c919de75ac0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git KVM: disable writeback for 0x0f 0x01 instructions. 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 Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 1b800fc00342..1f979cb0df31 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c @@ -1178,6 +1178,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;