Skip to contentSkip to conversation

emit more information on the emulation failure

PATCH In review Kamble, Nitin A 2 participants 2 messages Jun 18, 2007 – Jun 19, 2007 1 message not in the archive KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 emit more information on the emulation failure

Hi Avi,

Attached is a small patch to emit little bit more information when emulcation reaches cannot_emulate:.

The patch looks fine to the scripts/checkpatch.pl. It show not look to you in the DOS format, unless something in between us is changing the format of the attachment.

Please comment/apply.

Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation.
-------------------------------------------------------------------------
The mind is like a parachute; it works much better when it's open.

commit 4e368156a9d2e613b50278c73b12a84dda7adcd1

Author: Nitin A Kamble <[email protected]>
Date:   Mon Jun 18 19:18:55 2007 -0700

Printing more details when the x86 emulator fails to emulate.

drivers/kvm/x86_emulate.c +2 -1
index a4a8481..59511c6 100644
@@ -1350,7 +1350,8 @@ twobyte_special_insn:
 	goto writeback;
 
 cannot_emulate:
-	DPRINTF("Cannot emulate %02x\n", b);
+	DPRINTF("Cannot emulate %02x at 0x%lx:0x%lx\n",
+			b, ctxt->cs_base, ctxt->vcpi->rip);
 	return -1;
 }
 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel

#2 lore raw
In reply to a message not in the archive
Quoted 12 lines · Nitin A

Hi Avi,

Attached is a small patch to emit little bit more information when emulcation reaches cannot_emulate:.

The patch looks fine to the scripts/checkpatch.pl. It show not look to you in the DOS format, unless something in between us is changing the format of the attachment.

drivers/kvm/x86_emulate.c twobyte_special_insn: · line 1356

Quoted 8 lines
drivers/kvm/x86_emulate.c +2 -1
@@ -1350,7 +1350,8 @@ twobyte_special_insn:
 	goto writeback;
 
 cannot_emulate:
-	DPRINTF("Cannot emulate %02x\n", b);
+	DPRINTF("Cannot emulate %02x at 0x%lx:0x%lx\n",
+			b, ctxt->cs_base, ctxt->vcpi->rip);
 	return -1;
 }

How can this compile? I think you need to replace ctxt->vcpi by ctxt->vcpu.

Signature · 8 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/