Software Archive
Read-only legacy content
17060 Discussions

vmx guest debug?

blue_dot
Beginner
1,239 Views
Aftersuccessfully launching a guest, the code does not stop in my guest entry function at "INT 3", function that I supplied into the GUEST RIP field of the VMCS. Does anyone have an idea why this is happening?
Here is a VMCS dump on my Intel Core2 CPU 6300 @1.86Ghz with Windows 7 x64:
(Some of the fields here are not supported by the processor, although i've printed them out as well.
The guest shares resources with the host for now. )
*** Host State ***
HOST_CR0: 0x80050031
HOST_CR3: 0x187000
HOST_CR4: 0x26f8
HOST_RSP: 0xfffffa800420ef50
HOST_RIP: 0xfffff8800485e749
HOST_CS_SELECTOR: 0x10
HOST_DS_SELECTOR: 0x28
HOST_SS_SELECTOR: 0x18
HOST_ES_SELECTOR: 0x28
HOST_FS_SELECTOR: 0x50
HOST_GS_SELECTOR: 0x28
HOST_TR_SELECTOR: 0x40
HOST_FS_BASE: 0xfffffffffffdf000
HOST_GS_BASE: 0x0
HOST_TR_BASE: 0xb96080
HOST_GDTR_BASE: 0xfffff80000b95000
HOST_IDTR_BASE: 0xfffff80000b95080
HOST_SYSENTER_CS: 0x0
HOST_SYSENTER_ESP: 0x0
HOST_SYSENTER_EIP: 0x0
HOST_PERF_GLOBAL_CTRL: 0xfffff88002322b78 // not supported
HOST_PAT: 0xfffff88002322b78// not supported
HOST_EFER: 0xfffff88002322b78// not supported
*** Guest Register State ***
GUEST_CR0: 0x80050031
GUEST_CR3: 0x187000
GUEST_CR4: 0x26f8
GUEST_RSP: 0xfffff88002322b90
GUEST_RIP: 0xfffff8800485e734
GUEST_DR7: 0x400
GUEST_RFLAGS 0x246
GUEST_CS_SELECTOR: 0x10
GUEST_DS_SELECTOR: 0x2b
GUEST_SS_SELECTOR: 0x18
GUEST_ES_SELECTOR: 0x2b
GUEST_FS_SELECTOR: 0x53
GUEST_GS_SELECTOR: 0x2b
GUEST_LDTR_SELECTOR: 0x0
GUEST_TR_SELECTOR: 0x40
GUEST_CS_BASE: 0x0
GUEST_DS_BASE: 0x0
GUEST_SS_BASE: 0x0
GUEST_ES_BASE: 0x0
GUEST_FS_BASE: 0xfffffffffffdf000
GUEST_GS_BASE: 0x0
GUEST_GDTR_BASE: 0xfffff80000b95000
GUEST_LDTR_BASE: 0x0
GUEST_IDTR_BASE: 0xfffff80000b95080
GUEST_TR_BASE: 0xb96080
GUEST_CS_LIMIT: 0x0
GUEST_DS_LIMIT: 0xffffffff
GUEST_SS_LIMIT: 0xffffffff
GUEST_ES_LIMIT: 0xffffffff
GUEST_FS_LIMIT: 0x3c00
GUEST_GS_LIMIT: 0xffffffff
GUEST_GDTR_LIMIT: 0x7f
GUEST_LDTR_LIMIT: 0x0
GUEST_IDTR_LIMIT: 0xfff
GUEST_TR_LIMIT: 0x67
GUEST_CS_AR_BYTES: 0x209b
GUEST_DS_AR_BYTES: 0xcff3
GUEST_SS_AR_BYTES: 0xcf93
GUEST_ES_AR_BYTES: 0xcff3
GUEST_FS_AR_BYTES: 0x40f3
GUEST_GS_AR_BYTES: 0xcff3
GUEST_LDTR_AR_BYTES: 0x10000
GUEST_TR_AR_BYTES: 0x8b
GUEST_IA32_DEBUGCTL: 0x0
GUEST_SYSENTER_CS: 0x0
GUEST_SYSENTER_ESP: 0x0
GUEST_SYSENTER_EIP: 0x0
GUEST_PERF_GLOBAL_CTRL: 0xfffff88002322b78// not supported
GUEST_PAT: 0xfffff88002322b78// not supported
GUEST_EFER: 0xfffff88002322b78// not supported
GUEST_SMBASE: 0x0
*** Guest Non-Register State ***
GUEST_ACTIVITY_STATE: 0x0
GUEST_INTERRUPTIBILITY_INFO: 0x0
GUEST_PENDING_DBG_EXCEPTIONS: 0x0
VMCS_LINK_POINTER: 0xffffffff
VMX_PREEMPTION_TIMER_VALUE: 0x2322b78
GUEST_PDPTR0: 0xfffff88002322b78
GUEST_PDPTR1: 0xfffff88002322b78
GUEST_PDPTR2: 0xfffff88002322b78
GUEST_PDPTR3: 0xfffff88002322b78
*** VM-EXECUTION CONTROL FIELDS ***
CPU_BASED_VM_EXEC_CONTROL: 0x401e172
SECONDARY_VM_EXEC_CONTROL: 0x2322b78
* Exception Bitmap *
EXCEPTION_BITMAP: 0xffffffff
PAGE_FAULT_ERROR_CODE_MASK: 0x0
PAGE_FAULT_ERROR_CODE_MATCH: 0x0
* I/O-Bitmap Addresses *
IO_BITMAP_A: 0x0
IO_BITMAP_B: 0x0
* Time-Stamp Counter Offset *
TSC_OFFSET: 0x0
* Guest/Host Masks and Read Shadows for CR0 and CR4 *
CR0_GUEST_HOST_MASK: 0x0
CR4_GUEST_HOST_MASK: 0x0
CR0_READ_SHADOW: 0x0
CR4_READ_SHADOW: 0x0
* CR3-Target Controls *
CR3_TARGET_VALUE0: 0x0
CR3_TARGET_VALUE1: 0x0
CR3_TARGET_VALUE2: 0x0
CR3_TARGET_VALUE3: 0x0
CR3_TARGET_COUNT: 0x0
* Controls for APIC Accesses *
APIC_ACCESS_ADDR: 0xfffff88002322b78
VIRTUAL_APIC_PAGE_ADDR: 0x0
TPR_THRESHOLD: 0x0
* MSR-Bitmap Address *
MSR_BITMAP: 0x0
* Extended-Page-Table Pointer *
EPT_POINTER: 0xfffff88002322b78
* Virtual-Processor Identifier (VPID) *
VIRTUAL_PROCESSOR_ID: 0x2322b78
* Controls for PAUSE-Loop Exiting *
PLE_GAP: 0x2322b78
PLE_WINDOW: 0x2322b78
*** VM-Exit Controls ***
VM_EXIT_CONTROLS: 0x36fff
VM_EXIT_MSR_STORE_COUNT: 0x0
VM_EXIT_MSR_STORE_ADDR: 0x0
VM_EXIT_MSR_LOAD_COUNT: 0x0
VM_EXIT_MSR_LOAD_ADDR: 0x0
*** VM-Entry Controls ***
VM_ENTRY_CONTROLS: 0x13ff
VM_ENTRY_MSR_LOAD_COUNT: 0x0
VM_ENTRY_MSR_LOAD_ADDR: 0x0
VM_ENTRY_INTR_INFO: 0x0
VM_ENTRY_EXCEPTION_ERROR_CODE: 0x0
VM_ENTRY_INSTRUCTION_LEN: 0x0
*** VM-Exit Information ***
VM_EXIT_REASON: 0x0
EXIT_QUALIFICATION: 0x0
GUEST_LINEAR_ADDRESS: 0x0
GUEST_PHYSICAL_ADDRESS: 0xfffff88002322b78
* Information for VM-Exits Due to Vectored Events *
VM_EXIT_INTR_INFO: 0x0
VM_EXIT_INTR_ERROR_CODE: 0x0
* Information for VM-Exits That Occur During Event Delivery *
IDT_VECTORING_INFO: 0x0
IDT_VECTORING_ERROR_CODE: 0x0
* Information for VM-Exits Due to Instruction Execution *
VM_EXIT_INSTRUCTION_LEN: 0x0
VMX_INSTRUCTION_INFO: 0x0
IO_RCX: 0x0
IO_RSI: 0x0
IO_RDI: 0x0
IO_RIP: 0x0
* VM-Instruction Error Field *
VM_INSTRUCTION_ERROR: 0xc
***************************************************
Thankyou.
---------------------------------
0 Kudos
1 Reply
David_O_Intel1
Employee
1,239 Views

Ijust received a brief comment from an engineer as follows:

"The userneeds to identify whether the guestVM exits to the hypervisor due to int 3. Maybe they can try to use the monitor trap flag.It is enabled for Xen, but few people seem to use it."

An earlier comment from the same person:

"I noticed the guest exception map is 0xffffffff whichmeans that the userwants the guest VM toexit to the hypervisor on all kinds of exceptions. Hence, theywill get more VM exits than perhaps theyexpect. I understand they are looking for "int 3" VM exits."

David Ott

0 Kudos
Reply