public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mingwei Zhang <mizhang@google.com>
To: Chao Gao <chao.gao@intel.com>
Cc: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	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>,
	"Chang S. Bae" <chang.seok.bae@intel.com>
Subject: Re: [PATCH v2 2/7] KVM: selftests: x86: Fix an error in comment of amx_test
Date: Sun, 19 Feb 2023 17:58:40 +0000	[thread overview]
Message-ID: <Y/JjUEiIizj98hZb@google.com> (raw)
In-Reply-To: <Y/Hh31GLftx3eZJY@gao-cwp>

On Sun, Feb 19, 2023, Chao Gao wrote:
> On Tue, Feb 14, 2023 at 06:46:01PM +0000, 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
> >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>
> >---
> > tools/testing/selftests/kvm/x86_64/amx_test.c | 5 ++++-
> > 1 file changed, 4 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 d506821a5a26..aac727ff7cf8 100644
> >--- a/tools/testing/selftests/kvm/x86_64/amx_test.c
> >+++ b/tools/testing/selftests/kvm/x86_64/amx_test.c
> >@@ -190,7 +190,10 @@ 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() */
> >+	/*
> >+	 * After XSAVEC, XTILEDATA is cleared in the xstate_bv but is set in
> >+	 * the xcomp_bv.
> >+	 */
> > 	xstate->header.xstate_bv = XFEATURE_MASK_XTILEDATA;
> > 	__xsavec(xstate, XFEATURE_MASK_XTILEDATA);
> > 	GUEST_ASSERT(!(xstate->header.xstate_bv & XFEATURE_MASK_XTILEDATA));
> 
> maybe it would be better to add another GUEST_ASSERT() to enforce that
> XTILEDATA is set in the xcomp_bv.

yeah. The check has been added in the 6th patch of the series, but I
think it is hard to see. I will reorder the change next to this one in
the next version.
> 
> >-- 
> >2.39.1.581.gbfd45094c4-goog
> >

  reply	other threads:[~2023-02-19 17:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14 18:45 [PATCH v2 0/7] Overhauling amx_test Mingwei Zhang
2023-02-14 18:46 ` [PATCH v2 1/7] KVM: selftests: x86: Add a working xstate data structure Mingwei Zhang
2023-02-19  8:33   ` Chao Gao
2023-02-19 17:56     ` Mingwei Zhang
2023-02-14 18:46 ` [PATCH v2 2/7] KVM: selftests: x86: Fix an error in comment of amx_test Mingwei Zhang
2023-02-19  8:46   ` Chao Gao
2023-02-19 17:58     ` Mingwei Zhang [this message]
2023-02-14 18:46 ` [PATCH v2 3/7] KVM: selftests: x86: Add check of CR0.TS in the #NM handler in amx_test Mingwei Zhang
2023-02-17 22:01   ` Aaron Lewis
2023-02-18  0:57     ` Mingwei Zhang
2023-02-14 18:46 ` [PATCH v2 4/7] KVM: selftests: Add the XFD check to IA32_XFD in #NM handler Mingwei Zhang
2023-02-14 18:46 ` [PATCH v2 5/7] KVM: selftests: Fix the checks to XFD_ERR using and operation Mingwei Zhang
2023-02-14 18:46 ` [PATCH v2 6/7] KVM: selftests: x86: Enable checking on xcomp_bv in amx_test Mingwei Zhang
2023-02-14 18:46 ` [PATCH v2 7/7] KVM: selftests: x86: Repeat the checking of xheader when IA32_XFD[XTILEDATA] is set " Mingwei Zhang
2023-02-17 22:04 ` [PATCH v2 0/7] Overhauling amx_test Aaron Lewis
2023-02-18  0:58   ` Mingwei Zhang

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/JjUEiIizj98hZb@google.com \
    --to=mizhang@google.com \
    --cc=aaronlewis@google.com \
    --cc=chang.seok.bae@intel.com \
    --cc=chao.gao@intel.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@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