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: prevent simultaneous use of MSI a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86: prevent simultaneous use of MSI and MSI-X
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jul 2010 06:07:06 -0700
Delivery-date: Fri, 16 Jul 2010 06:11:37 -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 1279183762 -3600
# Node ID 61f09a05b46352fc14305979ea200f3874d6014b
# Parent  3bb6759b167cbcb0cdf610d14fdaa17df4c17c73
x86: prevent simultaneous use of MSI and MSI-X

This matches similar checks done in Linux, since no good can come from
a domain trying to enable both MSI and MSI-X on the same device at the
same time.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
xen-unstable changeset:   21778:421f6c63b220
xen-unstable date:        Mon Jul 12 10:43:34 2010 +0100
---
 xen/arch/x86/msi.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)

diff -r 3bb6759b167c -r 61f09a05b463 xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Thu Jul 15 09:49:00 2010 +0100
+++ b/xen/arch/x86/msi.c        Thu Jul 15 09:49:22 2010 +0100
@@ -623,6 +623,14 @@ static int __pci_enable_msi(struct msi_i
         return 0;
     }
 
+    if ( find_msi_entry(pdev, -1, PCI_CAP_ID_MSIX) )
+    {
+        dprintk(XENLOG_WARNING, "MSI-X is already in use on "
+                "device %02x:%02x.%01x\n", msi->bus,
+                PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn));
+        return 0;
+    }
+
     status = msi_capability_init(pdev, msi->irq, desc);
     return status;
 }
@@ -689,6 +697,14 @@ static int __pci_enable_msix(struct msi_
         return 0;
     }
 
+    if ( find_msi_entry(pdev, -1, PCI_CAP_ID_MSI) )
+    {
+        dprintk(XENLOG_WARNING, "MSI is already in use on "
+                "device %02x:%02x.%01x\n", msi->bus,
+                PCI_SLOT(msi->devfn), PCI_FUNC(msi->devfn));
+        return 0;
+    }
+
     status = msix_capability_init(pdev, msi, desc);
     return status;
 }

_______________________________________________
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: prevent simultaneous use of MSI and MSI-X, Xen patchbot-4.0-testing <=