[RFC PATCH v5 0/9] target/arm: Allow CONFIG_TCG=n builds

Fabiano Rosas posted 9 patches 1 year, 3 months ago
There is a newer version of this series
configs/devices/aarch64-softmmu/default.mak |   4 -
configs/devices/arm-softmmu/default.mak     |  39 --
configure                                   |   6 +-
hw/arm/Kconfig                              |  43 +-
hw/arm/virt.c                               |  10 +-
target/arm/Kconfig                          |   7 +
target/arm/cpu64.c                          | 632 +------------------
target/arm/internals.h                      |   4 +
target/arm/meson.build                      |   1 -
target/arm/{cpu_tcg.c => tcg/cpu32.c}       |  13 +-
target/arm/tcg/cpu64.c                      | 654 ++++++++++++++++++++
target/arm/tcg/meson.build                  |   2 +
tests/avocado/migration.py                  |  10 +
tests/qtest/arm-cpu-features.c              |  34 +-
tests/qtest/meson.build                     |   4 +-
15 files changed, 772 insertions(+), 691 deletions(-)
rename target/arm/{cpu_tcg.c => tcg/cpu32.c} (99%)
create mode 100644 target/arm/tcg/cpu64.c
[RFC PATCH v5 0/9] target/arm: Allow CONFIG_TCG=n builds
Posted by Fabiano Rosas 1 year, 3 months ago
This series makes the necessary changes to allow the use of
--disable-tcg for arm.

Based on "target/arm: CONFIG_TCG=n part 1":
https://lore.kernel.org/r/20230118193518.26433-1-farosas@suse.de

Since v4:

- Used "max" as the default CPU for KVM-only builds. This allows me to
  drop all the clunky qtest changes and it keeps disabling TCG
  separate from changing cpu defaults.

  I'm neutral towards removing the defaults for arm. We can do that in a
  separate series. It would be nice to make the TCG default equal to the
  non-TCG one. Otherwise we're bound to get reports that "this command
  line used to work" if users switch from: 'CONFIG_TCG=n -accel kvm' to
  'CONFIG_TCG=y -accel kvm' (the latter would try to use the cortex-a15
  as default).

- Move the ifdef around valid_cpus into the patches that move the
  respective cpus. Patches 1 & 2.

v4:
https://lore.kernel.org/r/20230119135424.5417-1-farosas@suse.de

v3:
https://lore.kernel.org/r/20230113140419.4013-1-farosas@suse.de

v2:
https://lore.kernel.org/r/20230109224232.11661-1-farosas@suse.de

v1:
https://lore.kernel.org/r/20230104215835.24692-1-farosas@suse.de

Claudio Fontana (1):
  target/arm: move cpu_tcg to tcg/cpu32.c

Fabiano Rosas (8):
  target/arm: Move 64-bit TCG CPUs into tcg/
  target/arm: Use "max" as default cpu for the virt machine with KVM
  tests/qtest: arm-cpu-features: Match tests to required accelerators
  tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG
  tests/tcg: Do not build/run TCG tests if TCG is disabled
  target/avocado: Pass parameters to migration test on aarch64
  arm/Kconfig: Always select SEMIHOSTING when TCG is present
  arm/Kconfig: Do not build TCG-only boards on a KVM-only build

 configs/devices/aarch64-softmmu/default.mak |   4 -
 configs/devices/arm-softmmu/default.mak     |  39 --
 configure                                   |   6 +-
 hw/arm/Kconfig                              |  43 +-
 hw/arm/virt.c                               |  10 +-
 target/arm/Kconfig                          |   7 +
 target/arm/cpu64.c                          | 632 +------------------
 target/arm/internals.h                      |   4 +
 target/arm/meson.build                      |   1 -
 target/arm/{cpu_tcg.c => tcg/cpu32.c}       |  13 +-
 target/arm/tcg/cpu64.c                      | 654 ++++++++++++++++++++
 target/arm/tcg/meson.build                  |   2 +
 tests/avocado/migration.py                  |  10 +
 tests/qtest/arm-cpu-features.c              |  34 +-
 tests/qtest/meson.build                     |   4 +-
 15 files changed, 772 insertions(+), 691 deletions(-)
 rename target/arm/{cpu_tcg.c => tcg/cpu32.c} (99%)
 create mode 100644 target/arm/tcg/cpu64.c

