VirtualBox

Changeset 89730 in vbox for trunk


Ignore:
Timestamp:
Jun 16, 2021 6:01:27 AM (3 years ago)
Author:
vboxsync
Message:

Intel IOMMU: bugref:9967 Build fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp

    r89729 r89730  
    251251AssertCompileSize(DMARDIAG, 4);
    252252
     253#ifdef IN_RING3
    253254/** DMAR diagnostic enum description expansion.
    254255 * The below construct ensures typos in the input to this macro are caught
    255256 * during compile time. */
    256 #define DMARDIAG_DESC(a_Name)        RT_CONCAT(kDmarDiag_, a_Name) < kDmarDiag_End ? RT_STR(a_Name) : "Ignored"
     257# define DMARDIAG_DESC(a_Name)        RT_CONCAT(kDmarDiag_, a_Name) < kDmarDiag_End ? RT_STR(a_Name) : "Ignored"
    257258
    258259/** DMAR diagnostics description for members in DMARDIAG. */
     
    319320};
    320321AssertCompile(RT_ELEMENTS(g_apszDmarDiagDesc) == kDmarDiag_End);
    321 #undef DMARDIAG_DESC
     322# undef DMARDIAG_DESC
     323#endif /* IN_RING3 */
    322324
    323325/**
     
    853855AssertCompile(sizeof(g_apbRw1cMasks) == sizeof(g_apbRwMasks));
    854856
     857#ifdef IN_RING3
    855858/** Array of valid domain-ID bits. */
    856859static uint16_t const g_auNdMask[] = { 0xf, 0x3f, 0xff, 0x3ff, 0xfff, 0x3fff, 0xffff, 0 };
    857860AssertCompile(RT_ELEMENTS(g_auNdMask) >= DMAR_ND);
     861#endif
    858862
    859863
    860864#ifndef VBOX_DEVICE_STRUCT_TESTCASE
     865#ifdef IN_RING3
    861866/**
    862867 * Returns the supported adjusted guest-address width (SAGAW) given the maximum
     
    905910
    906911/**
     912 * Returns table translation mode's descriptive name.
     913 *
     914 * @returns The descriptive name.
     915 * @param   uTtm    The RTADDR_REG.TTM value.
     916 */
     917static const char* vtdRtaddrRegGetTtmDesc(uint8_t uTtm)
     918{
     919    Assert(!(uTtm & 3));
     920    static const char* s_apszTtmNames[] =
     921    {
     922        "Legacy Mode",
     923        "Scalable Mode",
     924        "Reserved",
     925        "Abort-DMA Mode"
     926    };
     927    return s_apszTtmNames[uTtm & (RT_ELEMENTS(s_apszTtmNames) - 1)];
     928}
     929#endif /* IN_RING3 */
     930
     931
     932/**
    907933 * Returns whether the interrupt remapping (IR) fault is qualified or not.
    908934 *
     
    923949            return false;
    924950    }
    925 }
    926 
    927 
    928 /**
    929  * Returns table translation mode's descriptive name.
    930  *
    931  * @returns The descriptive name.
    932  * @param   uTtm    The RTADDR_REG.TTM value.
    933  */
    934 static const char* vtdRtaddrRegGetTtmDesc(uint8_t uTtm)
    935 {
    936     Assert(!(uTtm & 3));
    937     static const char* s_apszTtmNames[] =
    938     {
    939         "Legacy Mode",
    940         "Scalable Mode",
    941         "Reserved",
    942         "Abort-DMA Mode"
    943     };
    944     return s_apszTtmNames[uTtm & (RT_ELEMENTS(s_apszTtmNames) - 1)];
    945951}
    946952
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