public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: Noah Goldstein <goldstein.w.n@gmail.com>,
	libc-alpha@sourceware.org,  adhemerval.zanella@linaro.org
Subject: Re: [PATCH v7 1/2] x86-64: Save APX registers in ld.so trampoline
Date: Fri, 16 Feb 2024 03:53:56 -0800	[thread overview]
Message-ID: <CAMe9rOoz-gPuhiOdVjVGoaQoCUmzAK1SsVXy522Ek28Dupy97g@mail.gmail.com> (raw)
In-Reply-To: <87ttm8630c.fsf@oldenburg.str.redhat.com>

On Fri, Feb 16, 2024 at 3:51 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Noah Goldstein:
>
> >> +/* Save SSE, AVX, AVX512, mask, bound and APX registers.  Bound and APX
> >> +   registers are mutually exclusive.  */
> >> +# define STATE_SAVE_MASK               \
> >> +  ((1 << X86_XSTATE_SSE_ID)            \
> >> +   | (1 << X86_XSTATE_AVX_ID)          \
> >> +   | (1 << X86_XSTATE_BNDREGS_ID)      \
> >> +   | (1 << X86_XSTATE_K_ID)            \
> >> +   | (1 << X86_XSTATE_ZMM_H_ID)        \
> >> +   | (1 << X86_XSTATE_ZMM_ID)          \
> >> +   | (1 << X86_XSTATE_APX_F_ID))
>
> > Need tile here?
>
> We can't save the AMX state because it's too big and will overflow
> existing stacks.  This change is immediately active on systems with AMX,
> even for old applications which do not know about AMX at all.
>
>

Another problem is that AMX is enabled by a syscall.  When ld.so checks
the xsave mask, AMX state may not be active at the time.

-- 
H.J.

  reply	other threads:[~2024-02-16 11:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16  0:21 [PATCH v7 0/2] x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers H.J. Lu
2024-02-16  0:21 ` [PATCH v7 1/2] x86-64: Save APX registers in ld.so trampoline H.J. Lu
2024-02-16  7:39   ` Noah Goldstein
2024-02-16 11:51     ` Florian Weimer
2024-02-16 11:53       ` H.J. Lu [this message]
2024-02-16  0:21 ` [PATCH v7 2/2] x86: Update _dl_tlsdesc_dynamic to preserve caller-saved registers H.J. Lu
2024-02-16  8:04   ` Noah Goldstein
2024-02-16 12:15     ` H.J. Lu

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=CAMe9rOoz-gPuhiOdVjVGoaQoCUmzAK1SsVXy522Ek28Dupy97g@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=fweimer@redhat.com \
    --cc=goldstein.w.n@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).