Skip to contentSkip to conversation

KVM: x86 emulator: fix debug reg mov instructions

PATCH RESEND New Avi Kivity 1 participant 1 message Aug 5, 2007 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH RESEND 1/1 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 emulation).

drivers/kvm/x86_emulate.c +2 -0
index 1f979cb..4b8a0cc 100644
@@ -1217,11 +1217,13 @@ twobyte_insn:
 		}
 		break;
 	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]);
 		break;
 	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]);

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/