All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <darwi@linutronix.de>
To: Sohil Mehta <sohil.mehta@intel.com>
Cc: x86-cpuid@lists.linux.dev, Thomas Gleixner <tglx@linutronix.de>,
	Xin Li <xin@zytor.com>, "H . Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] db: Add Intel NMI-source reporting feature flag
Date: Thu, 26 Sep 2024 15:12:44 +0200	[thread overview]
Message-ID: <ZvVdzJIIqaC_javn@lx-t490> (raw)
In-Reply-To: <70cf05c3-0ba6-4a5e-a7ab-21cadad3c255@intel.com>

Hi Sohil,

On Mon, 23 Sep 2024, Sohil Mehta wrote:
>
> >  <bit21 len="1"  id="amx_fp16"   desc="AMX-FP16: FP16 tile operations">
> >    <linux        feature="true"  proc="false" />
>
> I couldn't find much documentation for the <linux> tag. When is it
> expected to be included?
>
> Also, are the following linux hint attributes documented somewhere? I
> couldn't decipher them from their name itself.
>
> >   <xs:complexType name="linuxType">
> >     <xs:attribute type="xs:boolean" name="feature" use="required" />
> >     <xs:attribute type="xs:boolean" name="proc"    use="required" />
> >     <xs:attribute type="xs:string"  name="altid"   use="optional" />
> >     <xs:attribute type="xs:string"  name="procid"  use="optional" />
> >   </xs:complexType>
> >

Yeah, I should've documented the schema more, either in-place or in a
separate file.

The <linux> tag means that this bit is also represented inside the Linux
Kernel x86 tree in various means.

Here are two nice examples from leaf_01.xml:

  <bit2  len="1" id="dtes64"    desc="64-bit DS save area">
    <vendors>
      <vendor>Intel</vendor>
    </vendors>
    <linux	 feature="true"  proc="true" />
    <xen         feature="true"  attrs="" />
  </bit2>
  ...
  <bit0  len="1" id="sse3"      desc="Streaming SIMD Extensions 3 (SSE3)">
    <vendors>
      <vendor>Intel</vendor>
      <vendor>AMD</vendor>
    </vendors>
    <linux       feature="true"	proc="true" altid="xmm3" procid="pni" />
    <xen         feature="true"	attrs="A" />
  </bit0>

<linux> "feature=true" attribute means that the feature bit is also an
X86_FEATURE_* flag.  So, in the "dtes64" case, there's indeed an
X86_FEATURE_DTES64 defined flag in the Linux kernel x86 tree.

<linux> "feature=true altid=NAME" means there's an X86_FEATURE_* flag,
but the name is slightly different from the database attribute id name
(for various reasons).  Thus, in the SSE3 feature flag case, the Linux
feature flag is actually called X86_FEATURE_XMM3 (altid="xmm3".)

<linux> "proc=true" means that the feature bit is also displayed at
Linux's /proc/cpuinfo if available on the CPU.  So, in the "dtes64"
case, you'll indeed see dtes64 flag at /proc/cpuinfo on most Intel CPUs.

<linux> "proc=true procid=PROCNAME' means that the feature bit is
displayed at /proc/cpuinfo, but the flag name there is different from
the database attribute id name (for various reasons.)  Thus, in the
"sse3" case, "procid=pni" because that's how Linux displays SSE3 feature
flag at /proc/cpuinfo.

So far, that <linux> tag is not used by any of the XSLT transformers.
But, we plan to use this information as we go deeper into the Linux x86
tree refactoring(s).  For now, the goal was to cover all known names for
the cpuid feature bits, especially when they differ; i.e. canonical name
vs. Linux X86_FEATURE name vs. Linux /proc/cpuinfo name.

Thanks for the question! I'll indeed need to document that part of the
schema before the v2.0 release.

All the best,

--
Ahmed S. Darwish
Linutronix GmbH

  reply	other threads:[~2024-09-26 13:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 22:32 [PATCH] db: Add Intel NMI-source reporting feature flag Sohil Mehta
2024-09-23 22:57 ` Sohil Mehta
2024-09-26 13:12   ` Ahmed S. Darwish [this message]
2024-09-26 15:33     ` Andrew Cooper
2024-09-26 19:57       ` Ahmed S. Darwish
2024-09-27 17:47     ` Sohil Mehta
2024-09-27 18:29       ` H. Peter Anvin
2024-09-27 18:55         ` Sohil Mehta
2024-09-28  7:34         ` Ahmed S. Darwish
2024-09-24 16:09 ` Ahmed S. Darwish

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=ZvVdzJIIqaC_javn@lx-t490 \
    --to=darwi@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=sohil.mehta@intel.com \
    --cc=tglx@linutronix.de \
    --cc=x86-cpuid@lists.linux.dev \
    --cc=xin@zytor.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.