Changeset 86254 in vbox
- Timestamp:
- Sep 24, 2020 5:56:29 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp
r86214 r86254 316 316 STAMCOUNTER StatMsiRemapR3; /**< Number of MSI remap requests in R3. */ 317 317 STAMCOUNTER StatMsiRemapRZ; /**< Number of MSI remap requests in RZ. */ 318 319 STAMCOUNTER StatMemReadR3; /**< Number of memory read translation requests in R3. */ 320 STAMCOUNTER StatMemReadRZ; /**< Number of memory read translation requests in RZ. */ 321 STAMCOUNTER StatMemWriteR3; /**< Number of memory write translation requests in R3. */ 322 STAMCOUNTER StatMemWriteRZ; /**< Number of memory write translation requests in RZ. */ 318 323 319 324 STAMCOUNTER StatCmd; /**< Number of commands processed. */ … … 2032 2037 } 2033 2038 2034 /* If a read handler doesn't exist, it's reserved or unknown register. */2039 /* If a read handler doesn't exist, it's a reserved or unknown register. */ 2035 2040 if (pReg->pfnRead) 2036 2041 { /* likely */ } … … 2989 2994 2990 2995 /* If the IOVA is subject to address exclusion, addresses are forwarded without translation. */ 2991 if ( !pThis->ExclRangeBaseAddr.n.u1ExclEnable 2996 if ( !pThis->ExclRangeBaseAddr.n.u1ExclEnable /** @todo lock or make atomic read? */ 2992 2997 || !iommuAmdIsDvaInExclRange(pThis, &Dte, uIova)) 2993 2998 { /* likely */ } … … 3069 3074 3070 3075 PIOMMU pThis = PDMDEVINS_2_DATA(pDevIns, PIOMMU); 3071 LogFlowFunc(("uDevId=%#x uIova=%#RX64 cbRead=%u\n", uDevId, uIova, cbRead));3072 3076 3073 3077 /* Addresses are forwarded without translation when the IOMMU is disabled. */ … … 3075 3079 if (Ctrl.n.u1IommuEn) 3076 3080 { 3081 STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatMemRead)); 3082 LogFlowFunc(("uDevId=%#x uIova=%#RX64 cbRead=%u\n", uDevId, uIova, cbRead)); 3083 3077 3084 /** @todo IOMMU: IOTLB cache lookup. */ 3078 3085 … … 3107 3114 3108 3115 PIOMMU pThis = PDMDEVINS_2_DATA(pDevIns, PIOMMU); 3109 LogFlowFunc(("uDevId=%#x uIova=%#RX64 cbWrite=%u\n", uDevId, uIova, cbWrite));3110 3116 3111 3117 /* Addresses are forwarded without translation when the IOMMU is disabled. */ … … 3113 3119 if (Ctrl.n.u1IommuEn) 3114 3120 { 3121 STAM_COUNTER_INC(&pThis->CTX_SUFF_Z(StatMemWrite)); 3122 LogFlowFunc(("uDevId=%#x uIova=%#RX64 cbWrite=%u\n", uDevId, uIova, cbWrite)); 3123 3115 3124 /** @todo IOMMU: IOTLB cache lookup. */ 3116 3125 … … 4893 4902 */ 4894 4903 rc = PDMDevHlpMmioCreate(pDevIns, IOMMU_MMIO_REGION_SIZE, pPciDev, 0 /* iPciRegion */, iommuAmdMmioWrite, iommuAmdMmioRead, 4895 NULL /* pvUser */, IOMMMIO_FLAGS_READ_DWORD_QWORD | IOMMMIO_FLAGS_WRITE_DWORD_QWORD_READ_MISSING, 4904 NULL /* pvUser */, 4905 IOMMMIO_FLAGS_READ_DWORD_QWORD 4906 | IOMMMIO_FLAGS_WRITE_DWORD_QWORD_READ_MISSING 4907 | IOMMMIO_FLAGS_DBGSTOP_ON_COMPLICATED_READ 4908 | IOMMMIO_FLAGS_DBGSTOP_ON_COMPLICATED_WRITE, 4896 4909 "AMD-IOMMU", &pThis->hMmio); 4897 4910 AssertLogRelRCReturn(rc, rc); … … 4919 4932 * Statistics. 4920 4933 */ 4921 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadR3, STAMTYPE_COUNTER, "R3/MmioReadR3", STAMUNIT_OCCURENCES, "Number of MMIO reads in R3"); 4922 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadRZ, STAMTYPE_COUNTER, "RZ/MmioReadRZ", STAMUNIT_OCCURENCES, "Number of MMIO reads in RZ."); 4923 4924 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteR3, STAMTYPE_COUNTER, "R3/MmioWriteR3", STAMUNIT_OCCURENCES, "Number of MMIO writes in R3."); 4925 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteRZ, STAMTYPE_COUNTER, "RZ/MmioWriteRZ", STAMUNIT_OCCURENCES, "Number of MMIO writes in RZ."); 4926 4927 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMsiRemapR3, STAMTYPE_COUNTER, "R3/MsiRemapR3", STAMUNIT_OCCURENCES, "Number of interrupt remap requests in R3."); 4928 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMsiRemapRZ, STAMTYPE_COUNTER, "RZ/MsiRemapRZ", STAMUNIT_OCCURENCES, "Number of interrupt remap requests in RZ."); 4934 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadR3, STAMTYPE_COUNTER, "R3/MmioRead", STAMUNIT_OCCURENCES, "Number of MMIO reads in R3"); 4935 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioReadRZ, STAMTYPE_COUNTER, "RZ/MmioRead", STAMUNIT_OCCURENCES, "Number of MMIO reads in RZ."); 4936 4937 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteR3, STAMTYPE_COUNTER, "R3/MmioWrite", STAMUNIT_OCCURENCES, "Number of MMIO writes in R3."); 4938 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMmioWriteRZ, STAMTYPE_COUNTER, "RZ/MmioWrite", STAMUNIT_OCCURENCES, "Number of MMIO writes in RZ."); 4939 4940 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMsiRemapR3, STAMTYPE_COUNTER, "R3/MsiRemap", STAMUNIT_OCCURENCES, "Number of interrupt remap requests in R3."); 4941 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMsiRemapRZ, STAMTYPE_COUNTER, "RZ/MsiRemap", STAMUNIT_OCCURENCES, "Number of interrupt remap requests in RZ."); 4942 4943 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMemReadR3, STAMTYPE_COUNTER, "R3/MemRead", STAMUNIT_OCCURENCES, "Number of memory read translation requests in R3."); 4944 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMemReadRZ, STAMTYPE_COUNTER, "RZ/MemRead", STAMUNIT_OCCURENCES, "Number of memory read translation requests in RZ."); 4945 4946 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMemWriteR3, STAMTYPE_COUNTER, "R3/MemWrite", STAMUNIT_OCCURENCES, "Number of memory write translation requests in R3."); 4947 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatMemWriteRZ, STAMTYPE_COUNTER, "RZ/MemWrite", STAMUNIT_OCCURENCES, "Number of memory write translation requests in RZ."); 4929 4948 4930 4949 PDMDevHlpSTAMRegister(pDevIns, &pThis->StatCmd, STAMTYPE_COUNTER, "R3/Commands", STAMUNIT_OCCURENCES, "Number of commands processed (total).");
Note:
See TracChangeset
for help on using the changeset viewer.