ASAravind Sivakumaran
Theme

Theme and appearance

Appearance
Palette

Pick any colour. The displayed accent adjusts for readable contrast in light or dark mode.

← Systems Observatory

VALIDATION / INVESTIGATE A FAILURE

The test passed. Is the protection path active?

A test maps device address 0x8000 to page B and has the NIC write a 16-byte marker. Page A sits at physical 0x8000, so where the marker lands shows which path the write took. No fault was logged, and the test reported PASS.

A pass is a claim, not evidence. Four causes fit it. Pick checks, watch causes drop out, and conclude only when one is left.

The investigation

The device wrote the wrong bytes. What do I check?

Follow one request in order and stop at the first hop that fails. Each check narrows the causes; it does not prove one on its own. Addresses are explained in the address legend.

HopCheckWhat it narrows, if the request is controlled
Requester IDThe Command register in lspci (bus mastering) and the device ID in any fault recordWhether the device was allowed to send requests. Bus mastering permits them but does not show this one was sent, and a missing record does not show it was not: match any record to the attempt you made
IOMMU domainThe IOMMU's translation mode for the deviceTranslation bypassed (the write went straight through), versus translated, for that device
TranslationInvalidate, then write the same request againStale translation (the retry now lands on the right page) versus wrong mapping (it still lands on the wrong one). Only if the invalidation covered every cache that could hold the entry (the IOMMU's and the device's), completed before the retry, and the mapping did not change meanwhile
MemoryRead the intended page and the page that was hitWhere the bytes went, once visibility and ordering are controlled. It does not say why that page was chosen
CompletionHow many of the bytes arrived, and whether the command or transfer completed (what a completion proves)Incomplete work (a partial or unfinished transfer) versus the wrong destination
InterruptIs the data right in RAM while the driver was never told?A missing interrupt (notification path), which is not a data bug

Same symptom, different layer

You seeEvidence that points to itWhat that evidence cannot establish
Device not enumeratedMissing from lspciAnything about DMA or the driver: it never got that far
BAR access failureReads come back all ones (a common sign), memory space not enabled or BAR unassigned in lspci -vvWhether the device, the link or the BAR assignment is at fault
DMA faultAn event-log record with the device and addressWhy the mapping was absent or denied
NIC policy dropA drop counter on the NIC (ethtool -S) with no IOMMU eventThat the DMA path itself is healthy
DMA succeeded, no guest notificationThe bytes are in RAM; the interrupt count did not moveWhether the device sent no interrupt or the interrupt path dropped it

The method behind it

The same steps, on the emulated IOMMU: show that the intended protection path is active. Each cause has its own chapter: stale IOTLB entries, bus mastering and faults and recovery.