]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Report error on failure to set isolation group
authorAndrea Bolognani <abologna@redhat.com>
Thu, 24 Aug 2017 14:07:07 +0000 (16:07 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 25 Aug 2017 08:05:45 +0000 (10:05 +0200)
This is more user-friendly because the error will be
displayed directly instead of being buried in the log.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/qemu/qemu_domain_address.c

index 8066ed1233ffc026ff1831b9480a544a23805b15..16bf0cdf91f8149723c55bfb6cdbb81698c0a5a9 100644 (file)
@@ -1012,10 +1012,11 @@ qemuDomainFillDeviceIsolationGroup(virDomainDefPtr def,
         tmp = virPCIDeviceAddressGetIOMMUGroupNum(hostAddr);
 
         if (tmp < 0) {
-            VIR_WARN("Can't look up isolation group for host device "
-                     "%04x:%02x:%02x.%x",
-                     hostAddr->domain, hostAddr->bus,
-                     hostAddr->slot, hostAddr->function);
+            virReportError(VIR_ERR_INTERNAL_ERROR,
+                           _("Can't look up isolation group for host device "
+                             "%04x:%02x:%02x.%x"),
+                           hostAddr->domain, hostAddr->bus,
+                           hostAddr->slot, hostAddr->function);
             goto cleanup;
         }
 
@@ -1056,9 +1057,11 @@ qemuDomainFillDeviceIsolationGroup(virDomainDefPtr def,
         tmp = qemuDomainFindUnusedIsolationGroup(def);
 
         if (tmp == 0) {
-            VIR_WARN("Can't obtain usable isolation group for interface "
-                     "configured to use hostdev-backed network '%s'",
-                     iface->data.network.name);
+            virReportError(VIR_ERR_INTERNAL_ERROR,
+                           _("Can't obtain usable isolation group for "
+                             "interface configured to use hostdev-backed "
+                             "network '%s'"),
+                             iface->data.network.name);
             goto cleanup;
         }