提交 695538aa 编写于 作者: S Sean Christopherson 提交者: Paolo Bonzini

KVM: x86: Drop redundant array size check

Drop a "nent >= maxnent" check in kvm_get_cpuid() that's fully redundant
now that kvm_get_cpuid() isn't indexing the array to pass an entry to
do_cpuid_func().
Reviewed-by: NVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
上级 e53c95e8
......@@ -844,9 +844,6 @@ static int get_cpuid_func(struct kvm_cpuid_array *array, u32 func,
limit = array->entries[array->nent - 1].eax;
for (func = func + 1; func <= limit; ++func) {
if (array->nent >= array->maxnent)
return -E2BIG;
r = do_cpuid_func(array, func, type);
if (r)
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册