Changeset 87241 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Jan 13, 2021 3:56:05 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r85769 r87241 411 411 else if (uMinor == 18) 412 412 sv = SettingsVersion_v1_18; 413 else if (uMinor > 18) 413 else if (uMinor == 19) 414 sv = SettingsVersion_v1_19; 415 else if (uMinor > 19) 414 416 sv = SettingsVersion_Future; 415 417 } … … 1043 1045 break; 1044 1046 1047 case SettingsVersion_v1_19: 1048 pcszVersion = "1.19"; 1049 break; 1050 1045 1051 default: 1046 1052 // catch human error: the assertion below will trigger in debug … … 1065 1071 // but as it's an omission of someone who changed this file 1066 1072 // it's the only generic possibility. 1067 pcszVersion = "1.1 8";1068 m->sv = SettingsVersion_v1_1 8;1073 pcszVersion = "1.19"; 1074 m->sv = SettingsVersion_v1_19; 1069 1075 } 1070 1076 break; … … 3362 3368 keyboardHIDType(KeyboardHIDType_PS2Keyboard), 3363 3369 chipsetType(ChipsetType_PIIX3), 3370 iommuType(IommuType_None), 3364 3371 paravirtProvider(ParavirtProvider_Legacy), // default for old VMs, for new ones it's ParavirtProvider_Default 3365 3372 strParavirtDebug(""), … … 3486 3493 && keyboardHIDType == h.keyboardHIDType 3487 3494 && chipsetType == h.chipsetType 3495 && iommuType == h.iommuType 3488 3496 && paravirtProvider == h.paravirtProvider 3489 3497 && strParavirtDebug == h.strParavirtDebug … … 4601 4609 N_("Invalid value '%s' in Chipset/@type"), 4602 4610 strChipsetType.c_str()); 4611 } 4612 } 4613 else if (pelmHwChild->nameEquals("Iommu")) 4614 { 4615 Utf8Str strIommuType; 4616 if (pelmHwChild->getAttributeValue("type", strIommuType)) 4617 { 4618 if (strIommuType == "None") 4619 hw.iommuType = IommuType_None; 4620 else if (strIommuType == "Automatic") 4621 hw.iommuType = IommuType_Automatic; 4622 else if (strIommuType == "AMD") 4623 hw.iommuType = IommuType_AMD; 4624 else 4625 throw ConfigFileError(this, 4626 pelmHwChild, 4627 N_("Invalid value '%s' in Iommu/@type"), 4628 strIommuType.c_str()); 4603 4629 } 4604 4630 } … … 6092 6118 && hw.strParavirtDebug.isNotEmpty()) 6093 6119 pelmParavirt->setAttribute("debug", hw.strParavirtDebug); 6120 } 6121 6122 if ( m->sv >= SettingsVersion_v1_19 6123 && hw.iommuType != IommuType_None) 6124 { 6125 const char *pcszIommuType; 6126 switch (hw.iommuType) 6127 { 6128 case IommuType_None: pcszIommuType = "None"; break; 6129 case IommuType_Automatic: pcszIommuType = "Automatic"; break; 6130 case IommuType_AMD: pcszIommuType = "AMD"; break; 6131 default: Assert(false); pcszIommuType = "None"; break; 6132 } 6133 6134 xml::ElementNode *pelmIommu = pelmHardware->createChild("Iommu"); 6135 pelmIommu->setAttribute("type", pcszIommuType); 6094 6136 } 6095 6137 … … 7631 7673 void MachineConfigFile::bumpSettingsVersionIfNeeded() 7632 7674 { 7675 if (m->sv < SettingsVersion_v1_19) 7676 { 7677 // VirtualBox 6.2 adds iommu device. 7678 if (hardwareMachine.iommuType != IommuType_None) 7679 { 7680 m->sv = SettingsVersion_v1_19; 7681 return; 7682 } 7683 } 7684 7633 7685 if (m->sv < SettingsVersion_v1_18) 7634 7686 {
Note:
See TracChangeset
for help on using the changeset viewer.