From nobody Sun May 5 20:42:19 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1502977769771694.6830862919838; Thu, 17 Aug 2017 06:49:29 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5CF87C08E2BB; Thu, 17 Aug 2017 13:49:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40959C9AA5; Thu, 17 Aug 2017 13:49:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id AE3BA3FACE; Thu, 17 Aug 2017 13:49:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7HDnFNK028200 for ; Thu, 17 Aug 2017 09:49:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id 66F272062BFA; Thu, 17 Aug 2017 13:49:15 +0000 (UTC) Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.rdu2.redhat.com [10.11.55.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6206320B94CF for ; Thu, 17 Aug 2017 13:49:15 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1550E7A7F5 for ; Thu, 17 Aug 2017 13:49:13 +0000 (UTC) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v7HDihcK027078 for ; Thu, 17 Aug 2017 09:49:12 -0400 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0b-001b2d01.pphosted.com with ESMTP id 2cdac688kx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 17 Aug 2017 09:49:11 -0400 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Aug 2017 23:49:09 +1000 Received: from d23relay07.au.ibm.com (202.81.31.226) by e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Aug 2017 23:49:07 +1000 Received: from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v7HDmxH141287818; Thu, 17 Aug 2017 23:49:07 +1000 Received: from d23av05.au.ibm.com (localhost [127.0.0.1]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v7HDmYvm011344; Thu, 17 Aug 2017 23:48:35 +1000 Received: from localhost.in.ibm.com ([9.78.198.118]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v7HDmWM7010861; Thu, 17 Aug 2017 23:48:33 +1000 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5CF87C08E2BB Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5CF87C08E2BB DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1550E7A7F5 Authentication-Results: ext-mx02.extmail.prod.ext.rdu2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx02.extmail.prod.ext.rdu2.redhat.com; spf=fail smtp.mailfrom=niteshkonkar.libvirt@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1550E7A7F5 From: Nitesh Konkar To: libvir-list@redhat.com Date: Thu, 17 Aug 2017 19:18:05 +0530 X-TM-AS-MML: disable x-cbid: 17081713-0040-0000-0000-0000034F8DC2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17081713-0041-0000-0000-00000CCD4D3F Message-Id: <20170817134805.27720-1-niteshkonkar.libvirt@gmail.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-08-17_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1708170228 X-Greylist: Delayed for 06:29:52 by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 17 Aug 2017 13:49:14 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 17 Aug 2017 13:49:14 +0000 (UTC) for IP:'148.163.158.5' DOMAIN:'mx0b-001b2d01.pphosted.com' HELO:'mx0a-001b2d01.pphosted.com' FROM:'niteshkonkar.libvirt@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.647 * (BAYES_50, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_SOFTFAIL) 148.163.158.5 mx0b-001b2d01.pphosted.com 148.163.158.5 mx0b-001b2d01.pphosted.com X-Scanned-By: MIMEDefang 2.78 on 10.11.55.2 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, Nitesh Konkar , Nitesh Konkar Subject: [libvirt] [PATCH v2] virt-host-validate: Fix warning for IOMMU detection on PPC X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 17 Aug 2017 13:49:27 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Fix the warning generated on PPC by virt-host-validate for IOMMU Signed-off-by: Nitesh Konkar --- tools/virt-host-validate-common.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/virt-host-validate-common.c b/tools/virt-host-validate-c= ommon.c index 6faed04..51fa8c0 100644 --- a/tools/virt-host-validate-common.c +++ b/tools/virt-host-validate-common.c @@ -35,6 +35,7 @@ #include "virfile.h" #include "virt-host-validate-common.h" #include "virstring.h" +#include "virarch.h" =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 @@ -442,8 +443,7 @@ int virHostValidateIOMMU(const char *hvname, virBitmapPtr flags; struct stat sb; const char *bootarg =3D NULL; - bool isAMD =3D false, isIntel =3D false; - + bool isAMD =3D false, isIntel =3D false, isPPC =3D false; flags =3D virHostValidateGetCPUFlags(); =20 if (flags && virBitmapIsBitSet(flags, VIR_HOST_VALIDATE_CPU_FLAG_VMX)) @@ -453,9 +453,10 @@ int virHostValidateIOMMU(const char *hvname, =20 virBitmapFree(flags); =20 - virHostMsgCheck(hvname, "%s", _("for device assignment IOMMU support")= ); + isPPC =3D ARCH_IS_PPC64(virArchFromHost()); =20 if (isIntel) { + virHostMsgCheck(hvname, "%s", _("for device assignment IOMMU suppo= rt")); if (access("/sys/firmware/acpi/tables/DMAR", F_OK) =3D=3D 0) { virHostMsgPass(); bootarg =3D "intel_iommu=3Don"; @@ -467,6 +468,7 @@ int virHostValidateIOMMU(const char *hvname, return -1; } } else if (isAMD) { + virHostMsgCheck(hvname, "%s", _("for device assignment IOMMU suppo= rt")); if (access("/sys/firmware/acpi/tables/IVRS", F_OK) =3D=3D 0) { virHostMsgPass(); bootarg =3D "iommu=3Dpt iommu=3D1"; @@ -477,6 +479,8 @@ int virHostValidateIOMMU(const char *hvname, "hardware platform"); return -1; } + } else if (isPPC) { + /* Empty Block */ } else { virHostMsgFail(level, "Unknown if this platform has IOMMU support"); --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list