[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 11/13] xen/arm: Save/restore context on suspend/resume
- To: Mykola Kvach <xakep.amatop@xxxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Mon, 27 Apr 2026 15:26:00 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=gmail.com 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=arm.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=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=s4ShT6GvlSujcGQUnL7CVoen9wfpB10+b/cLPUQSSlU=; b=IwyrY6SbjrpydkzdjLarmos67XINQZhDhOw1HsVPc6O7/Fhc2ifatiNyJ5NXSTK/beEq4xJsgVYxktvHB0yHZGI/Yf9Xfj3zt1quLEuxaH3QOFgyTgfQV9HWM4+Z1f/flLD/mqWjf8RaecmD82amJDlBD8KlyTCNVHuyDEYsSpwPdb2A/ENrklNihG1qdBL5ll8SQw6qHrixSjyNG84336YI4OYgGN7P5eY8p1hgA8vacCZxcW9oWoDlyrh8CLYfzr6z70295+eXH3vmIcX4korjJlpptyOTfBy9vch+sYPqKwi6/H9PGB0WeYFsyYGvE3Qu2W5XwilqcCNWAd6kHw==
- 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=s4ShT6GvlSujcGQUnL7CVoen9wfpB10+b/cLPUQSSlU=; b=FrbJVk7qrHZnWIXyxcT2LVbpM2/SHLES/2pSQgD8QcCzAst0bMRje0DTjkkTddSICVr/wuTC2wybCkkBUoCrPrWliuNqeigMF1RCeOi5SqSsrcE5ITPqy2Dc/EQ++RMH0sr5WDGYHlMrOp78sVWbvLaGbwUfDVcg2B9nVH7HxJ6WBPz+dtOd9PDTzKrNS/Ygwe5vhTfj0zn6MnlkngfcoDH7MYdWrjTbvIKnwrcvhBku6WG8J+Z0EMFXpFJl4/mfpUMKc9l1xdxV9u/0ZNHaVcbSjW4GP7lfJQVmnqELskXQ/vNNnPI3yYXgqsHwnSLaLeMpPTsr/phTv8uPL+BVqA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=hzNBD8tbCo75YoFLpEFLN0s0MAso36PZKZs7oZtKbTeKkyWdeNTQvYXLvep48AS4ZXW3ibRP73hT9i2zCUTr2sxsbpsA/4xYIGsDJNQRlS2AAIzvQeiTPA081bo6CpcBfW+YPUSo4JKPDDJl4C/TDeVLnfOQeQuweu2YVMtw+zTjAr4Fu5jrkcJ4G+WJ3Nh374M/mjRh7WYzkfxEyMT5radZu1OzEb5veIZRYthbR1Rt9HGCM1Nc7ZoOXuqoCiPmsdkZo8MR6+e3GbQUip7b/9dw3z4ABjIyptSq3v8c9ajpIp1GbmbRvXBbP3v3TfZX0IsPD1YD/eEenoeJR6X6yQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UghylKoLGh0KDuIrnxyhTdfkXidFPmVP9XrB/67KdPmzBSGzmtB94/ZXEqiPwJmIAx1XDNQtNip3/BE3wQ6+1fP+01FkCPQPh0ihnn6V12zQPqtBM9oueN3MpNlTLWyEyOlIMt4qwziPvkEwI5ytNHNkZrkctSMOBUfR3U4rXOhar/GnZqgcAz3MNo1B0/dfl/fZjjgQMu4ys4t+NVlRUfpnEosqSa1VZd96htG6ZES515Z/1mTqpPtdZ4Xh0FS5Q/QjbQhfPCr3PG753V+yrwFMEZ53HC1cVrtOWp3LGPbDjWWKiLVctv839rKAeRFzFYJ4WWiEh/7aUspw5ZF8wg==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"; dkim=pass header.s=selector1 header.d=arm.com header.i="@arm.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Mykola Kvach <mykola_kvach@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Mon, 27 Apr 2026 15:27:20 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHc1lonfl/HZr0bRU6yMGs4M1GHKA==
- Thread-topic: [PATCH v8 11/13] xen/arm: Save/restore context on suspend/resume
Hi Mykola,
> On 2 Apr 2026, at 11:45, Mykola Kvach <xakep.amatop@xxxxxxxxx> wrote:
>
> From: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>
>
> The context of CPU general purpose and system control registers must be
> saved on suspend and restored on resume. This is implemented in
> prepare_resume_ctx and before the return from the hyp_resume function.
> The prepare_resume_ctx must be invoked just before the PSCI system suspend
> call is issued to the ATF. The prepare_resume_ctx must return a non-zero
> value so that the calling 'if' statement evaluates to true, causing the
> system suspend to be invoked. Upon resume, the context saved on suspend
> will be restored, including the link register. Therefore, after
> restoring the context, the control flow will return to the address
> pointed to by the saved link register, which is the place from which
> prepare_resume_ctx was called. To ensure that the calling 'if' statement
> does not again evaluate to true and initiate system suspend, hyp_resume
> must return a zero value after restoring the context.
>
> Note that the order of saving register context into cpu_context structure
> must match the order of restoring.
>
> Support for ARM32 is not implemented. Instead, compilation fails with a
> build-time error if suspend is enabled for ARM32.
>
> Signed-off-by: Mirela Simonovic <mirela.simonovic@xxxxxxxxxx>
> Signed-off-by: Saeed Nowshadi <saeed.nowshadi@xxxxxxxxxx>
> Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
> Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
> ---
This patch looks ok to me, I’ll leave my R-by when maintainers will give an
opinion
about squashing this one with the previous one.
Cheers,
Luca
|