
On Thu, Aug 17, 2017 at 12:49:02 +0530, Nitesh Konkar wrote:
Fix the warning generated on PPC by virt-host-validate for IOMMU
Signed-off-by: Nitesh Konkar <nitkon12@linux.vnet.ibm.com> --- tools/virt-host-validate-common.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-common.c index 6faed04..e0ca1dd 100644 --- a/tools/virt-host-validate-common.c +++ b/tools/virt-host-validate-common.c
[...]
@@ -477,7 +479,7 @@ int virHostValidateIOMMU(const char *hvname, "hardware platform"); return -1; } - } else { + } else if (!ARCH_IS_PPC64(hostarch)) {
Add PPC64 as a section above, even with an empty body if necessary so that the catch-all case stays as-is.
virHostMsgFail(level, "Unknown if this platform has IOMMU support"); return -1; @@ -491,6 +493,9 @@ int virHostValidateIOMMU(const char *hvname, if (!S_ISDIR(sb.st_mode)) return 0;
+ if (S_ISDIR(sb.st_mode) && ARCH_IS_PPC64(hostarch)) + virHostMsgPass(); + virHostMsgCheck(hvname, "%s", _("if IOMMU is enabled by kernel"));
So this writes: PASS qemu: checking if IOMMU is enabled by kernel: PASS The extra call to virHostMsgPass is wrong.