WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86-64: allow mapping mmcfg space for hig

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86-64: allow mapping mmcfg space for high numbered PCI segments
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Tue, 30 Aug 2011 20:22:10 +0100
Delivery-date: Tue, 30 Aug 2011 12:23:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1314443619 -3600
# Node ID 4705eca37c9fac9d13867a856bdcfa8b7bad56c6
# Parent  1ec46033135e3a9f8b24a3e67d560a7ff2a826d8
x86-64: allow mapping mmcfg space for high numbered PCI segments

Rather than using the segment number directly when determining the
virtual address for a particular mmconfig block, use the array index
instead. Thus a system with (perhaps significantly) less than 2048 PCI
segments, but with some having numbers beyond 2047 can actually have
all its mmconfig blocks mapped.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---


diff -r 1ec46033135e -r 4705eca37c9f xen/arch/x86/x86_64/mmconfig_64.c
--- a/xen/arch/x86/x86_64/mmconfig_64.c Fri Aug 26 13:06:39 2011 +0100
+++ b/xen/arch/x86/x86_64/mmconfig_64.c Sat Aug 27 12:13:39 2011 +0100
@@ -113,12 +113,11 @@
 }
 
 static void __iomem *mcfg_ioremap(const struct acpi_mcfg_allocation *cfg,
-                                  unsigned int prot)
+                                  unsigned long idx, unsigned int prot)
 {
     unsigned long virt, size;
 
-    virt = PCI_MCFG_VIRT_START +
-           ((unsigned long)cfg->pci_segment << mmcfg_pci_segment_shift) +
+    virt = PCI_MCFG_VIRT_START + (idx << mmcfg_pci_segment_shift) +
            (cfg->start_bus_number << 20);
     size = (cfg->end_bus_number - cfg->start_bus_number + 1) << 20;
     if (virt + size < virt || virt + size > PCI_MCFG_VIRT_END)
@@ -139,7 +138,7 @@
 
     if (pci_mmcfg_virt[idx].virt)
         return 0;
-    pci_mmcfg_virt[idx].virt = mcfg_ioremap(cfg, PAGE_HYPERVISOR_NOCACHE);
+    pci_mmcfg_virt[idx].virt = mcfg_ioremap(cfg, idx, PAGE_HYPERVISOR_NOCACHE);
     if (!pci_mmcfg_virt[idx].virt) {
         printk(KERN_ERR "PCI: Cannot map MCFG aperture for segment %04x\n",
                cfg->pci_segment);
@@ -160,7 +159,7 @@
      * the necessary L4 entries get populated (so that they get properly
      * propagated to guest domains' page tables).
      */
-    mcfg_ioremap(cfg, 0);
+    mcfg_ioremap(cfg, idx, 0);
     printk(KERN_WARNING "PCI: Not using MCFG for segment %04x bus %02x-%02x\n",
            cfg->pci_segment, cfg->start_bus_number, cfg->end_bus_number);
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86-64: allow mapping mmcfg space for high numbered PCI segments, Xen patchbot-unstable <=