]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: Fix a spurious -E2BIG in __do_cpuid_func
authorJim Mattson <jmattson@google.com>
Wed, 25 Sep 2019 18:17:14 +0000 (11:17 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 26 Sep 2019 10:31:30 +0000 (12:31 +0200)
commitcf07ce101f4d0ed3c59a7a66d2481eebd65cf9b6
tree369893c787df8ebb498a44ef98cb7f570c2d4dab
parentad4da876c87703de627efb0b37d117a89b339514
kvm: x86: Fix a spurious -E2BIG in __do_cpuid_func

Don't return -E2BIG from __do_cpuid_func when processing function 0BH
or 1FH and the last interesting subleaf occupies the last allocated
entry in the result array.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Fixes: f39d668c06aa7f ("KVM: Refactor and simplify kvm_dev_ioctl_get_supported_cpuid")
Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Peter Shier <pshier@google.com>
Reviewed-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/cpuid.c