Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 9 +++++++++
src/qemu/qemu_domain.h | 2 ++
2 files changed, 11 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 824bca89f4..6502c6191c 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -29,6 +29,7 @@
#include "qemu_dbus.h"
#include "qemu_process.h"
#include "qemu_capabilities.h"
+#include "qemu_hostdev.h"
#include "qemu_migration.h"
#include "qemu_migration_params.h"
#include "qemu_security.h"
@@ -12825,6 +12826,14 @@ qemuDomainSupportsVideoVga(virDomainVideoDefPtr video,
}
+bool
+qemuDomainNeedsVFIO(const virDomainDef *def)
+{
+ return virDomainDefHasVFIOHostdev(def) ||
+ virDomainDefHasMdevHostdev(def);
+}
+
+
/**
* qemuDomainGetHostdevPath:
* @def: domain definition
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 6c490bd9d8..8e3917c205 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -1084,6 +1084,8 @@ int qemuDomainCheckMonitor(virQEMUDriverPtr driver,
bool qemuDomainSupportsVideoVga(virDomainVideoDefPtr video,
virQEMUCapsPtr qemuCaps);
+bool qemuDomainNeedsVFIO(const virDomainDef *def);
+
int qemuDomainGetHostdevPath(virDomainDefPtr def,
virDomainHostdevDefPtr dev,
bool teardown,
--
2.21.0