[PATCH v2 0/3] target/arm: Allow aarch64=off for TCG

Peter Maydell posted 3 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260416165353.589569-1-peter.maydell@linaro.org
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
docs/system/arm/cpu-features.rst              | 10 +--
target/arm/cpu-features.h                     |  5 ++
target/arm/cpu.c                              | 71 +++++++++++++++++--
target/arm/cpu.h                              |  3 +-
tests/functional/aarch64/meson.build          |  1 +
.../aarch64/test_virt_aarch64_off.py          | 37 ++++++++++
tests/qtest/arm-cpu-features.c                |  8 +--
7 files changed, 120 insertions(+), 15 deletions(-)
create mode 100755 tests/functional/aarch64/test_virt_aarch64_off.py
[PATCH v2 0/3] target/arm: Allow aarch64=off for TCG
Posted by Peter Maydell 1 month, 2 weeks ago
This patchset relaxes our current constraint that we only permit
-cpu foo,aarch64=off on KVM CPUs, so that you can also use this
to run a TCG CPU with aarch64 disabled. This is useful because
currently if you want a 32-bit TCG CPU you're limited to either
'max' in qemu-system-arm or else the old v7-only CPUs like a15.

I sent out v1 back in October last year. The main changes
here are:
 - as I said we ought to do in a follow up to those patches
   https://lore.kernel.org/qemu-devel/CAFEAcA9KeO2r+jNont_2Jpvi5MgViH3nXO7TcbANe+3nS_PF-A@mail.gmail.com/
   I've switched to only clearing the AArch64 ID regs with
   TCG; we leave the KVM aarch64=off behaviour alone. (Clearing
   the regs didn't break KVM, but did leave us in the odd
   situation that QEMU and KVM didn't have the same idea about
   what the ID reg values were, which seems like it might lead
   to subtle problems later.)
 - I've added a simple functional test which boots one of
   the kernels we use for a 32-bit functional test using
   qemu-system-aarch64 and -cpu max,aarch64=off

I also made a tiny tweak to the docs wording.

Patches 1 and 3 need review.

thanks
-- PMM

Peter Maydell (3):
  target/arm: Clear AArch64 ID regs from ARMISARegisters if AArch64
    disabled
  target/arm: Allow 'aarch64=off' to be set for TCG CPUs
  tests/functional/aarch64: Add basic test of TCG aarch64=off

 docs/system/arm/cpu-features.rst              | 10 +--
 target/arm/cpu-features.h                     |  5 ++
 target/arm/cpu.c                              | 71 +++++++++++++++++--
 target/arm/cpu.h                              |  3 +-
 tests/functional/aarch64/meson.build          |  1 +
 .../aarch64/test_virt_aarch64_off.py          | 37 ++++++++++
 tests/qtest/arm-cpu-features.c                |  8 +--
 7 files changed, 120 insertions(+), 15 deletions(-)
 create mode 100755 tests/functional/aarch64/test_virt_aarch64_off.py

-- 
2.43.0