|
@@ -327,6 +327,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
|
|
unsigned f_invpcid = kvm_x86_ops->invpcid_supported() ? F(INVPCID) : 0;
|
|
|
unsigned f_mpx = kvm_mpx_supported() ? F(MPX) : 0;
|
|
|
unsigned f_xsaves = kvm_x86_ops->xsaves_supported() ? F(XSAVES) : 0;
|
|
|
+ unsigned f_umip = kvm_x86_ops->umip_emulated() ? F(UMIP) : 0;
|
|
|
|
|
|
/* cpuid 1.edx */
|
|
|
const u32 kvm_cpuid_1_edx_x86_features =
|
|
@@ -473,6 +474,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
|
|
entry->ebx |= F(TSC_ADJUST);
|
|
|
entry->ecx &= kvm_cpuid_7_0_ecx_x86_features;
|
|
|
cpuid_mask(&entry->ecx, CPUID_7_ECX);
|
|
|
+ entry->ecx |= f_umip;
|
|
|
/* PKU is not yet implemented for shadow paging. */
|
|
|
if (!tdp_enabled || !boot_cpu_has(X86_FEATURE_OSPKE))
|
|
|
entry->ecx &= ~F(PKU);
|