diff options
author | Brijesh Singh <[email protected]> | 2017-12-04 10:57:25 -0600 |
---|---|---|
committer | Brijesh Singh <[email protected]> | 2017-12-04 10:57:25 -0600 |
commit | 8765d75329a386dd7742f94a1ea5fdcdea8d93d0 (patch) | |
tree | f0f2c9a7d56aeeecd2efba8f2ba70c842c51e92d /arch/x86/kvm/svm.c | |
parent | 4faefff3241e02dd66bfb77bd7ca40f3aa08f62e (diff) |
KVM: X86: Extend CPUID range to include new leaf
This CPUID leaf provides the memory encryption support information on
AMD Platform. Its complete description is available in APM volume 2,
Section 15.34
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: "Radim Krčmář" <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Tom Lendacky <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Borislav Petkov <[email protected]>
Signed-off-by: Brijesh Singh <[email protected]>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e403cf1f6ba3..7e302a25bc45 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -5170,6 +5170,12 @@ static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry) entry->edx |= SVM_FEATURE_NPT; break; + case 0x8000001F: + /* Support memory encryption cpuid if host supports it */ + if (boot_cpu_has(X86_FEATURE_SEV)) + cpuid(0x8000001f, &entry->eax, &entry->ebx, + &entry->ecx, &entry->edx); + } } |