VirtualBox

Changeset 45773 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Apr 26, 2013 12:17:25 PM (12 years ago)
Author:
vboxsync
Message:

VMM/HMVMXR0: Darwin hybrid-kernel fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r45749 r45773  
    4646*   Defined Constants And Macros                                               *
    4747*******************************************************************************/
     48#define HMVMXHCUINTREG                RTHCUINTREG
    4849#if defined(RT_ARCH_AMD64)
    4950# define HMVMX_IS_64BIT_HOST_MODE()   (true)
    5051#elif defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
     52extern "C" uint32_t g_fVMXIs64bitHost;
    5153# define HMVMX_IS_64BIT_HOST_MODE()   (g_fVMXIs64bitHost != 0)
     54# undef HMVMXHCUINTREG
     55# define HMVMXHCUINTREG               uint64_t
    5256#else
    5357# define HMVMX_IS_64BIT_HOST_MODE()   (false)
     
    20502054    if (HMVMX_IS_64BIT_HOST_MODE())
    20512055    {
    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);
    20542058    }
    20552059    else
     
    21562160    if (HMVMX_IS_64BIT_HOST_MODE())
    21572161    {
    2158         X86XDTR64 Gtr64;
     2162        X86XDTR64 Gdtr64;
    21592163        X86XDTR64 Idtr64;
    21602164        hmR0Get64bitGdtrAndIdtr(&Gdtr64, &Idtr64);
     
    38183822
    38193823                /* VMX control bits. */
    3820                 uint32_t    u32Val;
    3821                 uint64_t    u64Val;
    3822                 RTHCUINTREG uHCReg;
     3824                uint32_t        u32Val;
     3825                uint64_t        u64Val;
     3826                HMVMXHCUINTREG uHCReg;
    38233827                rc = VMXReadVmcs32(VMX_VMCS32_CTRL_PIN_EXEC_CONTROLS, &u32Val);         AssertRC(rc);
    38243828                Log(("VMX_VMCS32_CTRL_PIN_EXEC_CONTROLS       %#RX32\n", u32Val));
     
    40424046    PHMGLOBLCPUINFO pCpu;
    40434047    RTHCPHYS        HCPhysCpuPage;
    4044     RTHCUINTREG     uOldEFlags;
     4048    RTCCUINTREG     uOldEFlags;
    40454049
    40464050    AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER);
     
    74647468static DECLCALLBACK(int) hmR0VmxExitErrInvalidGuestState(PVMCPU pVCpu, PCPUMCTX pMixedCtx, PVMXTRANSIENT pVmxTransient)
    74657469{
    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;
    74707474
    74717475    int rc  = hmR0VmxReadEntryIntrInfoVmcs(pVmxTransient);
     
    77767780            {
    77777781                case 0: /* CR0 */
    7778                     Log(("CR0 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;
    77807784                    break;
    77817785                case 2: /* C2 **/
     
    77847788                case 3: /* CR3 */
    77857789                    Assert(!pVM->hm.s.fNestedPaging || !CPUMIsGuestPagingEnabledEx(pMixedCtx));
    7786                     Log(("CR3 write rc=%d CR3=%#RGv\n", rc, pMixedCtx->cr3));
     7790                    Log(("CRX CR3 write rc=%d CR3=%#RGv\n", rc, pMixedCtx->cr3));
    77877791                    pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR3;
    77887792                    break;
    77897793                case 4: /* CR4 */
    7790                     Log(("CR4 write rc=%d CR4=%#RGv\n", rc, pMixedCtx->cr4));
     7794                    Log(("CRX CR4 write rc=%d CR4=%#RGv\n", rc, pMixedCtx->cr4));
    77917795                    pVCpu->hm.s.fContextUseFlags |= HM_CHANGED_GUEST_CR4;
    77927796                    break;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette