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

Re: [Xen-devel] [PATCH 01/11] xen/arm: vpl011: Add pl011 uart emulation in Xen



Hi Julien,

On 23 March 2017 at 19:46, Julien Grall <julien.grall@xxxxxxx> wrote:
>>> It makes little sense to hardcode the MMIO region and not the SPI. Also,
>>> I
>>> would rather avoid to introduce new HVM_PARAM when not necessary. So
>>> hardcoding the value looks more sensible to me.
>>>
>> So for reserving a SPI for vpl011, should I reserve one bit in the
>> vgic.allocated_irqs bitmap in domain_vgic_init(), say 988, for vpl011?
>> I think if I am going to reserve 1 SPI for vpl011 then I need not bump
>> up nr_spis by 1.
>
>
> Regardless the solution solution, nr_spis still need to be incremented. This
> field is used to know the number of SPIs exposed to the guest.

The d->arch.vgic.allocated_irqs size is allocated based on the nr_spis
and the nr_spis is set to highest numbered irq requested by the user+1
by the toolstack (see libxl__arch_domain_prepare_config).

There are two possible values which we can reserve for vpl011 SPI:

1. Reserve one SPI for vpl011 at the end of the SPI range to 988
(1020-32), then nr_spis will have to be always set to 989.

2. Reserve one at the beginning of the range say 0 (i.e. virq number
32). In this case nr_spis will be set to 1.

I think 2nd option is better as it wastes less memory for maintaining
the irq bitmap data structures.

Let me know.

Regards,
Bhupinder

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