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

Re: [Xen-devel] [PATCH v2 08/21] xen/arm: Initialize the virtual GIC later



Hi Julien,

On Fri, Aug 29, 2014 at 11:04 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>
>
> On 29/08/14 15:49, Andrii Tseglytskyi wrote:
>>
>> On Fri, Aug 29, 2014 at 9:57 PM, Julien Grall <julien.grall@xxxxxxxxxx>
>> wrote:
>>>
>>> You will have to modify the function for your purpose. If you plan to
>>> PIRQ
>>> == VIRQ every time, you could do smth like:
>>>
>>>
>>> d->arch.vgic.nr_spis = gic_number_lines() - 32;
>>>
>>> I assume, you already modified vgic_allocate_irq to return directly the
>>> pirq, and do nothing in vgic_free_irq.
>>
>>
>> Yes, locally I did the same as you mentioned, but I'm thinking about
>> solution which will allow me to have 1 to 1 irq mapping and which will
>> be acceptable for Xen mainline.
>
>
> IHMO, the best solution would adding a boolean in the new DOMCTL to specify
> if we want to use PIRQ == VIRQ or not.
>
> Then you will have to modify vgic_allocate_irq to return the physical IRQ if
> the domain as this new option enabled.

This sounds good.

>
>
>> My local diff is:
>>
>> diff --git a/xen/arch/arm/physdev.c b/xen/arch/arm/physdev.c
>> index 9333aa0..50ff100 100644
>> --- a/xen/arch/arm/physdev.c
>> +++ b/xen/arch/arm/physdev.c
>> @@ -46,16 +46,13 @@ static int physdev_map_pirq(domid_t domid, int
>> type, int index, int *pirq_p)
>>
>>       virq = vgic_allocate_virq(d, irq);
>>       ret = -EMFILE;
>>       if ( virq == -1 )
>>           goto free_domain;
>>
>> -    ret = route_irq_to_guest(d, virq, irq, "routed IRQ");
>> +    ret = route_irq_to_guest(d, irq, irq, "routed IRQ");
>
>
> With this change you may have some issue when unmap_pirq is used. I would
> modify vgic_allocate_irq to always return the physical IRQ number.
>
> The code will be also more clean.

Sure, anyway this won't be needed in case of new bool option for domain

Regards,
Andrii



-- 

Andrii Tseglytskyi | Embedded Dev
GlobalLogic
www.globallogic.com

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


 


Rackspace

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