Changeset 88521 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Apr 15, 2021 10:56:57 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r88515 r88521 868 868 uint8_t const fSlts = 1; /* Second-Level translation support. */ 869 869 uint8_t const fPt = 1; /* Pass-Through support. */ 870 uint8_t const fSmts = fFlts & fSlts & fPt; /* Scalable mode translation support.*/ 870 871 uint8_t const fNest = 0; /* Nested translation support. */ 871 uint8_t const fSmts = fFlts & fSlts & fPt; /* Scalable mode translation support.*/872 872 873 873 /* CAP_REG */ … … 886 886 X86_PAGE_1G_SHIFT : X86_PAGE_2M_SHIFT) - X86_PAGE_4K_SHIFT; 887 887 uint8_t const fNd = 2; /* Number of domains (0=16, 1=64, 2=256, 3=1K, 4=4K, 5=16K, 6=64K, 888 7=Reserved). */888 7=Reserved). */ 889 889 uint8_t const fPsi = 1; /* Page selective invalidation. */ 890 890 uint8_t const uMgaw = cGstPhysAddrBits - 1; /* Maximum guest address width. */ … … 892 892 uint16_t const offFro = DMAR_MMIO_OFF_FRCD_LO_REG >> 4; /* MMIO offset of FRCD registers. */ 893 893 894 pThis->fCap = RT_BF_MAKE(VTD_BF_CAP_REG_ND, fNd) 895 | RT_BF_MAKE(VTD_BF_CAP_REG_AFL, 0) /* Advanced fault logging not supported. */ 896 | RT_BF_MAKE(VTD_BF_CAP_REG_RWBF, 0) /* Software need not flush write-buffers. */ 897 | RT_BF_MAKE(VTD_BF_CAP_REG_PLMR, 0) /* Protected Low-Memory Region not supported. */ 898 | RT_BF_MAKE(VTD_BF_CAP_REG_PHMR, 0) /* Protected High-Memory Region not supported. */ 899 | RT_BF_MAKE(VTD_BF_CAP_REG_CM, 1) /** @todo Figure out if required when we impl. caching. */ 900 | RT_BF_MAKE(VTD_BF_CAP_REG_SAGAW, fSlts & uSagaw) 901 | RT_BF_MAKE(VTD_BF_CAP_REG_MGAW, uMgaw) 902 | RT_BF_MAKE(VTD_BF_CAP_REG_ZLR, 1) /** @todo Figure out if/how to support zero-length reads. */ 903 | RT_BF_MAKE(VTD_BF_CAP_REG_FRO, offFro) 904 | RT_BF_MAKE(VTD_BF_CAP_REG_SLLPS, fSlts & fSllps) 905 | RT_BF_MAKE(VTD_BF_CAP_REG_PSI, fPsi) 906 | RT_BF_MAKE(VTD_BF_CAP_REG_NFR, DMAR_FRCD_REG_COUNT - 1) 907 | RT_BF_MAKE(VTD_BF_CAP_REG_MAMV, fPsi & fMamv) 908 | RT_BF_MAKE(VTD_BF_CAP_REG_DWD, 1) 909 | RT_BF_MAKE(VTD_BF_CAP_REG_FL1GP, fFlts & fFl1gp) 910 | RT_BF_MAKE(VTD_BF_CAP_REG_PI, 0) /* Posted Interrupts not supported. */ 911 | RT_BF_MAKE(VTD_BF_CAP_REG_FL5LP, fFlts & fFl5lp); 894 pThis->fCap = RT_BF_MAKE(VTD_BF_CAP_REG_ND, fNd) 895 | RT_BF_MAKE(VTD_BF_CAP_REG_AFL, 0) /* Advanced fault logging not supported. */ 896 | RT_BF_MAKE(VTD_BF_CAP_REG_RWBF, 0) /* Software need not flush write-buffers. */ 897 | RT_BF_MAKE(VTD_BF_CAP_REG_PLMR, 0) /* Protected Low-Memory Region not supported. */ 898 | RT_BF_MAKE(VTD_BF_CAP_REG_PHMR, 0) /* Protected High-Memory Region not supported. */ 899 | RT_BF_MAKE(VTD_BF_CAP_REG_CM, 1) /** @todo Figure out if required when we impl. caching. */ 900 | RT_BF_MAKE(VTD_BF_CAP_REG_SAGAW, fSlts & uSagaw) 901 | RT_BF_MAKE(VTD_BF_CAP_REG_MGAW, uMgaw) 902 | RT_BF_MAKE(VTD_BF_CAP_REG_ZLR, 1) /** @todo Figure out if/how to support zero-length reads. */ 903 | RT_BF_MAKE(VTD_BF_CAP_REG_FRO, offFro) 904 | RT_BF_MAKE(VTD_BF_CAP_REG_SLLPS, fSlts & fSllps) 905 | RT_BF_MAKE(VTD_BF_CAP_REG_PSI, fPsi) 906 | RT_BF_MAKE(VTD_BF_CAP_REG_NFR, DMAR_FRCD_REG_COUNT - 1) 907 | RT_BF_MAKE(VTD_BF_CAP_REG_MAMV, fPsi & fMamv) 908 | RT_BF_MAKE(VTD_BF_CAP_REG_DWD, 1) 909 | RT_BF_MAKE(VTD_BF_CAP_REG_FL1GP, fFlts & fFl1gp) 910 | RT_BF_MAKE(VTD_BF_CAP_REG_PI, 0) /* Posted Interrupts not supported. */ 911 | RT_BF_MAKE(VTD_BF_CAP_REG_FL5LP, fFlts & fFl5lp) 912 | RT_BF_MAKE(VTD_BF_CAP_REG_ESIRTPS, 0) /* Whether we invalidate interrupt cache on SIRTP flow. */ 913 | RT_BF_MAKE(VTD_BF_CAP_REG_ESRTPS, 0); /* Whether we invalidate translation cache on SRTP flow. */ 912 914 dmarRegWriteRaw64(pThis, VTD_MMIO_OFF_CAP_REG, pThis->fCap); 913 915 } … … 921 923 uint8_t const fSrs = 1; /* Supervisor request support. */ 922 924 uint8_t const fEim = 1; /* Extended interrupt mode.*/ 925 uint8_t const fAdms = 1; /* Abort DMA mode support. */ 923 926 924 927 pThis->fExtCap = RT_BF_MAKE(VTD_BF_ECAP_REG_C, 0) /* Accesses don't snoop CPU cache. */ … … 937 940 | RT_BF_MAKE(VTD_BF_ECAP_REG_SRS, fSmts & fSrs) 938 941 | RT_BF_MAKE(VTD_BF_ECAP_REG_NWFS, 0) /* 0 as DT not supported. */ 939 | RT_BF_MAKE(VTD_BF_ECAP_REG_EAFS, 0) /* 0 as PASID not supported.*/942 | RT_BF_MAKE(VTD_BF_ECAP_REG_EAFS, 0) /** @todo figure out if EAFS is required? */ 940 943 | RT_BF_MAKE(VTD_BF_ECAP_REG_PSS, 0) /* 0 as PASID not supported. */ 941 944 | RT_BF_MAKE(VTD_BF_ECAP_REG_PASID, 0) /* PASID support. */ … … 948 951 | RT_BF_MAKE(VTD_BF_ECAP_REG_FLTS, fFlts) 949 952 | RT_BF_MAKE(VTD_BF_ECAP_REG_SMPWCS, 0) /* 0 as PASID not supported. */ 950 | RT_BF_MAKE(VTD_BF_ECAP_REG_RPS, 0); /* 0 as PASID not supported. */ 953 | RT_BF_MAKE(VTD_BF_ECAP_REG_RPS, 0) /* We don't support RID_PASID field in SM context entry. */ 954 | RT_BF_MAKE(VTD_BF_ECAP_REG_ADMS, fAdms) 955 | RT_BF_MAKE(VTD_BF_ECAP_REG_RPRIVS, 0); /** @todo figure out if we should/can support this? */ 951 956 dmarRegWriteRaw64(pThis, VTD_MMIO_OFF_ECAP_REG, pThis->fExtCap); 952 957 }
Note:
See TracChangeset
for help on using the changeset viewer.