Skip to content

x86/sev: Fix SNP host late disable

Borislav Petkov kvm lkml 1 version Applied

Status from this message: The following commit has been merged into the x86/urgent branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 12 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5x86/alternatives: Remove a superfluous newline in _static_cpu_has()arch/x86/include/asm/cpufeature.h+1 -20 replies
2/5x86/alternatives: Catch late X86_FEATURE modifiersarch/x86/include/asm/cpufeature.h arch/x86/kernel/cpu/cpuid-deps.c+9 -22 replies
3/5x86/kvm/Kconfig: Have KVM_AMD_SEV select ARCH_HAS_CC_PLATFORMarch/x86/kvm/Kconfig+1 -01 reply
4/5x86/cc: Add cc_platform_set/_clear() helpersarch/x86/coco/core.c include/linux/cc_platform.h+64 -01 reply
5/5x86/CPU/AMD: Track SNP host status with cc_platform_*()arch/x86/include/asm/sev.h arch/x86/kernel/cpu/amd.c arch/x86/kernel/cpu/mtrr/generic.c +5 more+49 -397 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchTom LendackySrikanth Aithal
SeriesT-b
1/5
2/5
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] x86/sev: Fix SNP host late disable

From: "Borislav Petkov (AMD)" <[email protected]>

Hi,

the intention to track SNP host status with the CPU feature bit X86_FEATURE_SEV_SNP was all fine and dandy but that can't work if stuff needs to be disabled late, after alternatives patching - see patch 5.

Therefore, convert the SNP status tracking to a cc_platform*() bit.

The first two are long overdue cleanups.

If no objections, 3-5 should go in now so that 6.9 releases fixed.

Thx.

Borislav Petkov (AMD) (5):
x86/alternatives: Remove a superfluous newline in _static_cpu_has() x86/alternatives: Catch late X86_FEATURE modifiers x86/kvm/Kconfig: Have KVM_AMD_SEV select ARCH_HAS_CC_PLATFORM x86/cc: Add cc_platform_set/_clear() helpers x86/CPU/AMD: Track SNP host status with cc_platform_*()

 arch/x86/coco/core.c               | 52 ++++++++++++++++++++++++++++++
 arch/x86/include/asm/cpufeature.h  | 11 ++++---
 arch/x86/include/asm/sev.h         |  4 +--
 arch/x86/kernel/cpu/amd.c          | 38 +++++++++++++---------
 arch/x86/kernel/cpu/cpuid-deps.c   |  3 ++
 arch/x86/kernel/cpu/mtrr/generic.c |  2 +-
 arch/x86/kernel/sev.c              | 10 ------
 arch/x86/kvm/Kconfig               |  1 +
 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 ++-
 include/linux/cc_platform.h        | 12 +++++++
 13 files changed, 124 insertions(+), 43 deletions(-)
Signature · 1 line
2.43.0