VirtualBox

Changeset 23733 in vbox


Ignore:
Timestamp:
Oct 13, 2009 2:48:10 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53453
Message:

Dropped obsolet HWVirtEx properties.

Location:
trunk/src/VBox
Files:
11 edited

Legend:

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

    r23703 r23733  
    344344
    345345    BOOL hwVirtExEnabled;
    346     machine->COMGETTER(HWVirtExEnabled)(&hwVirtExEnabled);
     346    machine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &hwVirtExEnabled);
    347347    if (details == VMINFO_MACHINEREADABLE)
    348348        RTPrintf("hwvirtex=\"%s\"\n", hwVirtExEnabled ? "on" : "off");
    349349    else
    350350        RTPrintf("Hardw. virt.ext: %s\n", hwVirtExEnabled ? "on" : "off");
     351
     352    BOOL hwVirtExExclusive;
     353    machine->GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &hwVirtExExclusive);
     354    if (details == VMINFO_MACHINEREADABLE)
     355        RTPrintf("hwvirtexexcl=\"%s\"\n", hwVirtExExclusive ? "on" : "off");
     356    else
     357        RTPrintf("Hardw. virt.ext exclusive: %s\n", hwVirtExExclusive ? "on" : "off");
     358
    351359    BOOL HWVirtExNestedPagingEnabled;
    352     machine->COMGETTER(HWVirtExNestedPagingEnabled)(&HWVirtExNestedPagingEnabled);
     360    machine->GetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, &HWVirtExNestedPagingEnabled);
    353361    if (details == VMINFO_MACHINEREADABLE)
    354362        RTPrintf("nestedpaging=\"%s\"\n", HWVirtExNestedPagingEnabled ? "on" : "off");
     
    357365
    358366    BOOL HWVirtExVPIDEnabled;
    359     machine->COMGETTER(HWVirtExVPIDEnabled)(&HWVirtExVPIDEnabled);
     367    machine->GetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, &HWVirtExVPIDEnabled);
    360368    if (details == VMINFO_MACHINEREADABLE)
    361369        RTPrintf("vtxvpid=\"%s\"\n", HWVirtExVPIDEnabled ? "on" : "off");
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r23731 r23733  
    6666    MODIFYVMPAE,
    6767    MODIFYVMHWVIRTEX,
     68    MODIFYVMHWVIRTEXEXCLUSIVE,
    6869    MODIFYVMNESTEDPAGING,
    6970    MODIFYVMVTXVPID,
     
    137138    { "--pae",                     MODIFYVMPAE,                     RTGETOPT_REQ_STRING },
    138139    { "--hwvirtex",                MODIFYVMHWVIRTEX,                RTGETOPT_REQ_STRING },
     140    { "--hwvirtexexcl",            MODIFYVMHWVIRTEXEXCLUSIVE,       RTGETOPT_REQ_STRING },
    139141    { "--nestedpaging",            MODIFYVMNESTEDPAGING,            RTGETOPT_REQ_STRING },
    140142    { "--vtxvpid",                 MODIFYVMVTXVPID,                 RTGETOPT_REQ_STRING },
     
    384386                    if (!strcmp(pValueUnion.psz, "on"))
    385387                    {
    386                         CHECK_ERROR (machine, COMSETTER(HWVirtExEnabled)(TRUE));
     388                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, TRUE));
    387389                    }
    388390                    else if (!strcmp(pValueUnion.psz, "off"))
    389391                    {
    390                         CHECK_ERROR (machine, COMSETTER(HWVirtExEnabled)(FALSE));
     392                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Enabled, FALSE));
    391393                    }
    392394                    else
     
    399401            }
    400402
     403            case MODIFYVMHWVIRTEXEXCLUSIVE:
     404            {
     405                if (pValueUnion.psz)
     406                {
     407                    if (!strcmp(pValueUnion.psz, "on"))
     408                    {
     409                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, TRUE));
     410                    }
     411                    else if (!strcmp(pValueUnion.psz, "off"))
     412                    {
     413                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_Exclusive, FALSE));
     414                    }
     415                    else
     416                    {
     417                        errorArgument("Invalid --hwvirtex argument '%s'", pValueUnion.psz);
     418                        rc = E_FAIL;
     419                    }
     420                }
     421                break;
     422            }
     423
    401424            case MODIFYVMNESTEDPAGING:
    402425            {
     
    405428                    if (!strcmp(pValueUnion.psz, "on"))
    406429                    {
    407                         CHECK_ERROR (machine, COMSETTER(HWVirtExNestedPagingEnabled)(true));
     430                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, TRUE));
    408431                    }
    409432                    else if (!strcmp(pValueUnion.psz, "off"))
    410433                    {
    411                         CHECK_ERROR (machine, COMSETTER(HWVirtExNestedPagingEnabled)(false));
     434                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, FALSE));
    412435                    }
    413436                    else
     
    426449                    if (!strcmp(pValueUnion.psz, "on"))
    427450                    {
    428                         CHECK_ERROR (machine, COMSETTER(HWVirtExVPIDEnabled)(true));
     451                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, TRUE));
    429452                    }
    430453                    else if (!strcmp(pValueUnion.psz, "off"))
    431454                    {
    432                         CHECK_ERROR (machine, COMSETTER(HWVirtExVPIDEnabled)(false));
     455                        CHECK_ERROR (machine, SetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, FALSE));
    433456                    }
    434457                    else
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp

    r23703 r23733  
    16231623
    16241624        /* VT-x/AMD-V */
    1625         QString virt = aMachine.GetHWVirtExEnabled()
     1625        QString virt = aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled)
    16261626            ? tr ("Enabled", "details report (VT-x/AMD-V)")
    16271627            : tr ("Disabled", "details report (VT-x/AMD-V)");
    16281628
    16291629        /* Nested Paging */
    1630         QString nested = aMachine.GetHWVirtExNestedPagingEnabled()
     1630        QString nested = aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled)
    16311631            ? tr ("Enabled", "details report (Nested Paging)")
    16321632            : tr ("Disabled", "details report (Nested Paging)");
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSettingsDialogSpecific.cpp

    r23688 r23733  
    403403    if (generalPage && systemPage &&
    404404        generalPage->is64BitOSTypeSelected() && !systemPage->isHWVirtExEnabled())
    405         mMachine.SetHWVirtExEnabled (true);
     405        mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled, true);
    406406
    407407#ifdef VBOX_WITH_VIDEOHWACCEL
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsSystem.cpp

    r23263 r23733  
    178178    /* VT-x/AMD-V */
    179179    mCbVirt->setEnabled (fVTxAMDVSupported);
    180     mCbVirt->setChecked (aMachine.GetHWVirtExEnabled());
     180    mCbVirt->setChecked (aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled));
    181181
    182182    /* Nested Paging */
    183183    mCbNestedPaging->setEnabled (fVTxAMDVSupported &&
    184                                  aMachine.GetHWVirtExEnabled());
    185     mCbNestedPaging->setChecked (aMachine.GetHWVirtExNestedPagingEnabled());
     184                                 aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_Enabled));
     185    mCbNestedPaging->setChecked (aMachine.GetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled));
    186186
    187187    if (mValidator)
     
    231231
    232232    /* VT-x/AMD-V */
    233     mMachine.SetHWVirtExEnabled (mCbVirt->checkState() == Qt::Checked ||
    234                                  mSlCPU->value() > 1);
     233    mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_Enabled,
     234                                 mCbVirt->checkState() == Qt::Checked || mSlCPU->value() > 1);
    235235
    236236    /* Nested Paging */
    237     mMachine.SetHWVirtExNestedPagingEnabled (mCbNestedPaging->isChecked());
     237    mMachine.SetHWVirtExProperty(KHWVirtExPropertyType_NestedPagingEnabled, mCbNestedPaging->isChecked());
    238238}
    239239
  • trunk/src/VBox/Main/ApplianceImpl.cpp

    r23502 r23733  
    12451245            if (tmpCount > 1)
    12461246            {
    1247                 rc = pNewMachine->COMSETTER(HWVirtExEnabled)(TRUE);
     1247                rc = pNewMachine->SetHWVirtExProperty(HWVirtExPropertyType_Enabled, TRUE);
    12481248                if (FAILED(rc)) throw rc;
    12491249
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r23720 r23733  
    259259    /* hardware virtualization extensions */
    260260    BOOL fHWVirtExEnabled;
    261     hrc = pMachine->COMGETTER(HWVirtExEnabled)(&fHWVirtExEnabled);                  H();
     261    hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &fHWVirtExEnabled);                  H();
    262262    if (cCpus > 1) /** @todo SMP: This isn't nice, but things won't work on mac otherwise. */
    263263        fHWVirtExEnabled = TRUE;
     
    326326    }
    327327
     328    /* HWVirtEx exclusive mode */
     329    BOOL fHWVirtExExclusive = true;
     330    hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &fHWVirtExExclusive);                   H();
     331    rc = CFGMR3InsertInteger(pHWVirtExt, "Exclusive", fHWVirtExExclusive);                     RC_CHECK();
     332
    328333    /* Nested paging (VT-x/AMD-V) */
    329334    BOOL fEnableNestedPaging = false;
    330     hrc = pMachine->COMGETTER(HWVirtExNestedPagingEnabled)(&fEnableNestedPaging);   H();
    331     rc = CFGMR3InsertInteger(pRoot, "EnableNestedPaging", fEnableNestedPaging);     RC_CHECK();
     335    hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_NestedPagingEnabled, &fEnableNestedPaging);   H();
     336    rc = CFGMR3InsertInteger(pHWVirtExt, "EnableNestedPaging", fEnableNestedPaging);     RC_CHECK();
    332337
    333338    /* VPID (VT-x) */
    334339    BOOL fEnableVPID = false;
    335     hrc = pMachine->COMGETTER(HWVirtExVPIDEnabled)(&fEnableVPID);                   H();
    336     rc = CFGMR3InsertInteger(pRoot, "EnableVPID", fEnableVPID);                     RC_CHECK();
     340    hrc = pMachine->GetHWVirtExProperty(HWVirtExPropertyType_VPIDEnabled, &fEnableVPID);                   H();
     341    rc = CFGMR3InsertInteger(pHWVirtExt, "EnableVPID", fEnableVPID);                     RC_CHECK();
    337342
    338343    /* Physical Address Extension (PAE) */
  • trunk/src/VBox/Main/MachineImpl.cpp

    r23727 r23733  
    12971297}
    12981298
    1299 STDMETHODIMP Machine::COMGETTER(HWVirtExEnabled)(BOOL *enabled)
    1300 {
    1301     if (!enabled)
    1302         return E_POINTER;
    1303 
    1304     AutoCaller autoCaller(this);
    1305     CheckComRCReturnRC(autoCaller.rc());
    1306 
    1307     AutoReadLock alock(this);
    1308 
    1309     *enabled = mHWData->mHWVirtExEnabled;
    1310 
    1311     return S_OK;
    1312 }
    1313 
    1314 STDMETHODIMP Machine::COMSETTER(HWVirtExEnabled)(BOOL enable)
    1315 {
    1316     AutoCaller autoCaller(this);
    1317     CheckComRCReturnRC(autoCaller.rc());
    1318 
    1319     AutoWriteLock alock(this);
    1320 
    1321     HRESULT rc = checkStateDependency(MutableStateDep);
    1322     CheckComRCReturnRC(rc);
    1323 
    1324     /** @todo check validity! */
    1325 
    1326     mHWData.backup();
    1327     mHWData->mHWVirtExEnabled = enable;
    1328 
    1329     return S_OK;
    1330 }
    1331 
    1332 STDMETHODIMP Machine::COMGETTER(HWVirtExNestedPagingEnabled)(BOOL *enabled)
    1333 {
    1334     if (!enabled)
    1335         return E_POINTER;
    1336 
    1337     AutoCaller autoCaller(this);
    1338     CheckComRCReturnRC(autoCaller.rc());
    1339 
    1340     AutoReadLock alock(this);
    1341 
    1342     *enabled = mHWData->mHWVirtExNestedPagingEnabled;
    1343 
    1344     return S_OK;
    1345 }
    1346 
    1347 STDMETHODIMP Machine::COMSETTER(HWVirtExNestedPagingEnabled)(BOOL enable)
    1348 {
    1349     AutoCaller autoCaller(this);
    1350     CheckComRCReturnRC(autoCaller.rc());
    1351 
    1352     AutoWriteLock alock(this);
    1353 
    1354     HRESULT rc = checkStateDependency(MutableStateDep);
    1355     CheckComRCReturnRC(rc);
    1356 
    1357     /** @todo check validity! */
    1358 
    1359     mHWData.backup();
    1360     mHWData->mHWVirtExNestedPagingEnabled = enable;
    1361 
    1362     return S_OK;
    1363 }
    1364 
    1365 STDMETHODIMP Machine::COMGETTER(HWVirtExVPIDEnabled)(BOOL *enabled)
    1366 {
    1367     if (!enabled)
    1368         return E_POINTER;
    1369 
    1370     AutoCaller autoCaller(this);
    1371     CheckComRCReturnRC(autoCaller.rc());
    1372 
    1373     AutoReadLock alock(this);
    1374 
    1375     *enabled = mHWData->mHWVirtExVPIDEnabled;
    1376 
    1377     return S_OK;
    1378 }
    1379 
    1380 STDMETHODIMP Machine::COMSETTER(HWVirtExVPIDEnabled)(BOOL enable)
    1381 {
    1382     AutoCaller autoCaller(this);
    1383     CheckComRCReturnRC(autoCaller.rc());
    1384 
    1385     AutoWriteLock alock(this);
    1386 
    1387     HRESULT rc = checkStateDependency(MutableStateDep);
    1388     CheckComRCReturnRC(rc);
    1389 
    1390     /** @todo check validity! */
    1391 
    1392     mHWData.backup();
    1393     mHWData->mHWVirtExVPIDEnabled = enable;
    1394 
    1395     return S_OK;
    1396 }
    1397 
    13981299STDMETHODIMP Machine::GetHWVirtExProperty(HWVirtExPropertyType_T property, BOOL *aVal)
    13991300{
     
    14341335
    14351336    AutoWriteLock alock(this);
     1337
     1338    HRESULT rc = checkStateDependency(MutableStateDep);
     1339    CheckComRCReturnRC(rc);
    14361340
    14371341    switch(property)
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r23727 r23733  
    770770    <const name="Enabled"             value="1">
    771771      <desc>
    772         HWVirtEx (VT-x/AMD-V) boolean property.
     772        HWVirtEx (VT-x/AMD-V) boolean property. Note that in case such extensions are not available,
     773        they will not be used.
    773774      </desc>
    774775    </const>
     
    781782    <const name="VPIDEnabled"         value="3">
    782783      <desc>
    783         VT-x VPID boolean property.
     784        VT-x VPID boolean property. Note that in case this extension is not available,
     785        it will not be used.
    784786      </desc>
    785787    </const>
    786788    <const name="NestedPagingEnabled" value="4">
    787789      <desc>
    788         Nested Paging boolean property.
     790        Nested Paging boolean property. Note that in case this extension is not available,
     791        it will not be used.
    789792      </desc>
    790793    </const>
     
    40424045  <interface
    40434046     name="IMachine" extends="$unknown"
    4044      uuid="160b0ccc-c3d6-4c1b-bbe9-39b1a732f833"
     4047     uuid="ff5155a9-da1e-4225-8829-2f9f105d4db2"
    40454048     wsmap="managed"
    40464049     >
     
    42704273    </attribute>
    42714274
    4272     <attribute name="HWVirtExEnabled" type="boolean">
    4273       <desc>
    4274         This setting determines whether VirtualBox will try to make use of
    4275         the host CPU's hardware virtualization extensions such as Intel VT-x
    4276         and AMD-V. Note that in case such extensions are not available,
    4277         they will not be used.
    4278       </desc>
    4279     </attribute>
    4280 
    4281     <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
    4282       <desc>
    4283         This setting determines whether VirtualBox will try to make use of
    4284         the nested paging extension of Intel VT-x and AMD-V. Note that in case
    4285         such extensions are not available, they will not be used.
    4286       </desc>
    4287     </attribute>
    4288 
    4289     <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
    4290       <desc>
    4291         This setting determines whether VirtualBox will try to make use of
    4292         the VPID extension of Intel VT-x. Note that in case such extensions are
    4293         not available, they will not be used.
    4294       </desc>
    4295     </attribute>
    4296 
    42974275    <attribute name="PAEEnabled" type="boolean" default="false">
    42984276      <desc>
  • trunk/src/VBox/Main/include/MachineImpl.h

    r23727 r23733  
    535535    STDMETHOD(COMSETTER(Accelerate2DVideoEnabled))(BOOL enabled);
    536536    STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
    537     STDMETHOD(COMGETTER(HWVirtExEnabled))(BOOL *enabled);
    538     STDMETHOD(COMSETTER(HWVirtExEnabled))(BOOL enabled);
    539     STDMETHOD(COMGETTER(HWVirtExNestedPagingEnabled))(BOOL *enabled);
    540     STDMETHOD(COMSETTER(HWVirtExNestedPagingEnabled))(BOOL enabled);
    541     STDMETHOD(COMGETTER(HWVirtExVPIDEnabled))(BOOL *enabled);
    542     STDMETHOD(COMSETTER(HWVirtExVPIDEnabled))(BOOL enabled);
    543537    STDMETHOD(COMGETTER(PAEEnabled))(BOOL *enabled);
    544538    STDMETHOD(COMSETTER(PAEEnabled))(BOOL enabled);
  • trunk/src/VBox/VMM/HWACCM.cpp

    r23638 r23733  
    331331    PCFGMNODE pHWVirtExt = CFGMR3GetChild(pRoot, "HWVirtExt/");
    332332    /* Nested paging: disabled by default. */
    333     rc = CFGMR3QueryBoolDef(pRoot, "EnableNestedPaging", &pVM->hwaccm.s.fAllowNestedPaging, false);
     333    rc = CFGMR3QueryBoolDef(pHWVirtExt, "EnableNestedPaging", &pVM->hwaccm.s.fAllowNestedPaging, false);
    334334    AssertRC(rc);
    335335
    336336    /* VT-x VPID: disabled by default. */
    337     rc = CFGMR3QueryBoolDef(pRoot, "EnableVPID", &pVM->hwaccm.s.vmx.fAllowVPID, false);
     337    rc = CFGMR3QueryBoolDef(pHWVirtExt, "EnableVPID", &pVM->hwaccm.s.vmx.fAllowVPID, false);
    338338    AssertRC(rc);
    339339
     
    387387     *  Default false for Mac OS X and Windows due to the higher risk of conflicts with other hypervisors.
    388388     */
    389     rc = CFGMR3QueryBoolDef(pHWVirtExt, "EnableGlobalInit", &pVM->hwaccm.s.fGlobalInit,
     389    rc = CFGMR3QueryBoolDef(pHWVirtExt, "Exclusive", &pVM->hwaccm.s.fGlobalInit,
    390390#if defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS)
    391391                            false
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