VirtualBox

Changeset 45868 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 2, 2013 7:55:59 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
85459
Message:

tstVMREQ: disable HM to prevent failing when allocating HM_VTX_TOTAL_DEVHEAP_MEM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/testcase/tstVMREQ.cpp

    r44528 r45868  
    208208}
    209209
    210 
     210static DECLCALLBACK(int)
     211tstVMREQConfigConstructor(PUVM pUVM, PVM pVM, void *pvUser)
     212{
     213    NOREF(pvUser);
     214    int rc = CFGMR3ConstructDefaultTree(pVM);
     215    if (RT_SUCCESS(rc))
     216    {
     217        /* Disable HM, otherwise it will fail on machines without unrestricted guest execution
     218         * because the allocation of HM_VTX_TOTAL_DEVHEAP_MEM will fail -- no VMMDev */
     219        PCFGMNODE pRoot = CFGMR3GetRoot(pVM);
     220        rc = CFGMR3InsertInteger(pRoot, "HMEnabled", false);
     221        if (RT_FAILURE(rc))
     222            RTPrintf("CFGMR3InsertInteger(pRoot,\"HMEnabled\",) -> %Rrc\n", rc);
     223    }
     224    return rc;
     225}
    211226
    212227int main(int argc, char **argv)
     
    220235     */
    221236    PUVM pUVM;
    222     int rc = VMR3Create(1, NULL, NULL, NULL, NULL, NULL, NULL, &pUVM);
     237    int rc = VMR3Create(1, NULL, NULL, NULL, tstVMREQConfigConstructor, NULL, NULL, &pUVM);
    223238    if (RT_SUCCESS(rc))
    224239    {
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