]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Don't use a static local in vcpu_get_supported_hv_cpuid()
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:44 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:15 +0000 (18:14 -0700)
commit6d6844f8fe65a990da865846b7762259150e0e56
tree8b0985ccb850d44cbddf637dd368c9eb66b92c59
parent20694b60d7df6b38ed786809600fb4c9d8f41a96
KVM: selftests: Don't use a static local in vcpu_get_supported_hv_cpuid()

Don't use a static variable for the Hyper-V supported CPUID array, the
helper unconditionally reallocates the array on every invocation (and all
callers free the array immediately after use).  The array is intentionally
recreated and refilled because the set of supported CPUID features is
dependent on vCPU state, e.g. whether or not eVMCS has been enabled.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-20-seanjc@google.com
tools/testing/selftests/kvm/lib/x86_64/processor.c