From 8deedeb563afe6340c08f00d39bb778c6ff77872 Mon Sep 17 00:00:00 2001
Message-Id: <8deedeb563afe6340c08f00d39bb778c6ff77872@dist-git>
From: Andrea Bolognani <abologna@redhat.com>
Date: Mon, 28 Aug 2017 16:59:13 +0200
Subject: [PATCH] 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 <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit ed9db36b426dcf9e4c34f2126379c339773f6db8)
https://bugzilla.redhat.com/show_bug.cgi?id=1484254
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
src/qemu/qemu_domain_address.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index 756cd97970..3d5e7cc442 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -1007,10 +1007,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;
}
@@ -1051,9 +1052,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;
}
--
2.14.1