Re: [RFC] /dev/ioasid uAPI proposal
From: Alex Williamson <hidden>
Date: 2021-06-04 15:38:01
Also in:
linux-iommu, lkml
On Fri, 4 Jun 2021 09:19:50 +0000 "Tian, Kevin" [off-list ref] wrote:
quoted
From: Alex Williamson <redacted> Sent: Friday, June 4, 2021 4:42 AMquoted
'qemu --allow-no-snoop' makes more sense to meI'd be tempted to attach it to the -device vfio-pci option, it's specific drivers for specific devices that are going to want this and those devices may not be permanently attached to the VM. But I see in the other thread you're trying to optimize IOMMU page table sharing. There's a usability question in either case though and I'm not sure how to get around it other than QEMU or the kernel knowing a list of devices (explicit IDs or vendor+class) to select per device defaults."-device vfio-pci" is a per-device option, which implies that the no-snoop choice is given to the admin then no need to maintain a fixed device list in Qemu?
I think we want to look at where we put it to have the best default user experience. For example the QEMU vfio-pci device option could use on/off/auto semantics where auto is the default and QEMU maintains a list of IDs or vendor/class configurations where we've determined the "optimal" auto configuration. Management tools could provide an override, but we're imposing some pretty technical requirements for a management tool to be able to come up with good per device defaults. Seems like we should consolidate that technical decision in one place. Thanks, Alex