VirtualBox

Ignore:
Timestamp:
May 3, 2019 8:21:44 AM (6 years ago)
Author:
vboxsync
Message:

VMM: Move VT-x/AMD-V helpers that are based on CPU specs to CPUM in preparation of upcoming changes. It is better placed in CPUM if say NEM in future needs to implement nested VT-x/AMD-V.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r78370 r78371  
    15501550 *                          include both a read -and- a write permission!
    15511551 *
    1552  * @sa      HMGetVmxMsrPermission.
     1552 * @sa      CPUMGetVmxMsrPermission.
    15531553 * @remarks Can be called with interrupts disabled.
    15541554 */
     
    22072207        if (pVmcsInfo->u32ProcCtls & VMX_PROC_CTLS_USE_MSR_BITMAPS)
    22082208        {
    2209             uint32_t const fMsrpm = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, pGuestMsrLoad->u32Msr);
     2209            uint32_t const fMsrpm = CPUMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, pGuestMsrLoad->u32Msr);
    22102210            if (fIsEferMsr)
    22112211            {
     
    29052905#ifdef VBOX_STRICT
    29062906    Assert(pVmcsInfo->pvMsrBitmap);
    2907     uint32_t const fMsrpmEfer = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, MSR_K6_EFER);
     2907    uint32_t const fMsrpmEfer = CPUMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, MSR_K6_EFER);
    29082908    Assert(fMsrpmEfer == VMXMSRPM_EXIT_RD_WR);
    29092909#endif
     
    1083910839 * @param   pcLoops     Pointer to the number of executed loops.
    1084010840 *
    10841  * @sa      hmR0VmxRunGuestCodeNormal().
     10841 * @sa      hmR0VmxRunGuestCodeNormal.
    1084210842 */
    1084310843static VBOXSTRICTRC hmR0VmxRunGuestCodeNested(PVMCPU pVCpu, uint32_t *pcLoops)
     
    1367113671        {
    1367213672            Assert(pVmcsInfo->pvMsrBitmap);
    13673             uint32_t fMsrpm = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, idMsr);
     13673            uint32_t fMsrpm = CPUMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, idMsr);
    1367413674            if (fMsrpm & VMXMSRPM_ALLOW_RD)
    1367513675            {
     
    1381613816                    {
    1381713817                        Assert(pVmcsInfo->pvMsrBitmap);
    13818                         uint32_t fMsrpm = HMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, idMsr);
     13818                        uint32_t fMsrpm = CPUMGetVmxMsrPermission(pVmcsInfo->pvMsrBitmap, idMsr);
    1381913819                        if (fMsrpm & VMXMSRPM_ALLOW_WR)
    1382013820                        {
     
    1487014870 * Hacks its way around the lovely mesa driver's backdoor accesses.
    1487114871 *
    14872  * @sa hmR0SvmHandleMesaDrvGp
     14872 * @sa hmR0SvmHandleMesaDrvGp.
    1487314873 */
    1487414874static int hmR0VmxHandleMesaDrvGp(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient, PCPUMCTX pCtx)
     
    1489014890 *
    1489114891 * @returns true if it is, false if it isn't.
    14892  * @sa      hmR0SvmIsMesaDrvGp
     14892 * @sa      hmR0SvmIsMesaDrvGp.
    1489314893 */
    1489414894DECLINLINE(bool) hmR0VmxIsMesaDrvGp(PVMCPU pVCpu, PVMXTRANSIENT pVmxTransient, PCPUMCTX pCtx)
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