Re: [PATCH v1] RISC-V: mark hibernation as nonportable

From: Palmer Dabbelt
Date: Wed May 31 2023 - 11:03:59 EST

On Fri, 26 May 2023 11:59:08 +0100, Conor Dooley wrote:
> Hibernation support depends on firmware marking its reserved/PMP
> protected regions as not accessible from Linux.
> The latest versions of the de-facto SBI implementation (OpenSBI) do
> not do this, having dropped the no-map property to enable 1 GiB huge
> page mappings by the kernel.
> This was exposed by commit 3335068f8721 ("riscv: Use PUD/P4D/PGD pages
> for the linear mapping"), which made the first 2 MiB of DRAM (where SBI
> typically resides) accessible by the kernel.
> Attempting to hibernate with either OpenSBI, or other implementations
> following its lead, will lead to a kernel panic ([1], [2]) as the
> hibernation process will attempt to save/restore any mapped regions,
> including the PMP protected regions in use by the SBI implementation.
> [...]

Applied, thanks!

[1/1] RISC-V: mark hibernation as nonportable

Best regards,
Palmer Dabbelt <palmer@xxxxxxxxxxxx>