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-4.0-testing] x86: allow the MSI-X table to reside b

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86: allow the MSI-X table to reside beyond 4G even on 32-bit systems
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jul 2010 06:07:07 -0700
Delivery-date: Fri, 16 Jul 2010 06:11:45 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1279183785 -3600
# Node ID 13eead70c5c9b55764a6ff390c8c943a0f91d92e
# Parent  61f09a05b46352fc14305979ea200f3874d6014b
x86: allow the MSI-X table to reside beyond 4G even on 32-bit systems

Underlying interfaces allow this, and unduly (and silently) truncating
addresses doesn't seem nice.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
xen-unstable changeset:   21779:08b2222ff505
xen-unstable date:        Mon Jul 12 10:43:57 2010 +0100
---
 xen/arch/x86/msi.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff -r 61f09a05b463 -r 13eead70c5c9 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Thu Jul 15 09:49:22 2010 +0100
+++ b/xen/arch/x86/msi.c        Thu Jul 15 09:49:45 2010 +0100
@@ -57,10 +57,11 @@ static void msix_fixmap_free(int idx)
     spin_unlock(&msix_fixmap_lock);
 }
 
-static int msix_get_fixmap(struct pci_dev *dev, unsigned long table_paddr,
-                           unsigned long entry_paddr)
-{
-    int nr_page, idx;
+static int msix_get_fixmap(struct pci_dev *dev, u64 table_paddr,
+                           u64 entry_paddr)
+{
+    long nr_page;
+    int idx;
 
     nr_page = (entry_paddr >> PAGE_SHIFT) - (table_paddr >> PAGE_SHIFT);
 
@@ -536,7 +537,7 @@ static int msix_capability_init(struct p
     struct msi_desc *entry;
     int pos;
     u16 control;
-    unsigned long table_paddr, entry_paddr;
+    u64 table_paddr, entry_paddr;
     u32 table_offset, entry_offset;
     u8 bir;
     void __iomem *base;
@@ -571,7 +572,8 @@ static int msix_capability_init(struct p
         xfree(entry);
         return idx;
     }
-    base = (void *)(fix_to_virt(idx) + (entry_paddr & ((1UL << PAGE_SHIFT) - 
1)));
+    base = (void *)(fix_to_virt(idx) +
+        ((unsigned long)entry_paddr & ((1UL << PAGE_SHIFT) - 1)));
 
     entry->msi_attrib.type = PCI_CAP_ID_MSIX;
     entry->msi_attrib.is_64 = 1;

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] x86: allow the MSI-X table to reside beyond 4G even on 32-bit systems, Xen patchbot-4.0-testing <=