VirtualBox

Ignore:
Timestamp:
May 24, 2018 7:52:52 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9044: Display execution engine rather than the VT-x-AMD-V-ness in the 'CPU' indicator text. (TODO: Need new indicator icon for NEM engine.)

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r71355 r72329  
    934934    {
    935935        /* Assign state-icons: */
    936         setStateIcon(0, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png"));
    937         setStateIcon(1, UIIconPool::iconSet(":/vtx_amdv_16px.png"));
     936        setStateIcon(KVMExecutionEngine_NotSet, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png"));
     937        setStateIcon(KVMExecutionEngine_RawMode, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png"));
     938        setStateIcon(KVMExecutionEngine_HwVirt, UIIconPool::iconSet(":/vtx_amdv_16px.png"));
     939        /** @todo new indicator icon, something that looks very very slow (at least on Windows)... @bugref{9044} */
     940        setStateIcon(KVMExecutionEngine_NativeApi, UIIconPool::iconSet(":/vtx_amdv_disabled_16px.png"));
    938941        /* Translate finally: */
    939942        retranslateUi();
     
    949952
    950953        /* VT-x/AMD-V feature: */
    951         const QString strVirtualization = m_pSession->isHWVirtExEnabled() ?
    952                                           VBoxGlobal::tr("Active", "details report (VT-x/AMD-V)") :
    953                                           VBoxGlobal::tr("Inactive", "details report (VT-x/AMD-V)");
     954        KVMExecutionEngine enmEngine = m_pSession->getVMExecutionEngine();
     955        QString strExecutionEngine;
     956        switch (enmEngine)
     957        {
     958            case KVMExecutionEngine_HwVirt:
     959                strExecutionEngine = "VT-x/AMD-V";  /* no translation */
     960                break;
     961            case KVMExecutionEngine_RawMode:
     962                strExecutionEngine = "raw-mode";    /* no translation */
     963                break;
     964            case KVMExecutionEngine_NativeApi:
     965                strExecutionEngine = "native API";  /* no translation */
     966                break;
     967            default:
     968                AssertFailed();
     969                enmEngine = KVMExecutionEngine_NotSet;
     970            case KVMExecutionEngine_NotSet:
     971                strExecutionEngine = VBoxGlobal::tr("not set", "details report (execution engine)");
     972                break;
     973        }
    954974
    955975        /* Nested Paging feature: */
     
    971991        /* Prepare tool-tip: */
    972992        QString strFullData;
    973         strFullData += s_strTableRow2.arg(VBoxGlobal::tr("VT-x/AMD-V", "details report"),                   strVirtualization);
     993        //strFullData += s_strTableRow2.arg(VBoxGlobal::tr("VT-x/AMD-V", "details report"),                   strVirtualization);
     994        strFullData += s_strTableRow2.arg(VBoxGlobal::tr("Execution engine", "details report"),             strExecutionEngine);
    974995        strFullData += s_strTableRow2.arg(VBoxGlobal::tr("Nested Paging"),                                  strNestedPaging);
    975996        strFullData += s_strTableRow2.arg(VBoxGlobal::tr("Unrestricted Execution"),                         strUnrestrictExec);
     
    978999        const int cpuCount = machine.GetCPUCount();
    9791000        if (cpuCount > 1)
    980             strFullData += s_strTableRow2.arg(VBoxGlobal::tr("Processor(s)", "details report"), QString::number(cpuCount));
     1001            strFullData += s_strTableRow2.arg(VBoxGlobal::tr("Processors", "details report"), QString::number(cpuCount));
    9811002
    9821003        /* Update tool-tip: */
    9831004        setToolTip(s_strTable.arg(strFullData));
    9841005        /* Update indicator state: */
    985         setState(m_pSession->isHWVirtExEnabled());
     1006        setState(enmEngine);
    9861007    }
    9871008};
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r72057 r72329  
    956956    , m_fIsValidPointerShapePresent(false)
    957957    , m_fIsHidingHostPointer(true)
     958    , m_enmVMExecutionEngine(KVMExecutionEngine_NotSet)
    958959    /* CPU hardware virtualization features for VM: */
    959960    , m_fIsHWVirtExEnabled(false)
     
    21212122void UISession::loadVMSettings()
    21222123{
     2124    /* Cache IMachine::ExecutionEngine value. */
     2125    m_enmVMExecutionEngine = m_debugger.GetExecutionEngine();
    21232126    /* Load CPU hardware virtualization extension: */
    21242127    m_fIsHWVirtExEnabled = m_debugger.GetHWVirtExEnabled();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r71374 r72329  
    266266    /** @name CPU hardware virtualization features for VM.
    267267     ** @{ */
     268    /** Returns whether CPU hardware virtualization extension is enabled. */
     269    KVMExecutionEngine getVMExecutionEngine() const { return m_enmVMExecutionEngine; }
    268270    /** Returns whether CPU hardware virtualization extension is enabled. */
    269271    bool isHWVirtExEnabled() const { return m_fIsHWVirtExEnabled; }
     
    543545    bool m_fIsHidingHostPointer : 1;
    544546
     547    /** Copy of IMachineDebugger::ExecutionEngine */
     548    KVMExecutionEngine m_enmVMExecutionEngine;
     549
    545550    /** @name CPU hardware virtualization features for VM.
    546551     ** @{ */
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