VirtualBox

Changeset 93557 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 2, 2022 11:15:11 PM (3 years ago)
Author:
vboxsync
Message:

VMM: Enabled checks for ASMMemIsZeroPage and ASMMemZeroPage, addressing 4 instances.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/.scm-settings

    r93554 r93557  
    4343/testcase/tstVMStructSize.cpp:     --no-page-restrictions
    4444
     45# Forbit ASMMemIsZeroPage and ASMMemZeroPage.
     46/*.cpp: --no-ASMMemPage-use
     47/*.h:   --no-ASMMemPage-use
     48# Except in the pool where more care/work is needed.
     49/VMMR3/PGMPool.cpp:     --unrestricted-ASMMemPage-use
     50/VMMAll/PGMAllPool.cpp: --unrestricted-ASMMemPage-use
     51
  • trunk/src/VBox/VMM/VMMR0/HMR0.cpp

    r93554 r93557  
    419419            void          *pvScatchPage      = RTR0MemObjAddress(hScatchMemObj);
    420420            RTHCPHYS const HCPhysScratchPage = RTR0MemObjGetPagePhysAddr(hScatchMemObj, 0);
    421             ASMMemZeroPage(pvScatchPage);
     421            RT_BZERO(pvScatchPage, HOST_PAGE_SIZE);
    422422
    423423            /* Set revision dword at the beginning of the VMXON structure. */
     
    914914                g_aHmCpuInfo[i].pvMemObj     = RTR0MemObjAddress(g_aHmCpuInfo[i].hMemObj);
    915915                AssertPtr(g_aHmCpuInfo[i].pvMemObj);
    916                 ASMMemZeroPage(g_aHmCpuInfo[i].pvMemObj);
     916                RT_BZERO(g_aHmCpuInfo[i].pvMemObj, HOST_PAGE_SIZE);
    917917
    918918#ifdef VBOX_WITH_NESTED_HWVIRT_SVM
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r93554 r93557  
    808808        pVCpu->hmr0.s.svm.HCPhysVmcbHost    = RTR0MemObjGetPagePhysAddr(pVCpu->hmr0.s.svm.hMemObjVmcbHost, 0 /* iPage */);
    809809        Assert(pVCpu->hmr0.s.svm.HCPhysVmcbHost < _4G);
    810         ASMMemZeroPage(pvVmcbHost);
     810        RT_BZERO(pvVmcbHost, HOST_PAGE_SIZE);
    811811
    812812        /*
     
    821821        pVCpu->hmr0.s.svm.HCPhysVmcb        = RTR0MemObjGetPagePhysAddr(pVCpu->hmr0.s.svm.hMemObjVmcb, 0 /* iPage */);
    822822        Assert(pVCpu->hmr0.s.svm.HCPhysVmcb < _4G);
    823         ASMMemZeroPage(pVCpu->hmr0.s.svm.pVmcb);
     823        RT_BZERO(pVCpu->hmr0.s.svm.pVmcb, HOST_PAGE_SIZE);
    824824
    825825        /*
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