From patchwork Thu Jun 6 09:01:34 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: 10978857 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 C5FBC92A for ; Thu, 6 Jun 2019 09:03:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B60B7283AF for ; Thu, 6 Jun 2019 09:03:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA54B2882F; Thu, 6 Jun 2019 09:03:50 +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 4970F283E8 for ; Thu, 6 Jun 2019 09:03:50 +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 1hYoHe-0006Sh-H2; Thu, 06 Jun 2019 09:02:06 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hYoHc-0006SV-CB for xen-devel@lists.xenproject.org; Thu, 06 Jun 2019 09:02:04 +0000 X-Inumbo-ID: c0228784-8839-11e9-8980-bc764e045a96 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id c0228784-8839-11e9-8980-bc764e045a96; Thu, 06 Jun 2019 09:02:03 +0000 (UTC) Authentication-Results: esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="roger.pau@citrix.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (esa1.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=esa1.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 (esa1.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=esa1.hc3370-68.iphmx.com; envelope-from="roger.pau@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: wNvL4aVW+e/EtW93cqlMYlldtEA1uqDfXodfGEIl8hYuKWiYh5fRfLEDotOXZuZtWPtltcBjZU vzfJIwwu8AFLUqWUZeNqQ3GMzNkIEhIGyk+YTYokmCamDfPglinxc2/w2c/hpxS5TndDMHeCXc Y9v9AkDVJwD8v4foRcAjqli5930VRUzDuhujJPJlEOt6h/hHYdGbmmOYYuCnbSUemMvy+xnIgm M6E9lclEvrAnXMnM+HIWisIt9kIso2f+E6pNTnhxEQTuS5eVEv2kL7lQYVLhKtT+mK/YseoqBl UG0= X-SBRS: -0.9 X-MesageID: 1397083 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.63,558,1557201600"; d="scan'208";a="1397083" From: Roger Pau Monne To: Date: Thu, 6 Jun 2019 11:01:34 +0200 Message-ID: <20190606090146.77381-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v2 00/12] 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 (12): 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 | 46 ++-- xen/include/xen/pci.h | 50 ++--- 37 files changed, 574 insertions(+), 749 deletions(-)