OSDN Git Service

KVM: selftests: Avoid KVM_SET_CPUID2 after KVM_RUN in hyperv_features test
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 22 Nov 2021 17:58:17 +0000 (18:58 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Nov 2021 13:14:19 +0000 (08:14 -0500)
commit6c1186430a808f97e2052bd5d9eff12c5d5defb0
tree5928f9eb74df51684656a1bf4188d718c57d9a56
parent712494de96f35f3e146b36b752c2afe0fdc0f0cc
KVM: selftests: Avoid KVM_SET_CPUID2 after KVM_RUN in hyperv_features test

hyperv_features's sole purpose is to test access to various Hyper-V MSRs
and hypercalls with different CPUID data. As KVM_SET_CPUID2 after KVM_RUN
is deprecated and soon-to-be forbidden, avoid it by re-creating test VM
for each sub-test.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20211122175818.608220-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/hyperv_features.c