diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-14 23:06:51 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2022-07-14 04:14:18 +0300 |
commit | 4dcd130c9b3d64464b5c44aba071203095f77e63 (patch) | |
tree | e3af287190a6b027bf97267912c22b02fc0142be /tools/testing/selftests/kvm/lib | |
parent | 3a5d36b32bd26d88d8dfe8f1eff702e138ea18cd (diff) | |
download | linux-4dcd130c9b3d64464b5c44aba071203095f77e63.tar.xz |
KVM: selftests: Use vCPU's CPUID directly in Hyper-V test
Use the vCPU's persistent CPUID array directly when manipulating the set
of exposed Hyper-V CPUID features. Drop set_cpuid() to route all future
modification through the vCPU helpers; the Hyper-V features test was the
last user.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-27-seanjc@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/lib')
-rw-r--r-- | tools/testing/selftests/kvm/lib/x86_64/processor.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tools/testing/selftests/kvm/lib/x86_64/processor.c b/tools/testing/selftests/kvm/lib/x86_64/processor.c index a41384863336..7cc0814f0b67 100644 --- a/tools/testing/selftests/kvm/lib/x86_64/processor.c +++ b/tools/testing/selftests/kvm/lib/x86_64/processor.c @@ -1224,24 +1224,6 @@ struct kvm_cpuid_entry2 *get_cpuid_entry(struct kvm_cpuid2 *cpuid, return NULL; } -bool set_cpuid(struct kvm_cpuid2 *cpuid, - struct kvm_cpuid_entry2 *ent) -{ - int i; - - for (i = 0; i < cpuid->nent; i++) { - struct kvm_cpuid_entry2 *cur = &cpuid->entries[i]; - - if (cur->function != ent->function || cur->index != ent->index) - continue; - - memcpy(cur, ent, sizeof(struct kvm_cpuid_entry2)); - return true; - } - - return false; -} - uint64_t kvm_hypercall(uint64_t nr, uint64_t a0, uint64_t a1, uint64_t a2, uint64_t a3) { |