Changeset 106384 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Oct 16, 2024 1:58:41 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r106061 r106384 3969 3969 3970 3970 #ifdef VBOX_WITH_VIRT_ARMV8 3971 PlatformARM::PlatformARM() 3971 PlatformARM::PlatformARM() : 3972 fNestedHWVirt(false) 3972 3973 { 3973 3974 } … … 3975 3976 bool PlatformARM::operator==(const PlatformARM& h) const 3976 3977 { 3977 RT_NOREF(h);3978 return true;3978 return (this == &h) 3979 || (fNestedHWVirt == h.fNestedHWVirt); 3979 3980 } 3980 3981 #endif /* VBOX_WITH_VIRT_ARMV8 */ … … 5306 5307 } 5307 5308 5309 #ifdef VBOX_WITH_VIRT_ARMV8 5310 /** 5311 * Reads the ARM platform settings. 5312 * 5313 * For settings >= v1.20 these were stored under the "Platform/arm" node. 5314 * 5315 * @param elmPlatformARM Platform/arm node to read from. 5316 * @param platARM Where to store the ARM platform settings. 5317 */ 5318 void MachineConfigFile::readPlatformARM(const xml::ElementNode &elmPlatformARM, 5319 PlatformARM &platARM) 5320 { 5321 xml::NodesLoop nl1(elmPlatformARM); 5322 5323 const xml::ElementNode *pelChild; 5324 while ((pelChild = nl1.forAllNodes())) 5325 { 5326 if (pelChild->nameEquals("CPU")) 5327 { 5328 const xml::ElementNode *pelmCPUChild; 5329 if ((pelmCPUChild = pelChild->findChildElement("NestedHWVirt"))) 5330 pelmCPUChild->getAttributeValue("enabled", platARM.fNestedHWVirt); 5331 } 5332 } 5333 } 5334 #endif 5335 5308 5336 /** 5309 5337 * Reads the platform settings. … … 5443 5471 case PlatformArchitecture_ARM: 5444 5472 { 5445 /* Nothing here yet -- add ARM-specific stuff as soon as we have it. */ 5473 const xml::ElementNode *pelmPlatformARM; 5474 5475 pelmPlatformARM = elmPlatformOrHardware.findChildElement("arm"); 5476 if (pelmPlatformARM) 5477 readPlatformARM(*pelmPlatformARM, plat.arm); 5446 5478 break; 5447 5479 } … … 7350 7382 } 7351 7383 7384 #ifdef VBOX_WITH_VIRT_ARMV8 7385 /** 7386 * Writes ARM-specific platform settings out to the XML. 7387 * 7388 * For settings >= v1.20 this creates a \<arm\> node under elmParent. 7389 * keys under that. Called for both the \<Machine\> node and for snapshots. 7390 * 7391 * @param elmParent Parent element. 7392 * For settings >= v1.20 this is the \<Platform\> element. 7393 * @param elmCPU CPU element platform-generic settings. 7394 * For settings >= v1.20 this is the \<Platform/CPU\> element. 7395 * @param platARM ARM-specific platform settings to use for building the XML. 7396 */ 7397 void MachineConfigFile::buildPlatformARMXML(xml::ElementNode &elmParent, const PlatformARM &platARM) 7398 { 7399 xml::ElementNode *pelmARMRoot = elmParent.createChild("arm"); 7400 xml::ElementNode *pelmARMCPU = pelmARMRoot->createChild("CPU"); 7401 7402 if (platARM.fNestedHWVirt) 7403 pelmARMCPU->createChild("NestedHWVirt")->setAttribute("enabled", platARM.fNestedHWVirt); 7404 } 7405 #endif /* VBOX_WITH_VIRT_ARMV8 */ 7406 7407 7352 7408 /** 7353 7409 * Stores platform-generic and platform-specific data and then writes out the XML. … … 7465 7521 if (plat.architectureType == PlatformArchitecture_x86) 7466 7522 buildPlatformX86XML(*pelmPlatformOrHardware, *pelmCPU, plat.x86); 7467 /** @todo Put ARM stuff here as soon as we have it. */ 7523 #ifdef VBOX_WITH_VIRT_ARMV8 7524 else if (plat.architectureType == PlatformArchitecture_ARM) 7525 { 7526 Assert(m->sv >= SettingsVersion_v1_20); 7527 buildPlatformARMXML(*pelmPlatformOrHardware, plat.arm); 7528 } 7529 #endif 7468 7530 } 7469 7531
Note:
See TracChangeset
for help on using the changeset viewer.