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

Re: [Xen-devel] [PATCH 24/25 v7] xen/arm: vpl011: Add a pl011 uart DT node in the guest device tree



Hi Julien,


>>
>> diff --git a/tools/libxl/libxl_arm.c b/tools/libxl/libxl_arm.c
>> index a33d3c9..6629852 100644
>> --- a/tools/libxl/libxl_arm.c
>> +++ b/tools/libxl/libxl_arm.c
>> @@ -43,11 +43,29 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
>>  {
>>      uint32_t nr_spis = 0;
>>      unsigned int i;
>> +    uint32_t vuart_irq = 0;
>> +
>> +    /*
>> +     * If pl011 vuart is enabled then increment the nr_spis to allow
>> allocation
>> +     * of SPI VIRQ for pl011.
>> +     */
>> +    if (d_config->b_info.arch_arm.vuart == LIBXL_VUART_TYPE_SBSA_UART) {
>> +        nr_spis += (GUEST_VPL011_SPI - 32) + 1;
>> +        vuart_irq = GUEST_VPL011_SPI;
>> +    }
>>
>>      for (i = 0; i < d_config->b_info.num_irqs; i++) {
>>          uint32_t irq = d_config->b_info.irqs[i];
>>          uint32_t spi;
>>
>> +        /*
>> +         * The user specified irq should not conflict with the vpl011
>> irq.
>> +         */
>
>
> I am sorry but in the changelog you wrote: "Add a comment explaining why
> user specified IRQ should not conflict with vpl011 SPI". But you still don't
> explain why... And I still don't see the TODO requested on v6.

ok. So should I mention that if there is a conflict then that
interrupt would not be received correctly by the guest as user expects
certain
behaviour on receiving the specified IRQ?

Can you please elaborate what is the TODO in this case?

>
>> +        if (irq == vuart_irq) {
>
>
> Hmmm if vUART is not enabled you would compare to 0. And I don't think we
> should make this assumption in the code. This would also give a random error
> to the user.
>
I thought that since this is an SPI interrupt it would start with at least 32.

> It would be better if you introduce a local boolean vuart_enabled to know
> whether you need to check the conflict.

ok. I will add a boolean variable.

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