selftests: kvm: fix state save/load on processors without XSAVE
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Aug 2019 15:35:52 +0000 (17:35 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Sep 2019 09:33:51 +0000 (10:33 +0100)
commit6cb9f8d60f8f564b868d39cb44e65a33b9ae649e
treea5893cf531c24ae419a690e9ae0b1ef4864e8694
parent08c2052815e3c08e83774b0e93c69503682c5e34
selftests: kvm: fix state save/load on processors without XSAVE

[ Upstream commit 54577e5018a8c0cb79c9a0fa118a55c68715d398 ]

state_test and smm_test are failing on older processors that do not
have xcr0.  This is because on those processor KVM does provide
support for KVM_GET/SET_XSAVE (to avoid having to rely on the older
KVM_GET/SET_FPU) but not for KVM_GET/SET_XCRS.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/kvm/lib/x86.c