lkml.org 
[lkml]   [2024]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/sev: Apply RMP table fixups for kexec.
On 4/2/24 09:45, bp@kernel.org wrote:
> From: Borislav Petkov <bp@alien8.de>
>
> On Tue, Mar 12, 2024 at 06:47:57PM +0000, Ashish Kalra wrote:
>> From: Ashish Kalra <ashish.kalra@amd.com>
>>
>> RMP table start and end physical range may not be aligned to 2MB in
>> the e820 tables
>
> This already sounds fishy. Why may the range not be aligned? This is
> BIOS, right? And BIOS can be fixed to align them properly.

There's no requirement from a hardware/RMP usage perspective that
requires a 2MB alignment, so BIOS is not doing anything wrong. The
problem occurs because kexec is initially using 2MB mappings that
overlap the start and/or end of the RMP which then results in an RMP
fault when memory within one of those 2MB mappings, that is not part of
the RMP, is referenced.

Additionally, we have BIOSes out there since Milan that don't do this
2MB alignment. And do you really trust that BIOS will do this properly
all the time?

I think it needs to be checked and mitigated in the kernel.

Thanks,
Tom

>

\
 
 \ /
  Last update: 2024-05-27 16:19    [W:0.116 / U:1.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site