Changeset 9535 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Jun 9, 2008 11:49:52 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r9533 r9535 2005 2005 { 2006 2006 #ifdef VBOX_STRICT 2007 int rc1; 2008 2009 rc1 = VMXReadVMCS(VMX_VMCS_RO_EXIT_REASON, &exitReason); 2010 rc1 |= VMXReadVMCS(VMX_VMCS_RO_VM_INSTR_ERROR, &instrError); 2011 AssertRC(rc1); 2012 if (rc1 == VINF_SUCCESS) 2013 { 2014 RTGDTR gdtr; 2015 PX86DESCHC pDesc; 2016 2017 ASMGetGDTR(&gdtr); 2018 2019 Log(("Unable to start/resume VM for reason: %x. Instruction error %x\n", (uint32_t)exitReason, (uint32_t)instrError)); 2020 Log(("Current stack %08x\n", &rc1)); 2021 2022 2023 VMXReadVMCS(VMX_VMCS_GUEST_RIP, &val); 2024 Log(("Old eip %VGv new %VGv\n", pCtx->eip, (RTGCPTR)val)); 2025 VMXReadVMCS(VMX_VMCS_CTRL_PIN_EXEC_CONTROLS, &val); 2026 Log(("VMX_VMCS_CTRL_PIN_EXEC_CONTROLS %08x\n", val)); 2027 VMXReadVMCS(VMX_VMCS_CTRL_PROC_EXEC_CONTROLS, &val); 2028 Log(("VMX_VMCS_CTRL_PROC_EXEC_CONTROLS %08x\n", val)); 2029 VMXReadVMCS(VMX_VMCS_CTRL_ENTRY_CONTROLS, &val); 2030 Log(("VMX_VMCS_CTRL_ENTRY_CONTROLS %08x\n", val)); 2031 VMXReadVMCS(VMX_VMCS_CTRL_EXIT_CONTROLS, &val); 2032 Log(("VMX_VMCS_CTRL_EXIT_CONTROLS %08x\n", val)); 2033 2034 VMXReadVMCS(VMX_VMCS_HOST_CR0, &val); 2035 Log(("VMX_VMCS_HOST_CR0 %08x\n", val)); 2036 2037 VMXReadVMCS(VMX_VMCS_HOST_CR3, &val); 2038 Log(("VMX_VMCS_HOST_CR3 %VHp\n", val)); 2039 2040 VMXReadVMCS(VMX_VMCS_HOST_CR4, &val); 2041 Log(("VMX_VMCS_HOST_CR4 %08x\n", val)); 2042 2043 VMXReadVMCS(VMX_VMCS_HOST_FIELD_CS, &val); 2044 Log(("VMX_VMCS_HOST_FIELD_CS %08x\n", val)); 2045 if (val < gdtr.cbGdt) 2046 { 2047 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC]; 2048 HWACCMR0DumpDescriptor(pDesc, val, "CS: "); 2049 } 2050 2051 VMXReadVMCS(VMX_VMCS_HOST_FIELD_DS, &val); 2052 Log(("VMX_VMCS_HOST_FIELD_DS %08x\n", val)); 2053 if (val < gdtr.cbGdt) 2054 { 2055 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC]; 2056 HWACCMR0DumpDescriptor(pDesc, val, "DS: "); 2057 } 2058 2059 VMXReadVMCS(VMX_VMCS_HOST_FIELD_ES, &val); 2060 Log(("VMX_VMCS_HOST_FIELD_ES %08x\n", val)); 2061 if (val < gdtr.cbGdt) 2062 { 2063 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC]; 2064 HWACCMR0DumpDescriptor(pDesc, val, "ES: "); 2065 } 2066 2067 VMXReadVMCS(VMX_VMCS_HOST_FIELD_FS, &val); 2068 Log(("VMX_VMCS_HOST_FIELD_FS %08x\n", val)); 2069 if (val < gdtr.cbGdt) 2070 { 2071 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC]; 2072 HWACCMR0DumpDescriptor(pDesc, val, "FS: "); 2073 } 2074 2075 VMXReadVMCS(VMX_VMCS_HOST_FIELD_GS, &val); 2076 Log(("VMX_VMCS_HOST_FIELD_GS %08x\n", val)); 2077 if (val < gdtr.cbGdt) 2078 { 2079 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC]; 2080 HWACCMR0DumpDescriptor(pDesc, val, "GS: "); 2081 } 2082 2083 VMXReadVMCS(VMX_VMCS_HOST_FIELD_SS, &val); 2084 Log(("VMX_VMCS_HOST_FIELD_SS %08x\n", val)); 2085 if (val < gdtr.cbGdt) 2086 { 2087 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC]; 2088 HWACCMR0DumpDescriptor(pDesc, val, "SS: "); 2089 } 2090 2091 VMXReadVMCS(VMX_VMCS_HOST_FIELD_TR, &val); 2092 Log(("VMX_VMCS_HOST_FIELD_TR %08x\n", val)); 2093 if (val < gdtr.cbGdt) 2094 { 2095 pDesc = &((PX86DESCHC)gdtr.pGdt)[val >> X86_SEL_SHIFT_HC]; 2096 HWACCMR0DumpDescriptor(pDesc, val, "TR: "); 2097 } 2098 2099 VMXReadVMCS(VMX_VMCS_HOST_TR_BASE, &val); 2100 Log(("VMX_VMCS_HOST_TR_BASE %VHv\n", val)); 2101 2102 VMXReadVMCS(VMX_VMCS_HOST_GDTR_BASE, &val); 2103 Log(("VMX_VMCS_HOST_GDTR_BASE %VHv\n", val)); 2104 VMXReadVMCS(VMX_VMCS_HOST_IDTR_BASE, &val); 2105 Log(("VMX_VMCS_HOST_IDTR_BASE %VHv\n", val)); 2106 2107 VMXReadVMCS(VMX_VMCS_HOST_SYSENTER_CS, &val); 2108 Log(("VMX_VMCS_HOST_SYSENTER_CS %08x\n", val)); 2109 2110 VMXReadVMCS(VMX_VMCS_HOST_SYSENTER_EIP, &val); 2111 Log(("VMX_VMCS_HOST_SYSENTER_EIP %VHv\n", val)); 2112 2113 VMXReadVMCS(VMX_VMCS_HOST_SYSENTER_ESP, &val); 2114 Log(("VMX_VMCS_HOST_SYSENTER_ESP %VHv\n", val)); 2115 2116 VMXReadVMCS(VMX_VMCS_HOST_RSP, &val); 2117 Log(("VMX_VMCS_HOST_RSP %VHv\n", val)); 2118 VMXReadVMCS(VMX_VMCS_HOST_RIP, &val); 2119 Log(("VMX_VMCS_HOST_RIP %VHv\n", val)); 2120 2121 #if HC_ARCH_BITS == 64 2122 Log(("MSR_K6_EFER = %VX64\n", ASMRdMsr(MSR_K6_EFER))); 2123 Log(("MSR_K6_STAR = %VX64\n", ASMRdMsr(MSR_K6_STAR))); 2124 Log(("MSR_K8_LSTAR = %VX64\n", ASMRdMsr(MSR_K8_LSTAR))); 2125 Log(("MSR_K8_CSTAR = %VX64\n", ASMRdMsr(MSR_K8_CSTAR))); 2126 Log(("MSR_K8_SF_MASK = %VX64\n", ASMRdMsr(MSR_K8_SF_MASK))); 2127 #endif 2128 } 2007 Log(("VMX_EXIT_ERR_INVALID_GUEST_STATE\n")); 2008 2009 VMXReadVMCS(VMX_VMCS_GUEST_RIP, &val); 2010 Log(("Old eip %VGv new %VGv\n", pCtx->rip, (RTGCPTR)val)); 2011 2012 VMXReadVMCS(VMX_VMCS_GUEST_CR0, &val); 2013 Log(("VMX_VMCS_GUEST_CR0 %RX64\n", val)); 2014 2015 VMXReadVMCS(VMX_VMCS_GUEST_CR3, &val); 2016 Log(("VMX_VMCS_HOST_CR3 %VGp\n", val)); 2017 2018 VMXReadVMCS(VMX_VMCS_GUEST_CR4, &val); 2019 Log(("VMX_VMCS_GUEST_CR4 %RX64\n", val)); 2020 2021 VMX_LOG_SELREG(CS, "CS"); 2022 VMX_LOG_SELREG(DS, "DS"); 2023 VMX_LOG_SELREG(ES, "ES"); 2024 VMX_LOG_SELREG(FS, "FS"); 2025 VMX_LOG_SELREG(GS, "GS"); 2026 VMX_LOG_SELREG(SS, "SS"); 2027 VMX_LOG_SELREG(TR, "TR"); 2028 VMX_LOG_SELREG(LDTR, "LDTR"); 2029 2030 VMXReadVMCS(VMX_VMCS_GUEST_GDTR_BASE, &val); 2031 Log(("VMX_VMCS_GUEST_GDTR_BASE %VGv\n", val)); 2032 VMXReadVMCS(VMX_VMCS_GUEST_IDTR_BASE, &val); 2033 Log(("VMX_VMCS_GUEST_IDTR_BASE %VGv\n", val)); 2129 2034 #endif /* VBOX_STRICT */ 2130 2035 rc = VERR_EM_INTERNAL_ERROR; -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.h
r9457 r9535 161 161 pCtx->reg##Hid.Attr.u = val; 162 162 163 #define VMX_LOG_SELREG(REG, szSelReg) \ 164 VMXReadVMCS(VMX_VMCS_GUEST_FIELD_##REG, &val); \ 165 Log(("%s Selector %x\n", szSelReg, val)); \ 166 VMXReadVMCS(VMX_VMCS_GUEST_##REG##_LIMIT, &val); \ 167 Log(("%s Limit %x\n", szSelReg, val)); \ 168 VMXReadVMCS(VMX_VMCS_GUEST_##REG##_BASE, &val); \ 169 Log(("%s Base %RX64\n", szSelReg, val)); \ 170 VMXReadVMCS(VMX_VMCS_GUEST_##REG##_ACCESS_RIGHTS, &val); \ 171 Log(("%s Attributes %x\n", szSelReg, val)); 172 163 173 164 174
Note:
See TracChangeset
for help on using the changeset viewer.