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

Re: [PATCH] arm/its: enable LPIs before mapping the collection table


  • To: Julien Grall <julien@xxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Thu, 28 Apr 2022 10:00:05 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q28z8uYe4B+DUst1RH+487OG7SWT8BA/xjb2pd1xLvs=; b=QoZfKJMQ+6RBhG5hlyxX4nUrL8W1l0XQTneBGITgbskJ7BzCT/mXdRidQGFkQdEEAyDsjMxP8eepO6TjZ/PxmNJLclfBxP22ESf/cxBbt+7UfLsNiieVb0x3xrk35h5BPoMW6kmoAo7/Dmh/d6XiNErK+8xh0MprHhoCX8uxyHj1AwQ0SeEU53RPwDzidPqUh+7hitOgkpIUmiE9FN3RAIoKkimvlTmKLfnazATnIpfFWMU3ww5OomVjCy8YDXNVKK7rfAaxMwyeebuoJtWDaTBvCr1W7OrCk1y8pnr/E7aVJDufnoXQrg7iPNT3bzjHaaCUV1qMxYtpDRmvPGxYrw==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Q28z8uYe4B+DUst1RH+487OG7SWT8BA/xjb2pd1xLvs=; b=PFH84WHrTaU3s5WH5dTa4oUeqiV5vgKXunV/V/rdYCPa3lczNqYiWzsf2arLuwzD3s6fxymBi2qg/GflIP61GB+KN/3MxvsqZT5dcYH8pg9MgNmPqDH8O3qp6uIqe2ovgkgRb9YpUYgJLwF4RGI1tI7WdEGHax5lmXK3es0RdsBQe85OCm07sjOCPwAQw1vcOY/iBvbgXHyoYJCjcaj2Q/Ed85efaeVVDoT75xgCvEqP2HeyUk6tHGe6NYjcdHsieStceM9hDTXhk4hNr0ahUdab9q4IG126HG/zj5wKxTu6rD978g6oG3CYERHaudjCiYWWjWETg8fU8+EnqpRVQg==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=O/coY/XWyR1R71Ak1ErV4HhhBvn/wRHmtMks3+AIg8t/EQBk94DgEmLAGZZwfMNXgxCb8TKvQBMeoTWHFabcBKTV9MLEx5gZX8B9IK5sp9VoDeIVimKVSkPLIIdEReVGc6lrnZIcCmxz0s7xC0ftLO2479cLwqLyZKQCFMyE0O8L+yV6cgtR2nMweah9gh5AttXaZnl5hF7xGqPg+kYA3kKBypUZbXhp+uJwnSi6zLlZON5dXa+kbbaJ8krz180IGCTfBpqC5toElWjVriX5tgME/NWFY78uSd3M4MnTpHPYnhjQrUO9gOXfJ8fNCaeBaLje3OFy4I8603EVbJPmdQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dAkTW5dDGWYPlIuqAdKVkXXsaCzjVFWuzQEvqSiFS7ArzfCa+rG/cHhYuxqnY7kcJE4yZrkq8aNvCCY6e1IWeS8TWtnzKfXNMGos4LORQVKH/nfWLHRy0Oqmcka5pRdiLhLi5MVUwygJlh7gcVczoCbxpCb07mbgIB8Z4yWCcbqq0fZx8TC/A/+WHvusVpFUAsPmgujCZO3FM1R8gOUfl6EJrFwFSIq44U28yCiOdgV/1zEeJrEsJ/hFq7rgV9BtYxL/GmLqUenXWxJgpwdtpDP+r4oguerVkVmS6lWRkf3OzGSrqEnzY65L8idnIxTl8g037+UXzetOmqyzxhkHGw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 28 Apr 2022 10:00:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYWlHsf41jIOfeQ0mX6M++noloAq0EDIIAgAEMUAA=
  • Thread-topic: [PATCH] arm/its: enable LPIs before mapping the collection table

Hi Julien,

> On 27 Apr 2022, at 6:59 pm, Julien Grall <julien@xxxxxxx> 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 <rahul.singh@xxxxxxx>
>> ---
>> 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
 


 


Rackspace

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