VirtualBox

Changeset 18008 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Mar 17, 2009 10:13:11 AM (16 years ago)
Author:
vboxsync
Message:

Some extra checks

File:
1 edited

Legend:

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

    r17916 r18008  
    465465        int aRc[RTCPUSET_MAX_CPUS];
    466466
    467         rc = RTPowerNotificationDeregister(hwaccmR0PowerCallback, 0);
    468         Assert(RT_SUCCESS(rc));
     467        Assert(!HWACCMR0Globals.vmx.fUsingSUPR0EnableVTx);
     468        if (!HWACCMR0Globals.vmx.fUsingSUPR0EnableVTx)
     469        {
     470            rc = RTPowerNotificationDeregister(hwaccmR0PowerCallback, 0);
     471            Assert(RT_SUCCESS(rc));
     472        }
    469473
    470474        memset(aRc, 0, sizeof(aRc));
     
    511515
    512516        /*
    513         * Both the LOCK and VMXON bit must be set; otherwise VMXON will generate a #GP.
    514         * Once the lock bit is set, this MSR can no longer be modified.
    515         */
     517         * Both the LOCK and VMXON bit must be set; otherwise VMXON will generate a #GP.
     518         * Once the lock bit is set, this MSR can no longer be modified.
     519         */
    516520        if (    !(val & (MSR_IA32_FEATURE_CONTROL_VMXON|MSR_IA32_FEATURE_CONTROL_LOCK))
    517521            ||  ((val & (MSR_IA32_FEATURE_CONTROL_VMXON|MSR_IA32_FEATURE_CONTROL_LOCK)) == MSR_IA32_FEATURE_CONTROL_VMXON) /* Some BIOSes forget to set the locked bit. */
     
    705709    Assert(idCpu < RT_ELEMENTS(HWACCMR0Globals.aCpuInfo));
    706710    Assert(ASMAtomicReadBool(&pCpu->fInUse) == false);
     711    Assert(!pCpu->fConfigured || pCpu->pMemObj);
    707712
    708713    if (!pCpu->pMemObj)
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