VirtualBox

Changeset 90244 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jul 19, 2021 5:18:35 PM (4 years ago)
Author:
vboxsync
Message:

ValidationKit: Add support for testing IOMMU. Ubuntu 20.04 smoketest is prepared to test both Intel and AMD IOMMUs.

Location:
trunk/src/VBox/ValidationKit
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testdriver/vbox.py

    r90243 r90244  
    21032103                         % (self.oVBoxMgr.getEnumValueName('GraphicsControllerType', oVM.graphicsControllerType),));              # pylint: disable=not-callable
    21042104        reporter.log("  Chipset:            %s" % (self.oVBoxMgr.getEnumValueName('ChipsetType', oVM.chipsetType),));             # pylint: disable=not-callable
     2105        if self.fpApiVer >= 6.2 and hasattr(vboxcon, 'IommuType_None'):
     2106            reporter.log("  IOMMU:              %s" % (self.oVBoxMgr.getEnumValueName('IommuType', oVM.iommuType),));             # pylint: disable=not-callable
    21052107        reporter.log("  Firmware:           %s" % (self.oVBoxMgr.getEnumValueName('FirmwareType', oVM.firmwareType),));           # pylint: disable=not-callable
    21062108        reporter.log("  HwVirtEx:           %s" % (oVM.getHWVirtExProperty(vboxcon.HWVirtExPropertyType_Enabled),));
     
    23972399                     sFirmwareType = 'bios',
    23982400                     sChipsetType = 'piix3',
     2401                     sIommuType = 'none',
    23992402                     sDvdControllerType = 'IDE Controller',
    24002403                     sCom1RawFile = None):
     
    24612464            if fRc and sCom1RawFile:
    24622465                fRc = oSession.setupSerialToRawFile(0, sCom1RawFile);
     2466            if fRc and self.fpApiVer >= 6.2 and hasattr(vboxcon, 'IommuType_AMD') and sIommuType == 'amd':
     2467                fRc = oSession.setIommuType(vboxcon.IommuType_AMD);
     2468            elif fRc and self.fpApiVer >= 6.2 and hasattr(vboxcon, 'IommuType_Intel') and sIommuType == 'intel':
     2469                fRc = oSession.setIommuType(vboxcon.IommuType_Intel);
    24632470
    24642471            if fRc: fRc = oSession.saveSettings();
  • trunk/src/VBox/ValidationKit/testdriver/vboxtestvms.py

    r84082 r90244  
    955955                 sFirmwareType = 'bios',                    # type: str
    956956                 sChipsetType = 'piix3',                    # type: str
     957                 sIommuType = 'none',                       # type: str
    957958                 sHddControllerType = 'IDE Controller',     # type: str
    958959                 sDvdControllerType = 'IDE Controller'      # type: str
     
    981982        self.sFirmwareType           = sFirmwareType;
    982983        self.sChipsetType            = sChipsetType;
     984        self.sIommuType              = sIommuType;
    983985        self.fCom1RawFile            = False;
    984986
     
    11791181                                     sFirmwareType      = self.sFirmwareType,
    11801182                                     sChipsetType       = self.sChipsetType,
     1183                                     sIommuType         = self.sIommuType,
    11811184                                     sCom1RawFile       = self.sCom1RawFile if self.fCom1RawFile else None
    11821185                                     );
     
    19301933        TestVm('tst-ol76-64',   kfGrpStdSmoke,        sHd = '4.2/ol76/t-ol76-64.vdi',
    19311934               sKind = 'Oracle_64', acCpusSup = range(1, 33), fIoApic = True),
     1935        TestVm('tst-ubuntu-20_04-64-amdvi',     kfGrpStdSmoke,    sHd = '6.1/ubuntu-20_04-64.vdi',
     1936               sKind = 'Ubuntu_64', acCpusSup = range(1, 33), fIoApic = True,
     1937               asParavirtModesSup = [g_ksParavirtProviderKVM,], sNic0AttachType = 'nat', sChipsetType = 'ich9',
     1938               sIommuType = 'amd'),
     1939        TestVm('tst-ubuntu-20_04-64-vtd',     kfGrpStdSmoke,      sHd = '6.1/ubuntu-20_04-64.vdi',
     1940               sKind = 'Ubuntu_64', acCpusSup = range(1, 33), fIoApic = True,
     1941               asParavirtModesSup = [g_ksParavirtProviderKVM,], sNic0AttachType = 'nat', sChipsetType = 'ich9',
     1942               sIommuType = 'intel'),
    19321943
    19331944        # Solaris
  • trunk/src/VBox/ValidationKit/testdriver/vboxwrappers.py

    r86502 r90244  
    12341234        else:
    12351235            reporter.log('set chipsetType=%s for "%s"' % (eType, self.sName));
     1236        self.oTstDrv.processPendingEvents();
     1237        return fRc;
     1238
     1239    def setIommuType(self, eType):
     1240        """
     1241        Sets the IOMMU type.
     1242        Returns True on success and False on failure.  Error information is logged.
     1243        """
     1244        # Supported.
     1245        if self.fpApiVer < 6.2 or not hasattr(vboxcon, 'IommuType_Intel') or not hasattr(vboxcon, 'IommuType_AMD'):
     1246            return True;
     1247        fRc = True;
     1248        try:
     1249            self.o.machine.iommuType = eType;
     1250        except:
     1251            reporter.errorXcpt('failed to set iommuType=%s for "%s"' % (eType, self.sName));
     1252            fRc = False;
     1253        else:
     1254            reporter.log('set iommuType=%s for "%s"' % (eType, self.sName));
    12361255        self.oTstDrv.processPendingEvents();
    12371256        return fRc;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette