summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/cpuid.c
diff options
context:
space:
mode:
authorAaron Lewis <aaronlewis@google.com>2023-04-04 17:45:20 -0700
committerSean Christopherson <seanjc@google.com>2023-04-11 10:19:04 -0700
commit03a405b7a522700a654b79903312d0a305bdce0d (patch)
treed6a0674e82ca4c025eee173e478c589c9623a8d3 /arch/x86/kvm/cpuid.c
parent28f2302584af8ed60e2108bf40762a5c40ecb372 (diff)
downloadlinux-stable-03a405b7a522700a654b79903312d0a305bdce0d.tar.gz
linux-stable-03a405b7a522700a654b79903312d0a305bdce0d.tar.bz2
linux-stable-03a405b7a522700a654b79903312d0a305bdce0d.zip
KVM: selftests: Add test to verify KVM's supported XCR0
Check both architectural rules and KVM's ABI for KVM_GET_SUPPORTED_CPUID to ensure the supported xfeatures[1] don't violate any of them. The architectural rules[2] and KVM's contract with userspace ensure for a given feature, e.g. sse, avx, amx, etc... their associated xfeatures are either all sets or none of them are set, and any dependencies are enabled if needed. [1] EDX:EAX of CPUID.(EAX=0DH,ECX=0) [2] SDM vol 1, 13.3 ENABLING THE XSAVE FEATURE SET AND XSAVE-ENABLED FEATURES Cc: Mingwei Zhang <mizhang@google.com> Signed-off-by: Aaron Lewis <aaronlewis@google.com> [sean: expand comments, use a fancy X86_PROPERTY] Reviewed-by: Aaron Lewis <aaronlewis@google.com> Tested-by: Aaron Lewis <aaronlewis@google.com> Link: https://lore.kernel.org/r/20230405004520.421768-7-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'arch/x86/kvm/cpuid.c')
0 files changed, 0 insertions, 0 deletions