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

Re: [Xen-devel] MSI-X interrupts to guests

[Kieran Mansley]
> On Wed, 2009-04-15 at 17:30 +0100, Espen Skoglund wrote:
>> The API is the same as used for mapping regular PIRQs (they just
>> happen to be MSI-X vectors).  In particular, xend will use the
>> right API when mapping a PIRQ to the guest.

> Changing the code to do as I think you describe gives a different
> error: the call to PHYSDEVOP_map_pirq to map the GSI into the guest
> fails as from reading the code (xen/arch/x86/physdev.c:58) it seems
> to be expecting an IRQ number to be passed in when what we have is
> an MSI-X vector, and it falls out of the range of IRQ numbers.  The
> frustrating part is that the code that handles PHYSDEVOP_map_pirq in
> the hypervisor just turns the IRQ back into a vector.

> For the record, this is what I'm doing now:
> 1) Call pci_enable_msix() to set up the MSI-X tables and allocate a set
> of vectors.  This works fine.  As I understand things this calls among
> other things  PHYSDEVOP_map_pirq to map it into dom0.

> 2a) Attempt to map this to the guest using PHYSDEVOP_map_pirq with
> parameters:
> map_irq.domid = guest_domid;
> map_irq.type = MAP_PIRQ_TYPE_GSI;
> map_irq.index = vector;
> map_irq.pirq = -1;

>  => gives an error in the hypervisor: 
> (XEN) physdev.c:61: dom1: map invalid irq 510

IRQ510?  This definitely sounds wrong.  This can't possibly be the
"PIRQ" assigned to the MSI vector.




> One point that is causing some confusion is the need to map the
> MSI-X into dom0 and get a physical IRQ in the first place before
> mapping it to the guest.  Is this strictly necessary?  It suggests
> that, once it has also been mapped to the guest the interrupt may be
> delivered to two different domains.

Only if two different domains bind to the pirq.  MSI-X vectors could
in theory be shared between multiple domains.  I have not attempted
this, and don't know if it would work with the current code base.

        eSk


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