VirtualBox

Changeset 8554 in vbox


Ignore:
Timestamp:
May 5, 2008 8:08:06 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
30468
Message:

Always refuse to load if the cpu is in vmx root mode (32 bits to PAE switcher turns off paging as well)

File:
1 edited

Legend:

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

    r8553 r8554  
    182182                                                                == (MSR_IA32_FEATURE_CONTROL_VMXON|MSR_IA32_FEATURE_CONTROL_LOCK))
    183183                    {
     184                        RTR0MEMOBJ pScatchMemObj;
     185                        void      *pvScatchPage;
     186                        RTHCPHYS   pScatchPagePhys;
     187
    184188                        HWACCMR0Globals.vmx.fSupported          = true;
    185189                        HWACCMR0Globals.vmx.msr.vmx_basic_info  = ASMRdMsr(MSR_IA32_VMX_BASIC_INFO);
     
    196200                        HWACCMR0Globals.vmx.hostCR4             = ASMGetCR4();
    197201
    198 #if HC_ARCH_BITS == 64
    199                         RTR0MEMOBJ pScatchMemObj;
    200                         void      *pvScatchPage;
    201                         RTHCPHYS   pScatchPagePhys;
    202 
    203202                        rc = RTR0MemObjAllocCont(&pScatchMemObj, 1 << PAGE_SHIFT, true /* executable R0 mapping */);
    204203                        if (RT_FAILURE(rc))
     
    232231                            /* KVM leaves the CPU in VMX root mode. Not only is this not allowed, it will crash the host when we enter raw mode, because
    233232                             * (a) clearing X86_CR4_VMXE in CR4 causes a #GP    (we no longer modify this bit)
    234                              * (b) turning off paging causes a #GP              (unavoidable when switching from long to 32 bits mode)
     233                             * (b) turning off paging causes a #GP              (unavoidable when switching from long to 32 bits mode or 32 bits to PAE)
    235234                             *
    236235                             * They should fix their code, but until they do we simply refuse to run.
     
    249248                        if (VBOX_FAILURE(HWACCMR0Globals.lLastError))
    250249                            return HWACCMR0Globals.lLastError ;
    251 #endif
    252250                    }
    253251                    else
Note: See TracChangeset for help on using the changeset viewer.

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