Re: [PATCH] x86/sev: Do RMP memory coverage check after max_pfn has been set

From: Liam Merwick
Date: Thu Jun 06 2024 - 09:10:02 EST


On 05/06/2024 16:38, Tom Lendacky wrote:
> The RMP table is probed early in the boot process before max_pfn has been
> set, so the logic to check if the RMP covers all of system memory is not
> valid.
>
> Move the RMP memory coverage check from snp_probe_rmptable_info() into
> snp_rmptable_init(), which is well after max_pfn has been set.
>
> Fixes: 216d106c7ff7 ("x86/sev: Add SEV-SNP host initialization support")
> Signed-off-by: Tom Lendacky <thomas.lendacky@xxxxxxx>

Reviewed-by: Liam Merwick <liam.merwick@xxxxxxxxxx>


> ---
> arch/x86/virt/svm/sev.c | 45 ++++++++++++++++++++---------------------
> 1 file changed, 22 insertions(+), 23 deletions(-)
>