mbox series

[v3,0/2] x86/cpufeatures: KVM: Add mem encrypt word

Message ID 20210122204047.2860075-1-seanjc@google.com (mailing list archive)
Headers show
Series x86/cpufeatures: KVM: Add mem encrypt word | expand

Message

Sean Christopherson Jan. 22, 2021, 8:40 p.m. UTC
Gather the AMD memory encryption features into a dedicated word for CPUID
0x8000001F[EAX] and use the new word in KVM to adjust its reporting of SEV
support based on host kernel enabling.

Paolo, can you ack patch 2?  Boris is planning on taking this through the
tip tree.  Thanks!

Split out from a larger KVM SEV cleanup series[*], thus the somewhat
questionable v3 tag.

Based on v5.11-rc4.

[*] https://lkml.kernel.org/r/20210114003708.3798992-1-seanjc@google.com

Sean Christopherson (2):
  x86/cpufeatures: Assign dedicated feature word for
    CPUID_0x8000001F[EAX]
  KVM: x86: Override reported SME/SEV feature flags with host mask

 arch/x86/include/asm/cpufeature.h              |  7 +++++--
 arch/x86/include/asm/cpufeatures.h             | 17 +++++++++++------
 arch/x86/include/asm/disabled-features.h       |  3 ++-
 arch/x86/include/asm/required-features.h       |  3 ++-
 arch/x86/kernel/cpu/common.c                   |  3 +++
 arch/x86/kernel/cpu/scattered.c                |  5 -----
 arch/x86/kvm/cpuid.c                           |  2 ++
 arch/x86/kvm/cpuid.h                           |  1 +
 tools/arch/x86/include/asm/disabled-features.h |  3 ++-
 tools/arch/x86/include/asm/required-features.h |  3 ++-
 10 files changed, 30 insertions(+), 17 deletions(-)