public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Willgerodt, Felix" <felix.willgerodt@intel.com>
To: John Baldwin <jhb@FreeBSD.org>,
	Luis Machado <luis.machado@arm.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 00/17] SME support for AArch64 gdb/gdbserver on Linux.
Date: Wed, 12 Apr 2023 08:47:11 +0000	[thread overview]
Message-ID: <SA0PR11MB457437B9C5A9279A89AB53648E9B9@SA0PR11MB4574.namprd11.prod.outlook.com> (raw)
In-Reply-To: <71bf117d-78e3-5ae9-56c7-48824a0f5537@FreeBSD.org>

> -----Original Message-----
> From: John Baldwin <jhb@FreeBSD.org>
> Sent: Dienstag, 11. April 2023 17:51
> To: Luis Machado <luis.machado@arm.com>; gdb-patches@sourceware.org
> Cc: Willgerodt, Felix <felix.willgerodt@intel.com>
> Subject: Re: [PATCH 00/17] SME support for AArch64 gdb/gdbserver on
> Linux.
> 
> On 4/10/23 9:26 PM, Luis Machado via Gdb-patches wrote:
> > The following series enables SME 1 (Scalable Matrix Extension) support for
> > AArch64 gdb and gdbserver.
> >
> > SME expands on SVE by having a variable-sized matrix (ZA) of dimensions
> > SVL x SVL bytes.
> >
> > The first few patches and some intermediate ones refactor the code and
> fix
> > issues prior to enabling SME support, and thus could go in independently.
> >
> > I've kept them in the series as they are closely/logically related.
> 
> I briefly glanced at a few bits of the aarch64-specific parts I'm familiar
> with and they all look fine to me.
> 
> One note is that I think the AMX patches from Intel (which deal with a
> similar "tile area" split into variable-sized subregisters IIUC) ran into
> some issues with wanting to update the tdesc to deal with the differing
> subregisters since the layout of those can change at runtime.  I'm not
> sure if that applies to SME in the same way and if any of the issues
> Felix ran into might apply to SME as well (and thus if there are common
> solutions?)  (I've cc'd Felix FYI)

Hi John, Luis,

I didn't read the SME series in full detail and probably won't have the time to
do that for a while, sorry. I can only repeat my AMX problems.
My problem was related to the fact that I tried to make the AMX register
pseudo registers to do the dynamic resizing.
This doesn't work well with the regcache.

I am currently waiting on this series to land to continue:
https://sourceware.org/pipermail/gdb-patches/2023-January/196353.html
I am planning to do the tdesc update dynamically instead, forgoing
pseudo registers all together. But I haven't started implementing that.
We had an internal version that tried this, but in the end we scrapped that
because gdbserver doesn't support it (yet).

I think my main problem with pseudo registers is that regcache is initialized
with a certain size and types of registers. Even the pseudo registers.
For AMX we have 8 kB of register state. That is currently divided into 8 registers
of the same dimensions.
But that is actually configurable, and it could be that future platforms add a
configuration ("palette") that divides it into 4 registers of dimension "x * x". Or
another palette that divides this into 4 registers of dimension "y * z". Or another
palette that divides it into 16 registers. Switching configurations can be done
at runtime.
I was initially planning to just take the biggest dimension and the
biggest amount of names, and keep that up-to-date.

The actual problem I had in the end was discussed here:
https://sourceware.org/pipermail/gdb-patches/2022-August/191259.html
But the solution I proposed there isn't a good one.
It works by accident for now. It only touches the type, but not the actual
memory that is already reserved for the reg, which can become a problem.

I am not familiar with SME. I see that the SME series also added pseudo
registers and doesn't touch regcache.c. But I didn't look at the code in
detail. I am not familiar with the aarch64 target code. I don't know if Luis
found a way around the same problem or if it just doesn’t exist for SME.
Or if my AMX code just wasn't smart enough or done the right way.

Regards,
Felix
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2023-04-12  8:47 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11  4:26 Luis Machado
2023-04-11  4:26 ` [PATCH 01/17] [gdb/aarch64] Fix register fetch/store order for native AArch64 Linux Luis Machado
2023-04-11  4:26 ` [PATCH 02/17] [gdb/aarch64] refactor: Rename SVE-specific files Luis Machado
2023-04-11  4:26 ` [PATCH 03/17] [gdb/gdbserver] refactor: Simplify SVE interface to read/write registers Luis Machado
2023-04-11  4:26 ` [PATCH 04/17] [gdb/aarch64] sve: Fix return command when using V registers in a SVE-enabled target Luis Machado
2023-04-11  4:26 ` [PATCH 05/17] [gdb/aarch64] sme: Enable SME registers and pseudo-registers Luis Machado
2023-04-11  4:26 ` [PATCH 06/17] [gdbserver/aarch64] refactor: Adjust expedited registers dynamically Luis Machado
2023-04-11  4:26 ` [PATCH 07/17] [gdbserver/aarch64] sme: Add support for SME Luis Machado
2023-04-11  4:26 ` [PATCH 08/17] [gdb/aarch64] sve: Fix signal frame z/v register restore Luis Machado
2023-04-11  4:26 ` [PATCH 09/17] [gdb/aarch64] sme: Signal frame support Luis Machado
2023-04-11  4:26 ` [PATCH 10/17] [gdb/aarch64] sme: Fixup sigframe gdbarch when vg/svg changes Luis Machado
2023-04-11  4:26 ` [PATCH 11/17] [gdb/aarch64] sme: Support TPIDR2 signal frame context Luis Machado
2023-04-11  4:26 ` [PATCH 12/17] [binutils/aarch64] sme: Core file support Luis Machado
2023-04-11  4:26 ` [PATCH 13/17] [gdb/generic] corefile/bug: Use thread-specific gdbarch when dumping register state to core files Luis Machado
2023-04-11  4:26 ` [PATCH 14/17] [gdb/generic] corefile/bug: Fixup (gcore) core file target description reading order Luis Machado
2023-04-11  4:26 ` [PATCH 15/17] [gdb/aarch64] sme: Core file support for Linux Luis Machado
2023-04-11  4:26 ` [PATCH 16/17] [gdb/testsuite] sme: Add SVE/SME testcases Luis Machado
2023-04-11  4:26 ` [PATCH 17/17] [gdb/docs] sme: Document SME registers and features Luis Machado
2023-04-11  7:09   ` Eli Zaretskii
2023-04-11  7:22     ` Luis Machado
2023-04-12 12:04   ` [PATCH,v2 " Luis Machado
2023-04-13  7:57     ` Eli Zaretskii
2023-04-13 12:17       ` Luis Machado
     [not found]         ` <83leiv4xsc.fsf@gnu.org>
2023-04-13 16:34           ` Luis Machado
2023-04-13 17:45             ` Eli Zaretskii
2023-04-17 17:19   ` [PATCH,v3 " Luis Machado
2023-04-22  9:21     ` Eli Zaretskii
2023-04-26 15:00       ` Luis Machado
2023-04-26 16:11         ` Eli Zaretskii
2023-04-27  8:35           ` Luis Machado
2023-04-27  9:10             ` Eli Zaretskii
2023-04-27  9:12               ` Luis Machado
2023-04-11 15:50 ` [PATCH 00/17] SME support for AArch64 gdb/gdbserver on Linux John Baldwin
2023-04-12  8:47   ` Willgerodt, Felix [this message]
2023-04-12  9:12   ` Luis Machado

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=SA0PR11MB457437B9C5A9279A89AB53648E9B9@SA0PR11MB4574.namprd11.prod.outlook.com \
    --to=felix.willgerodt@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --cc=luis.machado@arm.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).