diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2007-07-25 04:19:54 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-07-25 07:31:27 -0400 |
commit | d37c85571904a622cbabc7a2e04b8c919de75ac0 (patch) | |
tree | 460694be89be0bfa0049a23c842e0cb3edcf6eca /drivers/kvm/x86_emulate.c | |
parent | 4c981b43d7ec18818754bf85b829865abd0ce340 (diff) |
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 <aurelien@aurel32.net>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/x86_emulate.c')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 2 |
1 files changed, 2 insertions, 0 deletions
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: | |||
1178 | twobyte_insn: | 1178 | twobyte_insn: |
1179 | switch (b) { | 1179 | switch (b) { |
1180 | case 0x01: /* lgdt, lidt, lmsw */ | 1180 | case 0x01: /* lgdt, lidt, lmsw */ |
1181 | /* Disable writeback. */ | ||
1182 | no_wb = 1; | ||
1181 | switch (modrm_reg) { | 1183 | switch (modrm_reg) { |
1182 | u16 size; | 1184 | u16 size; |
1183 | unsigned long address; | 1185 | unsigned long address; |