KVM: selftests: Force load all supported XSAVE state in state test
authorSean Christopherson <seanjc@google.com>
Thu, 28 Sep 2023 00:19:56 +0000 (17:19 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Oct 2023 15:08:59 +0000 (11:08 -0400)
commit87e3ca055cdc6c63fb82b9bec7c370405d03f6ef
treec398b758ade179d616f7c9aba873318354d1dd52
parent77709820787355f45755fe454e26fca8584ecf40
KVM: selftests: Force load all supported XSAVE state in state test

Extend x86's state to forcefully load *all* host-supported xfeatures by
modifying xstate_bv in the saved state.  Stuffing xstate_bv ensures that
the selftest is verifying KVM's full ABI regardless of whether or not the
guest code is successful in getting various xfeatures out of their INIT
state, e.g. see the disaster that is/was MPX.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230928001956.924301-6-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/x86_64/state_test.c