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

Re: [Xen-devel] [PATCH v2] xen: add support for MSI message groups



On 02/28/2014 12:46 PM, Roger Pau Monnà wrote:
On 28/02/14 18:20, Boris Ostrovsky wrote:
On 02/27/2014 01:45 PM, Boris Ostrovsky wrote:
On 02/27/2014 01:15 PM, Roger Pau Monne wrote:
Add support for MSI message groups for Xen Dom0 using the
MAP_PIRQ_TYPE_MULTI_MSI pirq map type.

In order to keep track of which pirq is the first one in the group all
pirqs in the MSI group except for the first one have the newly
introduced PIRQ_MSI_GROUP flag set. This prevents calling
PHYSDEVOP_unmap_pirq on them, since the unmap must be done with the
first pirq in the group.
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>



I was just looking at xen_setup_msi_irqs() (for a different reason) and
I am no longer sure this patch does anything:

static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
         int irq, ret, i;
         struct msi_desc *msidesc;
         int *v;

         if (type == PCI_CAP_ID_MSI && nvec > 1)
                 return 1;
....

Same thing for xen_hvm_setup_msi_irqs().
As said in the commit message this is only for Dom0, so the function
modified is xen_initdom_setup_msi_irqs (were this check is removed).

Then what is the reason for these changes:

diff --git a/arch/x86/pci/xen.c b/arch/x86/pci/xen.c
index 103e702..905956f 100644
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -178,6 +178,7 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int 
nvec, int type)
        i = 0;
        list_for_each_entry(msidesc, &dev->msi_list, list) {
                irq = xen_bind_pirq_msi_to_irq(dev, msidesc, v[i],
+                                              (type == PCI_CAP_ID_MSI) ? nvec 
: 1,
                                               (type == PCI_CAP_ID_MSIX) ?
                                               "pcifront-msi-x" :
                                               "pcifront-msi",
@@ -245,6 +246,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int 
nvec, int type)
                                "xen: msi already bound to pirq=%d\n", pirq);
                }
                irq = xen_bind_pirq_msi_to_irq(dev, msidesc, pirq,
+                                              (type == PCI_CAP_ID_MSI) ? nvec 
: 1,
                                               (type == PCI_CAP_ID_MSIX) ?
                                               "msi-x" : "msi",
                                               DOMID_SELF);

Should you simply pass 1?

-boris


_______________________________________________
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®.