Skip to content

Commit bec357a

Browse files
mzhang3579sean-jc
authored andcommitted
KVM: selftests: Fix an error in comment of amx_test
After the execution of __tilerelease(), AMX component will be in INIT state. Therefore, execution of XSAVEC saving the AMX state into memory will cause the xstate_bv[18] cleared in xheader. However, the xcomp_bv[18] will remain set. Fix the error in comment. Also, update xsavec() to XSAVEC because xcomp_bv[18] is set due to the instruction, not the function. Finally, use XTILEDATA instead 'bit 18' in comments. Cc: Jim Mattson <jmattson@google.com> Cc: Venkatesh Srinivas <venkateshs@google.com> Cc: Aaron Lewis <aaronlewis@google.com> Signed-off-by: Mingwei Zhang <mizhang@google.com> Link: https://lore.kernel.org/r/20230221163655.920289-4-mizhang@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 5de4a37 commit bec357a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tools/testing/selftests/kvm/x86_64/amx_test.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ static void __attribute__((__flatten__)) guest_code(struct tile_config *amx_cfg,
190190
GUEST_SYNC(4);
191191
__tilerelease();
192192
GUEST_SYNC(5);
193-
/* bit 18 not in the XCOMP_BV after xsavec() */
193+
/*
194+
* After XSAVEC, XTILEDATA is cleared in the xstate_bv but is set in
195+
* the xcomp_bv.
196+
*/
194197
xstate->header.xstate_bv = XFEATURE_MASK_XTILEDATA;
195198
__xsavec(xstate, XFEATURE_MASK_XTILEDATA);
196199
GUEST_ASSERT(!(xstate->header.xstate_bv & XFEATURE_MASK_XTILEDATA));

0 commit comments

Comments
 (0)