lkml.org 
[lkml]   [2022]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    Subject[PATCH 10/42] KVM: selftests: Check for _both_ XTILE data and cfg in AMX test
    From
    Check for _both_ XTILE data and cfg support in the AMX test instead of
    checking for _either_ feature. Practically speaking, no sane CPU or vCPU
    will support one but not the other, but the effective "or" behavior is
    subtle and technically incorrect.

    Signed-off-by: Sean Christopherson <seanjc@google.com>
    ---
    tools/testing/selftests/kvm/x86_64/amx_test.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/tools/testing/selftests/kvm/x86_64/amx_test.c b/tools/testing/selftests/kvm/x86_64/amx_test.c
    index 7127873bb0cb..dcad838953d0 100644
    --- a/tools/testing/selftests/kvm/x86_64/amx_test.c
    +++ b/tools/testing/selftests/kvm/x86_64/amx_test.c
    @@ -335,7 +335,8 @@ int main(int argc, char *argv[])
    TEST_REQUIRE(kvm_get_cpuid_max_basic() >= 0xd);

    entry = kvm_get_supported_cpuid_index(0xd, 0);
    - TEST_REQUIRE(entry->eax & XFEATURE_MASK_XTILE);
    + TEST_REQUIRE(entry->eax & XFEATURE_MASK_XTILECFG);
    + TEST_REQUIRE(entry->eax & XFEATURE_MASK_XTILEDATA);

    /* Get xsave/restore max size */
    xsave_restore_size = entry->ecx;
    --
    2.36.1.255.ge46751e96f-goog
    \
     
     \ /
      Last update: 2022-06-04 03:22    [W:4.201 / U:0.368 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site