public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "H.J. Lu via Libc-alpha" <libc-alpha@sourceware.org>
Cc: "H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] <sys/platform/x86.h>: Add APX support
Date: Tue, 25 Jul 2023 21:55:53 +0200	[thread overview]
Message-ID: <87ila73gvq.fsf@oldenburg3.str.redhat.com> (raw)
In-Reply-To: <20230725190411.2192265-1-hjl.tools@gmail.com> (H. J. Lu via Libc-alpha's message of "Tue, 25 Jul 2023 12:04:11 -0700")

* H. J. Lu via Libc-alpha:

> diff --git a/sysdeps/x86/cpu-features.c b/sysdeps/x86/cpu-features.c
> index 9ac195810f..376e3c7501 100644
> --- a/sysdeps/x86/cpu-features.c
> +++ b/sysdeps/x86/cpu-features.c
> @@ -226,6 +226,10 @@ update_active (struct cpu_features *cpu_features)
>  	  CPU_FEATURE_SET_ACTIVE (cpu_features, AMX_COMPLEX);
>  	}
>  
> +      /* Is AVX state usable?  */
> +      if ((xcrlow & bit_AVX_state) != 0)
> +	CPU_FEATURE_SET_ACTIVE (cpu_features, APX_F);
> +
>        /* These features are usable only when OSXSAVE is enabled.  */
>        CPU_FEATURE_SET (cpu_features, XSAVE);
>        CPU_FEATURE_SET_ACTIVE (cpu_features, XSAVEOPT);

AVX vs APX looks like a typo, this needs a comment.

Will this really work without further kernel enablement?  Finally a
compelling use case for MPX. 8-)

Thanks,
Floria


  reply	other threads:[~2023-07-25 19:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 19:04 H.J. Lu
2023-07-25 19:55 ` Florian Weimer [this message]
2023-07-25 20:16   ` H.J. Lu
2023-07-26  2:46     ` Noah Goldstein
2023-07-26  4:59       ` Florian Weimer

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=87ila73gvq.fsf@oldenburg3.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=hjl.tools@gmail.com \
    --cc=libc-alpha@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).