• Sean Christopherson's avatar
    KVM: selftests: Load XSAVE state into untouched vCPU during state test · 77709820
    Sean Christopherson authored
    Expand x86's state test to load XSAVE state into a "dummy" vCPU prior to
    KVM_SET_CPUID2, and again with an empty guest CPUID model.  Except for
    off-by-default features, i.e. AMX, KVM's ABI for KVM_SET_XSAVE is that
    userspace is allowed to load xfeatures so long as they are supported by
    the host.  This is a regression test for a combination of KVM bugs where
    the state saved by KVM_GET_XSAVE{2} could not be loaded via KVM_SET_XSAVE
    if the saved xstate_bv would load guest-unsupported xfeatures.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20230928001956.924301-5-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    77709820
state_test.c 8.32 KB