Commit 8765d753 authored by Brijesh Singh's avatar Brijesh Singh
Browse files

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 <>
Cc: Ingo Molnar <>
Cc: "H. Peter Anvin" <>
Cc: Paolo Bonzini <>
Cc: "Radim Krčmář" <>
Cc: Joerg Roedel <>
Cc: Borislav Petkov <>
Cc: Tom Lendacky <>
Reviewed-by: default avatarBorislav Petkov <>
Signed-off-by: default avatarBrijesh Singh <>
parent 4faefff3
......@@ -604,7 +604,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
entry->edx = 0;
case 0x80000000:
entry->eax = min(entry->eax, 0x8000001a);
entry->eax = min(entry->eax, 0x8000001f);
case 0x80000001:
entry->edx &= kvm_cpuid_8000_0001_edx_x86_features;
......@@ -5170,6 +5170,12 @@ static void svm_set_supported_cpuid(u32 func, struct kvm_cpuid_entry2 *entry)
entry->edx |= SVM_FEATURE_NPT;
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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment