There are two types of host devices that require /dev/vfio/vfio
access:
1) PCI devices with VFIO backend
2) Mediated devices
Introduce a simple helper that returns true if passed @hostdev
falls in either of the categories.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
return 0;
}
+
+bool
+qemuHostdevNeedsVFIO(const virDomainHostdevDef *hostdev)
+{
+ return virHostdevIsVFIODevice(hostdev) ||
+ virHostdevIsMdevDevice(hostdev);
+}
+
+
bool
qemuHostdevHostSupportsPassthroughVFIO(void)
{
#include "qemu_conf.h"
#include "domain_conf.h"
+bool qemuHostdevNeedsVFIO(const virDomainHostdevDef *hostdev);
+
bool qemuHostdevHostSupportsPassthroughVFIO(void);
int qemuHostdevUpdateActiveMediatedDevices(virQEMUDriverPtr driver,