Changeset 58437 in vbox for trunk/src/VBox
- Timestamp:
- Oct 27, 2015 4:17:12 PM (9 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r57525 r58437 683 683 " [--paravirtprovider none|default|legacy|minimal|\n" 684 684 " hyperv|kvm]\n" 685 " [--paravirtdebug [<settings>]\n" 685 686 " [--hwvirtex on|off]\n" 686 687 " [--nestedpaging on|off]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r57358 r58437 745 745 RTPrintf("Paravirt. Provider: %s\n", pszParavirtProvider); 746 746 747 Bstr paravirtDebug; 748 CHECK_ERROR2I_RET(machine, COMGETTER(ParavirtDebug)(paravirtDebug.asOutParam()), hrcCheck); 749 if (paravirtDebug.isNotEmpty()) 750 { 751 if (details == VMINFO_MACHINEREADABLE) 752 RTPrintf("paravirtdebug=\"%ls\"\n", paravirtDebug.raw()); 753 else 754 RTPrintf("Paravirt. Debug: %ls\n", paravirtDebug.raw()); 755 } 747 756 748 757 MachineState_T machineState; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r57358 r58437 64 64 MODIFYVM_TFRESET, 65 65 MODIFYVM_PARAVIRTPROVIDER, 66 MODIFYVM_PARAVIRTDEBUG, 66 67 MODIFYVM_HWVIRTEX, 67 68 MODIFYVM_NESTEDPAGING, … … 232 233 { "--triplefaultreset", MODIFYVM_TFRESET, RTGETOPT_REQ_BOOL_ONOFF }, 233 234 { "--paravirtprovider", MODIFYVM_PARAVIRTPROVIDER, RTGETOPT_REQ_STRING }, 235 { "--paravirtdebug", MODIFYVM_PARAVIRTDEBUG, RTGETOPT_REQ_STRING }, 234 236 { "--hwvirtex", MODIFYVM_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF }, 235 237 { "--nestedpaging", MODIFYVM_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF }, … … 688 690 } 689 691 692 case MODIFYVM_PARAVIRTDEBUG: 693 { 694 CHECK_ERROR(sessionMachine, COMSETTER(ParavirtDebug)(Bstr(ValueUnion.psz).raw())); 695 break; 696 } 697 690 698 case MODIFYVM_HWVIRTEX: 691 699 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r58383 r58437 1052 1052 <desc>Microsoft Hyper-V.</desc> 1053 1053 </const> 1054 1055 1056 1054 <const name="KVM" value="5"> 1055 <desc>Linux KVM.</desc> 1056 </const> 1057 1057 </enum> 1058 1058 … … 4207 4207 wrap-hint-server-addinterfaces="IInternalMachineControl" 4208 4208 wrap-hint-server="manualaddinterfaces" 4209 reservedMethods="8" reservedAttributes="1 6"4209 reservedMethods="8" reservedAttributes="14" 4210 4210 > 4211 4211 <desc> … … 5044 5044 This attribute is currently not implemented. 5045 5045 </result> 5046 </desc> 5047 </attribute> 5048 5049 <attribute name="paravirtDebug" type="wstring"> 5050 <desc> 5051 Debug parameters for the paravirtualized guest interface provider. 5046 5052 </desc> 5047 5053 </attribute> -
trunk/src/VBox/Main/include/MachineImpl.h
r58383 r58437 314 314 ChipsetType_T mChipsetType; 315 315 ParavirtProvider_T mParavirtProvider; 316 Utf8Str mParavirtDebug; 316 317 BOOL mEmulatedUSBCardReaderEnabled; 317 318 … … 501 502 ChipsetType_T i_getChipsetType() const { return mHWData->mChipsetType; } 502 503 ParavirtProvider_T i_getParavirtProvider() const { return mHWData->mParavirtProvider; } 504 Utf8Str i_getParavirtDebug() const { return mHWData->mParavirtDebug; } 503 505 504 506 void i_setModified(uint32_t fl, bool fAllowStateModification = true); … … 958 960 HRESULT getParavirtProvider(ParavirtProvider_T *aParavirtProvider); 959 961 HRESULT setParavirtProvider(ParavirtProvider_T aParavirtProvider); 962 HRESULT getParavirtDebug(com::Utf8Str &aParavirtDebug); 963 HRESULT setParavirtDebug(const com::Utf8Str &aParavirtDebug); 960 964 HRESULT getFaultToleranceState(FaultToleranceState_T *aFaultToleranceState); 961 965 HRESULT setFaultToleranceState(FaultToleranceState_T aFaultToleranceState); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r58056 r58437 946 946 hrc = pMachine->GetEffectiveParavirtProvider(¶virtProvider); H(); 947 947 948 Bstr strParavirtDebug; 949 hrc = pMachine->COMGETTER(ParavirtDebug)(strParavirtDebug.asOutParam()); H(); 950 948 951 ChipsetType_T chipsetType; 949 952 hrc = pMachine->COMGETTER(ChipsetType)(&chipsetType); H(); … … 1290 1293 1291 1294 /* 1295 * Parse paravirt. debug options. 1296 */ 1297 bool fGimDebug = false; 1298 com::Utf8Str strGimDebugAddress = "127.0.0.1"; 1299 uint32_t uGimDebugPort = 50000; 1300 if (strParavirtDebug.isNotEmpty()) 1301 { 1302 /* Hyper-V debug options. */ 1303 if (paravirtProvider == ParavirtProvider_HyperV) 1304 { 1305 bool fGimHvDebug = false; 1306 com::Utf8Str strGimHvVendor; 1307 bool fGimHvVsIf; 1308 bool fGimHvHypercallIf; 1309 1310 size_t uPos = 0; 1311 com::Utf8Str strDebugOptions = strParavirtDebug; 1312 do 1313 { 1314 com::Utf8Str strKey; 1315 com::Utf8Str strVal; 1316 uPos = strDebugOptions.parseKeyValue(strKey, strVal, uPos); 1317 if ( strKey == "enabled" 1318 && strVal.toUInt32() == 1) 1319 { 1320 /* Apply defaults. */ 1321 fGimHvDebug = true; 1322 strGimHvVendor = "Microsoft Hv"; 1323 fGimHvVsIf = true; 1324 fGimHvHypercallIf = false; 1325 } 1326 else if (strKey == "address") 1327 strGimDebugAddress = strVal; 1328 else if (strKey == "port") 1329 uGimDebugPort = strVal.toUInt32(); 1330 else if (strKey == "vendor") 1331 strGimHvVendor = strVal; 1332 else if (strKey == "vsinterface") 1333 fGimHvVsIf = RT_BOOL(strVal.toUInt32()); 1334 else if (strKey == "hypercallinterface") 1335 fGimHvHypercallIf = RT_BOOL(strVal.toUInt32()); 1336 } while (uPos != com::Utf8Str::npos); 1337 1338 /* Update HyperV CFGM node with active debug options. */ 1339 if (fGimHvDebug) 1340 { 1341 PCFGMNODE pHvNode; 1342 InsertConfigNode(pParavirtNode, "HyperV", &pHvNode); 1343 InsertConfigString(pHvNode, "VendorID", strGimHvVendor); 1344 InsertConfigInteger(pHvNode, "VSInterface", fGimHvVsIf ? 1 : 0); 1345 InsertConfigInteger(pHvNode, "HypercallDebugInterface", fGimHvHypercallIf ? 1 : 0); 1346 fGimDebug = true; 1347 } 1348 } 1349 } 1350 1351 /* 1292 1352 * MM values. 1293 1353 */ … … 1411 1471 //InsertConfigNode(pInst, "Config", &pCfg); 1412 1472 1413 InsertConfigNode(pInst, "LUN#998", &pLunL0); 1414 InsertConfigString(pLunL0, "Driver", "UDP"); 1415 InsertConfigNode(pLunL0, "Config", &pLunL1); 1416 InsertConfigString(pLunL1, "ServerAddress", "127.0.0.1"); 1417 InsertConfigInteger(pLunL1, "ServerPort", 50000); 1473 if (fGimDebug) 1474 { 1475 InsertConfigNode(pInst, "LUN#998", &pLunL0); 1476 InsertConfigString(pLunL0, "Driver", "UDP"); 1477 InsertConfigNode(pLunL0, "Config", &pLunL1); 1478 InsertConfigString(pLunL1, "ServerAddress", strGimDebugAddress); 1479 InsertConfigInteger(pLunL1, "ServerPort", uGimDebugPort); 1480 } 1418 1481 } 1419 1482 -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r58420 r58437 1213 1213 } 1214 1214 } 1215 } 1216 1217 return S_OK; 1218 } 1219 1220 HRESULT Machine::getParavirtDebug(com::Utf8Str &aParavirtDebug) 1221 { 1222 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1223 1224 aParavirtDebug = mHWData->mParavirtDebug; 1225 return S_OK; 1226 } 1227 1228 HRESULT Machine::setParavirtDebug(const com::Utf8Str &aParavirtDebug) 1229 { 1230 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1231 1232 HRESULT rc = i_checkStateDependency(MutableStateDep); 1233 if (FAILED(rc)) return rc; 1234 1235 /** @todo Parse/validate options? */ 1236 if (aParavirtDebug != mHWData->mParavirtDebug) 1237 { 1238 i_setModified(IsModified_MachineData); 1239 mHWData.backup(); 1240 mHWData->mParavirtDebug = aParavirtDebug; 1215 1241 } 1216 1242 … … 8913 8939 mHWData->mChipsetType = data.chipsetType; 8914 8940 mHWData->mParavirtProvider = data.paravirtProvider; 8941 mHWData->mParavirtDebug = data.strParavirtDebug; 8915 8942 mHWData->mEmulatedUSBCardReaderEnabled = data.fEmulatedUSBCardReader; 8916 8943 mHWData->mHPETEnabled = data.fHPETEnabled; … … 10195 10222 // paravirt 10196 10223 data.paravirtProvider = mHWData->mParavirtProvider; 10197 10198 10224 data.strParavirtDebug = mHWData->mParavirtDebug; 10225 10226 // emulated USB card reader 10199 10227 data.fEmulatedUSBCardReader = !!mHWData->mEmulatedUSBCardReaderEnabled; 10200 10228 -
trunk/src/VBox/Main/xml/Settings.cpp
r58132 r58437 1997 1997 chipsetType(ChipsetType_PIIX3), 1998 1998 paravirtProvider(ParavirtProvider_Legacy), 1999 strParavirtDebug(""), 1999 2000 fEmulatedUSBCardReader(false), 2000 2001 clipboardMode(ClipboardMode_Disabled), … … 2074 2075 && (chipsetType == h.chipsetType) 2075 2076 && (paravirtProvider == h.paravirtProvider) 2077 && (strParavirtDebug == h.strParavirtDebug) 2076 2078 && (fEmulatedUSBCardReader == h.fEmulatedUSBCardReader) 2077 2079 && (vrdeSettings == h.vrdeSettings) … … 2969 2971 strProvider.c_str()); 2970 2972 } 2973 2974 Utf8Str strDebug; 2975 if (pelmHwChild->getAttributeValue("debug", strDebug)) 2976 hw.strParavirtDebug = strDebug; 2971 2977 } 2972 2978 else if (pelmHwChild->nameEquals("HPET")) … … 4296 4302 xml::ElementNode *pelmParavirt = pelmHardware->createChild("Paravirt"); 4297 4303 pelmParavirt->setAttribute("provider", pcszParavirtProvider); 4304 4305 if ( m->sv >= SettingsVersion_v1_16 4306 && hw.strParavirtDebug.isNotEmpty()) 4307 pelmParavirt->setAttribute("debug", hw.strParavirtDebug); 4298 4308 } 4299 4309 … … 5594 5604 if (m->sv < SettingsVersion_v1_16) 5595 5605 { 5596 // VirtualBox 5.1 adds a NVMe storage controller .5606 // VirtualBox 5.1 adds a NVMe storage controller, paravirt debug options. 5597 5607 for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin(); 5598 5608 it != storageMachine.llStorageControllers.end(); … … 5606 5616 return; 5607 5617 } 5618 } 5619 5620 if (hardwareMachine.strParavirtDebug.isNotEmpty()) 5621 { 5622 m->sv = SettingsVersion_v1_16; 5623 return; 5608 5624 } 5609 5625 }
Note:
See TracChangeset
for help on using the changeset viewer.