VirtualBox

Changeset 100357 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Jul 4, 2023 7:00:26 AM (20 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158087
Message:

Runtime/RTR0MemObj*: Add PhysHighest parameter to RTR0MemObjAllocCont to indicate the maximum allowed physical address for an allocation, bugref:10457 [second attempt]

Location:
trunk/src/VBox/VMM/VMMR0
Files:
3 edited

Legend:

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

    r98103 r100357  
    6060    AssertPtr(pHCPhys);
    6161
    62     int rc = RTR0MemObjAllocCont(pMemObj, HOST_PAGE_SIZE, false /* fExecutable */);
     62    int rc = RTR0MemObjAllocCont(pMemObj, HOST_PAGE_SIZE, NIL_RTHCPHYS /*PhysHighest*/, false /* fExecutable */);
    6363    if (RT_FAILURE(rc))
    6464        return rc;
  • trunk/src/VBox/VMM/VMMR0/HMR0.cpp

    r98103 r100357  
    421421            /* Allocate a temporary VMXON region. */
    422422            RTR0MEMOBJ hScatchMemObj;
    423             rc = RTR0MemObjAllocCont(&hScatchMemObj, HOST_PAGE_SIZE, false /* fExecutable */);
     423            rc = RTR0MemObjAllocCont(&hScatchMemObj, HOST_PAGE_SIZE, NIL_RTHCPHYS /*PhysHighest*/, false /* fExecutable */);
    424424            if (RT_FAILURE(rc))
    425425            {
     
    915915            {
    916916                /** @todo NUMA */
    917                 rc = RTR0MemObjAllocCont(&g_aHmCpuInfo[i].hMemObj, HOST_PAGE_SIZE, false /* executable R0 mapping */);
     917                rc = RTR0MemObjAllocCont(&g_aHmCpuInfo[i].hMemObj, HOST_PAGE_SIZE, NIL_RTHCPHYS /*PhysHighest*/, false /* executable R0 mapping */);
    918918                AssertLogRelRCReturn(rc, rc);
    919919
     
    928928#ifdef VBOX_WITH_NESTED_HWVIRT_SVM
    929929                rc = RTR0MemObjAllocCont(&g_aHmCpuInfo[i].n.svm.hNstGstMsrpm, SVM_MSRPM_PAGES << X86_PAGE_4K_SHIFT,
    930                                          false /* executable R0 mapping */);
     930                                         NIL_RTHCPHYS /*PhysHighest*/, false /* executable R0 mapping */);
    931931                AssertLogRelRCReturn(rc, rc);
    932932
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r99753 r100357  
    606606     */
    607607    Assert(g_hMemObjIOBitmap == NIL_RTR0MEMOBJ);
    608     int rc = RTR0MemObjAllocCont(&g_hMemObjIOBitmap, SVM_IOPM_PAGES << X86_PAGE_4K_SHIFT, false /* fExecutable */);
     608    int rc = RTR0MemObjAllocCont(&g_hMemObjIOBitmap, SVM_IOPM_PAGES << X86_PAGE_4K_SHIFT,
     609                                 NIL_RTHCPHYS /*PhysHighest*/, false /* fExecutable */);
    609610    if (RT_FAILURE(rc))
    610611        return rc;
     
    766767         * FS, GS, Kernel GS Base, etc.) apart from the host-state save area specified in MSR_K8_VM_HSAVE_PA.
    767768         */
    768 /** @todo Does this need to be below 4G? */
    769         rc = RTR0MemObjAllocCont(&pVCpu->hmr0.s.svm.hMemObjVmcbHost, SVM_VMCB_PAGES << HOST_PAGE_SHIFT, false /* fExecutable */);
     769        rc = RTR0MemObjAllocCont(&pVCpu->hmr0.s.svm.hMemObjVmcbHost, SVM_VMCB_PAGES << HOST_PAGE_SHIFT,
     770                                 NIL_RTHCPHYS /*PhysHighest*/, false /* fExecutable */);
    770771        if (RT_FAILURE(rc))
    771772            goto failure_cleanup;
     
    773774        void *pvVmcbHost                    = RTR0MemObjAddress(pVCpu->hmr0.s.svm.hMemObjVmcbHost);
    774775        pVCpu->hmr0.s.svm.HCPhysVmcbHost    = RTR0MemObjGetPagePhysAddr(pVCpu->hmr0.s.svm.hMemObjVmcbHost, 0 /* iPage */);
    775         Assert(pVCpu->hmr0.s.svm.HCPhysVmcbHost < _4G);
    776776        RT_BZERO(pvVmcbHost, HOST_PAGE_SIZE);
    777777
     
    779779         * Allocate one page for the guest-state VMCB.
    780780         */
    781 /** @todo Does this need to be below 4G? */
    782         rc = RTR0MemObjAllocCont(&pVCpu->hmr0.s.svm.hMemObjVmcb, SVM_VMCB_PAGES << HOST_PAGE_SHIFT, false /* fExecutable */);
     781        rc = RTR0MemObjAllocCont(&pVCpu->hmr0.s.svm.hMemObjVmcb, SVM_VMCB_PAGES << HOST_PAGE_SHIFT,
     782                                 NIL_RTHCPHYS /*PhysHighest*/, false /* fExecutable */);
    783783        if (RT_FAILURE(rc))
    784784            goto failure_cleanup;
     
    786786        pVCpu->hmr0.s.svm.pVmcb             = (PSVMVMCB)RTR0MemObjAddress(pVCpu->hmr0.s.svm.hMemObjVmcb);
    787787        pVCpu->hmr0.s.svm.HCPhysVmcb        = RTR0MemObjGetPagePhysAddr(pVCpu->hmr0.s.svm.hMemObjVmcb, 0 /* iPage */);
    788         Assert(pVCpu->hmr0.s.svm.HCPhysVmcb < _4G);
    789788        RT_BZERO(pVCpu->hmr0.s.svm.pVmcb, HOST_PAGE_SIZE);
    790789
     
    793792         * SVM to not require one.
    794793         */
    795 /** @todo Does this need to be below 4G? */
    796794        rc = RTR0MemObjAllocCont(&pVCpu->hmr0.s.svm.hMemObjMsrBitmap, SVM_MSRPM_PAGES << HOST_PAGE_SHIFT,
    797                                  false /* fExecutable */);
     795                                 NIL_RTHCPHYS /*PhysHighest*/, false /* fExecutable */);
    798796        if (RT_FAILURE(rc))
    799797            goto failure_cleanup;
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