From nobody Mon Feb 9 22:04:00 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=1559899494; cv=none; d=zoho.com; s=zohoarc; b=hfAqmOI5S9/cOiZO0wIafQWhAbIfIQzQjC5Zxs/nLXIApBaqlBmSAQrd7YqnwYX8SaD/aYKF+mF23BtxeqWivm3FBdmrnpGVBHz9SpX2+0tIfU5pMK433evqvrCR8mnVMmvLFUzVj7UgsmQw/k2XDeyleiVgnEYwNeB3xn28ZJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559899494; 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=tiDUhQUxINR1c+03HxS3cdMqbZbk61L+uGqLeO+bjKc=; b=g4QPOgsedKYdl+AUtJL1d1KePqevJlUZEINoifEW+8DToCkmrG7L/Nx+/1ADecjzCUXI3WZbE9wpHfoVEKTziXxPIesuiMI0qiAjfW9tHyGLaxiYshc+fIGQy/c12omLSrn1GOsyeFfD9AXXlGyTu5b6cGqL7ZJAggHZc4upVwI= 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 1559899494879806.4183336703215; Fri, 7 Jun 2019 02:24:54 -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 1hZB60-0002lW-Cw; Fri, 07 Jun 2019 09:23:36 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hZB5z-0002kL-F4 for xen-devel@lists.xenproject.org; Fri, 07 Jun 2019 09:23:35 +0000 Received: from esa1.hc3370-68.iphmx.com (unknown [216.71.145.142]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id eac410b8-8905-11e9-8980-bc764e045a96; Fri, 07 Jun 2019 09:23:32 +0000 (UTC) X-Inumbo-ID: eac410b8-8905-11e9-8980-bc764e045a96 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 (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 (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: ZpqqMApMI4KhGdAv5HMl2oryJO89M83ZTCyo61Gj54P4nrpkHZvCoxPvmKaiPitBJNMB3hp69E bUWIpmgQql5T2Mh4ZfSL2uhxNNW8pJabeAvCKrJOTaaMKXrc/8X4NzEwdk4IFmM7LDz/V6EP5y 4M4BapvhvWNHPgSEKVR5KPzdHo1M3WkDTfHjWiae/s2z5VktQxaAwh7H8oQiCnK1+qIGDXyPeK td3Ly9bMP7rYIS5/winI3fg48p3P/Sp//WaX0c6JrLtK0Q9OZHSsPVK4xxa4ni4M2gAkO7TQZF WgM= X-SBRS: -0.9 X-MesageID: 1451672 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,562,1557201600"; d="scan'208";a="1451672" From: Roger Pau Monne To: Date: Fri, 7 Jun 2019 11:22:28 +0200 Message-ID: <20190607092232.83179-10-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 09/13] pci: switch pci_conf_read32 to use 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: Kevin Tian , Stefano Stabellini , Suravee Suthikulpanit , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Tim Deegan , Julien Grall , Jan Beulich , Brian Woods , 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 reduces the number of parameters of the function to two, and simplifies some of the calling sites. Signed-off-by: Roger Pau Monn=C3=A9 Acked-by: Brian Woods --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: George Dunlap Cc: Ian Jackson Cc: Julien Grall Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Suravee Suthikulpanit Cc: Brian Woods Cc: Kevin Tian --- xen/arch/x86/cpu/amd.c | 7 +++-- xen/arch/x86/mm.c | 2 +- xen/arch/x86/msi.c | 28 ++++++----------- xen/arch/x86/oprofile/op_model_athlon.c | 6 ++-- xen/arch/x86/x86_64/mmconf-fam10h.c | 8 +++-- xen/arch/x86/x86_64/mmconfig-shared.c | 12 ++++---- xen/arch/x86/x86_64/pci.c | 27 +++++++--------- xen/drivers/char/ehci-dbgp.c | 20 +++++++----- xen/drivers/char/ns16550.c | 18 ++++++----- xen/drivers/passthrough/amd/iommu_detect.c | 2 +- xen/drivers/passthrough/amd/iommu_init.c | 4 +-- xen/drivers/passthrough/pci.c | 15 ++++----- xen/drivers/passthrough/vtd/quirks.c | 36 ++++++++++++---------- xen/drivers/pci/pci.c | 4 +-- xen/drivers/vpci/header.c | 6 ++-- xen/drivers/vpci/msix.c | 6 ++-- xen/drivers/vpci/vpci.c | 5 ++- xen/include/xen/pci.h | 4 +-- 18 files changed, 101 insertions(+), 109 deletions(-) diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c index 3c069391f4..37f60c0862 100644 --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -417,7 +417,8 @@ static void disable_c1_ramping(void) int node, nr_nodes; =20 /* Read the number of nodes from the first Northbridge. */ - nr_nodes =3D ((pci_conf_read32(0, 0, 0x18, 0x0, 0x60)>>4)&0x07)+1; + nr_nodes =3D ((pci_conf_read32(PCI_SBDF(0, 0, 0x18, 0), 0x60) >> 4) & + 0x07) + 1; for (node =3D 0; node < nr_nodes; node++) { /* PMM7: bus=3D0, dev=3D0x18+node, function=3D0x3, register=3D0x87. */ pmm7 =3D pci_conf_read8(PCI_SBDF(0, 0, 0x18 + node, 3), 0x87); @@ -696,8 +697,8 @@ static void init_amd(struct cpuinfo_x86 *c) =20 if (c->x86 =3D=3D 0x16 && c->x86_model <=3D 0xf) { if (c =3D=3D &boot_cpu_data) { - l =3D pci_conf_read32(0, 0, 0x18, 0x3, 0x58); - h =3D pci_conf_read32(0, 0, 0x18, 0x3, 0x5c); + l =3D pci_conf_read32(PCI_SBDF(0, 0, 0x18, 3), 0x58); + h =3D pci_conf_read32(PCI_SBDF(0, 0, 0x18, 3), 0x5c); if ((l & 0x1f) | (h & 0x1)) printk(KERN_WARNING "Applying workaround for erratum 792: %s%s%s\n", diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index df2c0130f1..e67119dbe6 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5949,7 +5949,7 @@ const struct platform_bad_page *__init get_platform_b= adpages(unsigned int *array } =20 *array_size =3D ARRAY_SIZE(snb_bad_pages); - igd_id =3D pci_conf_read32(0, 0, 2, 0, 0); + igd_id =3D pci_conf_read32(PCI_SBDF(0, 0, 2, 0), 0); if ( IS_SNB_GFX(igd_id) ) return snb_bad_pages; =20 diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index ed986261c3..392cbecfe4 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -191,16 +191,13 @@ static bool read_msi_msg(struct msi_desc *entry, stru= ct msi_msg *msg) { struct pci_dev *dev =3D entry->dev; int pos =3D entry->msi_attrib.pos; - u16 data, seg =3D dev->seg; - u8 bus =3D dev->bus; - u8 slot =3D PCI_SLOT(dev->devfn); - u8 func =3D PCI_FUNC(dev->devfn); + uint16_t data; =20 - msg->address_lo =3D pci_conf_read32(seg, bus, slot, func, + msg->address_lo =3D pci_conf_read32(dev->sbdf, msi_lower_address_reg(pos)); if ( entry->msi_attrib.is_64 ) { - msg->address_hi =3D pci_conf_read32(seg, bus, slot, func, + msg->address_hi =3D pci_conf_read32(dev->sbdf, msi_upper_address_reg(pos)); data =3D pci_conf_read16(dev->sbdf, msi_data_reg(pos, 1)); } @@ -396,7 +393,7 @@ static bool msi_set_mask_bit(struct irq_desc *desc, boo= l host, bool guest) { u32 mask_bits; =20 - mask_bits =3D pci_conf_read32(seg, bus, slot, func, entry->msi= .mpos); + mask_bits =3D pci_conf_read32(pdev->sbdf, entry->msi.mpos); mask_bits &=3D ~((u32)1 << entry->msi_attrib.entry_nr); mask_bits |=3D (u32)flag << entry->msi_attrib.entry_nr; pci_conf_write32(seg, bus, slot, func, entry->msi.mpos, mask_b= its); @@ -465,10 +462,7 @@ static int msi_get_mask_bit(const struct msi_desc *ent= ry) case PCI_CAP_ID_MSI: if ( !entry->msi_attrib.maskbit ) break; - return (pci_conf_read32(entry->dev->seg, entry->dev->bus, - PCI_SLOT(entry->dev->devfn), - PCI_FUNC(entry->dev->devfn), - entry->msi.mpos) >> + return (pci_conf_read32(entry->dev->sbdf, entry->msi.mpos) >> entry->msi_attrib.entry_nr) & 1; case PCI_CAP_ID_MSIX: if ( unlikely(!msix_memory_decoded(entry->dev, @@ -723,7 +717,7 @@ static int msi_capability_init(struct pci_dev *dev, u32 maskbits; =20 /* All MSIs are unmasked by default, Mask them all */ - maskbits =3D pci_conf_read32(seg, bus, slot, func, mpos); + maskbits =3D pci_conf_read32(dev->sbdf, mpos); maskbits |=3D ~(u32)0 >> (32 - maxvec); pci_conf_write32(seg, bus, slot, func, mpos, maskbits); } @@ -808,7 +802,7 @@ static u64 read_pci_mem_bar(u16 seg, u8 bus, u8 slot, u= 8 func, u8 bir, int vf) =20 if ( bir >=3D limit ) return 0; - addr =3D pci_conf_read32(seg, bus, slot, func, base + bir * 4); + addr =3D pci_conf_read32(PCI_SBDF(seg, bus, slot, func), base + bir * = 4); if ( (addr & PCI_BASE_ADDRESS_SPACE) =3D=3D PCI_BASE_ADDRESS_SPACE_IO ) return 0; if ( (addr & PCI_BASE_ADDRESS_MEM_TYPE_MASK) =3D=3D PCI_BASE_ADDRESS_M= EM_TYPE_64 ) @@ -817,7 +811,7 @@ static u64 read_pci_mem_bar(u16 seg, u8 bus, u8 slot, u= 8 func, u8 bir, int vf) if ( ++bir >=3D limit ) return 0; return addr + disp + - ((u64)pci_conf_read32(seg, bus, slot, func, + ((u64)pci_conf_read32(PCI_SBDF(seg, bus, slot, func), base + bir * 4) << 32); } return (addr & PCI_BASE_ADDRESS_MEM_MASK) + disp; @@ -886,8 +880,7 @@ static int msix_capability_init(struct pci_dev *dev, } =20 /* Locate MSI-X table region */ - table_offset =3D pci_conf_read32(seg, bus, slot, func, - msix_table_offset_reg(pos)); + table_offset =3D pci_conf_read32(dev->sbdf, msix_table_offset_reg(pos)= ); bir =3D (u8)(table_offset & PCI_MSIX_BIRMASK); table_offset &=3D ~PCI_MSIX_BIRMASK; =20 @@ -933,8 +926,7 @@ static int msix_capability_init(struct pci_dev *dev, WARN_ON(rangeset_overlaps_range(mmio_ro_ranges, msix->table.first, msix->table.last)); =20 - pba_offset =3D pci_conf_read32(seg, bus, slot, func, - msix_pba_offset_reg(pos)); + pba_offset =3D pci_conf_read32(dev->sbdf, msix_pba_offset_reg(pos)= ); bir =3D (u8)(pba_offset & PCI_MSIX_BIRMASK); pba_paddr =3D read_pci_mem_bar(seg, pbus, pslot, pfunc, bir, vf); WARN_ON(!pba_paddr); diff --git a/xen/arch/x86/oprofile/op_model_athlon.c b/xen/arch/x86/oprofil= e/op_model_athlon.c index 3d6e26f636..3bf0b0214d 100644 --- a/xen/arch/x86/oprofile/op_model_athlon.c +++ b/xen/arch/x86/oprofile/op_model_athlon.c @@ -463,7 +463,8 @@ static int __init init_ibs_nmi(void) for (bus =3D 0; bus < 256; bus++) { for (dev =3D 0; dev < 32; dev++) { for (func =3D 0; func < 8; func++) { - id =3D pci_conf_read32(0, bus, dev, func, PCI_VENDOR_ID); + id =3D pci_conf_read32(PCI_SBDF(0, bus, dev, func), + PCI_VENDOR_ID); =20 vendor_id =3D id & 0xffff; dev_id =3D (id >> 16) & 0xffff; @@ -474,7 +475,8 @@ static int __init init_ibs_nmi(void) pci_conf_write32(0, bus, dev, func, IBSCTL, IBSCTL_LVTOFFSETVAL | APIC_EILVT_LVTOFF_IBS); =20 - value =3D pci_conf_read32(0, bus, dev, func, IBSCTL); + value =3D pci_conf_read32(PCI_SBDF(0, bus, dev, func), + IBSCTL); =20 if (value !=3D (IBSCTL_LVTOFFSETVAL | APIC_EILVT_LVTOFF_IBS)) { diff --git a/xen/arch/x86/x86_64/mmconf-fam10h.c b/xen/arch/x86/x86_64/mmco= nf-fam10h.c index ed0acb9968..f997688ad4 100644 --- a/xen/arch/x86/x86_64/mmconf-fam10h.c +++ b/xen/arch/x86/x86_64/mmconf-fam10h.c @@ -52,7 +52,7 @@ static void __init get_fam10h_pci_mmconf_base(void) =20 bus =3D pci_probes[i].bus; slot =3D pci_probes[i].slot; - id =3D pci_conf_read32(0, bus, slot, 0, PCI_VENDOR_ID); + id =3D pci_conf_read32(PCI_SBDF(0, bus, slot, 0), PCI_VENDOR_ID); =20 vendor =3D id & 0xffff; device =3D (id>>16) & 0xffff; @@ -83,12 +83,14 @@ static void __init get_fam10h_pci_mmconf_base(void) * above 4G */ for (hi_mmio_num =3D i =3D 0; i < 8; i++) { - val =3D pci_conf_read32(0, bus, slot, 1, 0x80 + (i << 3)); + val =3D pci_conf_read32(PCI_SBDF(0, bus, slot, 1), + 0x80 + (i << 3)); if (!(val & 3)) continue; =20 start =3D (val & 0xffffff00) << 8; /* 39:16 on 31:8*/ - val =3D pci_conf_read32(0, bus, slot, 1, 0x84 + (i << 3)); + val =3D pci_conf_read32(PCI_SBDF(0, bus, slot, 1), + 0x84 + (i << 3)); end =3D ((val & 0xffffff00) << 8) | 0xffff; /* 39:16 on 31:8*/ =20 if (end < tom2) diff --git a/xen/arch/x86/x86_64/mmconfig-shared.c b/xen/arch/x86/x86_64/mm= config-shared.c index 9d1db590d9..cc08b52a35 100644 --- a/xen/arch/x86/x86_64/mmconfig-shared.c +++ b/xen/arch/x86/x86_64/mmconfig-shared.c @@ -89,7 +89,7 @@ static const char __init *pci_mmcfg_intel_945(void) =20 pci_mmcfg_config_num =3D 1; =20 - pciexbar =3D pci_conf_read32(0, 0, 0, 0, 0x48); + pciexbar =3D pci_conf_read32(PCI_SBDF(0, 0, 0, 0), 0x48); =20 /* Enable bit */ if (!(pciexbar & 1)) @@ -213,14 +213,14 @@ static const char __init *pci_mmcfg_nvidia_mcp55(void) u32 l, extcfg; u16 vendor, device; =20 - l =3D pci_conf_read32(0, bus, 0, 0, 0); + l =3D pci_conf_read32(PCI_SBDF(0, bus, 0, 0), 0); vendor =3D l & 0xffff; device =3D (l >> 16) & 0xffff; =20 if (PCI_VENDOR_ID_NVIDIA !=3D vendor || 0x0369 !=3D device) continue; =20 - extcfg =3D pci_conf_read32(0, bus, 0, 0, extcfg_regnum); + extcfg =3D pci_conf_read32(PCI_SBDF(0, bus, 0, 0), extcfg_regnum); =20 if (extcfg & extcfg_enable_mask) i++; @@ -239,14 +239,14 @@ static const char __init *pci_mmcfg_nvidia_mcp55(void) u16 vendor, device; int size_index; =20 - l =3D pci_conf_read32(0, bus, 0, 0, 0); + l =3D pci_conf_read32(PCI_SBDF(0, bus, 0, 0), 0); vendor =3D l & 0xffff; device =3D (l >> 16) & 0xffff; =20 if (PCI_VENDOR_ID_NVIDIA !=3D vendor || 0x0369 !=3D device) continue; =20 - extcfg =3D pci_conf_read32(0, bus, 0, 0, extcfg_regnum); + extcfg =3D pci_conf_read32(PCI_SBDF(0, bus, 0, 0), extcfg_regnum); =20 if (!(extcfg & extcfg_enable_mask)) continue; @@ -312,7 +312,7 @@ static int __init pci_mmcfg_check_hostbridge(void) for (i =3D 0; !name && i < ARRAY_SIZE(pci_mmcfg_probes); i++) { bus =3D pci_mmcfg_probes[i].bus; devfn =3D pci_mmcfg_probes[i].devfn; - l =3D pci_conf_read32(0, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 0); + l =3D pci_conf_read32(PCI_SBDF3(0, bus, devfn), 0); vendor =3D l & 0xffff; device =3D (l >> 16) & 0xffff; =20 diff --git a/xen/arch/x86/x86_64/pci.c b/xen/arch/x86/x86_64/pci.c index fe36b60c50..b8b82a6fe7 100644 --- a/xen/arch/x86/x86_64/pci.c +++ b/xen/arch/x86/x86_64/pci.c @@ -37,28 +37,23 @@ uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int = reg) return pci_conf_read(PCI_CONF_ADDRESS(sbdf, reg), reg & 2, 2); } =20 -#undef PCI_CONF_ADDRESS -#define PCI_CONF_ADDRESS(bus, dev, func, reg) \ - (0x80000000 | (bus << 16) | (dev << 11) | (func << 8) | (reg & ~3)) - -uint32_t pci_conf_read32( - unsigned int seg, unsigned int bus, unsigned int dev, unsigned int fun= c, - unsigned int reg) +uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg) { - u32 value; - - if ( seg || reg > 255 ) + if ( sbdf.seg || reg > 255 ) { - pci_mmcfg_read(seg, bus, PCI_DEVFN(dev, func), reg, 4, &value); + uint32_t value; + + pci_mmcfg_read(sbdf.seg, sbdf.bus, sbdf.devfn, reg, 4, &value); return value; } - else - { - BUG_ON((bus > 255) || (dev > 31) || (func > 7)); - return pci_conf_read(PCI_CONF_ADDRESS(bus, dev, func, reg), 0, 4); - } + + return pci_conf_read(PCI_CONF_ADDRESS(sbdf, reg), 0, 4); } =20 +#undef PCI_CONF_ADDRESS +#define PCI_CONF_ADDRESS(bus, dev, func, reg) \ + (0x80000000 | (bus << 16) | (dev << 11) | (func << 8) | (reg & ~3)) + void pci_conf_write8( unsigned int seg, unsigned int bus, unsigned int dev, unsigned int fun= c, unsigned int reg, uint8_t data) diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c index 64258da2dc..9b9025fb33 100644 --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -682,7 +682,8 @@ static int dbgp_control_msg(struct ehci_dbgp *dbgp, uns= igned int devnum, =20 static unsigned int __init __find_dbgp(u8 bus, u8 slot, u8 func) { - u32 class =3D pci_conf_read32(0, bus, slot, func, PCI_CLASS_REVISION); + uint32_t class =3D pci_conf_read32(PCI_SBDF(0, bus, slot, func), + PCI_CLASS_REVISION); =20 if ( (class >> 8) !=3D PCI_CLASS_SERIAL_USB_EHCI ) return 0; @@ -1006,7 +1007,8 @@ static set_debug_port_t __read_mostly set_debug_port = =3D default_set_debug_port; =20 static void nvidia_set_debug_port(struct ehci_dbgp *dbgp, unsigned int por= t) { - u32 dword =3D pci_conf_read32(0, dbgp->bus, dbgp->slot, dbgp->func, 0x= 74); + uint32_t dword =3D pci_conf_read32(PCI_SBDF(0, dbgp->bus, dbgp->slot, + dbgp->func), 0x74); =20 dword &=3D ~(0x0f << 12); dword |=3D (port & 0x0f) << 12; @@ -1039,7 +1041,8 @@ static void ehci_dbgp_bios_handoff(struct ehci_dbgp *= dbgp, u32 hcc_params) if ( !offset ) return; =20 - cap =3D pci_conf_read32(0, dbgp->bus, dbgp->slot, dbgp->func, offset); + cap =3D pci_conf_read32(PCI_SBDF(0, dbgp->bus, dbgp->slot, dbgp->func), + offset); dbgp_printk("dbgp: EHCI BIOS state %08x\n", cap); =20 if ( (cap & 0xff) =3D=3D 1 && (cap & EHCI_USBLEGSUP_BIOS) ) @@ -1054,7 +1057,8 @@ static void ehci_dbgp_bios_handoff(struct ehci_dbgp *= dbgp, u32 hcc_params) { mdelay(10); msec -=3D 10; - cap =3D pci_conf_read32(0, dbgp->bus, dbgp->slot, dbgp->func, offs= et); + cap =3D pci_conf_read32(PCI_SBDF(0, dbgp->bus, dbgp->slot, dbgp->f= unc), + offset); } =20 if ( cap & EHCI_USBLEGSUP_BIOS ) @@ -1307,7 +1311,7 @@ static void __init ehci_dbgp_init_preirq(struct seria= l_port *port) u32 debug_port, offset; void __iomem *ehci_bar; =20 - debug_port =3D pci_conf_read32(0, dbgp->bus, dbgp->slot, dbgp->func, + debug_port =3D pci_conf_read32(PCI_SBDF(0, dbgp->bus, dbgp->slot, dbgp= ->func), dbgp->cap); offset =3D (debug_port >> 16) & 0xfff; =20 @@ -1504,7 +1508,7 @@ void __init ehci_dbgp_init(void) else return; =20 - debug_port =3D pci_conf_read32(0, dbgp->bus, dbgp->slot, dbgp->func, + debug_port =3D pci_conf_read32(PCI_SBDF(0, dbgp->bus, dbgp->slot, dbgp= ->func), dbgp->cap); dbgp->bar =3D (debug_port >> 29) & 0x7; dbgp->bar =3D ((dbgp->bar - 1) * 4) + PCI_BASE_ADDRESS_0; @@ -1516,8 +1520,8 @@ void __init ehci_dbgp_init(void) return; } =20 - dbgp->bar_val =3D bar_val =3D pci_conf_read32(0, dbgp->bus, dbgp->slot, - dbgp->func, dbgp->bar); + dbgp->bar_val =3D bar_val =3D pci_conf_read32(PCI_SBDF(0, dbgp->bus, d= bgp->slot, + dbgp->func), dbgp->= bar); dbgp_printk("bar_val: %08x\n", bar_val); if ( bar_val & ~PCI_BASE_ADDRESS_MEM_MASK ) { diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 99c1254cac..fe71406cc1 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -1112,27 +1112,28 @@ pci_uart_config(struct ns16550 *uart, bool_t skip_a= mt, unsigned int idx) } =20 uart->io_base =3D 0; - bar =3D pci_conf_read32(0, b, d, f, - PCI_BASE_ADDRESS_0 + bar_idx*4); + bar =3D pci_conf_read32(PCI_SBDF(0, b, d, f), + PCI_BASE_ADDRESS_0 + bar_idx * 4); =20 /* MMIO based */ if ( param->mmio && !(bar & PCI_BASE_ADDRESS_SPACE_IO) ) { pci_conf_write32(0, b, d, f, PCI_BASE_ADDRESS_0 + bar_idx*4, ~0u); - len =3D pci_conf_read32(0, b, d, f, PCI_BASE_ADDRESS_0= + bar_idx*4); + len =3D pci_conf_read32(PCI_SBDF(0, b, d, f), + PCI_BASE_ADDRESS_0 + bar_idx * 4= ); pci_conf_write32(0, b, d, f, PCI_BASE_ADDRESS_0 + bar_idx*4, bar); =20 /* Handle 64 bit BAR if found */ if ( bar & PCI_BASE_ADDRESS_MEM_TYPE_64 ) { - bar_64 =3D pci_conf_read32(0, b, d, f, - PCI_BASE_ADDRESS_0 + (bar_idx+1)*4); + bar_64 =3D pci_conf_read32(PCI_SBDF(0, b, d, f), + PCI_BASE_ADDRESS_0 + (bar_idx + 1) *= 4); pci_conf_write32(0, b, d, f, PCI_BASE_ADDRESS_0 + (bar_idx+1)*4, ~0= u); - len_64 =3D pci_conf_read32(0, b, d, f, - PCI_BASE_ADDRESS_0 + (bar_idx+1)*4); + len_64 =3D pci_conf_read32(PCI_SBDF(0, b, d, f), + PCI_BASE_ADDRESS_0 + (bar_idx + 1) * 4= ); pci_conf_write32(0, b, d, f, PCI_BASE_ADDRESS_0 + (bar_idx+1)*4, ba= r_64); size =3D ((u64)~0 << 32) | PCI_BASE_ADDRESS_MEM_M= ASK; @@ -1149,7 +1150,8 @@ pci_uart_config(struct ns16550 *uart, bool_t skip_amt= , unsigned int idx) { pci_conf_write32(0, b, d, f, PCI_BASE_ADDRESS_0 + bar_idx*4, ~0u); - len =3D pci_conf_read32(0, b, d, f, PCI_BASE_ADDRESS_0= ); + len =3D pci_conf_read32(PCI_SBDF(0, b, d, f), + PCI_BASE_ADDRESS_0); pci_conf_write32(0, b, d, f, PCI_BASE_ADDRESS_0 + bar_idx*4, bar); size =3D len & PCI_BASE_ADDRESS_IO_MASK; diff --git a/xen/drivers/passthrough/amd/iommu_detect.c b/xen/drivers/passt= hrough/amd/iommu_detect.c index 3c5d4de1a3..069df156de 100644 --- a/xen/drivers/passthrough/amd/iommu_detect.c +++ b/xen/drivers/passthrough/amd/iommu_detect.c @@ -48,7 +48,7 @@ static int __init get_iommu_capabilities( { u8 type; =20 - iommu->cap.header =3D pci_conf_read32(seg, bus, dev, func, cap_ptr); + iommu->cap.header =3D pci_conf_read32(PCI_SBDF(seg, bus, dev, func), c= ap_ptr); type =3D get_field_from_reg_u32(iommu->cap.header, PCI_CAP_TYPE_MASK, PCI_CAP_TYPE_SHIFT); =20 diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthr= ough/amd/iommu_init.c index 1b3e7de10d..6083d51b91 100644 --- a/xen/drivers/passthrough/amd/iommu_init.c +++ b/xen/drivers/passthrough/amd/iommu_init.c @@ -844,7 +844,7 @@ static void amd_iommu_erratum_746_workaround(struct amd= _iommu *iommu) return; =20 pci_conf_write32(iommu->seg, bus, dev, func, 0xf0, 0x90); - value =3D pci_conf_read32(iommu->seg, bus, dev, func, 0xf4); + value =3D pci_conf_read32(PCI_SBDF2(iommu->seg, iommu->bdf), 0xf4); =20 if ( value & (1 << 2) ) return; @@ -1231,7 +1231,7 @@ static bool_t __init amd_sp5100_erratum28(void) =20 for (bus =3D 0; bus < 256; bus++) { - id =3D pci_conf_read32(0, bus, 0x14, 0, PCI_VENDOR_ID); + id =3D pci_conf_read32(PCI_SBDF(0, bus, 0x14, 0), PCI_VENDOR_ID); =20 vendor_id =3D id & 0xffff; dev_id =3D (id >> 16) & 0xffff; diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 703056f7b9..80887af66c 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -632,8 +632,7 @@ unsigned int pci_size_mem_bar(pci_sbdf_t sbdf, unsigned= int pos, uint64_t *paddr, uint64_t *psize, unsigned int flags) { - uint32_t hi =3D 0, bar =3D pci_conf_read32(sbdf.seg, sbdf.bus, sbdf.de= v, - sbdf.fn, pos); + uint32_t hi =3D 0, bar =3D pci_conf_read32(sbdf, pos); uint64_t size; bool is64bits =3D !(flags & PCI_BAR_ROM) && (bar & PCI_BASE_ADDRESS_MEM_TYPE_MASK) =3D=3D PCI_BASE_ADDRESS_MEM= _TYPE_64; @@ -655,15 +654,13 @@ unsigned int pci_size_mem_bar(pci_sbdf_t sbdf, unsign= ed int pos, *psize =3D 0; return 1; } - hi =3D pci_conf_read32(sbdf.seg, sbdf.bus, sbdf.dev, sbdf.fn, pos = + 4); + hi =3D pci_conf_read32(sbdf, pos + 4); pci_conf_write32(sbdf.seg, sbdf.bus, sbdf.dev, sbdf.fn, pos + 4, ~= 0); } - size =3D pci_conf_read32(sbdf.seg, sbdf.bus, sbdf.dev, sbdf.fn, - pos) & mask; + size =3D pci_conf_read32(sbdf, pos) & mask; if ( is64bits ) { - size |=3D (uint64_t)pci_conf_read32(sbdf.seg, sbdf.bus, sbdf.dev, - sbdf.fn, pos + 4) << 32; + size |=3D (uint64_t)pci_conf_read32(sbdf, pos + 4) << 32; pci_conf_write32(sbdf.seg, sbdf.bus, sbdf.dev, sbdf.fn, pos + 4, h= i); } else if ( size ) @@ -750,7 +747,7 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn, for ( i =3D 0; i < PCI_SRIOV_NUM_BARS; ) { unsigned int idx =3D pos + PCI_SRIOV_BAR + i * 4; - u32 bar =3D pci_conf_read32(seg, bus, slot, func, idx); + u32 bar =3D pci_conf_read32(pdev->sbdf, idx); pci_sbdf_t sbdf =3D PCI_SBDF3(seg, bus, devfn); =20 if ( (bar & PCI_BASE_ADDRESS_SPACE) =3D=3D @@ -1002,7 +999,7 @@ bool_t __init pci_device_detect(u16 seg, u8 bus, u8 de= v, u8 func) { u32 vendor; =20 - vendor =3D pci_conf_read32(seg, bus, dev, func, PCI_VENDOR_ID); + vendor =3D pci_conf_read32(PCI_SBDF(seg, bus, dev, func), PCI_VENDOR_I= D); /* some broken boards return 0 or ~0 if a slot is empty: */ if ( (vendor =3D=3D 0xffffffff) || (vendor =3D=3D 0x00000000) || (vendor =3D=3D 0x0000ffff) || (vendor =3D=3D 0xffff0000) ) diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough= /vtd/quirks.c index 47597c9600..28e9597014 100644 --- a/xen/drivers/passthrough/vtd/quirks.c +++ b/xen/drivers/passthrough/vtd/quirks.c @@ -128,9 +128,11 @@ static void __init map_igd_reg(void) if ( igd_reg_va ) return; =20 - igd_mmio =3D pci_conf_read32(0, 0, IGD_DEV, 0, PCI_BASE_ADDRESS_1); + igd_mmio =3D pci_conf_read32(PCI_SBDF(0, 0, IGD_DEV, 0), + PCI_BASE_ADDRESS_1); igd_mmio <<=3D 32; - igd_mmio +=3D pci_conf_read32(0, 0, IGD_DEV, 0, PCI_BASE_ADDRESS_0); + igd_mmio +=3D pci_conf_read32(PCI_SBDF(0, 0, IGD_DEV, 0), + PCI_BASE_ADDRESS_0); igd_reg_va =3D ioremap(igd_mmio & IGD_BAR_MASK, 0x3000); } =20 @@ -280,7 +282,7 @@ static void __init tylersburg_intremap_quirk(void) for ( bus =3D 0; bus < 0x100; bus++ ) { /* Match on System Management Registers on Device 20 Function 0 */ - device =3D pci_conf_read32(0, bus, 20, 0, PCI_VENDOR_ID); + device =3D pci_conf_read32(PCI_SBDF(0, bus, 20, 0), PCI_VENDOR_ID); rev =3D pci_conf_read8(PCI_SBDF(0, bus, 20, 0), PCI_REVISION_ID); =20 if ( rev =3D=3D 0x13 && device =3D=3D 0x342e8086 ) @@ -296,8 +298,8 @@ static void __init tylersburg_intremap_quirk(void) /* initialize platform identification flags */ void __init platform_quirks_init(void) { - ioh_id =3D pci_conf_read32(0, 0, IOH_DEV, 0, 0); - igd_id =3D pci_conf_read32(0, 0, IGD_DEV, 0, 0); + ioh_id =3D pci_conf_read32(PCI_SBDF(0, 0, IOH_DEV, 0), 0); + igd_id =3D pci_conf_read32(PCI_SBDF(0, 0, IGD_DEV, 0), 0); =20 /* Mobile 4 Series Chipset neglects to set RWBF capability. */ if ( ioh_id =3D=3D 0x2a408086 ) @@ -356,15 +358,15 @@ int me_wifi_quirk(struct domain *domain, u8 bus, u8 d= evfn, int map) u32 id; int rc =3D 0; =20 - id =3D pci_conf_read32(0, 0, 0, 0, 0); + id =3D pci_conf_read32(PCI_SBDF(0, 0, 0, 0), 0); if ( IS_CTG(id) ) { /* quit if ME does not exist */ - if ( pci_conf_read32(0, 0, 3, 0, 0) =3D=3D 0xffffffff ) + if ( pci_conf_read32(PCI_SBDF(0, 0, 3, 0), 0) =3D=3D 0xffffffff ) return 0; =20 /* if device is WLAN device, map ME phantom device 0:3.7 */ - id =3D pci_conf_read32(0, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 0= ); + id =3D pci_conf_read32(PCI_SBDF3(0, bus, devfn), 0); switch (id) { case 0x42328086: @@ -384,11 +386,11 @@ int me_wifi_quirk(struct domain *domain, u8 bus, u8 d= evfn, int map) else if ( IS_ILK(id) || IS_CPT(id) ) { /* quit if ME does not exist */ - if ( pci_conf_read32(0, 0, 22, 0, 0) =3D=3D 0xffffffff ) + if ( pci_conf_read32(PCI_SBDF(0, 0, 22, 0), 0) =3D=3D 0xffffffff ) return 0; =20 /* if device is WLAN device, map ME phantom device 0:22.7 */ - id =3D pci_conf_read32(0, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), 0= ); + id =3D pci_conf_read32(PCI_SBDF3(0, bus, devfn), 0); switch (id) { case 0x00878086: /* Kilmer Peak */ @@ -438,7 +440,7 @@ void pci_vtd_quirk(const struct pci_dev *pdev) case 0x342e: /* Tylersburg chipset (Nehalem / Westmere systems) */ case 0x3728: /* Xeon C5500/C3500 (JasperForest) */ case 0x3c28: /* Sandybridge */ - val =3D pci_conf_read32(seg, bus, dev, func, 0x1AC); + val =3D pci_conf_read32(pdev->sbdf, 0x1AC); pci_conf_write32(seg, bus, dev, func, 0x1AC, val | (1 << 31)); printk(XENLOG_INFO "Masked VT-d error signaling on %04x:%02x:%02x.= %u\n", seg, bus, dev, func); @@ -461,7 +463,7 @@ void pci_vtd_quirk(const struct pci_dev *pdev) PCI_EXT_CAP_ID_VNDR); while ( pos ) { - val =3D pci_conf_read32(seg, bus, dev, func, pos + PCI_VND= R_HEADER); + val =3D pci_conf_read32(pdev->sbdf, pos + PCI_VNDR_HEADER); if ( PCI_VNDR_HEADER_ID(val) =3D=3D 4 && PCI_VNDR_HEADER_R= EV(val) =3D=3D 1 ) { pos +=3D PCI_VNDR_HEADER; @@ -481,8 +483,8 @@ void pci_vtd_quirk(const struct pci_dev *pdev) break; } =20 - val =3D pci_conf_read32(seg, bus, dev, func, pos + PCI_ERR_UNCOR_M= ASK); - val2 =3D pci_conf_read32(seg, bus, dev, func, pos + PCI_ERR_COR_MA= SK); + val =3D pci_conf_read32(pdev->sbdf, pos + PCI_ERR_UNCOR_MASK); + val2 =3D pci_conf_read32(pdev->sbdf, pos + PCI_ERR_COR_MASK); if ( (val & PCI_ERR_UNC_UNSUP) && (val2 & PCI_ERR_COR_ADV_NFAT) ) action =3D "Found masked"; else if ( !ff ) @@ -497,7 +499,7 @@ void pci_vtd_quirk(const struct pci_dev *pdev) action =3D "Must not mask"; =20 /* XPUNCERRMSK Send Completion with Unsupported Request */ - val =3D pci_conf_read32(seg, bus, dev, func, 0x20c); + val =3D pci_conf_read32(pdev->sbdf, 0x20c); pci_conf_write32(seg, bus, dev, func, 0x20c, val | (1 << 4)); =20 printk(XENLOG_INFO "%s UR signaling on %04x:%02x:%02x.%u\n", @@ -514,8 +516,8 @@ void pci_vtd_quirk(const struct pci_dev *pdev) case 0x1610: case 0x1614: case 0x1618: /* Broadwell */ case 0x1900: case 0x1904: case 0x1908: case 0x190c: case 0x190f: /* Sk= ylake */ case 0x1910: case 0x1918: case 0x191f: /* Skylake */ - bar =3D pci_conf_read32(seg, bus, dev, func, 0x6c); - bar =3D (bar << 32) | pci_conf_read32(seg, bus, dev, func, 0x68); + bar =3D pci_conf_read32(pdev->sbdf, 0x6c); + bar =3D (bar << 32) | pci_conf_read32(pdev->sbdf, 0x68); pa =3D bar & 0x7ffffff000UL; /* bits 12...38 */ if ( (bar & 1) && pa && page_is_ram_type(paddr_to_pfn(pa), RAM_TYPE_RESERVED) ) diff --git a/xen/drivers/pci/pci.c b/xen/drivers/pci/pci.c index 5e5e0f0538..b24702e0c3 100644 --- a/xen/drivers/pci/pci.c +++ b/xen/drivers/pci/pci.c @@ -93,7 +93,7 @@ int pci_find_next_ext_capability(int seg, int bus, int de= vfn, int start, int cap int ttl =3D 480; /* 3840 bytes, minimum 8 bytes per capability */ int pos =3D max(start, 0x100); =20 - header =3D pci_conf_read32(seg, bus, PCI_SLOT(devfn), PCI_FUNC(devfn),= pos); + header =3D pci_conf_read32(PCI_SBDF3(seg, bus, devfn), pos); =20 /* * If we have no capabilities, this is indicated by cap ID, @@ -109,7 +109,7 @@ int pci_find_next_ext_capability(int seg, int bus, int = devfn, int start, int cap pos =3D PCI_EXT_CAP_NEXT(header); if ( pos < 0x100 ) break; - header =3D pci_conf_read32(seg, bus, PCI_SLOT(devfn), PCI_FUNC(dev= fn), pos); + header =3D pci_conf_read32(PCI_SBDF3(seg, bus, devfn), pos); } return 0; } diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c index 0b176b490a..7476634982 100644 --- a/xen/drivers/vpci/header.c +++ b/xen/drivers/vpci/header.c @@ -511,7 +511,7 @@ static int init_bars(struct pci_dev *pdev) continue; } =20 - val =3D pci_conf_read32(pdev->seg, pdev->bus, slot, func, reg); + val =3D pci_conf_read32(pdev->sbdf, reg); if ( (val & PCI_BASE_ADDRESS_SPACE) =3D=3D PCI_BASE_ADDRESS_SPACE_= IO ) { bars[i].type =3D VPCI_BAR_IO; @@ -561,8 +561,8 @@ static int init_bars(struct pci_dev *pdev) rom->type =3D VPCI_BAR_ROM; rom->size =3D size; rom->addr =3D addr; - header->rom_enabled =3D pci_conf_read32(pdev->seg, pdev->bus, slot= , func, - rom_reg) & PCI_ROM_ADDRESS_E= NABLE; + header->rom_enabled =3D pci_conf_read32(pdev->sbdf, rom_reg) & + PCI_ROM_ADDRESS_ENABLE; =20 rc =3D vpci_add_register(pdev->vpci, vpci_hw_read32, rom_write, ro= m_reg, 4, rom); diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c index 8e6cd070d0..c60cba0137 100644 --- a/xen/drivers/vpci/msix.c +++ b/xen/drivers/vpci/msix.c @@ -469,11 +469,9 @@ static int init_msix(struct pci_dev *pdev) pdev->vpci->msix->pdev =3D pdev; =20 pdev->vpci->msix->tables[VPCI_MSIX_TABLE] =3D - pci_conf_read32(pdev->seg, pdev->bus, slot, func, - msix_table_offset_reg(msix_offset)); + pci_conf_read32(pdev->sbdf, msix_table_offset_reg(msix_offset)); pdev->vpci->msix->tables[VPCI_MSIX_PBA] =3D - pci_conf_read32(pdev->seg, pdev->bus, slot, func, - msix_pba_offset_reg(msix_offset)); + pci_conf_read32(pdev->sbdf, msix_pba_offset_reg(msix_offset)); =20 for ( i =3D 0; i < pdev->vpci->msix->max_entries; i++) { diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c index 1a4c2ee4f1..2106255863 100644 --- a/xen/drivers/vpci/vpci.c +++ b/xen/drivers/vpci/vpci.c @@ -120,8 +120,7 @@ uint32_t vpci_hw_read16(const struct pci_dev *pdev, uns= igned int reg, uint32_t vpci_hw_read32(const struct pci_dev *pdev, unsigned int reg, void *data) { - return pci_conf_read32(pdev->seg, pdev->bus, PCI_SLOT(pdev->devfn), - PCI_FUNC(pdev->devfn), reg); + return pci_conf_read32(pdev->sbdf, reg); } =20 int vpci_add_register(struct vpci *vpci, vpci_read_t *read_handler, @@ -211,7 +210,7 @@ static uint32_t vpci_read_hw(pci_sbdf_t sbdf, unsigned = int reg, switch ( size ) { case 4: - data =3D pci_conf_read32(sbdf.seg, sbdf.bus, sbdf.dev, sbdf.fn, re= g); + data =3D pci_conf_read32(sbdf, reg); break; =20 case 3: diff --git a/xen/include/xen/pci.h b/xen/include/xen/pci.h index cf4c223f7c..2a5705560e 100644 --- a/xen/include/xen/pci.h +++ b/xen/include/xen/pci.h @@ -174,9 +174,7 @@ void pci_check_disable_device(u16 seg, u8 bus, u8 devfn= ); =20 uint8_t pci_conf_read8(pci_sbdf_t sbdf, unsigned int reg); uint16_t pci_conf_read16(pci_sbdf_t sbdf, unsigned int reg); -uint32_t pci_conf_read32( - unsigned int seg, unsigned int bus, unsigned int dev, unsigned int fun= c, - unsigned int reg); +uint32_t pci_conf_read32(pci_sbdf_t sbdf, unsigned int reg); void pci_conf_write8( unsigned int seg, unsigned int bus, unsigned int dev, unsigned int fun= c, unsigned int reg, uint8_t data); --=20 2.20.1 (Apple Git-117) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel