void (*set_tdp_cr3)(struct kvm_vcpu *vcpu, unsigned long cr3);
- void (*set_supported_cpuid)(struct kvm_cpuid_entry2 *entry);
-
bool (*has_wbinvd_exit)(void);
u64 (*read_l1_tsc_offset)(struct kvm_vcpu *vcpu);
cpuid_entry_override(entry, CPUID_8000_0008_EBX);
break;
}
+ case 0x8000000A:
+ if (!kvm_cpu_cap_has(X86_FEATURE_SVM)) {
+ entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
+ break;
+ }
+ entry->eax = 1; /* SVM revision 1 */
+ entry->ebx = 8; /* Lets support 8 ASIDs in case we add proper
+ ASID emulation to nested SVM */
+ entry->ecx = 0; /* Reserved */
+ cpuid_entry_override(entry, CPUID_8000_000A_EDX);
+ break;
case 0x80000019:
entry->ecx = entry->edx = 0;
break;
break;
}
- kvm_x86_ops->set_supported_cpuid(entry);
-
r = 0;
out:
APICV_INHIBIT_REASON_NESTED);
}
-static void svm_set_supported_cpuid(struct kvm_cpuid_entry2 *entry)
-{
- switch (entry->function) {
- case 0x8000000A:
- if (!kvm_cpu_cap_has(X86_FEATURE_SVM)) {
- entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
- break;
- }
- entry->eax = 1; /* SVM revision 1 */
- entry->ebx = 8; /* Lets support 8 ASIDs in case we add proper
- ASID emulation to nested SVM */
- entry->ecx = 0; /* Reserved */
- cpuid_entry_override(entry, CPUID_8000_000A_EDX);
- break;
- }
-}
-
static bool svm_has_wbinvd_exit(void)
{
return true;
.cpuid_update = svm_cpuid_update,
- .set_supported_cpuid = svm_set_supported_cpuid,
-
.has_wbinvd_exit = svm_has_wbinvd_exit,
.read_l1_tsc_offset = svm_read_l1_tsc_offset,
}
}
-static void vmx_set_supported_cpuid(struct kvm_cpuid_entry2 *entry)
-{
-}
-
static __init void vmx_set_cpu_caps(void)
{
kvm_set_cpu_caps();
.get_exit_info = vmx_get_exit_info,
.cpuid_update = vmx_cpuid_update,
- .set_supported_cpuid = vmx_set_supported_cpuid,
.has_wbinvd_exit = cpu_has_vmx_wbinvd_exit,