1 # Quick patch until proper version is upstream, but is safe.
2 # Signed-off-by: Alex Graf - agraf@suse
3 Index: kvm-75/kernel/x86/x86.c
4 ===================================================================
5 --- kvm-75.orig/kernel/x86/x86.c
6 +++ kvm-75/kernel/x86/x86.c
7 @@ -1260,7 +1260,7 @@ static int kvm_vcpu_ioctl_set_cpuid(stru
8 struct kvm_cpuid *cpuid,
9 struct kvm_cpuid_entry *entries)
13 struct kvm_cpuid_entry *cpuid_entries;
16 @@ -1280,8 +1280,17 @@ static int kvm_vcpu_ioctl_set_cpuid(stru
17 vcpu->arch.cpuid_entries[i].ebx = cpuid_entries[i].ebx;
18 vcpu->arch.cpuid_entries[i].ecx = cpuid_entries[i].ecx;
19 vcpu->arch.cpuid_entries[i].edx = cpuid_entries[i].edx;
20 - vcpu->arch.cpuid_entries[i].index = 0;
21 - vcpu->arch.cpuid_entries[i].flags = 0;
22 + switch(vcpu->arch.cpuid_entries[i].function) {
24 + vcpu->arch.cpuid_entries[i].index = n;
25 + vcpu->arch.cpuid_entries[i].flags = KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
29 + vcpu->arch.cpuid_entries[i].index = 0;
30 + vcpu->arch.cpuid_entries[i].flags = 0;
33 vcpu->arch.cpuid_entries[i].padding[0] = 0;
34 vcpu->arch.cpuid_entries[i].padding[1] = 0;
35 vcpu->arch.cpuid_entries[i].padding[2] = 0;