VirtualBox

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


Ignore:
Timestamp:
Aug 24, 2023 11:23:58 PM (19 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
158907
Message:

VMM/PGM,IEM: Prepare work for write monitoring page containing recompiled code. bugref:10369

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMInternal-armv8.h

    r100072 r100966  
    295295#define IEMTLBE_F_NO_MAPPINGR3      RT_BIT_64(7) /**< TLB entry:   The IEMTLBENTRY::pMappingR3 member is invalid. */
    296296#define IEMTLBE_F_PG_UNASSIGNED     RT_BIT_64(8) /**< Phys page:   Unassigned memory (not RAM, ROM, MMIO2 or MMIO). */
    297 #define IEMTLBE_F_PHYS_REV          UINT64_C(0xfffffffffffffe00) /**< Physical revision mask. @sa IEMTLB_PHYS_REV_INCR */
     297#define IEMTLBE_F_PG_CODE_PAGE      RT_BIT_64(9) /**< Phys page:   Code page. */
     298#define IEMTLBE_F_PHYS_REV          UINT64_C(0xfffffffffffffc00) /**< Physical revision mask. @sa IEMTLB_PHYS_REV_INCR */
    298299/** @} */
    299300
     
    360361/** IEMTLB::uTlbPhysRev increment.
    361362 * @sa IEMTLBE_F_PHYS_REV */
    362 #define IEMTLB_PHYS_REV_INCR    RT_BIT_64(9)
     363#define IEMTLB_PHYS_REV_INCR    RT_BIT_64(10)
    363364/**
    364365 * Calculates the TLB tag for a virtual address.
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r100889 r100966  
    443443#define IEMTLBE_F_NO_MAPPINGR3      RT_BIT_64(7) /**< TLB entry:   The IEMTLBENTRY::pMappingR3 member is invalid. */
    444444#define IEMTLBE_F_PG_UNASSIGNED     RT_BIT_64(8) /**< Phys page:   Unassigned memory (not RAM, ROM, MMIO2 or MMIO). */
    445 #define IEMTLBE_F_PHYS_REV          UINT64_C(0xfffffffffffffe00) /**< Physical revision mask. @sa IEMTLB_PHYS_REV_INCR */
     445#define IEMTLBE_F_PG_CODE_PAGE      RT_BIT_64(9) /**< Phys page:   Code page. */
     446#define IEMTLBE_F_PHYS_REV          UINT64_C(0xfffffffffffffc00) /**< Physical revision mask. @sa IEMTLB_PHYS_REV_INCR */
    446447/** @} */
    447448
     
    512513/** IEMTLB::uTlbPhysRev increment.
    513514 * @sa IEMTLBE_F_PHYS_REV */
    514 #define IEMTLB_PHYS_REV_INCR    RT_BIT_64(9)
     515#define IEMTLB_PHYS_REV_INCR    RT_BIT_64(10)
    515516/**
    516517 * Calculates the TLB tag for a virtual address.
  • trunk/src/VBox/VMM/include/PGMInternal.h

    r100965 r100966  
    659659        /** 2     - Don't apply the physical handler in HM mode (nested APIC hack). */
    660660        uint64_t    fHandlerPhysNotInHm : 1;
    661         /** 3     - Flag indicating that a write monitored page was written to
    662          *  when set. */
     661        /** 3     - Flag indicating that a write monitored page was written to when set. */
    663662        uint64_t    fWrittenToY         : 1;
    664         /** 7:4   - Unused. */
    665         uint64_t    u2Unused0           : 4;
     663        /** 4     - Set when the page is write monitored because it's an IEM TB code
     664         * page.  Save recompiled code the need to verify opcode bytes.
     665         *
     666         * IEM fetches this flag as part of the TLB queries.  The flag is cleared when
     667         * the page is made writable and IEM is informed and will invalidate its
     668         * physical TLB layer.
     669         *
     670         * @note Can possibly be set on ROM pages that are not in the monitored state. */
     671        uint64_t    fCodePageY          : 1;
     672        /** 7:5   - Unused. */
     673        uint64_t    u2Unused0           : 3;
    666674        /** 9:8   - Paging structure needed to map the page
    667675         * (PGM_PAGE_PDE_TYPE_*). */
     
    977985#define PGM_PAGE_IS_ALLOCATED(a_pPage)          ( (a_pPage)->s.uStateY == PGM_PAGE_STATE_ALLOCATED )
    978986
     987
    979988/**
    980989 * Marks the page as written to (for GMM change monitoring).
     
    9991008 */
    10001009#define PGM_PAGE_IS_WRITTEN_TO(a_pPage)         ( (a_pPage)->s.fWrittenToY )
     1010
     1011
     1012/**
     1013 * Marks the page as an IEM code page (being write monitored or a ROM page).
     1014 * @param   a_pVM       The VM handle, only used for lock ownership assertions.
     1015 * @param   a_pPage     Pointer to the physical guest page tracking structure.
     1016 */
     1017#define PGM_PAGE_SET_CODE_PAGE(a_pVM, a_pPage) \
     1018    do { (a_pPage)->s.fCodePageY = 1; PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
     1019
     1020/**
     1021 * Clears the code page indicator.
     1022 * @param   a_pVM       The VM handle, only used for lock ownership assertions.
     1023 * @param   a_pPage     Pointer to the physical guest page tracking structure.
     1024 */
     1025#define PGM_PAGE_CLEAR_CODE_PAGE(a_pVM, a_pPage) \
     1026    do { (a_pPage)->s.fCodePageY = 0; PGM_PAGE_ASSERT_LOCK(a_pVM); } while (0)
     1027
     1028/**
     1029 * Checks if the page is an IEM code page (implies write monitored or ROM page).
     1030 * @returns true/false.
     1031 * @param   a_pPage     Pointer to the physical guest page tracking structure.
     1032 */
     1033#define PGM_PAGE_IS_CODE_PAGE(a_pPage)         ( (a_pPage)->s.fCodePageY )
    10011034
    10021035
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