Changeset 83712 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 16, 2020 5:57:35 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137222
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp
r83711 r83712 2072 2072 2073 2073 2074 DECLINLINE(IOMMU_STATUS_T) iommuAmdGetStatus(PCIOMMU pThis) 2075 { 2076 IOMMU_STATUS_T Status; 2077 Status.u64 = ASMAtomicReadU64((volatile uint64_t *)&pThis->Status.u64); 2078 return Status; 2079 } 2080 2081 2074 2082 /** 2075 2083 * Logs if the buffer length is invalid. … … 2131 2139 { 2132 2140 RT_NOREF(pDevIns, iReg); 2141 2142 /* 2143 * IOMMU behavior is undefined when software writes this register when event logging is running. 2144 * In our emulation, we ignore the write entirely. 2145 * See AMD IOMMU spec. "Event Log Base Address Register". 2146 */ 2147 IOMMU_STATUS_T const Status = iommuAmdGetStatus(pThis); 2148 if (Status.n.u1EvtLogRunning) 2149 { 2150 Log((IOMMU_LOG_PFX ": Setting EvtLogBar (%#RX64) when event logging is running -> Ignored\n", u64Value)); 2151 return VINF_SUCCESS; 2152 } 2153 2133 2154 pThis->EvtLogBaseAddr.u64 = u64Value & IOMMU_EVT_LOG_BAR_VALID_MASK; 2134 2155 iommuAmdCheckBufferLength(pThis->EvtLogBaseAddr.n.u4EvtLen, __PRETTY_FUNCTION__); 2156 2157 /* 2158 * Writing the event log base address, clears the event log head and tail pointers. 2159 * See AMD spec. 2.5 "Event Logging". 2160 */ 2161 pThis->EvtLogHeadPtr.u64 = 0; 2162 pThis->EvtLogTailPtr.u64 = 0; 2163 2135 2164 return VINF_SUCCESS; 2136 2165 } … … 2271 2300 * See AMD IOMMU spec. 3.3.13 "Command and Event Log Pointer Registers". 2272 2301 */ 2273 IOMMU_STATUS_T const Status = pThis->Status;2302 IOMMU_STATUS_T const Status = iommuAmdGetStatus(pThis); 2274 2303 if (Status.n.u1CmdBufRunning) 2275 2304 { … … 2288 2317 if (offBuf >= cbBuf) 2289 2318 { 2290 Log((IOMMU_LOG_PFX ": Setting CmdBufHeadPtr (%#RX32) to a value that exceeds buffer length -> Ignored\n", offBuf, cbBuf)); 2319 Log((IOMMU_LOG_PFX ": Setting CmdBufHeadPtr (%#RX32) to a value that exceeds buffer length (%#RX23) -> Ignored\n", 2320 offBuf, cbBuf)); 2291 2321 return VINF_SUCCESS; 2292 2322 }
Note:
See TracChangeset
for help on using the changeset viewer.