From: "Doru Blânzeanu" <dblanzeanu@linux.microsoft.com>
To: Magnus Kulke <magnuskulke@linux.microsoft.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Magnus Kulke" <magnuskulke@microsoft.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Wei Liu" <wei.liu@kernel.org>,
"Doru Blânzeanu" <doru.blanzeanu@microsoft.com>,
"Wei Liu" <liuwe@microsoft.com>
Subject: Re: [PATCH 01/12] target/i386/mshv: disable AMX TILE features
Date: Thu, 16 Jul 2026 14:06:32 +0300 [thread overview]
Message-ID: <ali7OIHQ0BjH0pmq@linux.microsoft.com> (raw)
In-Reply-To: <20260710101534.664604-2-magnuskulke@linux.microsoft.com>
On Fri, Jul 10, 2026 at 12:15:23PM +0200, Magnus Kulke wrote:
> For the time being we disable AMX TILE in partition processor features
> and CPUID b/c AMX TILE XSAVE state (XTILE_DATA) is 8KB, which exceeds
> the current fixed 4KB XSAVE buffer size.
>
> For now we filter it until buffer sizing is computed dynamically from CPUID.
>
> Signed-off-by: Magnus Kulke <magnuskulke@linux.microsoft.com>
> ---
> accel/mshv/mshv-all.c | 8 ++++++++
> target/i386/mshv/mshv-cpu.c | 16 ++++++++++++++++
> 2 files changed, 24 insertions(+)
>
> diff --git a/accel/mshv/mshv-all.c b/accel/mshv/mshv-all.c
> index 72721d0f0d..5e8756ede2 100644
> --- a/accel/mshv/mshv-all.c
> +++ b/accel/mshv/mshv-all.c
> @@ -203,6 +203,14 @@ static int create_partition(int mshv_fd, int *vm_fd)
>
> /* enable all */
> disabled_xsave_features.as_uint64 = 0;
> + /*
> + * AMX TILE XSAVE state (XTILE_DATA) is 8KB, which exceeds the
> + * current fixed 4KB XSAVE buffer size.
> + */
> + disabled_xsave_features.amx_tile_support = 1;
> + disabled_xsave_features.amx_bf16_support = 1;
> + disabled_xsave_features.amx_int8_support = 1;
> + disabled_xsave_features.amx_fp16_support = 1;
>
> /*
> * query host for supported processor features and disable unsupported
> diff --git a/target/i386/mshv/mshv-cpu.c b/target/i386/mshv/mshv-cpu.c
> index 1c433c408c..8eca01a8fa 100644
> --- a/target/i386/mshv/mshv-cpu.c
> +++ b/target/i386/mshv/mshv-cpu.c
> @@ -2156,6 +2156,22 @@ uint32_t mshv_get_supported_cpuid(uint32_t func, uint32_t idx, int reg)
> */
> ret &= ~CPUID_7_0_ECX_LA57;
> }
> + if (func == 0x07 && idx == 0 && reg == R_EDX) {
> + /*
> + * AMX TILE XSAVE state (XTILE_DATA) is 8KB, which exceeds the
> + * current fixed 4KB XSAVE buffer size. Filter until buffer
> + * sizing is computed dynamically from CPUID.
> + */
> + ret &= ~CPUID_7_0_EDX_AMX_TILE;
> + ret &= ~CPUID_7_0_EDX_AMX_BF16;
> + ret &= ~CPUID_7_0_EDX_AMX_INT8;
> + }
> + if (func == 0x07 && idx == 1 && reg == R_EAX) {
> + ret &= ~CPUID_7_1_EAX_AMX_FP16;
> + }
> + if (func == 0x07 && idx == 1 && reg == R_EDX) {
> + ret &= ~CPUID_7_1_EDX_AMX_COMPLEX;
> + }
>
> return ret;
> }
> --
> 2.34.1
Reviewed-by: Doru Blânzeanu <dblanzeanu@linux.microsoft.com>
next prev parent reply other threads:[~2026-07-16 11:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 10:15 [PATCH 00/12] Add migration support to MSHV accelerator, Part 2 Magnus Kulke
2026-07-10 10:15 ` [PATCH 01/12] target/i386/mshv: disable AMX TILE features Magnus Kulke
2026-07-16 11:06 ` Doru Blânzeanu [this message]
2026-07-10 10:15 ` [PATCH 02/12] accel/mshv: introduce SaveVMHandler Magnus Kulke
2026-07-16 11:10 ` Doru Blânzeanu
2026-07-10 10:15 ` [PATCH 03/12] hw/i386/mshv: migrate REFERENCE_TIME Magnus Kulke
2026-07-16 12:01 ` Doru Blânzeanu
2026-07-10 10:15 ` [PATCH 04/12] accel/mshv: install dummy handler for SIG_IPI Magnus Kulke
2026-07-10 10:15 ` [PATCH 05/12] target/i386/mshv: migrate LAPIC state Magnus Kulke
2026-07-10 10:15 ` [PATCH 06/12] target/i386/mshv: migrate Synic SINT MSRs Magnus Kulke
2026-07-10 10:15 ` [PATCH 07/12] target/i386/mshv: migrate SIMP and SIEFP state Magnus Kulke
2026-07-10 10:15 ` [PATCH 08/12] target/i386/mshv: migrate STIMER state Magnus Kulke
2026-07-10 10:15 ` [PATCH 09/12] accel/mshv: write synthetic MSRs after migration Magnus Kulke
2026-07-10 10:15 ` [PATCH 10/12] target/i386/mshv: migrate MP_STATE Magnus Kulke
2026-07-10 10:15 ` [PATCH 11/12] target/i386/mshv: toggle fpu/xsave migration Magnus Kulke
2026-07-10 10:15 ` [PATCH 12/12] hw/i386/mshv: drop initial msi vector 0 Magnus Kulke
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=ali7OIHQ0BjH0pmq@linux.microsoft.com \
--to=dblanzeanu@linux.microsoft.com \
--cc=doru.blanzeanu@microsoft.com \
--cc=liuwe@microsoft.com \
--cc=magnuskulke@linux.microsoft.com \
--cc=magnuskulke@microsoft.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wei.liu@kernel.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 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.