Hi Julien,

> On 27 Apr 2022, at 6:59 pm, Julien Grall <[email protected]> wrote:
> 
> Hi Rahul,
> 
> On 27/04/2022 17:14, Rahul Singh wrote:
>> MAPC_LPI_OFF ITS command error can be reported to software if LPIs are
> 
> Looking at the spec (ARM IHI 0069H), I can't find a command error named 
> MAPC_LPI_OFF. Is it something specific to your HW?

I found the issue on HW that implements GIC-600 and GIC-600 TRM specify the 
MAPC_LPI_OFF its command error.

https://developer.arm.com/documentation/100336/0106/introduction/about-the-gic-600
{Table 3-15 ITS command and translation errors, records 13+ page 3-89}

> 
>> not enabled before mapping the collection table using MAPC command.
>> Enable the LPIs using GICR_CTLR.EnableLPIs before mapping the collection
>> table.
>> Signed-off-by: Rahul Singh <[email protected]>
>> ---
>> xen/arch/arm/gic-v3.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
>> index 3c472ed768..8fb0014b16 100644
>> --- a/xen/arch/arm/gic-v3.c
>> +++ b/xen/arch/arm/gic-v3.c
>> @@ -812,11 +812,11 @@ static int gicv3_cpu_init(void)
>> /* If the host has any ITSes, enable LPIs now. */
>> if ( gicv3_its_host_has_its() )
>> {
>> + if ( !gicv3_enable_lpis() )
>> + return -EBUSY;
>> ret = gicv3_its_setup_collection(smp_processor_id());
>> if ( ret )
>> return ret;
>> - if ( !gicv3_enable_lpis() )
>> - return -EBUSY;
> 
> AFAICT, Linux is using the same ordering as your are proposing. It seems to 
> have been introduced from the start, so it is not clear why we chose this 
> approach.

Yes I also confirmed that before sending the patch for review. I think this is 
okay if we enable the enable LPIs before mapping the collection table.
> 
> However, given this works on some HW, can you clarify whether this is 
> mandated by the spec or this is a bug in your HW?


Regards,
Rahul
 

Reply via email to