mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
Different VFIO I/O backends support different features. For example, the kernel VFIO backend supports DMA-BUF creation, while vfio-user does not. Currently, this is handled by attempting the operation and checking for -ENOTTY, which can lead to misleading warnings when a feature is simply not supported by a particular backend. Introduce a capability flags mechanism in VFIODeviceIOOps that allows backends to explicitly advertise which features they support. Callers can check these capabilities before attempting operations, avoiding spurious errors and warnings. Cc: John Levon <john.levon@nutanix.com> Reviewed-by: John Levon <john.levon@nutanix.com> Link: https://lore.kernel.org/qemu-devel/20260409114312.1704062-1-clg@redhat.com Signed-off-by: Cédric Le Goater <clg@redhat.com>