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

Re: [PATCH 06/16] xen/arm: Introduce system suspend config option


  • To: Mykola Kvach <xakep.amatop@xxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
  • Date: Fri, 21 Mar 2025 16:58:09 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=4fL02CPPC+ReMQnElTXUam8KEi+iC8iHcAIwmx4keyw=; b=aFYj84vqY2at6hB5Dgq2HUSMSACURHIcS8yMeY24uyCuoj9L2XyXF8Vfs63m9hfox4zE6bRulWHSDg/JupB+CthzW9hZqjZELH3ecCNFvfvW4UCrvjtXhoYFXEqsNB7p4En1f3nIX3pmYXzs3FGw4IVOWOMZjCJECtz4iTvzpeumUr69+9Lm3f1G3yz5Ee2aEjbB6aBrmxZTgpSB9KXxBtHLuhFKySq7ps7ci+ZFxF8G58slk25f6yvw4N+SfrXSY/BQOdeSFQWaLJxRI54+NuFaEdvTiS53A6LiU+BwmuP/NEumfqR0hgWTbvWmnC5jcVBg5vA3C8m+bQxPQnY+PQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sRvcBHr2B7AlXa7wwwzP7cNVva2AVJ6TTEB7YWkk+69YGn0xOLFdysMbfLWR7fPpewnlkGOXaG5UHR2WjKkqm2/0dauK43pUn55B+JeByuEd2rG7EmP/ASRUkyyEDCRfXEuo9nmlA71frYI9SYuQTHN/wasRyfZLcf9gwYUInIy/HbJ+MjuvnB/VGPtT/Ioa2JhINghI/OPomIkf7BWTGYDs1vNJJi4p86KoqY8E7YasejQS4O1lx7kZ94W3omDCx5oU5HygYhJELHed10sydnvKi6y8SRV7e2HNChVkeCNXoEB1GLqdeQ7awY3XXppXkGYIDm1rZUpi0Ug/3YijQQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Mykola Kvach <mykola_kvach@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Mykyta Poturai <mykyta_poturai@xxxxxxxx>
  • Delivery-date: Fri, 21 Mar 2025 14:58:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 21.03.25 11:48, Mykola Kvach wrote:
Hi,

On Wed, Mar 12, 2025 at 12:29 AM Julien Grall <julien@xxxxxxx> wrote:

Hi,

On 05/03/2025 09:11, Mykola Kvach wrote:
From: Mykola Kvach <mykola_kvach@xxxxxxxx>

This option enables the system suspend support. This is the
mechanism that allows the system to be suspended to RAM and
later resumed.

Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
---
   xen/arch/arm/Kconfig | 11 +++++++++++
   1 file changed, 11 insertions(+)

diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
index a26d3e1182..5834af16ab 100644
--- a/xen/arch/arm/Kconfig
+++ b/xen/arch/arm/Kconfig
@@ -475,6 +475,17 @@ config ARM64_HARDEN_BRANCH_PREDICTOR
   config ARM32_HARDEN_BRANCH_PREDICTOR
       def_bool y if ARM_32 && HARDEN_BRANCH_PREDICTOR

+config SYSTEM_SUSPEND
+     bool "System suspend support"
+     default y

The default should likely be no until everything is working.

got it!


+     depends on ARM_64

I think this also needs to depends on !LLC_COLORING (unless you
confirmed cache coloring is working) and UNSUPPORTED.

Sure! I'll add the dependency.


+     help
+       This option enables the system suspend support. This is the
+       mechanism that allows the system to be suspended to RAM and
+       later resumed.

You seem to also tie guest suspend/resunme to this option. Is it intended?

 From the guest's perspective, it is a system suspend. However, it looks like 
the
description should be enhanced. Thank you for pointing that out.

s2r = "suspend to ram"

You definitely need consider and clarify ARM64 Guest System s2r and
XEN system s2r. First can be supported without second, while the XEN system s2r
depends on Guests System s2r support and required guests to be properly 
suspended
before allowing XEN to enter system s2r.

You can't call freeze_domains() and blindly pause some domain, because if it's 
not
suspend and has passed through HW which is in the middle of transaction -> 
DEADBEEF.

--
Best regards,
-grygorii



 


Rackspace

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