VirtualBox

Changeset 23750 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 14, 2009 9:26:48 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53476
Message:

Introduced the Synthetic CPU attribute and a get/set method for CPU properties.

Location:
trunk/src/VBox/Frontends
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r23733 r23750  
    228228        RTPrintf("Number of CPUs:  %u\n", numCpus);
    229229
     230    BOOL fSyntheticCpu;
     231    machine->GetCpuProperty(CpuPropertyType_Synthetic, &fSyntheticCpu);
     232    if (details == VMINFO_MACHINEREADABLE)
     233        RTPrintf("synthcpu=\"%s\"\n", fSyntheticCpu ? "on" : "off");
     234    else
     235        RTPrintf("Synthetic Cpu:   %s\n", fSyntheticCpu ? "on" : "off");
     236
    230237    ComPtr <IBIOSSettings> biosSettings;
    231238    machine->COMGETTER(BIOSSettings)(biosSettings.asOutParam());
     
    330337
    331338    BOOL PAEEnabled;
    332     machine->COMGETTER(PAEEnabled)(&PAEEnabled);
     339    machine->GetCpuProperty(CpuPropertyType_PAE, &PAEEnabled);
    333340    if (details == VMINFO_MACHINEREADABLE)
    334341        RTPrintf("pae=\"%s\"\n", PAEEnabled ? "on" : "off");
     
    358365
    359366    BOOL HWVirtExNestedPagingEnabled;
    360     machine->GetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, &HWVirtExNestedPagingEnabled);
     367    machine->GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &HWVirtExNestedPagingEnabled);
    361368    if (details == VMINFO_MACHINEREADABLE)
    362369        RTPrintf("nestedpaging=\"%s\"\n", HWVirtExNestedPagingEnabled ? "on" : "off");
     
    365372
    366373    BOOL HWVirtExVPIDEnabled;
    367     machine->GetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, &HWVirtExVPIDEnabled);
     374    machine->GetHWVirtExProperty(HWVirtExPropertyType_VPID, &HWVirtExVPIDEnabled);
    368375    if (details == VMINFO_MACHINEREADABLE)
    369376        RTPrintf("vtxvpid=\"%s\"\n", HWVirtExVPIDEnabled ? "on" : "off");
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r23738 r23750  
    6565    MODIFYVMIOAPIC,
    6666    MODIFYVMPAE,
     67    MODIFYVMSYNTHCPU,
    6768    MODIFYVMHWVIRTEX,
    6869    MODIFYVMHWVIRTEXEXCLUSIVE,
     
    137138    { "--ioapic",                  MODIFYVMIOAPIC,                  RTGETOPT_REQ_STRING },
    138139    { "--pae",                     MODIFYVMPAE,                     RTGETOPT_REQ_STRING },
     140    { "--synthcpu",                MODIFYVMSYNTHCPU,                RTGETOPT_REQ_STRING },
    139141    { "--hwvirtex",                MODIFYVMHWVIRTEX,                RTGETOPT_REQ_STRING },
    140142    { "--hwvirtexexcl",            MODIFYVMHWVIRTEXEXCLUSIVE,       RTGETOPT_REQ_STRING },
     
    363365                    if (!strcmp(pValueUnion.psz, "on"))
    364366                    {
    365                         CHECK_ERROR (machine, COMSETTER(PAEEnabled)(true));
     367                        CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_PAE, true));
    366368                    }
    367369                    else if (!strcmp(pValueUnion.psz, "off"))
    368370                    {
    369                         CHECK_ERROR (machine, COMSETTER(PAEEnabled)(false));
     371                        CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_PAE, false));
    370372                    }
    371373                    else
     
    378380            }
    379381
     382            case MODIFYVMSYNTHCPU:
     383            {
     384                if (pValueUnion.psz)
     385                {
     386                    if (!strcmp(pValueUnion.psz, "on"))
     387                    {
     388                        CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_Synthetic, true));
     389                    }
     390                    else if (!strcmp(pValueUnion.psz, "off"))
     391                    {
     392                        CHECK_ERROR (machine, SetCpuProperty(CpuPropertyType_Synthetic, false));
     393                    }
     394                    else
     395                    {
     396                        errorArgument("Invalid --synthcpu argument '%s'", pValueUnion.psz);
     397                        rc = E_FAIL;
     398                    }
     399                }
     400                break;
     401            }
     402
    380403            case MODIFYVMHWVIRTEX:
    381404            {
     
    426449                    if (!strcmp(pValueUnion.psz, "on"))
    427450                    {
    428                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, TRUE));
     451                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, TRUE));
    429452                    }
    430453                    else if (!strcmp(pValueUnion.psz, "off"))
    431454                    {
    432                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, FALSE));
     455                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, FALSE));
    433456                    }
    434457                    else
     
    447470                    if (!strcmp(pValueUnion.psz, "on"))
    448471                    {
    449                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, TRUE));
     472                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, TRUE));
    450473                    }
    451474                    else if (!strcmp(pValueUnion.psz, "off"))
    452475                    {
    453                         CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, FALSE));
     476                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPID, FALSE));
    454477                    }
    455478                    else
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r23733 r23750  
    16171617
    16181618        /* PAE/NX */
    1619         QString pae = aMachine.GetPAEEnabled()
     1619        QString pae = aMachine.GetCpuProperty(KCpuPropertyType_PAE)
    16201620            ? tr ("Enabled", "details report (PAE/NX)")
    16211621            : tr ("Disabled", "details report (PAE/NX)");
     
    16281628
    16291629        /* Nested Paging */
    1630         QString nested = aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled)
     1630        QString nested = aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging)
    16311631            ? tr ("Enabled", "details report (Nested Paging)")
    16321632            : tr ("Disabled", "details report (Nested Paging)");
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsSystem.cpp

    r23733 r23750  
    174174                         .GetProcessorFeature (KProcessorFeature_PAE);
    175175    mCbPae->setEnabled (fPAESupported);
    176     mCbPae->setChecked (aMachine.GetPAEEnabled());
     176    mCbPae->setChecked (aMachine.GetCpuProperty(KCpuPropertyType_PAE));
    177177
    178178    /* VT-x/AMD-V */
     
    183183    mCbNestedPaging->setEnabled (fVTxAMDVSupported &&
    184184                                 aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled));
    185     mCbNestedPaging->setChecked (aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled));
     185    mCbNestedPaging->setChecked (aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging));
    186186
    187187    if (mValidator)
     
    228228
    229229    /* PAE/NX */
    230     mMachine.SetPAEEnabled (mCbPae->isChecked());
     230    mMachine.SetCpuProperty(KCpuPropertyType_PAE, mCbPae->isChecked());
    231231
    232232    /* VT-x/AMD-V */
     
    235235
    236236    /* Nested Paging */
    237     mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled, mCbNestedPaging->isChecked());
     237    mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPaging, mCbNestedPaging->isChecked());
    238238}
    239239
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