From patchwork Fri Jun 7 09:22:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 10981167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B6F8E924 for ; Fri, 7 Jun 2019 09:24:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A4D5328B26 for ; Fri, 7 Jun 2019 09:24:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9558A28AEC; Fri, 7 Jun 2019 09:24:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2FFB228AEC for ; Fri, 7 Jun 2019 09:24:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hZB5M-0002TZ-K2; Fri, 07 Jun 2019 09:22:56 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hZB5K-0002TU-S4 for xen-devel@lists.xenproject.org; Fri, 07 Jun 2019 09:22:54 +0000 X-Inumbo-ID: d3bd4f7b-8905-11e9-8980-bc764e045a96 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id d3bd4f7b-8905-11e9-8980-bc764e045a96; Fri, 07 Jun 2019 09:22:53 +0000 (UTC) Authentication-Results: esa2.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 (esa2.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=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (esa2.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=esa2.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 (esa2.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=esa2.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: TcE+CbmEK0b2OwKjOetPd5k2TB74xkovIyBfDXBfXNS2CEJKvK1ipS6J1hr9lM7xsWLokmk1ei Oioa4BJpqp0348YdqT9yrEDW5flTeEY2SICqI9iVN5NQq8srGVqzi0HOmwTMFUIXiUUYMvV7vA Hxo9SzdTS9ONswI3ev/4Rga5yEkdWIhQbQClfuN5NrK9HRyaJ6lig+qMWRdZBmzgI68IaDIPnG 8S/XCQb2lc8qCmg7TUwmhzN6wWCOdqBilEiblpTeixE5PKiBRzNO4eQ5kyuCH2eCIDueUu7fqC FUo= X-SBRS: -0.9 X-MesageID: 1438387 X-Ironport-Server: esa2.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="1438387" From: Roger Pau Monne To: Date: Fri, 7 Jun 2019 11:22:19 +0200 Message-ID: <20190607092232.83179-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v3 00/13] pci: expand usage of 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: Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP IMO pci_sbdf_t it's nicer to use than passing around a sbdf in multiple fields. However it's hard to expand the usage of pci_sbdf_t in the code base without changing some of the core pci functions and the pci_dev struct fields, hence this patch set. Note there's still more low hanging fruit that could benefit from switching to pci_sbdf_t, this patch series just changes some of the more core pci functions to use pci_sbdf_t. This series should not introduce any functional changes. Roger Pau Monne (13): pci: rename func field to fn pci: introduce a devfn field to pci_sbdf_t pci: introduce a pci_sbdf_t field to pci_dev pci: make PCI_SBDF return a pci_sbdf_t pci: make PCI_SBDF2 return a pci_sbdf_t pci: make PCI_SBDF3 return a pci_sbdf_t pci: switch pci_conf_read8 to use pci_sbdf_t pci: switch pci_conf_read16 to use pci_sbdf_t pci: switch pci_conf_read32 to use pci_sbdf_t pci: switch pci_conf_write8 to use pci_sbdf_t pci: switch pci_conf_write16 to use pci_sbdf_t pci: switch pci_conf_write32 to use pci_sbdf_t print: introduce a format specifier for pci_sbdf_t docs/misc/printk-formats.txt | 5 + xen/arch/x86/cpu/amd.c | 15 +- xen/arch/x86/dmi_scan.c | 6 +- xen/arch/x86/hvm/vmsi.c | 10 +- xen/arch/x86/mm.c | 2 +- xen/arch/x86/msi.c | 203 ++++++++---------- xen/arch/x86/oprofile/op_model_athlon.c | 10 +- xen/arch/x86/x86_64/mmconf-fam10h.c | 8 +- xen/arch/x86/x86_64/mmconfig-shared.c | 14 +- xen/arch/x86/x86_64/pci.c | 98 +++------ xen/common/compat/memory.c | 4 +- xen/common/memory.c | 4 +- xen/common/vsprintf.c | 18 ++ xen/drivers/acpi/reboot.c | 6 +- xen/drivers/char/ehci-dbgp.c | 49 +++-- xen/drivers/char/ns16550.c | 71 ++++--- xen/drivers/passthrough/amd/iommu_acpi.c | 17 +- xen/drivers/passthrough/amd/iommu_cmd.c | 5 +- xen/drivers/passthrough/amd/iommu_detect.c | 7 +- xen/drivers/passthrough/amd/iommu_init.c | 29 ++- xen/drivers/passthrough/amd/iommu_intr.c | 8 +- xen/drivers/passthrough/amd/pci_amd_iommu.c | 25 +-- xen/drivers/passthrough/ats.h | 4 +- xen/drivers/passthrough/pci.c | 220 ++++++++------------ xen/drivers/passthrough/vtd/dmar.c | 36 ++-- xen/drivers/passthrough/vtd/intremap.c | 11 +- xen/drivers/passthrough/vtd/iommu.c | 80 +++---- xen/drivers/passthrough/vtd/quirks.c | 81 ++++--- xen/drivers/passthrough/vtd/utils.c | 6 +- xen/drivers/passthrough/x86/ats.c | 28 +-- xen/drivers/pci/pci.c | 23 +- xen/drivers/video/vga.c | 11 +- xen/drivers/vpci/header.c | 65 ++---- xen/drivers/vpci/msi.c | 13 +- xen/drivers/vpci/msix.c | 35 ++-- xen/drivers/vpci/vpci.c | 47 ++--- xen/include/xen/pci.h | 50 +++-- 37 files changed, 574 insertions(+), 750 deletions(-)