VirtualBox

Changeset 74542 in vbox for trunk/src/VBox/VMM/VMMR3


Ignore:
Timestamp:
Oct 1, 2018 5:42:25 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
125410
Message:

VMM/CPUM, IEM: Nested VMX: bugref:9180 Preparation of MSR bitmaps for MSR intercepts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/CPUM.cpp

    r74512 r74542  
    954954            pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3 = NULL;
    955955        }
     956        if (pVCpu->cpum.s.Guest.hwvirt.vmx.pvMsrBitmapR3)
     957        {
     958            SUPR3PageFreeEx(pVCpu->cpum.s.Guest.hwvirt.vmx.pvMsrBitmapR3, VMX_V_MSR_BITMAP_PAGES);
     959            pVCpu->cpum.s.Guest.hwvirt.vmx.pvMsrBitmapR3 = NULL;
     960        }
    956961    }
    957962}
     
    10361041         */
    10371042        Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3);
    1038         rc = SUPR3PageAllocEx(VMX_V_AUTOMSR_AREA_PAGES, 0 /* fFlags */,
    1039                               (void **)&pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3,
     1043        rc = SUPR3PageAllocEx(VMX_V_AUTOMSR_AREA_PAGES, 0 /* fFlags */, (void **)&pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR3,
    10401044                              &pVCpu->cpum.s.Guest.hwvirt.vmx.pAutoMsrAreaR0, NULL /* paPages */);
    10411045        if (RT_FAILURE(rc))
     
    10441048            LogRel(("CPUM%u: Failed to alloc %u pages for the nested-guest's auto-load/store MSR area\n", pVCpu->idCpu,
    10451049                    VMX_V_AUTOMSR_AREA_PAGES));
     1050            break;
     1051        }
     1052
     1053        /*
     1054         * Allocate the MSR bitmap.
     1055         */
     1056        Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pvMsrBitmapR3);
     1057        rc = SUPR3PageAllocEx(VMX_V_MSR_BITMAP_PAGES, 0 /* fFlags */, (void **)&pVCpu->cpum.s.Guest.hwvirt.vmx.pvMsrBitmapR3,
     1058                              &pVCpu->cpum.s.Guest.hwvirt.vmx.pvMsrBitmapR0, NULL /* paPages */);
     1059        if (RT_FAILURE(rc))
     1060        {
     1061            Assert(!pVCpu->cpum.s.Guest.hwvirt.vmx.pvMsrBitmapR3);
     1062            LogRel(("CPUM%u: Failed to alloc %u pages for the nested-guest's MSR bitmap\n", pVCpu->idCpu,
     1063                    VMX_V_MSR_BITMAP_PAGES));
    10461064            break;
    10471065        }
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