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-devel

[Xen-devel] MSI-X interrupts to guests

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] MSI-X interrupts to guests
From: Kieran Mansley <kmansley@xxxxxxxxxxxxxx>
Date: Wed, 15 Apr 2009 16:43:04 +0100
Cc: espen.skoglund@xxxxxxxxxxxxx
Delivery-date: Wed, 15 Apr 2009 08:43:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Some recent changes from Espen Skoglund
http://markmail.org/thread/76szuiywgd5dn2x4 suggest that it should now
be possible to map an MSI-X interrupt direct to a guest.  However, when
trying to do this, I get errors, and before I delve too deep I wondered
if there was something obvious I'm doing wrong.

My approach is that dom0 does something like this:

        struct physdev_map_pirq map_irq;

        map_irq.domid = guest_domid;
        map_irq.type = MAP_PIRQ_TYPE_MSI;
        map_irq.index = -1;
        map_irq.pirq = -1;
        map_irq.bus = pci_dev->bus->number;
        map_irq.devfn = pci_dev->devfn;
        map_irq.entry_nr = msix_entry;
        map_irq.table_base = msix_table;

        rc = HYPERVISOR_physdev_op(PHYSDEVOP_map_pirq, &map_irq);

This call succeeds.  dom0 then tells the guest the value of map_irq.pirq
(which seems to have a sensible value given the other interrupts mapped
to that domain) that it gets back from this hypercall, and the guest
tries to call request_irq() using that value.  The call to request_irq()
returns -38 (ENOSYS).

Any ideas what the problem could be?  I'm happy to investigate.

Kieran


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel