VirtualBox

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


Ignore:
Timestamp:
Jan 14, 2010 10:39:12 AM (15 years ago)
Author:
vboxsync
Message:

r=bird: hot-plug review and code style cleanup. check out the @todos

Location:
trunk/src/VBox/Devices/PC
Files:
2 edited

Legend:

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

    r25817 r25825  
    144144    unsigned char *pbAmlCode = NULL;
    145145    size_t cbAmlCode = 0;
    146     bool fCpuHotplug = false;
    147     int rc = CFGMR3QueryBoolDef(pDevIns->pCfgHandle, "CpuHotplug", &fCpuHotplug, false);
     146    bool fCpuHotPlug = false;
     147    int rc = CFGMR3QueryBoolDef(pDevIns->pCfgHandle, "CpuHotplug", &fCpuHotPlug, false); /** @todo r=bird: Rename to CpuHotPlug. */
    148148    if (RT_FAILURE(rc))
    149149        return PDMDEV_SET_ERROR(pDevIns, rc,
    150150                                N_("Configuration error: Failed to read \"CpuHotplug\""));
    151151
    152     if (fCpuHotplug)
     152    if (fCpuHotPlug)
    153153    {
    154154        pbAmlCode = AmlCodeCpuHotplug;
  • trunk/src/VBox/Devices/PC/DevACPI.cpp

    r25820 r25825  
    238238    uint32_t            cbMADT;
    239239    /** Array of flags of attached CPUs */
    240     bool                afCpuAttached[32]; /* Maximum we support atm */
     240    bool                afCpuAttached[VMM_MAX_CPU_COUNT]; /**< @todo use VMCPUSET. */
    241241    /** Mask of locked CPUs (used by the guest) */
    242     uint32_t            uCpusLocked;
    243     /** Flag whether CPU hotplugging is enabled */
    244     bool                fCpuHotplug;
     242    uint32_t            uCpusLocked;                      /**< @todo use VMCPUSET. */
     243    /** Flag whether CPU hot plugging is enabled */
     244    bool                fCpuHotPlug;
    245245    /** Aligning IBase. */
    246246    bool                afAlignment[4];
     
    731731
    732732    /* We have to force physical APIC mode or Linux can't use more than 8 CPUs */
    733     if (s->fCpuHotplug)
     733    if (s->fCpuHotPlug)
    734734        fadt.u32Flags |= RT_H2LE_U32(FADT_FL_FORCE_APIC_PHYS_DEST_MODE);
    735735
     
    20952095        /*
    20962096         * Lock the CPU because we don't know if the guest will use it or not.
    2097          * Prevents ejection while the CPU is still used 
     2097         * Prevents ejection while the CPU is still used
    20982098         */
    20992099        s->uCpusLocked |= RT_BIT(iLUN);
     
    21952195                              "ShowRtc\0"
    21962196                              "ShowCpu\0"
    2197                               "CpuHotplug\0"
     2197                              "CpuHotplug\0" /** @todo r=bird: Rename to CpuHotPlug. */
    21982198                              ))
    21992199        return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,
     
    22422242                                N_("Configuration error: Failed to read \"ShowCpu\""));
    22432243
    2244     /* query whether we are allow CPU hotplugging */
    2245     rc = CFGMR3QueryBoolDef(pCfgHandle, "CpuHotplug", &s->fCpuHotplug, false);
     2244    /* query whether we are allow CPU hot plugging */
     2245    rc = CFGMR3QueryBoolDef(pCfgHandle, "CpuHotplug", &s->fCpuHotPlug, false); /** @todo r=bird: Rename to CpuHotPlug. */
    22462246    if (RT_FAILURE(rc))
    22472247        return PDMDEV_SET_ERROR(pDevIns, rc,
     
    22812281    for (unsigned i = 1; i < s->cCpus; i++)
    22822282    {
    2283         if (s->fCpuHotplug)
     2283        if (s->fCpuHotPlug)
    22842284        {
    22852285            PPDMIBASE IBaseTmp;
     
    23022302        else
    23032303        {
    2304             /* CPU is always attached if hotplug is not enabled. */
     2304            /* CPU is always attached if hot-plug is not enabled. */
    23052305            s->afCpuAttached[i] = true;
    23062306            s->uCpusLocked |= RT_BIT(i);
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