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

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



Hi Stefano,



On 7 January 2017 at 03:24, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
> Hello Bhupinder,
>
> it is good to hear that you are making progress.
>
>
> 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.
>
I increment the nr_spis by 1 in domain_vgic_init() to ensure the
vgic_allocate_virq() is able to allocate a SPI for pl011. With that
change, I am able to inject a SPI irq into guest and handle it.

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