Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
iSCSI hook and IOMMU
2018-11-19, 14:38
Post: #1
iSCSI hook and IOMMU
I've observed issues when using iSCSI sanhook in conjunction with the IOMMU. When the loaded kernel enables the IOMMU, the traffic caused by the iSCSI hook eventually causes DMA faults, because the NIC uses DMA regions that are not registered anywhere.

Since iPXE acts like a kind of firmware in this case, shouldn't it register the NIC and corresponding memory regions in the RMRRs?
Find all posts by this user
Quote this message in a reply
2018-11-19, 15:12
Post: #2
RE: iSCSI hook and IOMMU
(2018-11-19 14:38)parthy Wrote:  I've observed issues when using iSCSI sanhook in conjunction with the IOMMU. When the loaded kernel enables the IOMMU, the traffic caused by the iSCSI hook eventually causes DMA faults, because the NIC uses DMA regions that are not registered anywhere.

Since iPXE acts like a kind of firmware in this case, shouldn't it register the NIC and corresponding memory regions in the RMRRs?

There is no protocol by which iPXE can negotiate IOMMU registrations with the host OS. What should happen is that the kernel takes over ownership of all hardware, including the IOMMU and the NIC, and ceases to use the INT13 API.

There is some logic within iPXE to quiesce the hardware (i.e. stop DMA) at the points that iPXE expects the OS to potentially take ownership. This is currently implemented only for Hyper-V, but could be extended for other NICs.

Michael
Visit this user's website Find all posts by this user
Quote this message in a reply
2018-11-19, 17:50
Post: #3
RE: iSCSI hook and IOMMU
Well, the situation is that the kernel does not have a NIC driver, but configures the IOMMU. The INT13 hook is transparent and continues to function if the IOMMU is configured correctly. The way to report this would be the RMRR descriptors in the DMAR table. I suspect that is how hardware iSCSI mechanisms provided by the firmware do it. The VT-d specification says:

Quote:Section 3.15 described the details of BIOS allocated reserved memory ranges that may be DMA targets. BIOS may report each such reserved memory region through the RMRR structures, along with the devices that requires access to the specified reserved memory region.

This sounds like the appropriate mechanism, if iPXE is viewed as part of the "BIOS".
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)