[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 13 August 2014 15:40, Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
> 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.

I am considering 2 cases here
a) physical PCI passthrough devices / functions assigned to domU
b) emulated (virtual) PCI devices assigned to domU

For (a) it is straight to configure and inject the MSI into guest
For (b) how does the configuring and injection should work,
- PCI Front driver using backops requests to enable msi
- At a later stage xen using dom0 (somehow) inject an virtual LPI into domU.

What are your thoughts on this?

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.