On 27/02/2019 09.07, Boris Fiuczynski wrote: > Besides the minor required change below > Reviewed-by: Boris Fiuczynski <fiu...@linux.ibm.com> > > Thanks for catching this > > On 2/26/19 12:02 PM, Thomas Huth wrote: >> When running virt-host-validate on an s390x host, the tool currently >> warns that it is "Unknown if this platform has IOMMU support". >> We can use the common check for entries in sys/kernel/iommu_groups here, >> too, but it only makes sense to check it if there are also PCI devices >> available. It's also common on s390x that there are no PCI devices >> assigned to the LPAR, and in that case there is no need for the >> PCI-related IOMMU, so without PCI devices we should simply skip this >> test. >> >> Signed-off-by: Thomas Huth <th...@redhat.com> >> --- >> tools/virt-host-validate-common.c | 11 +++++++++-- >> 1 file changed, 9 insertions(+), 2 deletions(-) >> >> diff --git a/tools/virt-host-validate-common.c >> b/tools/virt-host-validate-common.c >> index 73e3bdb..75c7cfc 100644 >> --- a/tools/virt-host-validate-common.c >> +++ b/tools/virt-host-validate-common.c >> @@ -337,7 +337,7 @@ int virHostValidateIOMMU(const char *hvname, >> virBitmapPtr flags; >> struct stat sb; >> const char *bootarg = NULL; >> - bool isAMD = false, isIntel = false, isPPC = false; >> + bool isAMD = false, isIntel = false, isPPC, isS390; >> flags = virHostValidateGetCPUFlags(); >> if (flags && virBitmapIsBitSet(flags, >> VIR_HOST_VALIDATE_CPU_FLAG_VMX)) >> @@ -348,6 +348,7 @@ int virHostValidateIOMMU(const char *hvname, >> virBitmapFree(flags); >> isPPC = ARCH_IS_PPC64(virArchFromHost()); >> + isS390 = ARCH_IS_S390(virArchFromHost()); >> if (isIntel) { >> virHostMsgCheck(hvname, "%s", _("for device assignment IOMMU >> support")); >> @@ -375,6 +376,12 @@ int virHostValidateIOMMU(const char *hvname, >> } >> } else if (isPPC) { >> /* Empty Block */ >> + } else if (isS390) { >> + /* On s390x, we skip the IOMMU check if there are no PCI devices >> + * (which is quite usual on s390x) */ > TAB_in_indentation > ../tools/virt-host-validate-common.c:380: /* On s390x, we skip the > IOMMU check if there are no PCI devices > ../tools/virt-host-validate-common.c:381: * (which is quite usual > on s390x) */ > maint.mk: indent with space, not TAB, in C, sh, html, py, syms and RNG > schemas > make: *** [../cfg.mk:501: sc_TAB_in_indentation] Error 1
Ooops, sorry for that! Could this be fixed while applying the patch, or shall I send a v2 ? Thomas -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list