VirtualBox

Changeset 72481 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Jun 8, 2018 12:46:07 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122966
Message:

FE/Qt bugref:9184 When hardware acceleration is enabled for the vm and not supported by the host, warn the user and let him disable it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r72467 r72481  
    483483            messages << message;
    484484    }
    485 
     485    /* Acceleration tab: */
     486    {
     487        /* Prepare message: */
     488        UIValidationMessage message;
     489        message.first = VBoxGlobal::removeAccelMark(m_pTabWidgetSystem->tabText(2));
     490        /* VT-x/AMD-V capability test: */
     491        if (!vboxGlobal().host().GetProcessorFeature(KProcessorFeature_HWVirtEx) && m_pCheckBoxVirtualization->isChecked())
     492        {
     493            message.second << tr(
     494                "The hardware virtualization is enabled in the Acceleration section of the System page although "
     495                "it is not supported by the host system. It should be disabled in order to start the virtual system");
     496
     497            fPass = false;
     498        }
     499        /* Serialize message: */
     500        if (!message.second.isEmpty())
     501            messages << message;
     502
     503    }
    486504    /* Return result: */
    487505    return fPass;
     
    582600
    583601    /* Polish 'Acceleration' availability: */
    584     setAccelerationCheckBoxesEnabled(systemData.m_fSupportedHwVirtEx && isMachineOffline());
     602    /* Enable the hardware virtulization related check boxes if it is supported by the host system or
     603       it is enabled in the vm (in this case check box is enabled so that user can deselect the checkbox
     604       and disable the hardware virtualization (see #9184 for the discussion) */
     605    setAccelerationCheckBoxesEnabled((systemData.m_fSupportedHwVirtEx && isMachineOffline()) ||
     606                                     (systemData.m_fEnabledHwVirtEx && isMachineOffline()));
    585607    m_pLabelParavirtProvider->setEnabled(isMachineOffline());
    586608    m_pComboParavirtProvider->setEnabled(isMachineOffline());
Note: See TracChangeset for help on using the changeset viewer.

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