lkml.org 
[lkml]   [2024]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 5/5] x86/CPU/AMD: Track SNP host status with cc_platform_*()
From
On 3/27/24 10:43, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <bp@alien8.de>
>
> The host SNP worthiness can determined later, after alternatives have
> been patched, in snp_rmptable_init() depending on cmdline options like
> iommu=pt which is incompatible with SNP, for example.
>
> Which means that one cannot use X86_FEATURE_SEV_SNP and will need to
> have a special flag for that control.
>
> Use that newly added CC_ATTR_HOST_SEV_SNP in the appropriate places.
>
> Move kdump_sev_callback() to its rightfull place, while at it.
>
> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>

If late disabling of CPU feature flags is ever supported in the future, we
should come back and possibly remove this. But until then...

Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>

> ---
> arch/x86/include/asm/sev.h | 4 ++--
> arch/x86/kernel/cpu/amd.c | 38 ++++++++++++++++++------------
> arch/x86/kernel/cpu/mtrr/generic.c | 2 +-
> arch/x86/kernel/sev.c | 10 --------
> arch/x86/kvm/svm/sev.c | 2 +-
> arch/x86/virt/svm/sev.c | 26 +++++++++++++-------
> drivers/crypto/ccp/sev-dev.c | 2 +-
> drivers/iommu/amd/init.c | 4 +++-
> 8 files changed, 49 insertions(+), 39 deletions(-)
>

\
 
 \ /
  Last update: 2024-05-27 16:15    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog