KVM: x86: Add reverse-CPUID lookup support for scattered SGX features
authorSean Christopherson <seanjc@google.com>
Mon, 12 Apr 2021 04:21:36 +0000 (16:21 +1200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Apr 2021 08:18:54 +0000 (04:18 -0400)
commit01de8682b32d3ed4f0136f7379e1e3ae2e563308
treecdc0e3ea7624771619e055e6fb8751d6960ff875
parent4e66c0cb79b732b01b82e094b21b8e22a20dff83
KVM: x86: Add reverse-CPUID lookup support for scattered SGX features

Define a new KVM-only feature word for advertising and querying SGX
sub-features in CPUID.0x12.0x0.EAX.  Because SGX1 and SGX2 are scattered
in the kernel's feature word, they need to be translated so that the
bit numbers match those of hardware.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Kai Huang <kai.huang@intel.com>
Message-Id: <e797c533f4c71ae89265bbb15a02aef86b67cbec.1618196135.git.kai.huang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.h