VirtualBox

Changeset 30459 in vbox for trunk/src


Ignore:
Timestamp:
Jun 28, 2010 11:34:17 AM (15 years ago)
Author:
vboxsync
Message:

ConsoleImpl2.cpp: Don't try create the CPUM node more than once, it will fail. Fixes nt4 + cpuid overrides.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r30450 r30459  
    435435    rc = CFGMR3InsertInteger(pRoot, "MemBalloonSize",       ulBalloonSize);             RC_CHECK();
    436436
     437    /*
     438     * CPUM values.
     439     */
     440    PCFGMNODE pCPUM;
     441    rc = CFGMR3InsertNode(pRoot, "CPUM", &pCPUM);                                       RC_CHECK();
     442
    437443    /* cpuid leaf overrides. */
    438444    static uint32_t const s_auCpuIdRanges[] =
     
    449455            {
    450456                PCFGMNODE pLeaf;
    451                 rc = CFGMR3InsertNodeF(pRoot, &pLeaf, "CPUM/HostCPUID/%RX32", uLeaf);   RC_CHECK();
     457                rc = CFGMR3InsertNodeF(pCPUM, &pLeaf, "HostCPUID/%RX32", uLeaf);        RC_CHECK();
    452458
    453459                rc = CFGMR3InsertInteger(pLeaf, "eax", ulEax);                          RC_CHECK();
     
    459465        }
    460466
     467    /* We must limit CPUID count for Windows NT 4, as otherwise it stops
     468       with error 0x3e (MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED). */
    461469    if (osTypeId == "WindowsNT4")
    462470    {
    463         /*
    464          * We must limit CPUID count for Windows NT 4, as otherwise it stops
    465          * with error 0x3e (MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED).
    466          */
    467471        LogRel(("Limiting CPUID leaf count for NT4 guests\n"));
    468         PCFGMNODE pCPUM;
    469         rc = CFGMR3InsertNode(pRoot, "CPUM", &pCPUM);                                   RC_CHECK();
    470472        rc = CFGMR3InsertInteger(pCPUM, "NT4LeafLimit", true);                          RC_CHECK();
    471473    }
    472474
     475    /* Expose extended MWAIT features to Mac OS X guests. */
    473476    if (fOsXGuest)
    474477    {
    475         /*
    476          * Expose extended MWAIT features to Mac OS X guests.
    477          */
    478478        LogRel(("Using MWAIT extensions\n"));
    479         PCFGMNODE pCPUM;
    480         rc = CFGMR3InsertNode(pRoot, "CPUM", &pCPUM);                                   RC_CHECK();
    481479        rc = CFGMR3InsertInteger(pCPUM, "MWaitExtensions", true);                       RC_CHECK();
    482480    }
    483481
    484     /* hardware virtualization extensions */
     482    /*
     483     * Hardware virtualization extensions.
     484     */
    485485    BOOL fHWVirtExEnabled;
    486486    BOOL fHwVirtExtForced;
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