[PATCH v7 0/2] arm/hvf: Add SME2 support

Manos Pitsidianakis posted 2 patches 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260306-sme2-hvf-v7-0-e72eeda41ed3@linaro.org
Maintainers: Alexander Graf <agraf@csgraf.de>, Peter Maydell <peter.maydell@linaro.org>
target/arm/hvf/hvf.c           | 334 +++++++++++++++++++++++++++++++++++++++--
target/arm/hvf/hvf_sme_stubs.h | 172 +++++++++++++++++++++
target/arm/hvf/sysreg.c.inc    |   8 +
target/arm/hvf_arm.h           |  41 +++++
target/arm/machine.c           |   2 +-
5 files changed, 541 insertions(+), 16 deletions(-)
[PATCH v7 0/2] arm/hvf: Add SME2 support
Posted by Manos Pitsidianakis 1 month ago
M4/M5 Macs support SME2, and HVF exposes this functionality in its
public API.

Add support for it in QEMU.

This was tested by running an SME2 benchmark from Arm [0]. savevm and
loadvm during the benchmark's run were used to verify migration works.

[0]:
https://learn.arm.com/learning-paths/cross-platform/multiplying-matrices-with-sme2/1-get-started/

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
---
Changes in v7:
- Set ID config registers properly
- Fix build with non-clang compilers
- Link to v6: https://lore.kernel.org/qemu-devel/20260303-sme2-hvf-v6-0-b473702d8287@linaro.org

Changes in v6:
- Remove host isar adjustment (thanks Richard)
- Link to v5: https://lore.kernel.org/qemu-devel/20260227-sme2-hvf-v5-0-1c60a92910c8@linaro.org

Changes in v5:
- Fix NEON registers getting zeroed when loading vmstate by setting SVCR first
- Link to v4: https://lore.kernel.org/qemu-devel/20260227-sme2-hvf-v4-0-3dae31a1876d@linaro.org

Changes in v4:
- Set cpu->sme_vq.supported in hvf_arm_set_cpu_features_from_host (thanks Richard)
- Removed two rogue lines that were smuggled in by git-rebase (thanks Mohamed)
- Link to v3: https://lore.kernel.org/qemu-devel/20260226-sme2-hvf-v3-0-ea5763dbeba2@linaro.org

Changes in v3:
- Rebased against master now that it supports SME-without-SVE setups for
  gdbstub
- Link to v2: https://lore.kernel.org/qemu-devel/20260115-sme2-hvf-v2-0-2eca481bd7ee@linaro.org

Changes in v2:
- Added stubs if hvf 15.2 headers are not available (suggested by agraf)
- Link to v1: https://lore.kernel.org/qemu-devel/20260114-sme2-hvf-v1-0-ce9599596736@linaro.org

---
Manos Pitsidianakis (2):
      hvf/arm: handle FEAT_SME2 migration
      hvf/arm: expose FEAT_SME2 to guest if available

 target/arm/hvf/hvf.c           | 334 +++++++++++++++++++++++++++++++++++++++--
 target/arm/hvf/hvf_sme_stubs.h | 172 +++++++++++++++++++++
 target/arm/hvf/sysreg.c.inc    |   8 +
 target/arm/hvf_arm.h           |  41 +++++
 target/arm/machine.c           |   2 +-
 5 files changed, 541 insertions(+), 16 deletions(-)
---
base-commit: 483cb5b74cd247b1520e0994b4fae4d8fe44cb00
change-id: 20260114-sme2-hvf-105767189521

--
γαῖα πυρί μιχθήτω


Re: [PATCH v7 0/2] arm/hvf: Add SME2 support
Posted by Peter Maydell 1 month ago
On Fri, 6 Mar 2026 at 12:45, Manos Pitsidianakis
<manos.pitsidianakis@linaro.org> wrote:
>
> M4/M5 Macs support SME2, and HVF exposes this functionality in its
> public API.
>
> Add support for it in QEMU.
>
> This was tested by running an SME2 benchmark from Arm [0]. savevm and
> loadvm during the benchmark's run were used to verify migration works.
>
> [0]:
> https://learn.arm.com/learning-paths/cross-platform/multiplying-matrices-with-sme2/1-get-started/
>
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>

Thanks for the respin -- applied to target-arm.next.

-- PMM
Re: [PATCH v7 0/2] arm/hvf: Add SME2 support
Posted by Mohamed Mediouni 1 month ago

> On 6. Mar 2026, at 13:45, Manos Pitsidianakis <manos.pitsidianakis@linaro.org> wrote:
> 
> M4/M5 Macs support SME2, and HVF exposes this functionality in its
> public API.
> 
> Add support for it in QEMU.
> 
> This was tested by running an SME2 benchmark from Arm [0]. savevm and
> loadvm during the benchmark's run were used to verify migration works.
> 
For the series:

Reviewed-by: Mohamed Mediouni <mohamed@unpredictable.fr>

> [0]:
> https://learn.arm.com/learning-paths/cross-platform/multiplying-matrices-with-sme2/1-get-started/
> 
> Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
> ---
> Changes in v7:
> - Set ID config registers properly
> - Fix build with non-clang compilers
> - Link to v6: https://lore.kernel.org/qemu-devel/20260303-sme2-hvf-v6-0-b473702d8287@linaro.org
> 
> Changes in v6:
> - Remove host isar adjustment (thanks Richard)
> - Link to v5: https://lore.kernel.org/qemu-devel/20260227-sme2-hvf-v5-0-1c60a92910c8@linaro.org
> 
> Changes in v5:
> - Fix NEON registers getting zeroed when loading vmstate by setting SVCR first
> - Link to v4: https://lore.kernel.org/qemu-devel/20260227-sme2-hvf-v4-0-3dae31a1876d@linaro.org
> 
> Changes in v4:
> - Set cpu->sme_vq.supported in hvf_arm_set_cpu_features_from_host (thanks Richard)
> - Removed two rogue lines that were smuggled in by git-rebase (thanks Mohamed)
> - Link to v3: https://lore.kernel.org/qemu-devel/20260226-sme2-hvf-v3-0-ea5763dbeba2@linaro.org
> 
> Changes in v3:
> - Rebased against master now that it supports SME-without-SVE setups for
>  gdbstub
> - Link to v2: https://lore.kernel.org/qemu-devel/20260115-sme2-hvf-v2-0-2eca481bd7ee@linaro.org
> 
> Changes in v2:
> - Added stubs if hvf 15.2 headers are not available (suggested by agraf)
> - Link to v1: https://lore.kernel.org/qemu-devel/20260114-sme2-hvf-v1-0-ce9599596736@linaro.org
> 
> ---
> Manos Pitsidianakis (2):
>      hvf/arm: handle FEAT_SME2 migration
>      hvf/arm: expose FEAT_SME2 to guest if available
> 
> target/arm/hvf/hvf.c           | 334 +++++++++++++++++++++++++++++++++++++++--
> target/arm/hvf/hvf_sme_stubs.h | 172 +++++++++++++++++++++
> target/arm/hvf/sysreg.c.inc    |   8 +
> target/arm/hvf_arm.h           |  41 +++++
> target/arm/machine.c           |   2 +-
> 5 files changed, 541 insertions(+), 16 deletions(-)
> ---
> base-commit: 483cb5b74cd247b1520e0994b4fae4d8fe44cb00
> change-id: 20260114-sme2-hvf-105767189521
> 
> --
> γαῖα πυρί μιχθήτω
> 
>