diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 58f517b59645..4a1ba05f7af3 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2395,9 +2395,9 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function, | |||
2395 | int i; | 2395 | int i; |
2396 | 2396 | ||
2397 | entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX; | 2397 | entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX; |
2398 | for (i = 1; *nent < maxnent; ++i) { | 2398 | for (i = 1; *nent < maxnent && i < 64; ++i) { |
2399 | if (entry[i - 1].eax == 0 && i != 2) | 2399 | if (entry[i].eax == 0) |
2400 | break; | 2400 | continue; |
2401 | do_cpuid_1_ent(&entry[i], function, i); | 2401 | do_cpuid_1_ent(&entry[i], function, i); |
2402 | entry[i].flags |= | 2402 | entry[i].flags |= |
2403 | KVM_CPUID_FLAG_SIGNIFCANT_INDEX; | 2403 | KVM_CPUID_FLAG_SIGNIFCANT_INDEX; |