[libvirt] [PATCH] virt-host-validate: Fix warning for IOMMU detection on PPC
Peter Krempa
pkrempa at redhat.com
Thu Aug 17 11:56:50 UTC 2017
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 at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170817/481b9d0e/attachment-0001.sig>
More information about the libvir-list
mailing list