Changeset 101035 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Sep 7, 2023 8:59:15 AM (15 months ago)
- Location:
- trunk/src/VBox/ValidationKit
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/testdriver/vbox.py
r101012 r101035 2241 2241 reporter.log(" ID: %s" % (oVM.id,)); 2242 2242 oOsType = self.oVBox.getGuestOSType(oVM.OSTypeId); 2243 if self.fpApiVer >= 7.1: 2244 if oVM.platform.architecture == vboxcon.PlatformArchitecture_ARM: 2245 sArch = 'ARM'; 2246 else: 2247 sArch = 'x86'; 2248 reporter.log(" Architecture: %s" % (sArch,)); 2249 else: # x86 only. 2250 reporter.log(" Architecture: x86"); 2243 2251 reporter.log(" OS Type: %s - %s" % (oVM.OSTypeId, oOsType.description,)); 2244 2252 reporter.log(" Machine state: %s" % (oVM.state,)); … … 2265 2273 reporter.log(" GraphicsController: %s" 2266 2274 % (self.oVBoxMgr.getEnumValueName('GraphicsControllerType', oVM.graphicsControllerType),)); # pylint: disable=not-callable 2267 reporter.log(" Chipset: %s" % (self.oVBoxMgr.getEnumValueName('ChipsetType', oVM.chipsetType),)); # pylint: disable=not-callable 2268 if self.fpApiVer >= 6.2 and hasattr(vboxcon, 'IommuType_None'): 2269 reporter.log(" IOMMU: %s" % (self.oVBoxMgr.getEnumValueName('IommuType', oVM.iommuType),)); # pylint: disable=not-callable 2270 reporter.log(" Firmware: %s" % (self.oVBoxMgr.getEnumValueName('FirmwareType', oVM.firmwareType),)); # pylint: disable=not-callable 2271 reporter.log(" HwVirtEx: %s" % (oVM.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_Enabled),)); 2272 reporter.log(" VPID support: %s" % (oVM.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_VPID),)); 2273 reporter.log(" Nested paging: %s" % (oVM.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_NestedPaging),)); 2274 atTypes = [ 2275 ( 'CPUPropertyType_PAE', 'PAE: '), 2276 ( 'CPUPropertyType_LongMode', 'Long-mode: '), 2277 ( 'CPUPropertyType_HWVirt', 'Nested VT-x/AMD-V: '), 2278 ( 'CPUPropertyType_APIC', 'APIC: '), 2279 ( 'CPUPropertyType_X2APIC', 'X2APIC: '), 2280 ( 'CPUPropertyType_TripleFaultReset', 'TripleFaultReset: '), 2281 ( 'CPUPropertyType_IBPBOnVMExit', 'IBPBOnVMExit: '), 2282 ( 'CPUPropertyType_SpecCtrl', 'SpecCtrl: '), 2283 ( 'CPUPropertyType_SpecCtrlByHost', 'SpecCtrlByHost: '), 2275 if self.fpApiVer >= 7.1: 2276 reporter.log(" Chipset: %s" % (self.oVBoxMgr.getEnumValueName('ChipsetType', oVM.platform.chipsetType),));# pylint: disable=not-callable 2277 if hasattr(vboxcon, 'IommuType_None'): 2278 reporter.log(" IOMMU: %s" % (self.oVBoxMgr.getEnumValueName('IommuType', oVM.platform.iommuType),));# pylint: disable=not-callable 2279 reporter.log(" Firmware: %s" 2280 % (self.oVBoxMgr.getEnumValueName('FirmwareType', oVM.firmwareSettings.firmwareType),)); # pylint: disable=not-callable 2281 if oVM.platform.architecture == vboxcon.PlatformArchitecture_x86: 2282 reporter.log(" HwVirtEx: %s" 2283 % (oVM.platform.x86.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_Enabled),)); 2284 reporter.log(" VPID support: %s" 2285 % (oVM.platform.x86.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_VPID),)); 2286 reporter.log(" Nested paging: %s" 2287 % (oVM.platform.x86.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_NestedPaging),)); 2288 else: 2289 reporter.log(" Chipset: %s" % (self.oVBoxMgr.getEnumValueName('ChipsetType', oVM.chipsetType),)); # pylint: disable=not-callable 2290 if self.fpApiVer >= 6.2 and hasattr(vboxcon, 'IommuType_None'): 2291 reporter.log(" IOMMU: %s" % (self.oVBoxMgr.getEnumValueName('IommuType', oVM.iommuType),)); # pylint: disable=not-callable 2292 reporter.log(" Firmware: %s" % (self.oVBoxMgr.getEnumValueName('FirmwareType', oVM.firmwareType),)); # pylint: disable=not-callable 2293 reporter.log(" HwVirtEx: %s" % (oVM.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_Enabled),)); 2294 reporter.log(" VPID support: %s" % (oVM.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_VPID),)); 2295 reporter.log(" Nested paging: %s" % (oVM.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_NestedPaging),)); 2296 atCpuPropertyTypesX86 = [ 2297 ( 'PAE', 'PAE: '), 2298 ( 'LongMode', 'Long-mode: '), 2299 ( 'HWVirt', 'Nested VT-x/AMD-V: '), 2300 ( 'APIC', 'APIC: '), 2301 ( 'X2APIC', 'X2APIC: '), 2302 ( 'TripleFaultReset', 'TripleFaultReset: '), 2303 ( 'IBPBOnVMExit', 'IBPBOnVMExit: '), 2304 ( 'SpecCtrl', 'SpecCtrl: '), 2305 ( 'SpecCtrlByHost', 'SpecCtrlByHost: '), 2306 ## @todo r=andy Add missing properties. 2284 2307 ]; 2285 for sEnumValue, sDesc in atTypes: 2286 if hasattr(vboxcon, sEnumValue): 2287 reporter.log(" %s%s" % (sDesc, oVM.getCPUProperty(getattr(vboxcon, sEnumValue)),)); 2288 reporter.log(" ACPI: %s" % (oVM.BIOSSettings.ACPIEnabled,)); 2289 reporter.log(" IO-APIC: %s" % (oVM.BIOSSettings.IOAPICEnabled,)); 2290 if self.fpApiVer >= 3.2: 2291 if self.fpApiVer >= 4.2: 2292 reporter.log(" HPET: %s" % (oVM.HPETEnabled,)); 2293 else: 2294 reporter.log(" HPET: %s" % (oVM.hpetEnabled,)); 2308 fnGetCpuPropertyX86 = None; 2309 if self.fpApiVer >= 7.1: 2310 sCpuPropertyTypeNamePrefix = 'CpuPropertyTypeX86_'; 2311 if oVM.platform.architecture == vboxcon.PlatformArchitecture_x86: 2312 fnGetCpuPropertyX86 = oVM.platform.x86.getCPUProperty; 2313 else: 2314 sCpuPropertyTypeNamePrefix = 'CpuPropertyType_'; 2315 fnGetCpuPropertyX86 = oVM.getCPUProperty; 2316 if fnGetCpuPropertyX86: 2317 for sEnumValue, sDesc in atCpuPropertyTypesX86: 2318 if hasattr(vboxcon, sCpuPropertyTypeNamePrefix + sEnumValue): 2319 reporter.log(" %s%s" % (sDesc, fnGetCpuPropertyX86(getattr(vboxcon, sEnumValue)),)); 2320 if self.fpApiVer >= 7.1: 2321 reporter.log(" ACPI: %s" % (oVM.firmwareSettings.ACPIEnabled,)); 2322 reporter.log(" IO-APIC: %s" % (oVM.firmwareSettings.IOAPICEnabled,)); 2323 if oVM.platform.architecture == vboxcon.PlatformArchitecture_x86: 2324 reporter.log(" HPET: %s" % (oVM.platform.x86.HPETEnabled,)); 2325 else: 2326 reporter.log(" ACPI: %s" % (oVM.BIOSSettings.ACPIEnabled,)); 2327 reporter.log(" IO-APIC: %s" % (oVM.BIOSSettings.IOAPICEnabled,)); 2328 if self.fpApiVer >= 3.2: 2329 if self.fpApiVer >= 4.2: 2330 reporter.log(" HPET: %s" % (oVM.HPETEnabled,)); 2331 else: 2332 reporter.log(" HPET: %s" % (oVM.hpetEnabled,)); 2295 2333 if self.fpApiVer >= 6.1 and hasattr(oVM, 'graphicsAdapter'): 2296 2334 reporter.log(" 3D acceleration: %s" % (oVM.graphicsAdapter.accelerate3DEnabled,)); … … 2501 2539 # 2502 2540 2503 def createTestVMOnly(self, sName, sKind): 2504 """ 2505 Creates and register a test VM without doing any kind of configuration. 2541 def createTestVMOnly(self, sName, sKind, sPlatformArchitecture = 'x86'): 2542 """ 2543 Creates and registers a test VM without doing any kind of configuration. 2544 Uses x86 as a platform architecture by default (only >= 7.1). 2506 2545 2507 2546 Returns VM object (IMachine) on success, None on failure. … … 2510 2549 return None; 2511 2550 2551 # Sanity. 2552 if self.fpApiVer < 7.1 \ 2553 and sPlatformArchitecture != 'x86': # 7.1 introduced platform support. 2554 reporter.errorXcpt('This host version of VirtualBox only supports x86 as platform architecture'); 2555 return None; 2556 2557 # Default to x86 if not explicitly specified. 2558 if not sPlatformArchitecture \ 2559 or sPlatformArchitecture == 'x86': 2560 enmPlatformArchitecture = vboxcon.PlatformArchitecture_x86; 2561 elif sPlatformArchitecture == 'ARM': 2562 enmPlatformArchitecture = vboxcon.PlatformArchitecture_ARM; 2563 else: 2564 reporter.error('Unkown platform architecture "%s"' % (sPlatformArchitecture,)); 2565 return None; 2566 2512 2567 # create + register the VM 2513 2568 try: 2514 if self.fpApiVer >= 7.0: # Introduces VM encryption (three new parameters, empty for now). 2569 if self.fpApiVer >= 7.1: # Introduces platform support (x86 + ARM). 2570 oVM = self.oVBox.createMachine("", sName, enmPlatformArchitecture, [], self.tryFindGuestOsId(sKind), \ 2571 "", "", "", ""); 2572 elif self.fpApiVer >= 7.0: # Introduces VM encryption (three new parameters, empty for now). 2515 2573 oVM = self.oVBox.createMachine("", sName, [], self.tryFindGuestOsId(sKind), "", "", "", ""); 2516 2574 elif self.fpApiVer >= 4.2: # Introduces grouping (third parameter, empty for now). … … 2553 2611 sName, 2554 2612 iGroup, 2613 sPlatformArchitecture = 'x86', 2555 2614 sHd = None, 2556 2615 cMbRam = None, … … 2585 2644 """ 2586 2645 # create + register the VM 2587 oVM = self.createTestVMOnly(sName, sKind );2646 oVM = self.createTestVMOnly(sName, sKind, sPlatformArchitecture); 2588 2647 if not oVM: 2589 2648 return None; … … 2599 2658 if fRc and cCpus is not None: 2600 2659 fRc = oSession.setCpuCount(cCpus); 2601 if fRc and fVirtEx is not None:2602 fRc = oSession.enableVirtEx(fVirtEx);2603 if fRc and fNestedPaging is not None:2604 fRc = oSession.enableNestedPaging(fNestedPaging);2605 if fRc and fIoApic is not None:2606 fRc = oSession.enableIoApic(fIoApic);2607 if fRc and fNstHwVirt is not None:2608 fRc = oSession.enableNestedHwVirt(fNstHwVirt);2609 if fRc and fPae is not None:2610 fRc = oSession.enablePae(fPae);2611 2660 if fRc and sDvdImage is not None: 2612 2661 fRc = oSession.attachDvd(sDvdImage, sDvdControllerType); … … 2684 2733 except: 2685 2734 reporter.errorXcpt('failed to configure recording for "%s"' % (sName)); 2686 if fRc and sChipsetType == 'piix3': 2687 fRc = oSession.setChipsetType(vboxcon.ChipsetType_PIIX3); 2688 elif fRc and sChipsetType == 'ich9': 2689 fRc = oSession.setChipsetType(vboxcon.ChipsetType_ICH9); 2735 if fRc: 2736 if sChipsetType == 'piix3': 2737 fRc = oSession.setChipsetType(vboxcon.ChipsetType_PIIX3); 2738 elif sChipsetType == 'ich9': 2739 fRc = oSession.setChipsetType(vboxcon.ChipsetType_ICH9); 2740 elif self.fpApiVer >= 7.1 \ 2741 and sChipsetType == 'armv8virtual': # ARM only is for VBox >= 7.1. 2742 fRc = oSession.setChipsetType(vboxcon.ChipsetType_ARMv8Virtual); 2743 else: # This is fatal. 2744 reporter.log('Unknown chipset type "%s" specified' % (sChipsetType,)); 2690 2745 if fRc and sCom1RawFile: 2691 2746 fRc = oSession.setupSerialToRawFile(0, sCom1RawFile); … … 2701 2756 elif sGraphicsControllerType == 'VBoxVGA': 2702 2757 fRc = oSession.setVideoControllerType(vboxcon.GraphicsControllerType_VBoxVGA); 2758 2759 # 2760 # x86-specifics. 2761 # 2762 if sPlatformArchitecture == 'x86': 2763 if fRc and fVirtEx is not None: 2764 fRc = oSession.enableVirtExX86(fVirtEx); 2765 if fRc and fNestedPaging is not None: 2766 fRc = oSession.enableNestedPagingX86(fNestedPaging); 2767 if fRc and fIoApic is not None: 2768 fRc = oSession.enableIoApic(fIoApic); 2769 if fRc and fNstHwVirt is not None: 2770 fRc = oSession.enableNestedHwVirtX86(fNstHwVirt); 2771 if fRc and fPae is not None: 2772 fRc = oSession.enablePaeX86(fPae); 2773 2774 # 2775 # ARM-specifics. 2776 # 2777 elif sPlatformArchitecture == 'ARM': 2778 pass; ## @todo BUGBUG Add stuff for ARM here. 2703 2779 2704 2780 if fRc: fRc = oSession.saveSettings(); … … 2735 2811 iGroup, 2736 2812 sKind, 2813 sPlatformArchitecture = 'x86', 2737 2814 sDvdImage = None, 2738 2815 fFastBootLogo = True, … … 2745 2822 """ 2746 2823 Creates a test VM with all defaults and no HDs. 2824 2825 Defaults to the x86 platform architecture if not explicitly specified otherwise. 2747 2826 """ 2748 2827 # create + register the VM 2749 oVM = self.createTestVMOnly(sName, sKind );2828 oVM = self.createTestVMOnly(sName, sKind, sPlatformArchitecture); 2750 2829 if oVM is not None: 2751 2830 # Configure the VM with defaults according to sKind. -
trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py
r101012 r101035 172 172 g_ksParavirtProviderMinimal, g_ksParavirtProviderHyperV, g_ksParavirtProviderKVM ); 173 173 174 ## @name String constants for platform architectures. The createVMXXX functions depend on these strings. 175 ## @{ 176 g_kasPlatformArchitectureX86 = 'x86'; 177 g_kasPlatformArchitectureARM = 'ARM'; 178 ## @} 179 180 ## Valid platform architectures. 181 g_kasPlatformArchitectures = ( g_kasPlatformArchitectureX86, g_kasPlatformArchitectureARM ); 182 174 183 # Mapping for support of paravirtualisation providers per guest OS. 175 184 #g_kdaParavirtProvidersSupported = { … … 214 223 """ 215 224 Base class for Test VMs. 225 226 Defaults to the x86 platform architecture. 216 227 """ 217 228 218 229 def __init__(self, # pylint: disable=too-many-arguments 219 230 sVmName, # type: str 231 sPlatformArchitecture = 'x86', # type: str 220 232 fGrouping = 0, # type: int 221 233 oSet = None, # type: TestVmSet … … 231 243 self.oSet = oSet # type: TestVmSet 232 244 self.sVmName = sVmName; 245 self.sPlatformArchitecture = sPlatformArchitecture; 233 246 self.iGroup = iGroup; # Startup group (for MAC address uniqueness and non-NAT networking). 234 247 self.fGrouping = fGrouping; … … 389 402 """ 390 403 return oTestDrv.createTestVmWithDefaults(self.sVmName, 391 iGroup = self.iGroup, 392 sKind = self.sKind, 393 eNic0AttachType = eNic0AttachType, 394 sDvdImage = sDvdImage, 395 fVmmDevTestingPart = self.fVmmDevTestingPart, 396 fVmmDevTestingMmio = self.fVmmDevTestingMmio, 397 sCom1RawFile = self.__sCom1RawFile if self.fCom1RawFile else None 404 iGroup = self.iGroup, 405 sKind = self.sKind, 406 sPlatformArchitecture = self.sPlatformArchitecture, 407 eNic0AttachType = eNic0AttachType, 408 sDvdImage = sDvdImage, 409 fVmmDevTestingPart = self.fVmmDevTestingPart, 410 fVmmDevTestingMmio = self.fVmmDevTestingMmio, 411 sCom1RawFile = self.__sCom1RawFile if self.fCom1RawFile else None 398 412 ); 399 413 … … 532 546 oSession = oTestDrv.openSession(oVM); 533 547 if oSession is not None: 534 fRc = oSession.enableVirtEx (sVirtMode != 'raw');535 fRc = fRc and oSession.enableNestedPaging (sVirtMode == 'hwvirt-np');548 fRc = oSession.enableVirtExX86(sVirtMode != 'raw'); 549 fRc = fRc and oSession.enableNestedPagingX86(sVirtMode == 'hwvirt-np'); 536 550 fRc = fRc and oSession.setCpuCount(cCpus); 537 551 if cCpus > 1: … … 550 564 551 565 fCfg64Bit = self.is64bitRequired() or (self.is64bit() and fHostSupports64bit and sVirtMode != 'raw'); 552 fRc = fRc and oSession.enableLongMode (fCfg64Bit);566 fRc = fRc and oSession.enableLongModeX86(fCfg64Bit); 553 567 if fCfg64Bit: # This is to avoid GUI pedantic warnings in the GUI. Sigh. 554 568 oOsType = oSession.getOsType(); … … 1237 1251 oSession = oTestDrv.openSession(oVM); 1238 1252 if oSession is not None: 1239 fRc = oSession.enableVirtEx (sVirtMode != 'raw');1240 fRc = fRc and oSession.enableNestedPaging (sVirtMode == 'hwvirt-np');1253 fRc = oSession.enableVirtExX86(sVirtMode != 'raw'); 1254 fRc = fRc and oSession.enableNestedPagingX86(sVirtMode == 'hwvirt-np'); 1241 1255 fRc = fRc and oSession.setCpuCount(cCpus); 1242 1256 if cCpus > 1: … … 1255 1269 1256 1270 fCfg64Bit = self.is64bitRequired() or (self.is64bit() and fHostSupports64bit and sVirtMode != 'raw'); 1257 fRc = fRc and oSession.enableLongMode (fCfg64Bit);1271 fRc = fRc and oSession.enableLongModeX86(fCfg64Bit); 1258 1272 if fCfg64Bit: # This is to avoid GUI pedantic warnings in the GUI. Sigh. 1259 1273 oOsType = oSession.getOsType(); … … 1614 1628 reporter.log(' Set of paravirtualized providers (modes) to tests. Intersected with what the test VM supports.'); 1615 1629 reporter.log(' Default is the first PV mode the test VMs support, generally same as "legacy".'); 1616 reporter.log(' --with- nested-hwvirt-only');1630 reporter.log(' --with-x86-nested-hwvirt-only'); 1617 1631 reporter.log(' Test VMs using nested hardware-virtualization only.'); 1618 reporter.log(' --without- nested-hwvirt-only');1632 reporter.log(' --without-x86-nested-hwvirt-only'); 1619 1633 reporter.log(' Test VMs not using nested hardware-virtualization only.'); 1634 reporter.log(' --platform-arch <architecture>'); 1635 reporter.log(' Specifies the test VM platform architecture to use.'); 1636 reporter.log(' Default: x86'); 1620 1637 ## @todo Add more options for controlling individual VMs. 1621 1638 return True; … … 1736 1753 oTestVm.asParavirtModesSup = oTestVm.asParavirtModesSupOrg; 1737 1754 1738 elif asArgs[iArg] == '--with-nested-hwvirt-only': 1755 # First is kept for backwards compatibility. 1756 elif asArgs[iArg] == '--with-nested-hwvirt-only' \ 1757 or asArgs[iArg] == '--with-x86-nested-hwvirt-only': 1739 1758 for oTestVm in self.aoTestVms: 1740 1759 if oTestVm.fNstHwVirt is False: 1741 1760 oTestVm.fSkip = True; 1742 1761 1743 elif asArgs[iArg] == '--without-nested-hwvirt-only': 1762 # First is kept for backwards compatibility. 1763 elif asArgs[iArg] == '--without-nested-hwvirt-only' \ 1764 or asArgs[iArg] == '--without-x86-nested-hwvirt-only': 1744 1765 for oTestVm in self.aoTestVms: 1745 1766 if oTestVm.fNstHwVirt is True: 1746 1767 oTestVm.fSkip = True; 1768 1769 elif asArgs[iArg] == '--platform-arch': 1770 iArg += 1; 1771 if iArg >= len(asArgs): 1772 raise base.InvalidOption('The "--platform-arch" takes a string to specify the platform architecture'); 1773 sPlatformArchitecture = asArgs[iArg]; 1774 if sPlatformArchitecture not in g_kasPlatformArchitectures: 1775 raise base.InvalidOption('The "--platform-arch" value "%s" is not valid; valid values are: %s' 1776 % (sPlatformArchitecture, ', '.join(g_kasPlatformArchitectures),)); 1777 for oTestVm in self.aoTestVms: 1778 oTestVm.sPlatformArchitecture = sPlatformArchitecture; 1747 1779 1748 1780 else: -
trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py
r99402 r101035 951 951 return True; 952 952 953 def enableVirtEx(self, fEnable): 954 """ 955 Enables or disables AMD-V/VT-x. 953 def isPlatformArch(self, enmPlatformArch): 954 """ 955 Returns if the machine is of the given platform architecture or not. 956 """ 957 if not self.o: 958 return False; 959 if self.fpApiVer >= 7.1: 960 return self.o.machine.platform.architecture == enmPlatformArch; 961 return enmPlatformArch == vboxcon.PlatformArchitecture_x86; # VBox < 7.1 only supported x86. 962 963 def isPlatformARM(self): 964 """ 965 Returns if the machine is of the ARM platform architecture or not. 966 """ 967 return self.isPlatformArch(vboxcon.PlatformArchitecture_ARM); 968 969 def isPlatformX86(self): 970 """ 971 Returns if the machine is of the x86 platform architecture or not. 972 """ 973 return self.isPlatformArch(vboxcon.PlatformArchitecture_x86); 974 975 def enableVirtExX86(self, fEnable): 976 """ 977 Enables or disables AMD-V/VT-x. x86 only. 956 978 Returns True on success and False on failure. Error information is logged. 957 """ 979 980 Ignored on non-x86 platform architectures. 981 """ 982 if not self.isPlatformX86(): return True; 958 983 # Enable/disable it. 959 984 fRc = True; 960 985 try: 961 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_Enabled, fEnable); 986 if self.fpApiVer >= 7.1: 987 self.o.machine.platform.x86.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_Enabled, fEnable); 988 else: 989 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_Enabled, fEnable); 962 990 except: 963 991 reporter.errorXcpt('failed to set HWVirtExPropertyType_Enabled=%s for "%s"' % (fEnable, self.sName)); … … 969 997 if fRc and hasattr(vboxcon, 'HWVirtExPropertyType_Force'): 970 998 try: 971 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_Force, fEnable); 999 if self.fpApiVer >= 7.1: 1000 self.o.machine.platform.x86.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_Force, fEnable); 1001 else: 1002 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_Force, fEnable); 972 1003 except: 973 1004 reporter.errorXcpt('failed to set HWVirtExPropertyType_Force=%s for "%s"' % (fEnable, self.sName)); … … 982 1013 return fRc; 983 1014 984 def enableNestedPaging (self, fEnable):985 """ 986 Enables or disables nested paging. .1015 def enableNestedPagingX86(self, fEnable): 1016 """ 1017 Enables or disables nested paging. x86 only. 987 1018 Returns True on success and False on failure. Error information is logged. 988 """ 1019 1020 Ignored on non-x86 platform architectures. 1021 """ 1022 if not self.isPlatformX86(): return True; 989 1023 ## @todo Add/remove force CFGM thing, we don't want fallback logic when testing. 990 1024 fRc = True; 991 1025 try: 992 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_NestedPaging, fEnable); 1026 if self.fpApiVer >= 7.1: 1027 self.o.machine.platform.x86.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_NestedPaging, fEnable); 1028 else: 1029 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_NestedPaging, fEnable); 993 1030 except: 994 1031 reporter.errorXcpt('failed to set HWVirtExPropertyType_NestedPaging=%s for "%s"' % (fEnable, self.sName)); … … 999 1036 return fRc; 1000 1037 1001 def enableLongMode (self, fEnable):1002 """ 1003 Enables or disables LongMode. 1038 def enableLongModeX86(self, fEnable): 1039 """ 1040 Enables or disables LongMode. x86 only. 1004 1041 Returns True on success and False on failure. Error information is logged. 1005 """ 1042 1043 Ignored on non-x86 platform architectures. 1044 """ 1045 if not self.isPlatformX86(): return True; 1006 1046 # Supported. 1007 1047 if self.fpApiVer < 4.2 or not hasattr(vboxcon, 'HWVirtExPropertyType_LongMode'): … … 1011 1051 fRc = True; 1012 1052 try: 1013 self.o.machine.setCPUProperty(vboxcon.CPUPropertyType_LongMode, fEnable); 1053 if self.fpApiVer >= 7.1: 1054 self.o.machine.platform.x86.setCPUProperty(vboxcon.CPUPropertyTypeX86_LongMode, fEnable); 1055 else: 1056 self.o.machine.setCPUProperty(vboxcon.CPUPropertyType_LongMode, fEnable); 1014 1057 except: 1015 1058 reporter.errorXcpt('failed to set CPUPropertyType_LongMode=%s for "%s"' % (fEnable, self.sName)); … … 1020 1063 return fRc; 1021 1064 1022 def enableNestedHwVirt (self, fEnable):1023 """ 1024 Enables or disables Nested Hardware-Virtualization. 1065 def enableNestedHwVirtX86(self, fEnable): 1066 """ 1067 Enables or disables Nested Hardware-Virtualization. x86 only. 1025 1068 Returns True on success and False on failure. Error information is logged. 1026 """ 1069 1070 Ignored on non-x86 platform architectures. 1071 """ 1072 if not self.isPlatformX86(): return True; 1027 1073 # Supported. 1028 1074 if self.fpApiVer < 5.3 or not hasattr(vboxcon, 'CPUPropertyType_HWVirt'): … … 1032 1078 fRc = True; 1033 1079 try: 1034 self.o.machine.setCPUProperty(vboxcon.CPUPropertyType_HWVirt, fEnable); 1080 if self.fpApiVer >= 7.1: 1081 self.o.machine.platform.x86.setCPUProperty(vboxcon.CPUPropertyTypeX86_HWVirt, fEnable); 1082 else: 1083 self.o.machine.setCPUProperty(vboxcon.CPUPropertyType_HWVirt, fEnable); 1035 1084 except: 1036 1085 reporter.errorXcpt('failed to set CPUPropertyType_HWVirt=%s for "%s"' % (fEnable, self.sName)); … … 1041 1090 return fRc; 1042 1091 1043 def enablePae (self, fEnable):1044 """ 1045 Enables or disables PAE 1092 def enablePaeX86(self, fEnable): 1093 """ 1094 Enables or disables PAE. x86 only. 1046 1095 Returns True on success and False on failure. Error information is logged. 1047 """ 1096 1097 Ignored on non-x86 platform architectures. 1098 """ 1099 if not self.isPlatformX86(): return True; 1048 1100 fRc = True; 1049 1101 try: 1050 if self.fpApiVer >= 3.2: # great, ain't it? 1102 if self.fpApiVer >= 7.1: 1103 self.o.machine.platform.x86.setCPUProperty(vboxcon.CPUPropertyTypeX86_PAE, fEnable); 1104 elif self.fpApiVer >= 3.2: # great, ain't it? 1051 1105 self.o.machine.setCPUProperty(vboxcon.CPUPropertyType_PAE, fEnable); 1052 1106 else: … … 1062 1116 def enableIoApic(self, fEnable): 1063 1117 """ 1064 Enables or disables the IO-APIC 1118 Enables or disables the IO-APIC. 1065 1119 Returns True on success and False on failure. Error information is logged. 1066 1120 """ 1067 1121 fRc = True; 1068 1122 try: 1069 self.o.machine.BIOSSettings.IOAPICEnabled = fEnable; 1070 except: 1071 reporter.errorXcpt('failed to set BIOSSettings.IOAPICEnabled=%s for "%s"' % (fEnable, self.sName)); 1123 if self.fpApiVer >= 7.1: 1124 self.o.machine.firmwareSettings.IOAPICEnabled = fEnable; 1125 else: 1126 self.o.machine.BIOSSettings.IOAPICEnabled = fEnable; 1127 except: 1128 reporter.errorXcpt('failed to set firmwareSettings.IOAPICEnabled=%s for "%s"' % (fEnable, self.sName)); 1072 1129 fRc = False; 1073 1130 else: 1074 reporter.log('set BIOSSettings.IOAPICEnabled=%s for "%s"' % (fEnable, self.sName));1131 reporter.log('set firmwareSettings.IOAPICEnabled=%s for "%s"' % (fEnable, self.sName)); 1075 1132 self.oTstDrv.processPendingEvents(); 1076 1133 return fRc; 1077 1134 1078 def enableHpet (self, fEnable):1079 """ 1080 Enables or disables the HPET 1135 def enableHpetX86(self, fEnable): 1136 """ 1137 Enables or disables the HPET. x86 only. 1081 1138 Returns True on success and False on failure. Error information is logged. 1082 """ 1139 1140 Ignored on non-x86 platform architectures. 1141 """ 1142 if not self.isPlatformX86(): return True; 1083 1143 fRc = True; 1084 1144 try: 1085 if self.fpApiVer >= 4.2: 1145 if self.fpApiVer >= 7.1: 1146 self.o.machine.platform.x86.HPETEnabled = fEnable; 1147 elif self.fpApiVer >= 4.2: 1086 1148 self.o.machine.HPETEnabled = fEnable; 1087 1149 else: … … 1097 1159 def enableUsbHid(self, fEnable): 1098 1160 """ 1099 Enables or disables the USB HID 1161 Enables or disables the USB HID. 1100 1162 Returns True on success and False on failure. Error information is logged. 1101 1163 """ … … 1133 1195 def enableUsbOhci(self, fEnable): 1134 1196 """ 1135 Enables or disables the USB OHCI controller 1197 Enables or disables the USB OHCI controller. 1136 1198 Returns True on success and False on failure. Error information is logged. 1137 1199 """ … … 1223 1285 fRc = True; 1224 1286 try: 1225 self.o.machine.firmwareType = eType; 1287 if self.fpApiVer >= 7.1: 1288 self.o.machine.firmwareSettings.firmwareType = eType; 1289 else: 1290 self.o.machine.firmwareType = eType; 1226 1291 except: 1227 1292 reporter.errorXcpt('failed to set firmwareType=%s for "%s"' % (eType, self.sName)); … … 1279 1344 fRc = True; 1280 1345 try: 1281 self.o.machine.chipsetType = eType; 1346 if self.fpApiVer >= 7.1: 1347 self.o.machine.platform.chipsetType = eType; 1348 else: 1349 self.o.machine.chipsetType = eType; 1282 1350 except: 1283 1351 reporter.errorXcpt('failed to set chipsetType=%s for "%s"' % (eType, self.sName)); … … 1298 1366 fRc = True; 1299 1367 try: 1300 self.o.machine.iommuType = eType; 1368 if self.fpApiVer >= 7.1: 1369 self.o.machine.platform.iommuType = eType; 1370 else: 1371 self.o.machine.iommuType = eType; 1301 1372 except: 1302 1373 reporter.errorXcpt('failed to set iommuType=%s for "%s"' % (eType, self.sName)); … … 1314 1385 fRc = True; 1315 1386 try: 1316 self.o.machine.BIOSSettings.logoFadeIn = not fEnable; 1317 self.o.machine.BIOSSettings.logoFadeOut = not fEnable; 1318 self.o.machine.BIOSSettings.logoDisplayTime = cMsLogoDisplay; 1319 if fEnable: 1320 self.o.machine.BIOSSettings.bootMenuMode = vboxcon.BIOSBootMenuMode_Disabled; 1321 else: 1322 self.o.machine.BIOSSettings.bootMenuMode = vboxcon.BIOSBootMenuMode_MessageAndMenu; 1387 if self.fpApiVer >= 7.1: 1388 fwSettings = self.o.machine.firmwareSettings; 1389 if fEnable: 1390 fwSettings.bootMenuMode = vboxcon.FirmwareBootMenuMode_Disabled; 1391 else: 1392 fwSettings.bootMenuMode = vboxcon.FirmwareBootMenuMode_MessageAndMenu; 1393 else: 1394 fwSettings = self.o.machine.BIOSSettings; 1395 if fEnable: 1396 fwSettings.bootMenuMode = vboxcon.BIOSBootMenuMode_Disabled; 1397 else: 1398 fwSettings.bootMenuMode = vboxcon.BIOSBootMenuMode_MessageAndMenu; 1399 fwSettings.logoFadeIn = not fEnable; 1400 fwSettings.logoFadeOut = not fEnable; 1401 fwSettings.logoDisplayTime = cMsLogoDisplay; 1323 1402 except: 1324 1403 reporter.errorXcpt('failed to set logoFadeIn/logoFadeOut/bootMenuMode=%s for "%s"' % (fEnable, self.sName)); … … 1760 1839 return fRc; 1761 1840 1762 def setLargePages (self, fUseLargePages):1763 """ 1764 Configures whether the VM should use large pages or not. 1841 def setLargePagesX86(self, fUseLargePages): 1842 """ 1843 Configures whether the VM should use large pages or not. x86 only. 1765 1844 Returns True on success and False on failure. Error information is logged. 1766 """ 1845 1846 Ignored on non-x86 platform architectures. 1847 """ 1848 if not self.isPlatformX86(): return True; 1767 1849 fRc = True; 1768 1850 try: 1769 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_LargePages, fUseLargePages); 1851 if self.fpApiVer >= 7.1: 1852 self.o.machine.platform.x86.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_LargePages, fUseLargePages); 1853 else: 1854 self.o.machine.setHWVirtExProperty(vboxcon.HWVirtExPropertyType_LargePages, fUseLargePages); 1770 1855 except: 1771 1856 reporter.errorXcpt('failed to set large pages of "%s" to %s' % (self.sName, fUseLargePages)); … … 2392 2477 fRc = True; 2393 2478 if not self.enableIoApic(fIoApic): fRc = False; 2394 if not self.enableVirtEx (fVirtEx):fRc = False;2395 if not self.enablePae (fPae):fRc = False;2479 if not self.enableVirtExX86(fVirtEx): fRc = False; 2480 if not self.enablePaeX86(fPae): fRc = False; 2396 2481 if not self.setRamSize(cMBRam): fRc = False; 2397 2482 if not self.setVRamSize(cMBVRam): fRc = False; … … 2400 2485 if not self.setFirmwareType(eFirmwareType): fRc = False; 2401 2486 if not self.enableUsbHid(fUsbHid): fRc = False; 2402 if not self.enableHpet (fHpet):fRc = False;2487 if not self.enableHpetX86(fHpet): fRc = False; 2403 2488 if eStorCtlType in (vboxcon.StorageControllerType_PIIX3, 2404 2489 vboxcon.StorageControllerType_PIIX4, -
trunk/src/VBox/ValidationKit/tests/autostart/tdAutostart1.py
r98651 r101035 625 625 oSession = oTestDrv.openSession(oVM); 626 626 if oSession is not None: 627 fRc = fRc and oSession.enableVirtEx (True);628 fRc = fRc and oSession.enableNestedPaging (True);629 fRc = fRc and oSession.enableNestedHwVirt (True);630 # disable 3D until the error is fixed. 627 fRc = fRc and oSession.enableVirtExX86(True); 628 fRc = fRc and oSession.enableNestedPagingX86(True); 629 fRc = fRc and oSession.enableNestedHwVirtX86(True); 630 # disable 3D until the error is fixed. ## @todo r=andy Which error? 631 631 fRc = fRc and oSession.setAccelerate3DEnabled(False); 632 632 fRc = fRc and oSession.setVRamSize(256); -
trunk/src/VBox/ValidationKit/tests/benchmarks/tdBenchmark2.py
r98651 r101035 156 156 if oSession: 157 157 fRc = oSession.setRamSize(cMbRam); 158 fRc = oSession.setLargePages (fLargePages) and fRc;158 fRc = oSession.setLargePagesX86(fLargePages) and fRc; 159 159 if fRc: 160 160 fRc = oSession.saveSettings(); -
trunk/src/VBox/ValidationKit/tests/cpu/tdCpuPae1.py
r98651 r101035 182 182 oSession = self.openSession(oVM); 183 183 if oSession is not None: 184 fRc = fRc and oSession.enableVirtEx (fHwVirt);185 fRc = fRc and oSession.enableNestedPaging (fNestedPaging);184 fRc = fRc and oSession.enableVirtExX86(fHwVirt); 185 fRc = fRc and oSession.enableNestedPagingX86(fNestedPaging); 186 186 fRc = fRc and oSession.setCpuCount(cCpus); 187 187 fRc = fRc and oSession.setupBootLogo(True, 2500); # Race avoidance fudge. -
trunk/src/VBox/ValidationKit/tests/installation/tdGuestOsInstOs2.py
r98651 r101035 191 191 192 192 # Enable HW virt 193 fRc = fRc and oSession.enableVirtEx (True)193 fRc = fRc and oSession.enableVirtExX86(True) 194 194 195 195 # Enable I/O APIC … … 197 197 198 198 # Enable Nested Paging 199 fRc = fRc and oSession.enableNestedPaging (self.fEnableNestedPaging)199 fRc = fRc and oSession.enableNestedPagingX86(self.fEnableNestedPaging) 200 200 201 201 # Enable PAE 202 fRc = fRc and oSession.enablePae (self.fEnablePAE)202 fRc = fRc and oSession.enablePaeX86(self.fEnablePAE) 203 203 204 204 # Remote desktop -
trunk/src/VBox/ValidationKit/tests/installation/tdGuestOsUnattendedInst1.py
r98651 r101035 299 299 # I/O APIC: 300 300 if self.fOptPae is not None: 301 fRc = oSession.enablePae (self.fOptPae) and fRc;301 fRc = oSession.enablePaeX86(self.fOptPae) and fRc; 302 302 303 303 # Set extra data -
trunk/src/VBox/ValidationKit/tests/network/tdNetBenchmark1.py
r98651 r101035 495 495 if oSession is not None: 496 496 fRc = fRc and oSession.setNicType(eNicType); 497 fRc = fRc and oSession.enableVirtEx (fHwVirt);498 fRc = fRc and oSession.enableNestedPaging (fNestedPaging);497 fRc = fRc and oSession.enableVirtExX86(fHwVirt); 498 fRc = fRc and oSession.enableNestedPagingX86(fNestedPaging); 499 499 fRc = fRc and oSession.setCpuCount(cCpus); 500 500 fRc = fRc and oSession.saveSettings(); -
trunk/src/VBox/ValidationKit/tests/shutdown/tdGuestOsShutdown1.py
r98651 r101035 198 198 199 199 # Enable HW virt 200 fRc = fRc and oSession.enableVirtEx (True)200 fRc = fRc and oSession.enableVirtExX86(True) 201 201 202 202 # Enable I/O APIC … … 204 204 205 205 # Enable Nested Paging 206 fRc = fRc and oSession.enableNestedPaging (self.fEnableNestedPaging)206 fRc = fRc and oSession.enableNestedPagingX86(self.fEnableNestedPaging) 207 207 208 208 # Enable PAE 209 fRc = fRc and oSession.enablePae (self.fEnablePAE)209 fRc = fRc and oSession.enablePaeX86(self.fEnablePAE) 210 210 211 211 if (sNicTraceFile is not None): -
trunk/src/VBox/ValidationKit/tests/storage/tdStorageBenchmark1.py
r98763 r101035 1274 1274 reporter.logXcpt(); 1275 1275 1276 fRc = fRc and oSession.enableVirtEx (fHwVirt);1277 fRc = fRc and oSession.enableNestedPaging (fNestedPaging);1276 fRc = fRc and oSession.enableVirtExX86(fHwVirt); 1277 fRc = fRc and oSession.enableNestedPagingX86(fNestedPaging); 1278 1278 fRc = fRc and oSession.setCpuCount(cCpus); 1279 1279 fRc = fRc and oSession.saveSettings(); -
trunk/src/VBox/ValidationKit/tests/storage/tdStorageRawDrive1.py
r98651 r101035 862 862 oSession = oTestDrv.openSession(oVM); 863 863 if oSession is not None: 864 fRc = fRc and oSession.enableVirtEx (True);864 fRc = fRc and oSession.enableVirtExX86(True); 865 865 # nested paging doesn't need for the test 866 #fRc = fRc and oSession.enableNestedPaging (True);867 #fRc = fRc and oSession.enableNestedHwVirt (True);866 #fRc = fRc and oSession.enableNestedPagingX86(True); 867 #fRc = fRc and oSession.enableNestedHwVirtX86(True); 868 868 # disable 3D until the error is fixed. 869 869 fRc = fRc and oSession.setAccelerate3DEnabled(False); -
trunk/src/VBox/ValidationKit/tests/storage/tdStorageStress1.py
r98651 r101035 379 379 fRc = fRc and oSession.createAndAttachHd(sDiskPath2, sDiskFormat, self.controllerTypeToName(eStorageController), 380 380 cb = 10*1024*1024*1024, iPort = 2, fImmutable = False); 381 fRc = fRc and oSession.enableVirtEx (fHwVirt);382 fRc = fRc and oSession.enableNestedPaging (fNestedPaging);381 fRc = fRc and oSession.enableVirtExX86(fHwVirt); 382 fRc = fRc and oSession.enableNestedPagingX86(fNestedPaging); 383 383 fRc = fRc and oSession.setCpuCount(cCpus); 384 384 fRc = fRc and oSession.saveSettings(); -
trunk/src/VBox/ValidationKit/tests/teleportation/tdTeleportLocal1.py
r98651 r101035 418 418 oSession = self.openSession(oVmSrc); 419 419 if oSession is not None: 420 fRc = fRc and oSession.enableVirtEx (fHwVirt);421 fRc = fRc and oSession.enableNestedPaging (fNestedPaging);420 fRc = fRc and oSession.enableVirtExX86(fHwVirt); 421 fRc = fRc and oSession.enableNestedPagingX86(fNestedPaging); 422 422 fRc = fRc and oSession.setCpuCount(cCpus); 423 423 fRc = fRc and oSession.setupTeleporter(False, uPort=6501, sPassword='password'); … … 432 432 oSession = self.openSession(oVmDst); 433 433 if oSession is not None: 434 fRc = fRc and oSession.enableVirtEx (fHwVirt);435 fRc = fRc and oSession.enableNestedPaging (fNestedPaging);434 fRc = fRc and oSession.enableVirtExX86(fHwVirt); 435 fRc = fRc and oSession.enableNestedPagingX86(fNestedPaging); 436 436 fRc = fRc and oSession.setCpuCount(cCpus); 437 437 fRc = fRc and oSession.setupTeleporter(True, uPort=6502, sPassword='password'); -
trunk/src/VBox/ValidationKit/tests/usb/tdUsb1.py
r98651 r101035 497 497 oSession = self.openSession(oVM); 498 498 if oSession is not None: 499 fRc = fRc and oSession.enableVirtEx (True);500 fRc = fRc and oSession.enableNestedPaging (True);499 fRc = fRc and oSession.enableVirtExX86(True); 500 fRc = fRc and oSession.enableNestedPagingX86(True); 501 501 502 502 # Make sure controllers are disabled initially.
Note:
See TracChangeset
for help on using the changeset viewer.