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

Re: [Xen-devel] Does a Virtual PCI Device can have MSI's



On Wed, 13 Aug 2014, manish jaggi wrote:
> Hi,
> 
> I think it should be possible, but confirming it that this feature is
> enabled in xen. I don't know how to test it.
> 
> Does any virtual PCI device in DomU (I don't mean a virtual function)
> have MSI interrupts ?

Yes, they do.


> If yes then how is that MSI handled in Xen

PV guests on x86 don't receive MSIs or legacy interrupts as is.  They
map them into "pirqs" instead, that are a kind of event channels, Xen
specific software interrupts. For each MSI on the PCI device assigned to
the guest, the guest kernel would ask for a pirq, see:

arch/x86/pci/xen.c:xen_pcifront_enable_irq
arch/x86/pci/xen.c:xen_setup_msi_irqs

In the specific case of MSIs and MSI-X, pcifront issues an hypercall in
order to enable them, see:

drivers/pci/xen-pcifront.c:pci_frontend_enable_msi

and the backend returns the pirq number:

drivers/xen/xen-pciback/pciback_ops.c:xen_pcibk_enable_msi


On ARM I think it would be best if we delivered MSIs as MSIs to the
guest, rather than mapping them into pirqs, to take better advantage of
the hardware. But it would be up to you to change the pcifront/pciback
code to do it.
In first instance it would be fine if we end up using pirqs.

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