Skip to contentSkip to conversation

x86 emulator: Report unhandlead instructions

PATCH Superseded Mohammed Gamal 1 participant 1 message Aug 19, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86 emulator: Report unhandlead instructions

Report unhandled instructions in the syslog on emulation failure

---
 arch/x86/kvm/emulate.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +2 -1
index cc0fe39..52a4b7d 100644
@@ -2194,6 +2194,7 @@ writeback:
 
 done:
 	if (rc == X86EMUL_UNHANDLEABLE) {
+		kvm_report_emulation_failure(ctxt->vcpu, "unhandled instruction");
 		c->eip = saved_eip;
 		return -1;
 	}
@@ -2467,7 +2468,7 @@ twobyte_insn:
 	goto writeback;
 
 cannot_emulate:
-	DPRINTF("Cannot emulate %02x\n", c->b);
+	kvm_report_emulation_failure(ctxt->vcpu, "unhandled instruction");
 	c->eip = saved_eip;
 	return -1;
 }
Signature · 1 line
1.6.0.4