-- 
2.35.3
Re: [RFC PATCH v5 0/9] target/arm: Allow CONFIG_TCG=n builds
Posted by Fabiano Rosas 1 year, 2 months ago
Fabiano Rosas <farosas@suse.de> writes:

> This series makes the necessary changes to allow the use of
> --disable-tcg for arm.
>
> Based on "target/arm: CONFIG_TCG=n part 1":
> https://lore.kernel.org/r/20230118193518.26433-1-farosas@suse.de
>
> Since v4:
>
> - Used "max" as the default CPU for KVM-only builds. This allows me to
>   drop all the clunky qtest changes and it keeps disabling TCG
>   separate from changing cpu defaults.
>
>   I'm neutral towards removing the defaults for arm. We can do that in a
>   separate series. It would be nice to make the TCG default equal to the
>   non-TCG one. Otherwise we're bound to get reports that "this command
>   line used to work" if users switch from: 'CONFIG_TCG=n -accel kvm' to
>   'CONFIG_TCG=y -accel kvm' (the latter would try to use the cortex-a15
>   as default).
>
> - Move the ifdef around valid_cpus into the patches that move the
>   respective cpus. Patches 1 & 2.
>
> v4:
> https://lore.kernel.org/r/20230119135424.5417-1-farosas@suse.de
>
> v3:
> https://lore.kernel.org/r/20230113140419.4013-1-farosas@suse.de
>
> v2:
> https://lore.kernel.org/r/20230109224232.11661-1-farosas@suse.de
>
> v1:
> https://lore.kernel.org/r/20230104215835.24692-1-farosas@suse.de
>
> Claudio Fontana (1):
>   target/arm: move cpu_tcg to tcg/cpu32.c
>
> Fabiano Rosas (8):
>   target/arm: Move 64-bit TCG CPUs into tcg/
>   target/arm: Use "max" as default cpu for the virt machine with KVM
>   tests/qtest: arm-cpu-features: Match tests to required accelerators
>   tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG
>   tests/tcg: Do not build/run TCG tests if TCG is disabled
>   target/avocado: Pass parameters to migration test on aarch64
>   arm/Kconfig: Always select SEMIHOSTING when TCG is present
>   arm/Kconfig: Do not build TCG-only boards on a KVM-only build
>
>  configs/devices/aarch64-softmmu/default.mak |   4 -
>  configs/devices/arm-softmmu/default.mak     |  39 --
>  configure                                   |   6 +-
>  hw/arm/Kconfig                              |  43 +-
>  hw/arm/virt.c                               |  10 +-
>  target/arm/Kconfig                          |   7 +
>  target/arm/cpu64.c                          | 632 +------------------
>  target/arm/internals.h                      |   4 +
>  target/arm/meson.build                      |   1 -
>  target/arm/{cpu_tcg.c => tcg/cpu32.c}       |  13 +-
>  target/arm/tcg/cpu64.c                      | 654 ++++++++++++++++++++
>  target/arm/tcg/meson.build                  |   2 +
>  tests/avocado/migration.py                  |  10 +
>  tests/qtest/arm-cpu-features.c              |  34 +-
>  tests/qtest/meson.build                     |   4 +-
>  15 files changed, 772 insertions(+), 691 deletions(-)
>  rename target/arm/{cpu_tcg.c => tcg/cpu32.c} (99%)
>  create mode 100644 target/arm/tcg/cpu64.c

Hi,

Peter, Richard,

I assume this series is good to go for the time being?

I have rebased the first part of the patches + this series + Philippe's
CI patch, all available here:

https://github.com/farosas/qemu/commits/arm-disable-tcg-max

Let me know if it would help to resend it all as one piece.

Thanks