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

Re: [Xen-devel] Xen ARM - Exposing a PL011 to the guest



Hi,

On 06/01/17 21:54, Stefano Stabellini wrote:
On Fri, 6 Jan 2017, Bhupinder Thakur wrote:
Hi,

I am trying to allocate a new SPI VIRQ for sending pl011 interrupt to
the guest OS. Currently Xen does not allow to allocate a SPI VIRQ for
a guest domain. I tried allocating a new SPI VIRQ by calling
vgic_allocate_spi() but it failed as the SPI VIRQ range for the guests
is limited to 0 (vgic_num_irqs() return 32 and therefore in effect
says that no SPI VIRQ can be allocated because below 32 are for
PPI/SGI VIRQs).

Yes, you should use vgic_allocate_virq. For that to work, you need to
make sure that nr_spis for the domain is > 0. Given that nr_spis is
passed from libxl by calling xc_domain_create, I would set nr_spis to 1
in libxl__arch_domain_prepare_config.

Before I forgot, this would need to be documented to allow people to easily use interrupt routing (for device passthrough) when PL011 enabled.

I would suggest to define the SPI used by the PL011 in include/public/arch-arm.h and the number of SPIs reserved (GUEST_NR_RESERVED_SPIS). This would avoid an hardcoded number in the code and easily extension whether we need more SPIs later on (I have the host bridge emulation in mind).

Cheers,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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