selftests: kvm: provide common function to enable eVMCS
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 14 Aug 2019 16:02:41 +0000 (12:02 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:35:16 +0000 (10:35 +0100)
commit5aac82ac9c7c073b0f165d5cfabb85239add642f
treebda7ab71a18fb6f7cef6c3f4ad7832333733c98b
parent926a6e9efce95977f31699249ec1d89e0460c6ff
selftests: kvm: provide common function to enable eVMCS

[ Upstream commit 65efa61dc0d536d5f0602c33ee805a57cc07e9dc ]

There are two tests already enabling eVMCS and a third is coming.
Add a function that enables the capability and tests the result.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/kvm/include/evmcs.h
tools/testing/selftests/kvm/lib/x86_64/vmx.c
tools/testing/selftests/kvm/x86_64/evmcs_test.c
tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c