VirtualBox

Ignore:
Timestamp:
Aug 21, 2024 7:16:50 AM (5 months ago)
Author:
vboxsync
Message:

VMM/PGM: Some preparations for ARMv8 page table walking, introduce dedicated PGMMODE enumerations for ARMv8 and hide all accesses behind PGMMODE_XXX macros, bugref:10388

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PGM-armv8.cpp

    r104885 r105745  
    4343#include <VBox/vmm/pgm.h>
    4444#include <VBox/vmm/cpum.h>
     45#include <VBox/vmm/cpum-armv8.h>
    4546#include <VBox/vmm/iom.h>
    4647#include <VBox/sup.h>
     
    722723VMMDECL(PGMMODE) PGMGetGuestMode(PVMCPU pVCpu)
    723724{
    724     return pVCpu->pgm.s.enmGuestMode;
     725    VMCPU_ASSERT_EMT(pVCpu);
     726
     727    bool fMmuEnabled = CPUMGetGuestMmuEnabled(pVCpu);
     728    if (!fMmuEnabled)
     729        return PGMMODE_NONE;
     730
     731    CPUMMODE enmCpuMode = CPUMGetGuestMode(pVCpu);
     732    return   enmCpuMode == CPUMMODE_ARMV8_AARCH64
     733           ? PGMMODE_VMSA_V8_64
     734           : PGMMODE_VMSA_V8_32;
    725735}
    726736
     
    728738VMMDECL(PGMMODE) PGMGetShadowMode(PVMCPU pVCpu)
    729739{
    730     return pVCpu->pgm.s.enmShadowMode;
     740    RT_NOREF(pVCpu);
     741    return PGMMODE_NONE; /* NEM doesn't need any shadow paging. */
    731742}
    732743
     
    736747    VMCPU_ASSERT_EMT(pVCpu);
    737748    Assert(pWalk);
    738     AssertReleaseFailed();
     749    //AssertReleaseFailed();
    739750    RT_NOREF(pVCpu, GCPtr, pWalk);
    740751    return VERR_NOT_IMPLEMENTED;
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