[lkml]   [2007]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] KVM: x86 emulator: fix debug reg mov instructions
More fallout from the writeback fixes: debug register transfer instructions
do their own writeback and thus need to disable the general writeback
mechanism. This fixes oopses and some guest failures on AMD machines (the
Intel variant decodes the instruction in hardware and thus does not need

Cc: Alistair John Strachan <>
Signed-off-by: Avi Kivity <>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 1f979cb..4b8a0cc 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1217,11 +1217,13 @@ twobyte_insn:
case 0x21: /* mov from dr to reg */
+ no_wb = 1;
if (modrm_mod != 3)
goto cannot_emulate;
rc = emulator_get_dr(ctxt, modrm_reg, &_regs[modrm_rm]);
case 0x23: /* mov from reg to dr */
+ no_wb = 1;
if (modrm_mod != 3)
goto cannot_emulate;
rc = emulator_set_dr(ctxt, modrm_reg, _regs[modrm_rm]);
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2007-07-31 09:53    [W:0.082 / U:1.700 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site