public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "George, Jini Susan" <JiniSusan.George@amd.com>
To: John Baldwin <jhb@FreeBSD.org>,
	Simon Marchi <simon.marchi@polymtl.ca>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Felix <felix.willgerodt@intel.com>,
	"Balasubrmanian, Vignesh" <Vignesh.Balasubrmanian@amd.com>
Subject: RE: [RFC 00/13] Proposal for a new NT_X86_CPUID core dump note
Date: Fri, 13 Oct 2023 09:38:05 +0000	[thread overview]
Message-ID: <BY5PR12MB4965F6A3484BED1059E992D790D2A@BY5PR12MB4965.namprd12.prod.outlook.com> (raw)
In-Reply-To: <53b0925d-04d5-a43b-0bd5-cf9e7d9db291@FreeBSD.org>

[AMD Official Use Only - General]

I think that even if the xsave layout remains uniform across the cores of a system, since we are trying to design an extensible .note section which can possibly hold all kinds of CPUID information, we might want to consider various scenarios wherein the CPUID information might differ across cores (esp for big.LITTLE/(P/E)), like the cache information, perhaps ? It might be more prudent to include the coretype information also in such cases ?

Rgds
Jini.

>>-----Original Message-----
>>From: John Baldwin <jhb@FreeBSD.org>
>>Sent: Thursday, October 12, 2023 10:48 PM
>>To: Simon Marchi <simon.marchi@polymtl.ca>; gdb-patches@sourceware.org
>>Cc: Felix <felix.willgerodt@intel.com>; George, Jini Susan
>><JiniSusan.George@amd.com>
>>Subject: Re: [RFC 00/13] Proposal for a new NT_X86_CPUID core dump note
>>
>>Caution: This message originated from an External Source. Use proper caution
>>when opening attachments, clicking links, or responding.
>>
>>
>>On 10/12/23 7:33 AM, Simon Marchi wrote:
>>>
>>>
>>> On 2023-10-09 14:36, John Baldwin wrote:
>>>> One of the shortcomings of the previous XSAVE patch series is that it
>>>> depends on heuristics based on the total XSAVE register set size and
>>>> XCR0 mask to infer layouts of the various register blocks for core
>>>> dumps.  This series introduces a new x86-specific core dump note
>>>> intended to supplant these heuristics by storing the raw CPUID leaves
>>>> describing the XSAVE layout in core dumps.
>>>>
>>>> This series proposes a new core dump note, NT_X86_CPUID (0x205),
>>>> which contains an array of structures.  Each structure describes an
>>>> invidual CPUID sub-leaf containing both the inputs to CPUID (%eax and
>>>> %ecx) and the outputs (%eax, %ebx, %ecx, and %edx) in a format
>>>> roughly matching the follow C structure:
>>>>
>>>> struct cpuid_leaf
>>>> {
>>>>      uint32_t leaf;
>>>>      uint32_t subleaf;
>>>>      uint32_t eax;
>>>>      uint32_t ebx;
>>>>      uint32_t ecx;
>>>>      uint32_t edx;
>>>> };
>>>>
>>>> This format is not XSAVE-specific and implementations could choose to
>>>> add additional CPUID leaves to this structure if needed in the future.
>>>> Consumers of this note should lookup the value of required leaves and
>>>> ignore any unneeded leaves.
>>>>
>>>> An alternate approach might be to write out a more XSAVE-specific
>>>> note that is an array containing the offset and size of each XSAVE region.
>>>
>>> Something I thought about: I think there are asymmetrical x86
>>> processors now, with "big" and "little" cores, not sure how they call
>>> them.  For them, is it possible for the XSAVE layout to be different
>>> per core, for instance some cores supporting AVX512 and some cores
>>> not?  And therefore, will we eventually need to include CPUID / XSAVE
>>> information for more than one CPU core type in the core file notes?
>>
>>(The Intel names are "P" (performance) and "E" (energy-efficient) cores
>>btw)
>>
>>I have no idea if they use the same or different XSAVE layouts.  It would seem to
>>be a royal pain if they did as everytime a user thread migrated between cores
>>the OS would have to convert the XSAVE block from one layout to the other.
>>FreeBSD does not have any notion of multiple layouts today and just assumes
>>that the XSAVE layout is uniform across all cores in a system.  I believe Linux's
>>kernel does the same from my reading.
>>
>>--
>>John Baldwin


  reply	other threads:[~2023-10-13  9:38 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09 18:36 John Baldwin
2023-10-09 18:36 ` [RFC 01/13] binutils: Support for the " John Baldwin
2023-10-16  9:23   ` Lancelot SIX
2023-10-16 23:23     ` John Baldwin
2023-10-09 18:36 ` [RFC 02/13] i387-tdep: Add function to read XSAVE layout from NT_X86_CPUID John Baldwin
2023-10-12  4:27   ` Simon Marchi
2023-10-16 23:52     ` John Baldwin
2023-10-16  9:17   ` Lancelot SIX
2023-10-17  0:04     ` John Baldwin
2023-10-09 18:36 ` [RFC 03/13] gdb: Use NT_X86_CPUID in x86 FreeBSD architectures to read XSAVE layouts John Baldwin
2023-10-09 18:36 ` [RFC 04/13] " John Baldwin
2023-10-12  4:28   ` Simon Marchi
2023-10-17  0:07     ` John Baldwin
2023-10-09 18:36 ` [RFC 05/13] nat/x86-cpuid.h: Remove non-x86 fallbacks John Baldwin
2023-10-12  4:29   ` Simon Marchi
2023-10-09 18:36 ` [RFC 06/13] nat/x86-cpuid: Add a function to build the contents of a NT_X86_CPUID note John Baldwin
2023-10-12  4:41   ` Simon Marchi
2023-10-17  0:22     ` John Baldwin
2023-10-09 18:36 ` [RFC 07/13] x86_elf_make_cpuid_note: Helper routine to build NT_X86_CPUID ELF note John Baldwin
2023-10-09 18:36 ` [RFC 08/13] x86-fbsd-nat: Support fetching TARGET_OBJECT_X86_CPUID objects John Baldwin
2023-10-09 18:36 ` [RFC 09/13] fbsd-tdep: Export fbsd_make_corefile_notes John Baldwin
2023-10-09 18:36 ` [RFC 10/13] {amd64,i386}-fbsd-tdep: Include NT_X86_CPUID notes in core dumps from gcore John Baldwin
2023-10-16  9:31   ` [RFC 10/13] {amd64, i386}-fbsd-tdep: " Lancelot SIX
2023-10-17  0:26     ` John Baldwin
2023-10-09 18:36 ` [RFC 11/13] x86-linux-nat: Support fetching TARGET_OBJECT_X86_CPUID objects John Baldwin
2023-10-09 18:36 ` [RFC 12/13] linux-tdep: Export linux_make_corefile_notes John Baldwin
2023-10-09 18:36 ` [RFC 13/13] {amd64,i386}-linux-tdep: Include NT_X86_CPUID notes in core dumps from gcore John Baldwin
2023-10-10 16:30 ` [RFC 00/13] Proposal for a new NT_X86_CPUID core dump note George, Jini Susan
2023-10-12  4:01 ` Simon Marchi
2023-10-12 14:33 ` Simon Marchi
2023-10-12 17:18   ` John Baldwin
2023-10-13  9:38     ` George, Jini Susan [this message]
2023-10-17  0:36       ` John Baldwin
2023-10-26 16:18         ` George, Jini Susan
2023-10-27  2:53           ` John Baldwin
2023-10-27 11:11             ` George, Jini Susan
2023-10-31 16:41               ` John Baldwin

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=BY5PR12MB4965F6A3484BED1059E992D790D2A@BY5PR12MB4965.namprd12.prod.outlook.com \
    --to=jinisusan.george@amd.com \
    --cc=Vignesh.Balasubrmanian@amd.com \
    --cc=felix.willgerodt@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jhb@FreeBSD.org \
    --cc=simon.marchi@polymtl.ca \
    /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).