KVM: Add cpuid_update() callback to kvm_x86_ops
Sometime, we need to adjust some state in order to reflect guest CPUID setting, e.g. if we don't expose rdtscp to guest, we won't want to enable it on hardware. cpuid_update() is introduced for this purpose. Also export kvm_find_cpuid_entry() for later use. Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:

committed by
Marcelo Tosatti

parent
be43f83dad
commit
0e85188049
@@ -2852,6 +2852,10 @@ static u64 svm_get_mt_mask(struct kvm_vcpu *vcpu, gfn_t gfn, bool is_mmio)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void svm_cpuid_update(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
}
|
||||
|
||||
static const struct trace_print_flags svm_exit_reasons_str[] = {
|
||||
{ SVM_EXIT_READ_CR0, "read_cr0" },
|
||||
{ SVM_EXIT_READ_CR3, "read_cr3" },
|
||||
@@ -2976,6 +2980,8 @@ static struct kvm_x86_ops svm_x86_ops = {
|
||||
|
||||
.exit_reasons_str = svm_exit_reasons_str,
|
||||
.gb_page_enable = svm_gb_page_enable,
|
||||
|
||||
.cpuid_update = svm_cpuid_update,
|
||||
};
|
||||
|
||||
static int __init svm_init(void)
|
||||
|
Reference in New Issue
Block a user