Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185949
b: refs/heads/master
c: 0e85188
h: refs/heads/master
i:
  185947: f4ee821
v: v3
  • Loading branch information
Sheng Yang authored and Marcelo Tosatti committed Mar 1, 2010
1 parent 5e75c90 commit d438530
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: be43f83dada2cf0e9e01c9a0ba42977c5bd70f9d
refs/heads/master: 0e85188049afacdfce9c026144142264981bbabb
1 change: 1 addition & 0 deletions trunk/arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ struct kvm_x86_ops {
int (*hardware_setup)(void); /* __init */
void (*hardware_unsetup)(void); /* __exit */
bool (*cpu_has_accelerated_tpr)(void);
void (*cpuid_update)(struct kvm_vcpu *vcpu);

/* Create, but do not attach this VCPU */
struct kvm_vcpu *(*vcpu_create)(struct kvm *kvm, unsigned id);
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3988,6 +3988,10 @@ static bool vmx_gb_page_enable(void)
return false;
}

static void vmx_cpuid_update(struct kvm_vcpu *vcpu)
{
}

static struct kvm_x86_ops vmx_x86_ops = {
.cpu_has_kvm_support = cpu_has_kvm_support,
.disabled_by_bios = vmx_disabled_by_bios,
Expand Down Expand Up @@ -4052,6 +4056,8 @@ static struct kvm_x86_ops vmx_x86_ops = {

.exit_reasons_str = vmx_exit_reasons_str,
.gb_page_enable = vmx_gb_page_enable,

.cpuid_update = vmx_cpuid_update,
};

static int __init vmx_init(void)
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/x86/kvm/x86.c
Original file line number Diff line number Diff line change
Expand Up @@ -1574,6 +1574,7 @@ static int kvm_vcpu_ioctl_set_cpuid(struct kvm_vcpu *vcpu,
cpuid_fix_nx_cap(vcpu);
r = 0;
kvm_apic_set_version(vcpu);
kvm_x86_ops->cpuid_update(vcpu);

out_free:
vfree(cpuid_entries);
Expand All @@ -1596,6 +1597,7 @@ static int kvm_vcpu_ioctl_set_cpuid2(struct kvm_vcpu *vcpu,
goto out;
vcpu->arch.cpuid_nent = cpuid->nent;
kvm_apic_set_version(vcpu);
kvm_x86_ops->cpuid_update(vcpu);
return 0;

out:
Expand Down Expand Up @@ -3733,6 +3735,7 @@ struct kvm_cpuid_entry2 *kvm_find_cpuid_entry(struct kvm_vcpu *vcpu,
}
return best;
}
EXPORT_SYMBOL_GPL(kvm_find_cpuid_entry);

int cpuid_maxphyaddr(struct kvm_vcpu *vcpu)
{
Expand Down

0 comments on commit d438530

Please sign in to comment.