VirtualBox

Changeset 86119 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Sep 14, 2020 9:15:29 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140353
Message:

AMD IOMMU: bugref:9654 Bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/iommu-amd.h

    r86088 r86119  
    453453/** @} */
    454454
    455 /**
    456  * Gets the device table length (in bytes) given the size field.
    457  */
    458 #define IOMMU_GET_DEV_TAB_LEN(a_DevTab)     (((a_DevTab.n.u9Size) + 1) << X86_PAGE_4K_SHIFT)
     455/** Gets the device table length (in bytes) given the device table pointer. */
     456#define IOMMU_GET_DEV_TAB_LEN(a_pDevTab)            (((a_pDevTab)->n.u9Size + 1) << X86_PAGE_4K_SHIFT)
    459457
    460458/**
     
    548546#define IOMMU_DTE_QWORD_1_FEAT_GTSUP_MASK       UINT64_C(0x00000000ffff0000)
    549547
    550 /* Mask of valid bits for GIoSup (Guest I/O Protection Support) feature (bit 54). */
     548/** Mask of valid bits for GIoSup (Guest I/O Protection Support) feature (bit 54). */
    551549#define IOMMU_DTE_QWORD_0_FEAT_GIOSUP_MASK      UINT64_C(0x0040000000000000)
    552550
    553 /* Mask of valid DTE feature bits. */
     551/** Mask of valid DTE feature bits. */
    554552#define IOMMU_DTE_QWORD_0_FEAT_MASK             (  IOMMU_DTE_QWORD_0_FEAT_EPHSUP_MASK \
    555553                                                 | IOMMU_DTE_QWORD_0_FEAT_GTSUP_MASK  \
     
    557555#define IOMMU_DTE_QWORD_1_FEAT_MASK             (IOMMU_DTE_QWORD_0_FEAT_GIOSUP_MASK)
    558556
    559 /* Mask of all valid DTE bits (including all feature bits). */
     557/** Mask of all valid DTE bits (including all feature bits). */
    560558#define IOMMU_DTE_QWORD_0_VALID_MASK            UINT64_C(0x7fffffffffffff83)
    561559#define IOMMU_DTE_QWORD_1_VALID_MASK            UINT64_C(0xfffffbffffffffff)
     
    563561#define IOMMU_DTE_QWORD_3_VALID_MASK            UINT64_C(0xffc0000000000000)
    564562
    565 /* Mask of the interrupt table root pointer. */
     563/** Mask of the interrupt table root pointer. */
    566564#define IOMMU_DTE_IRTE_ROOT_PTR_MASK            UINT64_C(0x000fffffffffffc0)
    567 /* Number of bits to shift to get the interrupt root table pointer at
     565/** Number of bits to shift to get the interrupt root table pointer at
    568566   qword 2 (qword 0 being the first one) - 128-byte aligned. */
    569567#define IOMMU_DTE_IRTE_ROOT_PTR_SHIFT           6
    570568
     569/** Maximum encoded IRTE length (exclusive). */
     570#define IOMMU_DTE_INTR_TAB_LEN_MAX              12
     571/** Gets the interrupt table entries (in bytes) given the DTE pointer. */
     572#define IOMMU_GET_INTR_TAB_ENTRIES(a_pDte)      ((1U << (a_pDte)->n.u4IntrTableLength))
     573/** Gets the interrupt table length (in bytes) given the DTE pointer. */
     574#define IOMMU_GET_INTR_TAB_LEN(a_pDte)          (IOMMU_GET_INTR_TAB_ENTRIES(a_pDte) << IOMMU_IRTE_SIZE_SHIFT)
    571575
    572576/**
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