From: Andrea Bolognani Date: Thu, 24 Aug 2017 14:07:07 +0000 (+0200) Subject: qemu: Report error on failure to set isolation group X-Git-Tag: v3.7.0-rc1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed9db36b426dcf9e4c34f2126379c339773f6db8;p=thirdparty%2Flibvirt.git qemu: Report error on failure to set isolation group This is more user-friendly because the error will be displayed directly instead of being buried in the log. Signed-off-by: Andrea Bolognani Reviewed-by: Pavel Hrdina --- diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 8066ed1233..16bf0cdf91 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -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; }