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

Re: [PATCH] xen/char: implement suspend/resume calls for SCIF driver


  • To: Julien Grall <julien@xxxxxxx>, Mykola Kvach <xakep.amatop@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Fri, 28 Mar 2025 10:13:45 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=KsHSJJaOKk4neO7+xXGCJ1G+n7FINOVR8E0/e0L7Yz4=; b=tnWZcJew6HD42nmISJP0EFaoCYPG+HjmT7v0FNhYr6UxMWczwSC8O4exyMZvFHy3aozZkxtbVdDtDDLaJc0j6FYJxFyE5EVW7w4U8EWPt8zTZwZQkR2ObKvFgaMX+yy5cmmL45W54wYIB0DZamWLYm0tEt653vfNuHloRF/8RLiAkbpvCKzC1ei67+vWxIR6KUECGubBHS9VXQKdCkSXkhdh22AptbhdJ3Sp/ygu0Umbl5FTV3xoONOUuN5QW/g+d4Wfdxf7w4XLZq2GF9bF850HPf6EZRZ1a0vZ4bV2PrSmGvR0WUa0O7r4fdZ8O69WSw8Aj3JGBK67zOgks6xvXw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FXQ5FQS35hCZKVEAFWaQKCWhvy5gtp7k9uRZnkRYRWusO8t+BGrHfXz+ataNXKmD/BZE8pJRXrtPpJ5E8u3ia5Vq1aCZ9f/YCgbSik1GVf/D5dkkESFTZN0oblrOs+1U0TVRlzFOdc96aHi6Ng4mwE99f2w84IHd7GzEiEtf2y1WIApjjxQk4wmYv8Effi4Zf3BxtyZeOY6kVmBE67B6kYTopOtSF4+M9nSKPxeFAt8W5xFwx3aYAr4mLfEuCK2wC9LpohcWamDE1Vxvhu01ktMAjVjMT/aU8VRZRc0GkSktkvVlddi0dVFM6AnrSF7YPmIe2rfwE5Ahrc2YtGpTIQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, Mykola Kvach <mykola_kvach@xxxxxxxx>
  • Delivery-date: Fri, 28 Mar 2025 09:13:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 28/03/2025 09:57, Julien Grall wrote:
> 
> 
> Hi Michal,
> 
> On 28/03/2025 08:39, Orzel, Michal wrote:
>>
>>
>> On 28/03/2025 08:08, Mykola Kvach wrote:
>>>
>>>
>>> From: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
>>>
>>> The changes have been tested only on the Renesas R-Car H3 Starter Kit board.
>>>
>>> Signed-off-by: Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>
>>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>
>>> Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
>> I'm afraid that without a suspend feature on Arm merged, this is just
>> introducing a dead code which we try to eliminate both for MISRA and safety.
>> I'd prefer to wait for the suspend feature to be merged first.
> 
> This patch is not different from the ns16550 driver which already have
> suspend/resume callback and users. They will be used by but the caller
> is not used on Arm yet. So you are saying the code there is not MISRA
> compliant? If so, is this reported by ECLAIR?
NS also works for x86 that has suspend feature. SCIF only works for Arm that
does not have suspend feature.
Neither NS nor SCIF are enabled in ECLAIR.
We have enabled MISRA 2.1 rule about unreachable code (suspend is example of
unreachable because it *cannot* be executed), but it's not clean i.e. gating.

> 
> Regardless that, I don't think the full suspend/resume series would
> help. AFAIR, the caller will be protected with a config (SUSPEND
> something). So IIUC your definition, this code will still be "dead code"
> in certain config. Therefore are you suggesting to protect everything
> suspend specific code with SUSPEND?
I'd say so, yes.

> 
> If the answer is yes, how about introducing the SUSPEND config now? This
> would allow to get some of the code merged in advance.
Better this than nothing. But in case of this patch, why would we take it anyway
without suspend feature? I'd prefer to add SUSPEND config and protect existing
code i.e. NS that can work on x86 but not on Arm, etc.

~Michal




 


Rackspace

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