VirtualBox

Changeset 25820 in vbox for trunk/src/VBox/Devices/PC


Ignore:
Timestamp:
Jan 14, 2010 1:43:33 AM (15 years ago)
Author:
vboxsync
Message:

The CPU is always attached if CPU hotplugging is not enabled

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r25817 r25820  
    22812281    for (unsigned i = 1; i < s->cCpus; i++)
    22822282    {
    2283         PPDMIBASE IBaseTmp;
    2284         rc = PDMDevHlpDriverAttach(pDevIns, i, &s->IBase, &IBaseTmp, "ACPI CPU");
    2285 
    2286         if (RT_SUCCESS(rc))
     2283        if (s->fCpuHotplug)
    22872284        {
     2285            PPDMIBASE IBaseTmp;
     2286            rc = PDMDevHlpDriverAttach(pDevIns, i, &s->IBase, &IBaseTmp, "ACPI CPU");
     2287
     2288            if (RT_SUCCESS(rc))
     2289            {
     2290                s->afCpuAttached[i] = true;
     2291                s->uCpusLocked |= RT_BIT(i);
     2292                Log(("acpi: Attached CPU %u\n", i));
     2293            }
     2294            else if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
     2295            {
     2296                Log(("acpi: CPU %u not attached yet\n", i));
     2297                s->afCpuAttached[i] = false;
     2298            }
     2299            else
     2300                return PDMDEV_SET_ERROR(pDevIns, rc, N_("Failed to attach CPU object\n"));
     2301        }
     2302        else
     2303        {
     2304            /* CPU is always attached if hotplug is not enabled. */
    22882305            s->afCpuAttached[i] = true;
    22892306            s->uCpusLocked |= RT_BIT(i);
    2290             Log(("acpi: Attached CPU %u\n", i));
    22912307        }
    2292         else if (rc == VERR_PDM_NO_ATTACHED_DRIVER)
    2293         {
    2294             Log(("acpi: CPU %u not attached yet\n", i));
    2295             s->afCpuAttached[i] = false;
    2296         }
    2297         else
    2298             return PDMDEV_SET_ERROR(pDevIns, rc, N_("Failed to attach CPU object\n"));
    22992308    }
    23002309
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