add the last vmexit cs & eip in the debugfs data
PATCH 1/1 add the last vmexit cs & eip in the debugfs data
Hi Avi,
Attached is a small patch to let user land know where the guest was
at last vmexit. I am using this to debug the big real mode guests. I think this will be useful to more people.
Author: Nitin A Kamble <[email protected]>
Thanks & Regards,
Nitin
Open Source Technology Center, Intel Corporation.
-------------------------------------------------------------------------
The mind is like a parachute; it works much better when it's open.
drivers/kvm/kvm.h +2 -0
@@ -255,6 +255,8 @@ struct kvm_stat {u32 irq_exits;u32 light_exits;u32 efer_reload; +u32 last_exit_cs_base; +u64 last_exit_eip; };struct kvm_vcpu {
drivers/kvm/kvm_main.c +2 -0
@@ -73,6 +73,8 @@ static struct kvm_stats_debugfs_item { { "irq_exits", STAT_OFFSET(irq_exits) }, { "light_exits", STAT_OFFSET(light_exits) }, { "efer_reload", STAT_OFFSET(efer_reload) }, + { "last_exit_cs_base", STAT_OFFSET(last_exit_cs_base) }, + { "last_exit_eip", STAT_OFFSET(last_exit_eip) }, { NULL } };
drivers/kvm/vmx.c +2 -0
@@ -1941,6 +1941,8 @@ static int kvm_handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) {u32 vectoring_info =vmcs_read32 (IDT_VECTORING_INFO_FIELD );u32 exit_reason =vmcs_read32 (VM_EXIT_REASON ); + vcpu->stat.last_exit_cs_base =vmcs_read32 (GUEST_CS_BASE ); + vcpu->stat.last_exit_eip =vmcs_read64 (GUEST_RIP );if ( (vectoring_info &VECTORING_INFO_VALID_MASK ) && exit_reason !=EXIT_REASON_EXCEPTION_NMI )
-------------------------------------------------------------------------
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