[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux-2.6.18/MSI: also reject resource with flags all clear


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Jan Beulich" <JBeulich@xxxxxxxx>
  • Date: Thu, 29 Jan 2015 15:14:50 +0000
  • Delivery-date: Thu, 29 Jan 2015 15:14:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

When resource assignment fails, things may end up this way, and we want
to avoid using the resource in that case.

Derived from an upstream patch by Yijing Wang <wangyijing@xxxxxxxxxx>.

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

--- a/drivers/pci/msi-xen.c
+++ b/drivers/pci/msi-xen.c
@@ -204,7 +204,9 @@ static u64 find_table_base(struct pci_de
        bar = reg & PCI_MSIX_FLAGS_BIRMASK;
 
        flags = pci_resource_flags(dev, bar);
-       if (flags & (IORESOURCE_DISABLED | IORESOURCE_UNSET | IORESOURCE_BUSY))
+       if (!flags ||
+            (flags & (IORESOURCE_DISABLED | IORESOURCE_UNSET |
+                      IORESOURCE_BUSY)))
                return 0;
 
        return pci_resource_start(dev, bar);



Attachment: xen-MSI-empty-resource-flags.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.