On Sat, 2017-07-15 at 17:30 +0200, Andrea Bolognani wrote:
All the pieces are now in place, so we can finally start
using isolation groups to achieve our initial goal, which is
separating hostdevs from emulated PCI devices while keeping
hostdevs that belong to the same host IOMMU group together.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1280542
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_domain_address.c | 241 +++++++++++++++++++++
src/qemu/qemu_domain_address.h | 4 +
src/qemu/qemu_hotplug.c | 7 +
tests/qemumemlocktest.c | 2 +-
.../qemuxml2argv-pseries-hostdevs-1.args | 8 +-
.../qemuxml2argv-pseries-hostdevs-2.args | 3 +-
.../qemuxml2argv-pseries-hostdevs-3.args | 2 +-
.../qemuxml2xmlout-pseries-hostdevs-1.xml | 14 +-
.../qemuxml2xmlout-pseries-hostdevs-2.xml | 6 +-
.../qemuxml2xmlout-pseries-hostdevs-3.xml | 2 +-
10 files changed, 278 insertions(+), 11 deletions(-)
I'll squash this in before pushing:
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 2594712..d943c8b 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -1038,9 +1038,9 @@ qemuDomainFillDeviceIsolationGroup(virDomainDefPtr def,
/* Network interfaces can ultimately result in the guest being
* assigned a host device if the libvirt network they're connected
- * to is of type hostdev. Any other kind of network doesn't require
- * us to isolate the guest device, so we can skip them */
- if (iface->type == VIR_DOMAIN_NET_TYPE_NETWORK &&
+ * to is of type hostdev. All other kinds of network interfaces don't
+ * require us to isolate the guest device, so we can skip them */
+ if (iface->type != VIR_DOMAIN_NET_TYPE_NETWORK ||
networkGetActualType(iface) != VIR_DOMAIN_NET_TYPE_HOSTDEV) {
goto skip;
}
You know, to prevent libvirtd from crashing :)
--
Andrea Bolognani / Red Hat / Virtualization