VirtualBox

Changeset 96979 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Oct 4, 2022 12:46:05 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153902
Message:

VMM/PGM,IEM,HM: Added a PGMPHYSHANDLER_F_NOT_IN_HM flag to better deal with a nested APIC access page. bugref:10092

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r96958 r96979  
    8686
    8787/**
    88  * Enables the nested APIC access page support tweaks in PGM.
    89  * If disabled, the nested VM's APIC accesses will by MMIO based in VT-x mode.
    90  */
    91 //#define PGM_WITH_NESTED_APIC_ACCESS_PAGE
    92 
    93 /**
    9488 * Enables optimizations for MMIO handlers that exploits X86_TRAP_PF_RSVD and
    9589 * VMX_EXIT_EPT_MISCONFIG.
     
    526520     * @sa PGMPHYSHANDLER_F_R0_DEVINS_IDX  */
    527521    bool                                fRing0DevInsIdx;
    528     bool                                afPadding[1];
     522    /** See PGMPHYSHANDLER_F_NOT_IN_HM. */
     523    bool                                fNotInHm : 1;
    529524    /** Pointer to the ring-0 callback function. */
    530525    R0PTRTYPE(PFNPGMPHYSHANDLER)        pfnHandler;
     
    557552    /** Set by ring-0 if the handler is ring-0 enabled (for debug). */
    558553    bool                                fRing0Enabled : 1;
     554    /** See PGMPHYSHANDLER_F_NOT_IN_HM. */
     555    bool                                fNotInHm : 1;
    559556    /** Pointer to the ring-3 callback function. */
    560557    R3PTRTYPE(PFNPGMPHYSHANDLER)        pfnHandler;
     
    662659         * (PGM_PAGE_PDE_TYPE_*). */
    663660        uint64_t    u2PDETypeY          : 2;
    664         /** 4     - Unused (was used by FTE for dirty tracking). */
    665         uint64_t    fUnused1            : 1;
     661        /** 4     - Don't apply the physical handler in HM mode (nested APIC hack). */
     662        uint64_t    fHandlerPhysNotInHm : 1;
    666663        /** 5     - Flag indicating that a write monitored page was written to
    667664         *  when set. */
     
    10601057 * @param   a_pPage     Pointer to the physical guest page tracking structure.
    10611058 * @param   a_uState    The new state value.
    1062  */
    1063 #define PGM_PAGE_SET_HNDL_PHYS_STATE(a_pPage, a_uState) \
     1059 * @param   a_fNotIHm   The PGMPHYSHANDLER_F_NOT_HM bit.
     1060 */
     1061#define PGM_PAGE_SET_HNDL_PHYS_STATE(a_pPage, a_uState, a_fNotInHm) \
     1062    do { (a_pPage)->s.u2HandlerPhysStateY = (a_uState);  (a_pPage)->s.fHandlerPhysNotInHm = (a_fNotInHm); } while (0)
     1063
     1064/**
     1065 * Sets the physical access handler state of a page.
     1066 * @param   a_pPage     Pointer to the physical guest page tracking structure.
     1067 * @param   a_uState    The new state value.
     1068 */
     1069#define PGM_PAGE_SET_HNDL_PHYS_STATE_ONLY(a_pPage, a_uState) \
    10641070    do { (a_pPage)->s.u2HandlerPhysStateY = (a_uState); } while (0)
    10651071
     
    11041110    ( PGM_PAGE_GET_HNDL_PHYS_STATE(a_pPage) == PGM_PAGE_HNDL_PHYS_STATE_ALL )
    11051111
     1112/** @def PGM_PAGE_IS_HNDL_PHYS_NOT_IN_HM
     1113 * Checks if the physical handlers of the page should be ignored in shadow page
     1114 * tables and such.
     1115 * @returns true/false
     1116 * @param   a_pPage     Pointer to the physical guest page tracking structure.
     1117 */
     1118#define PGM_PAGE_IS_HNDL_PHYS_NOT_IN_HM(a_pPage) ((a_pPage)->s.fHandlerPhysNotInHm)
    11061119
    11071120/** @def PGM_PAGE_GET_TRACKING
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