On 10/03/2019 23:12, Hans van Kranenburg wrote: > On 3/10/19 11:03 PM, Andrew Cooper wrote: >> On 10/03/2019 21:35, Hans van Kranenburg wrote: >>> [...] >>> >>> Using dom0_mem=2GiB,max:4GiB instead of dom0_mem=2GiB,max:2GiB (which I >>> started with) makes the errors go away, so workaround confirmed. > It's actually dom0_mem=2G,max:4G, I typed something before which was not > identical to what I started that machine with. > >>> [...] >>> I think I'm fine with this workaround. >> I think >> https://lists.xen.org/archives/html/xen-devel/2014-12/msg00699.html is >> the last attempt David made to upstream the fixes. >> >> Linux is still broken, and these fixes are still necessary. > FMI, is this max:4G DTRT for me now in the meantime, or am I still > facing more hidden problems while using this workaround?
I believe that is good enough to work around the problem. The issue is that the these drivers are using dom0's max ram (well - max pfn to be specific) to decide whether it reports itself as 32bit or 64bit DMA capable, which is nonsense. Therefore, if dom0 thinks it has less that 4G of potential RAM, the driver reports the device as only 32-bit capable, and bounce-buffers all of its DMA (as dom0 is generally allocated above the 4G boundary in physical address space). ~Andrew