From nobody Fri May 3 09:55:02 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 1521461688341252.34412292316347; Mon, 19 Mar 2018 05:14:48 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87B06356D2; Mon, 19 Mar 2018 12:14:46 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2D0385D96E; Mon, 19 Mar 2018 12:14:46 +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 1972C180613A; Mon, 19 Mar 2018 12:14:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2GHtbx5029918 for ; Fri, 16 Mar 2018 13:55:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0DBB85D72A; Fri, 16 Mar 2018 17:55:37 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02A005D72D for ; Fri, 16 Mar 2018 17:55:29 +0000 (UTC) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 257D48008C for ; Fri, 16 Mar 2018 17:55:28 +0000 (UTC) Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Mar 2018 10:55:27 -0700 Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.44]) by fmsmga007.fm.intel.com with ESMTP; 16 Mar 2018 10:55:26 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,316,1517904000"; d="scan'208";a="24679141" From: Keith Busch To: libvir-list@redhat.com Date: Fri, 16 Mar 2018 11:39:36 -0600 Message-Id: <20180316173936.3353-1-keith.busch@intel.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 207 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 16 Mar 2018 17:55:28 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Fri, 16 Mar 2018 17:55:28 +0000 (UTC) for IP:'134.134.136.31' DOMAIN:'mga06.intel.com' HELO:'mga06.intel.com' FROM:'keith.busch@intel.com' RCPT:'' X-RedHat-Spam-Score: -2.311 (RCVD_IN_DNSWL_MED, SPF_PASS, T_RP_MATCHES_RCVD) 134.134.136.31 mga06.intel.com 134.134.136.31 mga06.intel.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-Mailman-Approved-At: Mon, 19 Mar 2018 08:14:44 -0400 Cc: Keith Busch , Jonathan Derrick , Scott Bauer Subject: [libvirt] [PATCH] pci: Ignore 32-bit PCIe domains 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.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 19 Mar 2018 12:14:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Intel VMD creates secondary PCIe domain, where child devices in this domain are aggregated behind a single end point. Linux exposes these as special 32-bit domains, and devices in them are not individually assignable. This patch ignores devices in such domains as desired, and prevents logging excessive errors, like: internal error: dev->name buffer overflow: 10000:00:00.0 Cc: Jonathan Derrick Signed-off-by: Keith Busch --- src/util/virpci.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/virpci.c b/src/util/virpci.c index 55e4c3e49..53a6f2e51 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1762,6 +1762,13 @@ virPCIDeviceNew(unsigned int domain, char *vendor =3D NULL; char *product =3D NULL; =20 + + /* Devices in a 32-bit domain are special. Currently applicable to Int= el + * VMD PCIe, where individual devices are not individually assignable. + */ + if (domain > USHRT_MAX) + return NULL; + if (VIR_ALLOC(dev) < 0) return NULL; =20 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list