]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Verify that kvm_cpuid2.entries layout is unchanged by KVM
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:41 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:14 +0000 (18:14 -0700)
commit72f4f34087c083195cb3ed74ab5852a03b53f575
tree17839df1a29b3cfd35264f414d3ca10a9aa8a320
parent93d6f296b26df59f86a239f85278564d06168c44
KVM: selftests: Verify that kvm_cpuid2.entries layout is unchanged by KVM

In the CPUID test, verify that KVM doesn't modify the kvm_cpuid2.entries
layout, i.e. that the order of entries and their flags is identical
between what the test provides via KVM_SET_CPUID2 and what KVM returns
via KVM_GET_CPUID2.

Asserting that the layouts match simplifies the test as there's no need
to iterate over both arrays.

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