Changeset 50996 in vbox
- Timestamp:
- Apr 8, 2014 1:15:27 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 93182
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r50196 r50996 18 18 19 19 /* 20 * Copyright (C) 2007-201 3Oracle Corporation20 * Copyright (C) 2007-2014 Oracle Corporation 21 21 * 22 22 * This file is part of VirtualBox Open Source Edition (OSE), as … … 866 866 bool operator==(const Hardware&) const; 867 867 868 bool areParavirtDefaultSettings() const 869 { 870 return paravirtProvider == ParavirtProvider_Legacy; 871 } 872 868 873 com::Utf8Str strVersion; // hardware version, optional 869 874 com::Guid uuid; // hardware uuid, optional (null). … … 912 917 913 918 ChipsetType_T chipsetType; // requires settings version 1.11 (VirtualBox 4.0) 919 ParavirtProvider_T paravirtProvider; // requires settings version 1.15 (VirtualBox 4.4) 914 920 915 921 bool fEmulatedUSBCardReader; // 1.12 (VirtualBox 4.1) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r50447 r50996 179 179 " [--hpet on|off]\n" 180 180 " [--triplefaultreset on|off]\n" 181 " [--paravirtprovider none|default|legacy|minimal|\n" 182 " hyperv]\n" 181 183 " [--hwvirtex on|off]\n" 182 184 " [--nestedpaging on|off]\n" … … 328 330 " [--clipboard disabled|hosttoguest|guesttohost|\n" 329 331 " bidirectional]\n" 330 " [--draganddrop disabled|hosttoguest \n");332 " [--draganddrop disabled|hosttoguest]\n"); 331 333 RTStrmPrintf(pStrm, 332 334 " [--vrde on|off]\n" -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r50721 r50996 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 676 676 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_VPID, &f), "vtxvpid", "VT-x VPID"); 677 677 SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_UnrestrictedExecution, &f), "vtxux", "VT-x unr. exec."); 678 679 ParavirtProvider_T paravirtProvider; 680 CHECK_ERROR2_RET(machine, COMGETTER(ParavirtProvider)(¶virtProvider), hrcCheck); 681 const char *pszParavirtProvider; 682 switch (paravirtProvider) 683 { 684 case ParavirtProvider_None: 685 if (details == VMINFO_MACHINEREADABLE) 686 pszParavirtProvider = "none"; 687 else 688 pszParavirtProvider = "None"; 689 break; 690 691 case ParavirtProvider_Default: 692 if (details == VMINFO_MACHINEREADABLE) 693 pszParavirtProvider = "default"; 694 else 695 pszParavirtProvider = "Default"; 696 break; 697 698 case ParavirtProvider_Legacy: 699 if (details == VMINFO_MACHINEREADABLE) 700 pszParavirtProvider = "legacy"; 701 else 702 pszParavirtProvider = "Legacy"; 703 break; 704 705 case ParavirtProvider_Minimal: 706 if (details == VMINFO_MACHINEREADABLE) 707 pszParavirtProvider = "minimal"; 708 else 709 pszParavirtProvider = "Minimal"; 710 break; 711 712 case ParavirtProvider_HyperV: 713 if (details == VMINFO_MACHINEREADABLE) 714 pszParavirtProvider = "hyperv"; 715 else 716 pszParavirtProvider = "HyperV"; 717 break; 718 719 default: 720 if (details == VMINFO_MACHINEREADABLE) 721 pszParavirtProvider = "unknown"; 722 else 723 pszParavirtProvider = "Unknown"; 724 } 725 if (details == VMINFO_MACHINEREADABLE) 726 RTPrintf("paravirtprovider=\"%s\"\n", pszParavirtProvider); 727 else 728 RTPrintf("Paravirt. Provider: %s\n", pszParavirtProvider); 729 678 730 679 731 MachineState_T machineState; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r50721 r50996 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 62 62 MODIFYVM_SYNTHCPU, 63 63 MODIFYVM_TFRESET, 64 MODIFYVM_PARAVIRTPROVIDER, 64 65 MODIFYVM_HWVIRTEX, 65 66 MODIFYVM_NESTEDPAGING, … … 222 223 { "--longmode", MODIFYVM_LONGMODE, RTGETOPT_REQ_BOOL_ONOFF }, 223 224 { "--synthcpu", MODIFYVM_SYNTHCPU, RTGETOPT_REQ_BOOL_ONOFF }, 224 { "--triplefaultreset", MODIFYVM_TFRESET, RTGETOPT_REQ_BOOL_ONOFF }, 225 { "--triplefaultreset", MODIFYVM_TFRESET, RTGETOPT_REQ_BOOL_ONOFF }, 226 { "--paravirtprovider", MODIFYVM_PARAVIRTPROVIDER, RTGETOPT_REQ_STRING }, 225 227 { "--hwvirtex", MODIFYVM_HWVIRTEX, RTGETOPT_REQ_BOOL_ONOFF }, 226 228 { "--nestedpaging", MODIFYVM_NESTEDPAGING, RTGETOPT_REQ_BOOL_ONOFF }, … … 631 633 } 632 634 635 case MODIFYVM_PARAVIRTPROVIDER: 636 { 637 if ( !RTStrICmp(ValueUnion.psz, "none") 638 || !RTStrICmp(ValueUnion.psz, "disabled")) 639 CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_None)); 640 else if (!RTStrICmp(ValueUnion.psz, "default")) 641 CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_Default)); 642 else if (!RTStrICmp(ValueUnion.psz, "legacy")) 643 CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_Legacy)); 644 else if (!RTStrICmp(ValueUnion.psz, "minimal")) 645 CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_Minimal)); 646 else if (!RTStrICmp(ValueUnion.psz, "hyperv")) 647 CHECK_ERROR(machine, COMSETTER(ParavirtProvider)(ParavirtProvider_HyperV)); 648 else 649 { 650 errorArgument("Invalid --paravirtprovider argument '%s'", ValueUnion.psz); 651 rc = E_FAIL; 652 } 653 break; 654 } 655 633 656 case MODIFYVM_HWVIRTEX: 634 657 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r50857 r50996 1008 1008 </desc> 1009 1009 </const> 1010 </enum> 1011 1012 <enum 1013 name="ParavirtProvider" 1014 uuid="f9448c17-7caa-4ca7-9349-edafe369fcb5" 1015 > 1016 <desc> 1017 The paravirtualized guest interface provider. This enumeration represents possible 1018 values for the <link to="IMachine::paravirtProvider"/> attribute. 1019 </desc> 1020 <const name="None" value="0"> 1021 <desc>No provider is used.</desc> 1022 </const> 1023 <const name="Default" value="1"> 1024 <desc>A default provider is automatically chosen according to the guest OS type.</desc> 1025 </const> 1026 <const name="Legacy" value="2"> 1027 <desc>Used for VMs which didn't used to have any provider settings. Usually 1028 interpreted as @c None for most VMs.</desc> 1029 </const> 1030 <const name="Minimal" value="3"> 1031 <desc>A minimal set of features to expose to the paravirtualized guest.</desc> 1032 </const> 1033 <const name="HyperV" value="4"> 1034 <desc>Microsoft Hyper-V.</desc> 1035 </const> 1010 1036 </enum> 1011 1037 … … 4814 4840 </attribute> 4815 4841 4842 <attribute name="paravirtProvider" type="ParavirtProvider"> 4843 <desc> 4844 The paravirtualized guest interface provider. 4845 </desc> 4846 </attribute> 4847 4816 4848 <attribute name="faultToleranceState" type="FaultToleranceState"> 4817 4849 <desc> -
trunk/src/VBox/Main/include/MachineImpl.h
r50651 r50996 5 5 6 6 /* 7 * Copyright (C) 2006-201 3Oracle Corporation7 * Copyright (C) 2006-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 307 307 PointingHIDType_T mPointingHIDType; 308 308 ChipsetType_T mChipsetType; 309 ParavirtProvider_T mParavirtProvider; 309 310 BOOL mEmulatedUSBCardReaderEnabled; 310 311 … … 505 506 STDMETHOD(COMGETTER(ChipsetType))(ChipsetType_T *aChipsetType); 506 507 STDMETHOD(COMSETTER(ChipsetType))(ChipsetType_T aChipsetType); 508 STDMETHOD(COMGETTER(ParavirtProvider))(ParavirtProvider_T *aParavirtProvider); 509 STDMETHOD(COMSETTER(ParavirtProvider))(ParavirtProvider_T aParavirtProvider); 507 510 STDMETHOD(COMGETTER(IOCacheEnabled))(BOOL *aEnabled); 508 511 STDMETHOD(COMSETTER(IOCacheEnabled))(BOOL aEnabled); … … 721 724 */ 722 725 ChipsetType_T getChipsetType() const { return mHWData->mChipsetType; } 726 ParavirtProvider_T getParavirtProvider() const { return mHWData->mParavirtProvider; } 723 727 724 728 void setModified(uint32_t fl, bool fAllowStateModification = true); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r50914 r50996 872 872 uint32_t cbMcfgLength = 0; 873 873 874 ParavirtProvider_T paravirtProvider; 875 hrc = pMachine->COMGETTER(ParavirtProvider)(¶virtProvider); H(); 876 874 877 ChipsetType_T chipsetType; 875 878 hrc = pMachine->COMGETTER(ChipsetType)(&chipsetType); H(); … … 1181 1184 InsertConfigInteger(pRoot, "PowerOffInsteadOfReset", 1); 1182 1185 1183 1186 /* 1187 * Paravirt. provider. 1188 */ 1189 PCFGMNODE pParavirtNode; 1190 InsertConfigNode(pRoot, "GIM", &pParavirtNode); 1191 const char *pcszParavirtProvider; 1192 switch (paravirtProvider) 1193 { 1194 case ParavirtProvider_None: 1195 pcszParavirtProvider = "None"; 1196 break; 1197 1198 case ParavirtProvider_Default: /** @todo Choose a provider based on guest OS type. There is no "Default" provider. */ 1199 pcszParavirtProvider = "None"; 1200 break; 1201 1202 case ParavirtProvider_Legacy: 1203 { 1204 if (fOsXGuest) 1205 pcszParavirtProvider = "Minimal"; 1206 else 1207 pcszParavirtProvider = "None"; 1208 break; 1209 } 1210 1211 case ParavirtProvider_Minimal: 1212 pcszParavirtProvider = "Minimal"; 1213 break; 1214 1215 case ParavirtProvider_HyperV: 1216 pcszParavirtProvider = "HyperV"; 1217 break; 1218 1219 default: 1220 AssertMsgFailed(("Invalid paravirtProvider=%d\n", paravirtProvider)); 1221 return VMR3SetError(pUVM, VERR_INVALID_PARAMETER, RT_SRC_POS, N_("Invalid paravirt. provider '%d'"), 1222 paravirtProvider); 1223 } 1224 InsertConfigString(pParavirtNode, "Provider", pcszParavirtProvider); 1184 1225 1185 1226 /* -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r50922 r50996 5 5 6 6 /* 7 * Copyright (C) 2004-201 3Oracle Corporation7 * Copyright (C) 2004-2014 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 206 206 mPointingHIDType = PointingHIDType_PS2Mouse; 207 207 mChipsetType = ChipsetType_PIIX3; 208 mParavirtProvider = ParavirtProvider_Default; 208 209 mEmulatedUSBCardReaderEnabled = FALSE; 209 210 … … 1304 1305 } 1305 1306 } 1307 } 1308 1309 return S_OK; 1310 } 1311 1312 STDMETHODIMP Machine::COMGETTER(ParavirtProvider)(ParavirtProvider_T *aParavirtProvider) 1313 { 1314 CheckComArgOutPointerValid(aParavirtProvider); 1315 1316 AutoCaller autoCaller(this); 1317 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1318 1319 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1320 1321 *aParavirtProvider = mHWData->mParavirtProvider; 1322 1323 return S_OK; 1324 } 1325 1326 STDMETHODIMP Machine::COMSETTER(ParavirtProvider)(ParavirtProvider_T aParavirtProvider) 1327 { 1328 AutoCaller autoCaller(this); 1329 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1330 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1331 1332 HRESULT rc = checkStateDependency(MutableStateDep); 1333 if (FAILED(rc)) return rc; 1334 1335 if (aParavirtProvider != mHWData->mParavirtProvider) 1336 { 1337 setModified(IsModified_MachineData); 1338 mHWData.backup(); 1339 mHWData->mParavirtProvider = aParavirtProvider; 1306 1340 } 1307 1341 … … 9362 9396 mHWData->mKeyboardHIDType = data.keyboardHIDType; 9363 9397 mHWData->mChipsetType = data.chipsetType; 9398 mHWData->mParavirtProvider = data.paravirtProvider; 9364 9399 mHWData->mEmulatedUSBCardReaderEnabled = data.fEmulatedUSBCardReader; 9365 9400 mHWData->mHPETEnabled = data.fHPETEnabled; … … 10637 10672 data.chipsetType = mHWData->mChipsetType; 10638 10673 10674 // paravirt 10675 data.paravirtProvider = mHWData->mParavirtProvider; 10676 10639 10677 data.fEmulatedUSBCardReader = !!mHWData->mEmulatedUSBCardReaderEnabled; 10640 10678 -
trunk/src/VBox/Main/xml/Settings.cpp
r50721 r50996 55 55 56 56 /* 57 * Copyright (C) 2007-201 3Oracle Corporation57 * Copyright (C) 2007-2014 Oracle Corporation 58 58 * 59 59 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1913 1913 keyboardHIDType(KeyboardHIDType_PS2Keyboard), 1914 1914 chipsetType(ChipsetType_PIIX3), 1915 paravirtProvider(ParavirtProvider_Legacy), 1915 1916 fEmulatedUSBCardReader(false), 1916 1917 clipboardMode(ClipboardMode_Disabled), … … 1987 1988 && (keyboardHIDType == h.keyboardHIDType) 1988 1989 && (chipsetType == h.chipsetType) 1990 && (paravirtProvider == h.paravirtProvider) 1989 1991 && (fEmulatedUSBCardReader == h.fEmulatedUSBCardReader) 1990 1992 && (vrdeSettings == h.vrdeSettings) … … 2812 2814 N_("Invalid value '%s' in Chipset/@type"), 2813 2815 strChipsetType.c_str()); 2816 } 2817 } 2818 else if (pelmHwChild->nameEquals("Paravirt")) 2819 { 2820 Utf8Str strProvider; 2821 if (pelmHwChild->getAttributeValue("provider", strProvider)) 2822 { 2823 if (strProvider == "None") 2824 hw.paravirtProvider = ParavirtProvider_None; 2825 else if (strProvider == "Default") 2826 hw.paravirtProvider = ParavirtProvider_Default; 2827 else if (strProvider == "Legacy") 2828 hw.paravirtProvider = ParavirtProvider_Legacy; 2829 else if (strProvider == "Minimal") 2830 hw.paravirtProvider = ParavirtProvider_Minimal; 2831 else if (strProvider == "HyperV") 2832 hw.paravirtProvider = ParavirtProvider_HyperV; 2833 else 2834 throw ConfigFileError(this, 2835 pelmHwChild, 2836 N_("Invalid value '%s' in Paravirt/@provider attribute"), 2837 strProvider.c_str()); 2814 2838 } 2815 2839 } … … 4116 4140 } 4117 4141 4142 if ( (m->sv >= SettingsVersion_v1_15) 4143 && !hw.areParavirtDefaultSettings() 4144 ) 4145 { 4146 const char *pcszParavirtProvider; 4147 switch (hw.paravirtProvider) 4148 { 4149 case ParavirtProvider_None: pcszParavirtProvider = "None"; break; 4150 case ParavirtProvider_Default: pcszParavirtProvider = "Default"; break; 4151 case ParavirtProvider_Legacy: pcszParavirtProvider = "Legacy"; break; 4152 case ParavirtProvider_Minimal: pcszParavirtProvider = "Minimal"; break; 4153 case ParavirtProvider_HyperV: pcszParavirtProvider = "HyperV"; break; 4154 default: Assert(false); pcszParavirtProvider = "None"; break; 4155 } 4156 4157 xml::ElementNode *pelmParavirt = pelmHardware->createChild("Paravirt"); 4158 pelmParavirt->setAttribute("provider", pcszParavirtProvider); 4159 } 4160 4118 4161 xml::ElementNode *pelmBoot = pelmHardware->createChild("Boot"); 4119 4162 for (BootOrderMap::const_iterator it = hw.mapBootOrder.begin(); … … 5368 5411 { 5369 5412 /* 5370 * Check whether the hotpluggable flag of all storage devices differs 5371 * from the default for old settings. 5372 * AHCI ports are hotpluggable by default every other device is not. 5413 * Check whether a paravirtualization provider other than "Legacy" is used, if so bump the version. 5373 5414 */ 5374 for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin(); 5375 it != storageMachine.llStorageControllers.end(); 5376 ++it) 5377 { 5378 bool fSettingsBumped = false; 5379 const StorageController &sctl = *it; 5380 5381 for (AttachedDevicesList::const_iterator it2 = sctl.llAttachedDevices.begin(); 5382 it2 != sctl.llAttachedDevices.end(); 5383 ++it2) 5384 { 5385 const AttachedDevice &att = *it2; 5386 5387 if ( ( att.fHotPluggable 5388 && sctl.controllerType != StorageControllerType_IntelAhci) 5389 || ( !att.fHotPluggable 5390 && sctl.controllerType == StorageControllerType_IntelAhci)) 5415 if (hardwareMachine.paravirtProvider != ParavirtProvider_Legacy) 5416 m->sv = SettingsVersion_v1_15; 5417 else 5418 { 5419 /* 5420 * Check whether the hotpluggable flag of all storage devices differs 5421 * from the default for old settings. 5422 * AHCI ports are hotpluggable by default every other device is not. 5423 */ 5424 for (StorageControllersList::const_iterator it = storageMachine.llStorageControllers.begin(); 5425 it != storageMachine.llStorageControllers.end(); 5426 ++it) 5427 { 5428 bool fSettingsBumped = false; 5429 const StorageController &sctl = *it; 5430 5431 for (AttachedDevicesList::const_iterator it2 = sctl.llAttachedDevices.begin(); 5432 it2 != sctl.llAttachedDevices.end(); 5433 ++it2) 5391 5434 { 5392 m->sv = SettingsVersion_v1_15; 5393 fSettingsBumped = true; 5435 const AttachedDevice &att = *it2; 5436 5437 if ( ( att.fHotPluggable 5438 && sctl.controllerType != StorageControllerType_IntelAhci) 5439 || ( !att.fHotPluggable 5440 && sctl.controllerType == StorageControllerType_IntelAhci)) 5441 { 5442 m->sv = SettingsVersion_v1_15; 5443 fSettingsBumped = true; 5444 break; 5445 } 5446 } 5447 5448 /* Abort early if possible. */ 5449 if (fSettingsBumped) 5394 5450 break; 5395 } 5396 } 5397 5398 /* Abort early if possible. */ 5399 if (fSettingsBumped) 5400 break; 5451 } 5401 5452 } 5402 5453 }
Note:
See TracChangeset
for help on using the changeset viewer.