Re: [Xen-devel] [PATCH v2] PCI: Add guard to avoid mapping a invalid msix base address

2015-01-28 Thread Yijing Wang
>> >> Right, I think it does. >> >> One question: do we need to check flags for IORESOURCE_DISABLED as well? >> Currently IORESOURCE_DISABLED and IORESOURCE_UNSET are set together for PCI >> so it probably doesn't matter right now but if this changes we won't want to >> use BAR that's disabled, wil

Re: [Xen-devel] [PATCH v2] PCI: Add guard to avoid mapping a invalid msix base address

2015-01-28 Thread Bjorn Helgaas
On Wed, Jan 28, 2015 at 3:05 PM, Boris Ostrovsky wrote: > On 01/28/2015 01:13 PM, Bjorn Helgaas wrote: >> >> >> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c >> index fd60806..c3e7dfc 100644 >> --- a/drivers/pci/msi.c >> +++ b/drivers/pci/msi.c >> @@ -694,11 +694,16 @@ static void __iomem *ms

Re: [Xen-devel] [PATCH v2] PCI: Add guard to avoid mapping a invalid msix base address

2015-01-28 Thread Boris Ostrovsky
On 01/28/2015 01:13 PM, Bjorn Helgaas wrote: diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index fd60806..c3e7dfc 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -694,11 +694,16 @@ static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries) { resource

Re: [Xen-devel] [PATCH v2] PCI: Add guard to avoid mapping a invalid msix base address

2015-01-28 Thread Bjorn Helgaas
[+cc Konrad, Boris, David, xen-devel, Alex, kvm] On Wed, Jan 28, 2015 at 09:52:17AM +0800, Yijing Wang wrote: > Sometimes, a pci bridge device BAR was not assigned > properly. After we call pci_bus_assign_resources(), the > resource of the BAR would be reseted. So if we try to > enable msix for th