Changeset 45773 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Apr 26, 2013 12:17:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r45749 r45773 46 46 * Defined Constants And Macros * 47 47 *******************************************************************************/ 48 #define HMVMXHCUINTREG RTHCUINTREG 48 49 #if defined(RT_ARCH_AMD64) 49 50 # define HMVMX_IS_64BIT_HOST_MODE() (true) 50 51 #elif defined(VBOX_WITH_HYBRID_32BIT_KERNEL) 52 extern "C" uint32_t g_fVMXIs64bitHost; 51 53 # define HMVMX_IS_64BIT_HOST_MODE() (g_fVMXIs64bitHost != 0) 54 # undef HMVMXHCUINTREG 55 # define HMVMXHCUINTREG uint64_t 52 56 #else 53 57 # define HMVMX_IS_64BIT_HOST_MODE() (false) … … 2050 2054 if (HMVMX_IS_64BIT_HOST_MODE()) 2051 2055 { 2052 uint64_t uReg = hmR0Get64bitCR3();2053 rc |= VMXWriteVmcs64(VMX_VMCS_HOST_CR3, uReg );2056 uint64_t uRegCR3 = hmR0Get64bitCR3(); 2057 rc |= VMXWriteVmcs64(VMX_VMCS_HOST_CR3, uRegCR3); 2054 2058 } 2055 2059 else … … 2156 2160 if (HMVMX_IS_64BIT_HOST_MODE()) 2157 2161 { 2158 X86XDTR64 G tr64;2162 X86XDTR64 Gdtr64; 2159 2163 X86XDTR64 Idtr64; 2160 2164 hmR0Get64bitGdtrAndIdtr(&Gdtr64, &Idtr64); … … 3818 3822 3819 3823 /* VMX control bits. */ 3820 uint32_t u32Val;3821 uint64_t u64Val;3822 RTHCUINTREGuHCReg;3824 uint32_t u32Val; 3825 uint64_t u64Val; 3826 HMVMXHCUINTREG uHCReg; 3823 3827 rc = VMXReadVmcs32(VMX_VMCS32_CTRL_PIN_EXEC_CONTROLS, &u32Val); AssertRC(rc); 3824 3828 Log(("VMX_VMCS32_CTRL_PIN_EXEC_CONTROLS %#RX32\n", u32Val)); … … 4042 4046 PHMGLOBLCPUINFO pCpu; 4043 4047 RTHCPHYS HCPhysCpuPage; 4044 RT HCUINTREG uOldEFlags;4048 RTCCUINTREG uOldEFlags; 4045 4049 4046 4050 AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER); … … 7464 7468 static DECLCALLBACK(int) hmR0VmxExitErrInvalidGuestState(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient) 7465 7469 { 7466 uint32_t uIntrState;7467 RTHCUINTREG uHCReg;7468 uint64_t u64Val;7469 uint32_t u32Val;7470 uint32_t uIntrState; 7471 HMVMXHCUINTREG uHCReg; 7472 uint64_t u64Val; 7473 uint32_t u32Val; 7470 7474 7471 7475 int rc = hmR0VmxReadEntryIntrInfoVmcs(pVmxTransient); … … 7776 7780 { 7777 7781 case 0: /* CR0 */ 7778 Log(("CR 0 write rc=%d CR0=%#RGv\n", rc, pMixedCtx->cr0));7779 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR0 ;7782 Log(("CRX CR0 write rc=%d CR0=%#RGv\n", rc, pMixedCtx->cr0)); 7783 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR0 | HM_CHANGED_GUEST_CR3; 7780 7784 break; 7781 7785 case 2: /* C2 **/ … … 7784 7788 case 3: /* CR3 */ 7785 7789 Assert(!pVM->hm.s.fNestedPaging || !CPUMIsGuestPagingEnabledEx(pMixedCtx)); 7786 Log(("CR 3 write rc=%d CR3=%#RGv\n", rc, pMixedCtx->cr3));7790 Log(("CRX CR3 write rc=%d CR3=%#RGv\n", rc, pMixedCtx->cr3)); 7787 7791 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR3; 7788 7792 break; 7789 7793 case 4: /* CR4 */ 7790 Log(("CR 4 write rc=%d CR4=%#RGv\n", rc, pMixedCtx->cr4));7794 Log(("CRX CR4 write rc=%d CR4=%#RGv\n", rc, pMixedCtx->cr4)); 7791 7795 pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR4; 7792 7796 break;
Note:
See TracChangeset
for help on using the changeset viewer.