VirtualBox

Ignore:
Timestamp:
Feb 2, 2023 9:48:25 AM (2 years ago)
Author:
vboxsync
Message:

Merging r155527 from gui4 branch: FE/Qt: Runtime UI: Move virtualization stuff from UISession to UIMachine.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:mergeinfo
      •  

        old new  
        1919/branches/dsen/gui2:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        2020/branches/dsen/gui3:79645-79692
        21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526
         21/branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527
        2222/trunk/src:92342,154921
  • trunk/src/VBox

    • Property svn:mergeinfo
      •  

        old new  
        1919/branches/dsen/gui2/src/VBox:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        2020/branches/dsen/gui3/src/VBox:79645-79692
        21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526
         21/branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527
  • trunk/src/VBox/Frontends

    • Property svn:mergeinfo
      •  

        old new  
        1616/branches/dsen/gui2/src/VBox/Frontends:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        1717/branches/dsen/gui3/src/VBox/Frontends:79645-79692
        18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526
         18/branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285,155287-155288,155311,155316,155336,155342,155344,155437-155438,155441,155443,155488,155509-155513,155526-155527
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r98385 r98424  
    11021102
    11031103        /* VT-x/AMD-V feature: */
    1104         KVMExecutionEngine enmEngine = m_pSession->getVMExecutionEngine();
     1104        KVMExecutionEngine enmEngine = m_pMachine->vmExecutionEngine();
    11051105        QString strExecutionEngine;
    11061106        switch (enmEngine)
     
    11251125
    11261126        /* Nested Paging feature: */
    1127         const QString strNestedPaging = m_pSession->isHWVirtExNestedPagingEnabled() ?
     1127        const QString strNestedPaging = m_pMachine->isHWVirtExNestedPagingEnabled() ?
    11281128                                        UICommon::tr("Active", "details report (Nested Paging)") :
    11291129                                        UICommon::tr("Inactive", "details report (Nested Paging)");
    11301130
    11311131        /* Unrestricted Execution feature: */
    1132         const QString strUnrestrictExec = m_pSession->isHWVirtExUXEnabled() ?
     1132        const QString strUnrestrictExec = m_pMachine->isHWVirtExUXEnabled() ?
    11331133                                          UICommon::tr("Active", "details report (Unrestricted Execution)") :
    11341134                                          UICommon::tr("Inactive", "details report (Unrestricted Execution)");
     
    11381138
    11391139        /* Paravirtualization feature: */
    1140         const QString strParavirt = gpConverter->toString(m_pSession->paraVirtProvider());
     1140        const QString strParavirt = gpConverter->toString(m_pMachine->paravirtProvider());
    11411141
    11421142        /* Prepare tool-tip: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r98423 r98424  
    836836    , m_fIsMouseIntegrated(true)
    837837    , m_iMouseState(0)
     838    , m_enmVMExecutionEngine(KVMExecutionEngine_NotSet)
     839    , m_fIsHWVirtExNestedPagingEnabled(false)
     840    , m_fIsHWVirtExUXEnabled(false)
     841    , m_enmParavirtProvider(KParavirtProvider_None)
    838842    , m_fIsManualOverride(false)
    839843    , m_defaultCloseAction(MachineCloseAction_Invalid)
     
    873877
    874878    /* Update stuff which doesn't send events on init: */
     879    updateVirtualizationState();
    875880    updateStateAudioActions();
    876881    updateMouseState();
     
    17041709}
    17051710#endif /* VBOX_WS_WIN */
     1711
     1712void UIMachine::updateVirtualizationState()
     1713{
     1714    m_enmVMExecutionEngine = uisession()->debugger().GetExecutionEngine();
     1715    m_fIsHWVirtExNestedPagingEnabled = uisession()->debugger().GetHWVirtExNestedPagingEnabled();
     1716    m_fIsHWVirtExUXEnabled = uisession()->debugger().GetHWVirtExUXEnabled();
     1717    m_enmParavirtProvider = uisession()->machine().GetEffectiveParavirtProvider();
     1718}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h

    r98423 r98424  
    308308    /** @} */
    309309
     310    /** @name Virtualization stuff.
     311     ** @{ */
     312        /** Returns IMachineDebugger::ExecutionEngine reference. */
     313        KVMExecutionEngine vmExecutionEngine() const { return m_enmVMExecutionEngine; }
     314
     315        /** Returns whether nested-paging CPU hardware virtualization extension is enabled. */
     316        bool isHWVirtExNestedPagingEnabled() const { return m_fIsHWVirtExNestedPagingEnabled; }
     317        /** Returns whether the VM is currently making use of the unrestricted execution feature of VT-x. */
     318        bool isHWVirtExUXEnabled() const { return m_fIsHWVirtExUXEnabled; }
     319
     320        /** Returns VM's effective paravirtualization provider. */
     321        KParavirtProvider paravirtProvider() const { return m_enmParavirtProvider; }
     322    /** @} */
     323
    310324    /** @name Close stuff.
    311325     * @{ */
     
    544558    /** @} */
    545559
     560    /** @name Virtualization stuff.
     561     ** @{ */
     562        /** Updates virtualization state. */
     563        void updateVirtualizationState();
     564    /** @} */
     565
    546566    /** Holds the static instance. */
    547567    static UIMachine *s_pInstance;
     
    672692    /** @} */
    673693
     694    /** @name Virtualization stuff.
     695     ** @{ */
     696        /** Holds the IMachineDebugger::ExecutionEngine reference. */
     697        KVMExecutionEngine  m_enmVMExecutionEngine;
     698
     699        /** Holds whether nested-paging CPU hardware virtualization extension is enabled. */
     700        bool  m_fIsHWVirtExNestedPagingEnabled;
     701        /** Holds whether the VM is currently making use of the unrestricted execution feature of VT-x. */
     702        bool  m_fIsHWVirtExUXEnabled;
     703
     704        /** Holds the VM's effective paravirtualization provider. */
     705        KParavirtProvider  m_enmParavirtProvider;
     706    /** @} */
     707
    674708    /** @name Close stuff.
    675709     * @{ */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r98423 r98424  
    169169    machineLogic()->initializePostPowerUp();
    170170
    171     /* Load VM settings: */
    172     loadVMSettings();
    173 
    174171#ifdef VBOX_GUI_WITH_PIDFILE
    175172    uiCommon().createPidfile();
     
    378375    , m_fIsGuestSupportsGraphics(false)
    379376    , m_fIsGuestSupportsSeamless(false)
    380     /* CPU hardware virtualization features for VM: */
    381     , m_enmVMExecutionEngine(KVMExecutionEngine_NotSet)
    382     , m_fIsHWVirtExNestedPagingEnabled(false)
    383     , m_fIsHWVirtExUXEnabled(false)
    384     /* VM's effective paravirtualization provider: */
    385     , m_paraVirtProvider(KParavirtProvider_None)
    386377{
    387378}
     
    849840}
    850841
    851 void UISession::loadVMSettings()
    852 {
    853     /* Cache IMachine::ExecutionEngine value. */
    854     m_enmVMExecutionEngine = m_debugger.GetExecutionEngine();
    855     /* Load nested-paging CPU hardware virtualization extension: */
    856     m_fIsHWVirtExNestedPagingEnabled = m_debugger.GetHWVirtExNestedPagingEnabled();
    857     /* Load whether the VM is currently making use of the unrestricted execution feature of VT-x: */
    858     m_fIsHWVirtExUXEnabled = m_debugger.GetHWVirtExUXEnabled();
    859     /* Load VM's effective paravirtualization provider: */
    860     m_paraVirtProvider = m_machine.GetEffectiveParavirtProvider();
    861 }
    862 
    863842UIFrameBuffer* UISession::frameBuffer(ulong uScreenId) const
    864843{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r98423 r98424  
    224224    const QVector<UIFrameBuffer*>& frameBuffers() const { return m_frameBufferVector; }
    225225
    226     /** @name CPU hardware virtualization features for VM.
    227      ** @{ */
    228     /** Returns whether CPU hardware virtualization extension is enabled. */
    229     KVMExecutionEngine getVMExecutionEngine() const { return m_enmVMExecutionEngine; }
    230     /** Returns whether nested-paging CPU hardware virtualization extension is enabled. */
    231     bool isHWVirtExNestedPagingEnabled() const { return m_fIsHWVirtExNestedPagingEnabled; }
    232     /** Returns whether the VM is currently making use of the unrestricted execution feature of VT-x. */
    233     bool isHWVirtExUXEnabled() const { return m_fIsHWVirtExUXEnabled; }
    234     /** @} */
    235 
    236     /** Returns VM's effective paravirtualization provider. */
    237     KParavirtProvider paraVirtProvider() const { return m_paraVirtProvider; }
    238 
    239226    /** Returns a vector of media attached to the machine. */
    240227    CMediumVector machineMedia() const;
     
    297284    bool preprocessInitialization();
    298285    bool mountAdHocImage(KDeviceType enmDeviceType, UIMediumDeviceType enmMediumType, const QString &strMediumName);
    299     /** Loads VM settings. */
    300     void loadVMSettings();
    301286
    302287    /* Private variables: */
     
    341326    bool  m_fIsGuestSupportsGraphics : 1;
    342327    bool  m_fIsGuestSupportsSeamless : 1;
    343 
    344     /** Copy of IMachineDebugger::ExecutionEngine */
    345     KVMExecutionEngine m_enmVMExecutionEngine;
    346 
    347     /** @name CPU hardware virtualization features for VM.
    348      ** @{ */
    349     /** Holds whether nested-paging CPU hardware virtualization extension is enabled. */
    350     bool m_fIsHWVirtExNestedPagingEnabled;
    351     /** Holds whether the VM is currently making use of the unrestricted execution feature of VT-x. */
    352     bool m_fIsHWVirtExUXEnabled;
    353     /** @} */
    354 
    355     /** Holds VM's effective paravirtualization provider. */
    356     KParavirtProvider m_paraVirtProvider;
    357328};
    358329
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