All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Aaron Lewis <aaronlewis@google.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, jmattson@google.com
Subject: Re: [PATCH v2 5/6] KVM: selftests: Add XFEATURE masks to common code
Date: Wed, 4 Jan 2023 16:43:19 +0000	[thread overview]
Message-ID: <Y7WspxRhEVwyWf5Y@google.com> (raw)
In-Reply-To: <20221230162442.3781098-6-aaronlewis@google.com>

On Fri, Dec 30, 2022, Aaron Lewis wrote:
> Add XFEATURE masks to processor.h to make them more broadly available
> in KVM selftests.
> 
> They were taken from fpu/types.h, which included a difference in

Nit, state the rename as a command, e.g.

  Use the names from the kernel's fpu/types.h for consistency, i.e. rename
  XTILECFG and XTILEDATA to XTILE_CFG and XTILE_DATA respectively.

> spacing between the ones in amx_test from XTILECFG and XTILEDATA, to
> XTILE_CFG and XTILE_DATA.  This has been reflected in amx_test.
> 
> Signed-off-by: Aaron Lewis <aaronlewis@google.com>
> ---
>  .../selftests/kvm/include/x86_64/processor.h  | 16 ++++++++++++++
>  tools/testing/selftests/kvm/x86_64/amx_test.c | 22 +++++++------------
>  2 files changed, 24 insertions(+), 14 deletions(-)
> 
> diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
> index 5f06d6f27edf7..c1132ac277227 100644
> --- a/tools/testing/selftests/kvm/include/x86_64/processor.h
> +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
> @@ -45,6 +45,22 @@
>  #define X86_CR4_SMAP		(1ul << 21)
>  #define X86_CR4_PKE		(1ul << 22)
>  

Add 

 #define XFEATURE_MASK_FP		BIT_ULL(0)

so that you don't have to open code the literal in the next patch.

> +#define XFEATURE_MASK_SSE		BIT_ULL(1)
> +#define XFEATURE_MASK_YMM		BIT_ULL(2)
> +#define XFEATURE_MASK_BNDREGS		BIT_ULL(3)
> +#define XFEATURE_MASK_BNDCSR		BIT_ULL(4)
> +#define XFEATURE_MASK_OPMASK		BIT_ULL(5)
> +#define XFEATURE_MASK_ZMM_Hi256		BIT_ULL(6)
> +#define XFEATURE_MASK_Hi16_ZMM		BIT_ULL(7)
> +#define XFEATURE_MASK_XTILE_CFG		BIT_ULL(17)
> +#define XFEATURE_MASK_XTILE_DATA	BIT_ULL(18)
> +
> +#define XFEATURE_MASK_AVX512		(XFEATURE_MASK_OPMASK \
> +					 | XFEATURE_MASK_ZMM_Hi256 \
> +					 | XFEATURE_MASK_Hi16_ZMM)

'|' on the previous line please, i.e.

#define XFEATURE_MASK_AVX512		(XFEATURE_MASK_OPMASK | \
					 XFEATURE_MASK_ZMM_Hi256 | \
					 XFEATURE_MASK_Hi16_ZMM)

> +#define XFEATURE_MASK_XTILE		(XFEATURE_MASK_XTILE_DATA \
> +					 | XFEATURE_MASK_XTILE_CFG)

Same comment here.

  reply	other threads:[~2023-01-04 16:46 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-30 16:24 [PATCH v2 0/6] Clean up the supported xfeatures Aaron Lewis
2022-12-30 16:24 ` [PATCH v2 1/6] KVM: x86: Clear all supported MPX xfeatures if they are not all set Aaron Lewis
2023-01-02 15:03   ` Xiaoyao Li
2023-01-03 18:47     ` Sean Christopherson
2023-01-03 18:46   ` Sean Christopherson
2023-01-10 14:49     ` Aaron Lewis
2023-01-10 18:32       ` Chang S. Bae
2023-01-12 18:21         ` Mingwei Zhang
2023-01-12 18:44           ` Chang S. Bae
2023-01-12 19:17             ` Mingwei Zhang
2023-01-12 20:31               ` Chang S. Bae
2023-01-12 21:21                 ` Mingwei Zhang
2023-01-12 21:33                   ` Chang S. Bae
2023-01-13  0:25                     ` Mingwei Zhang
2023-01-13 14:43                       ` Aaron Lewis
2023-01-17 20:32                         ` Chang S. Bae
2023-01-17 22:39                           ` Mingwei Zhang
2023-01-18  0:34                             ` Chang S. Bae
2022-12-30 16:24 ` [PATCH v2 2/6] KVM: x86: Clear all supported AVX-512 " Aaron Lewis
2023-01-04 16:33   ` Sean Christopherson
2023-01-04 16:39     ` Sean Christopherson
2022-12-30 16:24 ` [PATCH v2 3/6] KVM: x86: Clear all supported AMX " Aaron Lewis
2022-12-30 16:24 ` [PATCH v2 4/6] KVM: selftests: Hoist XGETBV and XSETBV to make them more accessible Aaron Lewis
2022-12-30 16:24 ` [PATCH v2 5/6] KVM: selftests: Add XFEATURE masks to common code Aaron Lewis
2023-01-04 16:43   ` Sean Christopherson [this message]
2022-12-30 16:24 ` [PATCH v2 6/6] KVM: selftests: Add XCR0 Test Aaron Lewis
2023-01-04 17:13   ` Sean Christopherson
2023-01-05 22:46     ` Aaron Lewis
2023-01-05 23:10       ` 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=Y7WspxRhEVwyWf5Y@google.com \
    --to=seanjc@google.com \
    --cc=aaronlewis@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.