From: Sean Christopherson <seanjc@google.com>
To: Mingwei Zhang <mizhang@google.com>
Cc: kvm@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, Jim Mattson <jmattson@google.com>,
Venkatesh Srinivas <venkateshs@google.com>,
Aaron Lewis <aaronlewis@google.com>
Subject: Re: [PATCH 1/4] KVM: selftests: x86: Fix an error in comment of amx_test
Date: Wed, 8 Feb 2023 01:13:02 +0000 [thread overview]
Message-ID: <Y+L3HlFDRy+UiUSU@google.com> (raw)
In-Reply-To: <20230110185823.1856951-2-mizhang@google.com>
On Tue, Jan 10, 2023, Mingwei Zhang wrote:
> After the execution of __tilerelease(), AMX component will be in INIT
> state. Therefore, execution of xsavec saving the AMX state into memory will
s/xsavec/XSAVEC
> cause the XSTATE_BV[18] cleared in xheader. However, the XCOMP_BV[18] will
> remain set. Fix the error in comment.
>
> Cc: Jim Mattson <jmattson@google.com>
> Cc: Venkatesh Srinivas <venkateshs@google.com>
> Cc: Aaron Lewis <aaronlewis@google.com>
>
No need for a blank line.
> Signed-off-by: Mingwei Zhang <mizhang@google.com>
> ---
> tools/testing/selftests/kvm/x86_64/amx_test.c | 2 +-
> 1 file changed, 1 insertion(+), 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 bd72c6eb3b67..16533949a189 100644
> --- a/tools/testing/selftests/kvm/x86_64/amx_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/amx_test.c
> @@ -204,7 +204,7 @@ static void __attribute__((__flatten__)) guest_code(struct tile_config *amx_cfg,
> GUEST_SYNC(4);
> __tilerelease();
> GUEST_SYNC(5);
> - /* bit 18 not in the XCOMP_BV after xsavec() */
> + /* bit 18 not in the XSTATE_BV after xsavec() */
I would rather overhaul the entire comment, e.g.
/* Verify XTILEDATA is not set in XSTATE_BV after XSAVEC */
I had to look at the definition of XFEATURE_XTILEDATA to verify that yes, indeed,
bit 18 is XTILEDATA.
As for xsavec() vs. XSAVE, IIUC the clearing of XCOMP_BV[18] is a side effect of
XSAVEC the instruction, not something extra done by xsavec() the function.
> set_xstatebv(xsave_data, XFEATURE_MASK_XTILEDATA);
> __xsavec(xsave_data, XFEATURE_MASK_XTILEDATA);
> GUEST_ASSERT((get_xstatebv(xsave_data) & XFEATURE_MASK_XTILEDATA) == 0);
> --
> 2.39.0.314.g84b9a713c41-goog
>
next prev parent reply other threads:[~2023-02-08 1:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-10 18:58 [PATCH 0/4] Add extra checkings to amx_test Mingwei Zhang
2023-01-10 18:58 ` [PATCH 1/4] KVM: selftests: x86: Fix an error in comment of amx_test Mingwei Zhang
2023-02-08 1:13 ` Sean Christopherson [this message]
2023-02-13 18:57 ` Mingwei Zhang
2023-01-10 18:58 ` [PATCH 2/4] KVM: selftests: x86: Add check of IA32_XFD in amx_test Mingwei Zhang
2023-02-08 1:17 ` Sean Christopherson
2023-01-10 18:58 ` [PATCH 3/4] KVM: selftests: x86: Enable checking on xcomp_bv " Mingwei Zhang
2023-02-08 1:43 ` Sean Christopherson
2023-01-10 18:58 ` [PATCH 4/4] KVM: selftests: x86: Repeat the checking of xheader when IA32_XFD[18] is set " Mingwei Zhang
2023-02-08 1:48 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+L3HlFDRy+UiUSU@google.com \
--to=seanjc@google.com \
--cc=aaronlewis@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mizhang@google.com \
--cc=venkateshs@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox