From nobody Tue Feb 10 04:13:37 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1559899454; cv=none; d=zoho.com; s=zohoarc; b=eh4ad9fboQJ9eYf/UGoKQmt57EQ3gePv7v/Mv7px0qqD9fZ9ziZpl5Mse/t2MWIRIARkq5HcVQCtYNCKy5j57/FH8REhexM2UP6sMDA4YT62CHcnmXj9+67dxXmYjJETzTkuKSP9drESrT3VLkhun1CGthyPkMW1EI9bje2+8eg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559899454; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=yN7hgHvx9e99ynmXh8sOi/IBWj8iFhIAKKyqfm1L948=; b=NpYrgfDwjy3I5RbvV7YUga8UD6PWHT1If9TniQbi9wv0L8B0zedtBcAEg0BUNVGYpJ4T5Lz4Tl/TTFgQDTp2+JGSo08OB8soPIIeNzxMEoa6Vjop40AbatgMFwcBqOvE2uWVihyZKo+q3v3wNy9HFDrgzUTZtVd8WAuZzzrhqFc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1559899454013887.3809674309832; Fri, 7 Jun 2019 02:24:14 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hZB5W-0002US-7x; Fri, 07 Jun 2019 09:23:06 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hZB5V-0002U3-4o for xen-devel@lists.xenproject.org; Fri, 07 Jun 2019 09:23:05 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id d8c95714-8905-11e9-b0f8-df77dc23082e; Fri, 07 Jun 2019 09:23:02 +0000 (UTC) X-Inumbo-ID: d8c95714-8905-11e9-b0f8-df77dc23082e Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@citrix.com; spf=SoftFail smtp.mailfrom=roger.pau@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of roger.pau@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (esa4.hc3370-68.iphmx.com: domain of roger.pau@citrix.com is inclined to not designate 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 include:spf.citrix.com include:spf2.citrix.com include:ironport.citrix.com exists:%{i}._spf.mta.salesforce.com ~all" Received-SPF: None (esa4.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa4.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: A7M1zrWLyt+hRHXziFfL0/vd9rmwz0xrAqSdP00S4aQEU/NewzXfVMdHAxft7xOYytq88j6UOF 7Zsl77kqcyugEoiZw+6oDdo8yo1BjFB1SvJ4OZ8gp/MHEuyvFs9WcggHSxR3kenBiClQKmutxP 6UrGKNbrVYnFPEEJNnQNW86N4zAIPB+/+3m7v/yhnliLZiKqaGDq0WRq99m4v9BlamN1+wdEZY hTlvpwgGn9+SueYkzXt8odL4E6CkRc3o9v6Tlmb6iQRh4iVrJ+ucjHh/+9PcYNGHZX855hzMd3 rAc= X-SBRS: -0.9 X-MesageID: 1440968 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,562,1557201600"; d="scan'208";a="1440968" From: Roger Pau Monne To: Date: Fri, 7 Jun 2019 11:22:21 +0200 Message-ID: <20190607092232.83179-3-roger.pau@citrix.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20190607092232.83179-1-roger.pau@citrix.com> References: <20190607092232.83179-1-roger.pau@citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v3 02/13] pci: introduce a devfn field to pci_sbdf_t X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , Roger Pau Monne Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This is equivalent to the current extfunc field in term of contents. Switch the two current users of extfunc to use devfn instead for correctness. No functional change. Requested-by: Jan Beulich Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Jan Beulich Reviewed-by: Paul Durrant --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- Changes since v2: - Switch declaration order of the devfn and extfunc fields. Changes since v1: - New in this version. --- xen/drivers/vpci/vpci.c | 4 ++-- xen/include/xen/pci.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c index b03232fe30..ca598675ea 100644 --- a/xen/drivers/vpci/vpci.c +++ b/xen/drivers/vpci/vpci.c @@ -327,7 +327,7 @@ uint32_t vpci_read(pci_sbdf_t sbdf, unsigned int reg, u= nsigned int size) } =20 /* Find the PCI dev matching the address. */ - pdev =3D pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.extfunc); + pdev =3D pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.devfn); if ( !pdev ) return vpci_read_hw(sbdf, reg, size); =20 @@ -432,7 +432,7 @@ void vpci_write(pci_sbdf_t sbdf, unsigned int reg, unsi= gned int size, * Find the PCI dev matching the address. * Passthrough everything that's not trapped. */ - pdev =3D pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.extfunc); + pdev =3D pci_get_pdev_by_domain(d, sbdf.seg, sbdf.bus, sbdf.devfn); if ( !pdev ) { vpci_write_hw(sbdf, reg, size, data); diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index dab1a86dd4..c61fd7e262 100644 --- a/xen/include/xen/pci.h +++ b/xen/include/xen/pci.h @@ -49,7 +49,8 @@ typedef union { uint8_t fn : 3, dev : 5; }; - uint8_t extfunc; + uint8_t devfn, + extfunc; }; uint8_t bus; }; --=20 2.20.1 (Apple Git-117) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel