From: Xiaoyao Li <xiaoyao.li@intel.com>
To: Zhao Liu <zhao1.liu@intel.com>, Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 2/2] i386/cpu: Drop incorrect comment for CPUID 0x1E
Date: Tue, 18 Nov 2025 17:16:38 +0800 [thread overview]
Message-ID: <4216e86e-cbeb-45d6-a936-c8c8892a1178@intel.com> (raw)
In-Reply-To: <20251118080837.837505-3-zhao1.liu@intel.com>
On 11/18/2025 4:08 PM, Zhao Liu wrote:
> The information (tmul_maxk and tmul_maxn) in CPUID 0x1E.0x0.EBX is
> defined for architecture, not for SPR.
>
> This is to say, these "hardcoded" values won't change in future. If
> the TMUL component needs to be extended for new palettes, there'll
> likely be the new TMUL instructions, or new types of AMX instructions
> that are _parallel_ to TMUL that operate in particular palettes,
> instead of changing current tmul_maxk and tmul_maxn fields in CPUID
> 0x1E.0x0.EBX.
>
> Furthermore, the previous attempt [*] to make the 0x1E.0x0.EBX fields
> user-configurable is incorrect and unnecessary.
>
> Therefore, drop the incorrect and misleading comment.
>
> [*]: https://lore.kernel.org/qemu-devel/20230106083826.5384-2-lei4.wang@intel.com/
>
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
The intent was that when new palette introduced in the future, AMX TMUL
might be adjusted for better performance. But given that SDM now defines
it clearly as constant:
EBX[7:0] TMUL_MAXK tmul_maxk (rows or columns). Value = 16.
EBX[23:8] TMUL_MAXN tmul_maxn (column bytes). Value = 64.
so, it cannot change any more.
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
> target/i386/cpu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> index 41d224330d05..0c954202cea8 100644
> --- a/target/i386/cpu.c
> +++ b/target/i386/cpu.c
> @@ -8403,7 +8403,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
> break;
> }
> case 0x1E: {
> - /* AMX TMUL, for now hardcoded for Sapphire Rapids */
> + /* AMX TMUL */
> *eax = 0;
> *ebx = 0;
> *ecx = 0;
prev parent reply other threads:[~2025-11-18 9:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 8:08 [PATCH 0/2] i386/cpu: Correct comments for CPUID 0x1D and 0x1E Zhao Liu
2025-11-18 8:08 ` [PATCH 1/2] i386/cpu: Drop incorrect comment for CPUID 0x1D Zhao Liu
2025-11-18 9:12 ` Xiaoyao Li
2025-11-18 8:08 ` [PATCH 2/2] i386/cpu: Drop incorrect comment for CPUID 0x1E Zhao Liu
2025-11-18 9:16 ` Xiaoyao Li [this message]
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=4216e86e-cbeb-45d6-a936-c8c8892a1178@intel.com \
--to=xiaoyao.li@intel.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhao1.liu@intel.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 NNTP newsgroup(s).