A Linux security fix briefly breaks DMA
lwn.net
lwn.net
Wouldn't it be nice if the OS managed an IOMMU so the peripheral device could not access memory it is not allowed to access?
I'm scratching my head wondering why these problems still exist today..
I would be entirely unsurprised if a lot of device drivers didn't use the correct method to get a DMA buffer - meaning that this would just break them...
So code needs to be written to handle those cases. And if there is code to handle the cases, it needs to be correct, and if it is correct, there is no harm in using it in other edge cases where it doesn't have a big performance hit.
Splitting IOMMU groups is not inherently insecure; doing so without ACS is insecure. It is true that's not the motherboard vendors fault - it is because Intel designed it that way. ACS (the part of PCIe which makes sane IOMMU group splitting possible) works great on my Zen products (Ryzen, Threadripper, EPYC, etc.) It also works fine on my Intel Xeon products. Intel client silicon is the odd man out here, and if you ask me that's hardly an accident. It falls neatly in line w/ their other artificial market segmentation. (They do the exact same thing w/ ECC RAM.)
I'm mostly just jaded because my use-case (PCIe passthrough for a 'gaming VM') is hardly conducive to enterprise grade hardware (Xeon SKUs w/ low base clocks, headless GPUs designed for compute, etc.) yet vendors like NVidia and Intel choose to make this use-case difficult/impossible to implement on their consumer grade offerings. It gets old after a while. I, for one, am really glad AMD shook things up in this regard in the CPU space.
Gaming VMs are likely going to die anyway, at least for competitive gaming. Virtualization is just too powerful a tool for cheating. Many anti-cheats already ban it.