VirtualBox

Ignore:
Timestamp:
May 24, 2018 9:22:38 AM (7 years ago)
Author:
vboxsync
Message:

ValidationKit: Add support for basic nested hardware-virtualization smoke tests.

File:
1 edited

Legend:

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

    r72298 r72315  
    992992        else:
    993993            reporter.log('set CPUPropertyType_LongMode=%s for "%s"' % (fEnable, self.sName));
     994        self.oTstDrv.processPendingEvents();
     995        return fRc;
     996
     997    def enableNestedHwVirt(self, fEnable):
     998        """
     999        Enables or disables Nested Hardware-Virtualization.
     1000        Returns True on success and False on failure.  Error information is logged.
     1001        """
     1002        # Supported.
     1003        if self.fpApiVer < 5.3  or  not hasattr(vboxcon, 'CPUPropertyType_HWVirt'):
     1004            return True;
     1005
     1006        # Enable/disable it.
     1007        fRc = True;
     1008        try:
     1009            self.o.machine.setCPUProperty(vboxcon.CPUPropertyType_HWVirt, fEnable);
     1010        except:
     1011            reporter.errorXcpt('failed to set CPUPropertyType_HWVirt=%s for "%s"' % (fEnable, self.sName));
     1012            fRc = False;
     1013        else:
     1014            reporter.log('set CPUPropertyType_HWVirt=%s for "%s"' % (fEnable, self.sName));
    9941015        self.oTstDrv.processPendingEvents();
    9951016        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