]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Make get_supported_cpuid() returns "const"
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:55 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:20 +0000 (18:14 -0700)
commite90f15c69bd5cd189f356ac07e0abae2022d8aaf
treed710c85b3fb3f1e8dae6a9b81daf4a48b7389ff6
parent3a65fb3cb5e52df4fd8fb7f752a9537ba92b5d5c
KVM: selftests: Make get_supported_cpuid() returns "const"

Tag the returned CPUID pointers from kvm_get_supported_cpuid(),
kvm_get_supported_hv_cpuid(), and vcpu_get_supported_hv_cpuid() "const"
to prevent reintroducing the broken pattern of modifying the static
"cpuid" variable used by kvm_get_supported_cpuid() to cache the results
of KVM_GET_SUPPORTED_CPUID.

Update downstream consumers as needed.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-31-seanjc@google.com
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/cpuid_test.c
tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c
tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c
tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c