KVM: selftests: Touch relevant XSAVE state in guest for state test
authorSean Christopherson <seanjc@google.com>
Thu, 28 Sep 2023 00:19:54 +0000 (17:19 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 Oct 2023 15:08:58 +0000 (11:08 -0400)
commit60d351f18f7a8acd08964ef1d5c948354a7907be
tree3a3268c6d259e6e3065a24ceffff86fd0de3976e
parent8647c52e9504c99752a39f1d44f6268f82c40a5c
KVM: selftests: Touch relevant XSAVE state in guest for state test

Modify support XSAVE state in the "state test's" guest code so that saving
and loading state via KVM_{G,S}ET_XSAVE actually does something useful,
i.e. so that xstate_bv in XSAVE state isn't empty.

Punt on BNDCSR for now, it's easier to just stuff that xfeature from the
host side.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230928001956.924301-4-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