[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: prevent simultaneous use of MSI and MSI-X
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1278927814 -3600 # Node ID 421f6c63b220ecd4d56addc940327e37d45b7c55 # Parent a63e4c2d9ae4e27477a50d4bf06fcaeed7f1e72f 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/arch/x86/msi.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+) diff -r a63e4c2d9ae4 -r 421f6c63b220 xen/arch/x86/msi.c --- a/xen/arch/x86/msi.c Mon Jul 12 10:43:10 2010 +0100 +++ b/xen/arch/x86/msi.c Mon Jul 12 10:43:34 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |