All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
@ 2020-09-29 22:43 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

Cover from Samuel Ortiz from (part 1) [1]:

  This patchset allows for building and running ARM targets with TCG
  disabled. [...]

  The rationale behind this work comes from the NEMU project where we're
  trying to only support x86 and ARM 64-bit architectures, without
  including the TCG code base. We can only do so if we can build and run
  ARM binaries with TCG disabled.

v4 almost 2 years later... [2]:
- Rebased on Meson
- Addressed Richard review comments
- Addressed Claudio review comments

v3 almost 18 months later [3]:
- Rebased
- Addressed Thomas review comments
- Added Travis-CI job to keep building --disable-tcg on ARM

v2 [4]:
- Addressed review comments from Richard and Thomas from v1 [1]

Regards,

Phil.

[1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
[2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
[3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
[4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html

Green CI:
- https://cirrus-ci.com/build/4572961761918976
- https://gitlab.com/philmd/qemu/-/pipelines/196047779
- https://travis-ci.org/github/philmd/qemu/builds/731370972

Based-on: <20200929125609.1088330-1-philmd@redhat.com>
"hw/arm: Restrict APEI tables generation to the 'virt' machine"
https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html

Philippe Mathieu-Daudé (10):
  accel/tcg: Add stub for cpu_loop_exit()
  meson: Allow optional target/${ARCH}/Kconfig
  target/arm: Select SEMIHOSTING if TCG is available
  target/arm: Restrict ARMv4 cpus to TCG accel
  target/arm: Restrict ARMv5 cpus to TCG accel
  target/arm: Restrict ARMv6 cpus to TCG accel
  target/arm: Restrict ARMv7 R-profile cpus to TCG accel
  target/arm: Restrict ARMv7 M-profile cpus to TCG accel
  target/arm: Reorder meson.build rules
  .travis.yml: Add a KVM-only Aarch64 job

Samuel Ortiz (1):
  target/arm: Do not build TCG objects when TCG is off

Thomas Huth (1):
  target/arm: Make m_helper.c optional via CONFIG_ARM_V7M

 default-configs/arm-softmmu.mak |  3 --
 meson.build                     |  8 +++-
 target/arm/cpu.h                | 12 ------
 accel/stubs/tcg-stub.c          |  5 +++
 target/arm/cpu_tcg.c            |  4 +-
 target/arm/helper.c             |  7 ----
 target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
 .travis.yml                     | 35 ++++++++++++++++
 hw/arm/Kconfig                  | 32 +++++++++++++++
 target/arm/Kconfig              |  4 ++
 target/arm/meson.build          | 40 +++++++++++-------
 11 files changed, 184 insertions(+), 39 deletions(-)
 create mode 100644 target/arm/m_helper-stub.c
 create mode 100644 target/arm/Kconfig

-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
@ 2020-09-29 22:43 ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

Cover from Samuel Ortiz from (part 1) [1]:

  This patchset allows for building and running ARM targets with TCG
  disabled. [...]

  The rationale behind this work comes from the NEMU project where we're
  trying to only support x86 and ARM 64-bit architectures, without
  including the TCG code base. We can only do so if we can build and run
  ARM binaries with TCG disabled.

v4 almost 2 years later... [2]:
- Rebased on Meson
- Addressed Richard review comments
- Addressed Claudio review comments

v3 almost 18 months later [3]:
- Rebased
- Addressed Thomas review comments
- Added Travis-CI job to keep building --disable-tcg on ARM

v2 [4]:
- Addressed review comments from Richard and Thomas from v1 [1]

Regards,

Phil.

[1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
[2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
[3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
[4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html

Green CI:
- https://cirrus-ci.com/build/4572961761918976
- https://gitlab.com/philmd/qemu/-/pipelines/196047779
- https://travis-ci.org/github/philmd/qemu/builds/731370972

Based-on: <20200929125609.1088330-1-philmd@redhat.com>
"hw/arm: Restrict APEI tables generation to the 'virt' machine"
https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html

Philippe Mathieu-Daudé (10):
  accel/tcg: Add stub for cpu_loop_exit()
  meson: Allow optional target/${ARCH}/Kconfig
  target/arm: Select SEMIHOSTING if TCG is available
  target/arm: Restrict ARMv4 cpus to TCG accel
  target/arm: Restrict ARMv5 cpus to TCG accel
  target/arm: Restrict ARMv6 cpus to TCG accel
  target/arm: Restrict ARMv7 R-profile cpus to TCG accel
  target/arm: Restrict ARMv7 M-profile cpus to TCG accel
  target/arm: Reorder meson.build rules
  .travis.yml: Add a KVM-only Aarch64 job

Samuel Ortiz (1):
  target/arm: Do not build TCG objects when TCG is off

Thomas Huth (1):
  target/arm: Make m_helper.c optional via CONFIG_ARM_V7M

 default-configs/arm-softmmu.mak |  3 --
 meson.build                     |  8 +++-
 target/arm/cpu.h                | 12 ------
 accel/stubs/tcg-stub.c          |  5 +++
 target/arm/cpu_tcg.c            |  4 +-
 target/arm/helper.c             |  7 ----
 target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
 .travis.yml                     | 35 ++++++++++++++++
 hw/arm/Kconfig                  | 32 +++++++++++++++
 target/arm/Kconfig              |  4 ++
 target/arm/meson.build          | 40 +++++++++++-------
 11 files changed, 184 insertions(+), 39 deletions(-)
 create mode 100644 target/arm/m_helper-stub.c
 create mode 100644 target/arm/Kconfig

-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 01/12] accel/tcg: Add stub for cpu_loop_exit()
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé,
	Keith Packard

Since the support of SYS_READC in commit 8de702cb67 the
semihosting code is strongly depedent of the TCG accelerator
via a call to cpu_loop_exit().

Ideally we would only build semihosting support when TCG
is available, but unfortunately this is not trivial because
semihosting is used by many targets in different configurations.
For now add a simple stub to avoid link failure when building
with --disable-tcg:

  hw/semihosting/console.c:160: undefined reference to `cpu_loop_exit'

Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 accel/stubs/tcg-stub.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index e4bbf997aa..1eec7fb90e 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -29,3 +29,8 @@ void *probe_access(CPUArchState *env, target_ulong addr, int size,
      /* Handled by hardware accelerator. */
      g_assert_not_reached();
 }
+
+void cpu_loop_exit(CPUState *cpu)
+{
+    g_assert_not_reached();
+}
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 01/12] accel/tcg: Add stub for cpu_loop_exit()
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, Keith Packard, qemu-arm, Paolo Bonzini,
	Alex Bennée, Richard Henderson

Since the support of SYS_READC in commit 8de702cb67 the
semihosting code is strongly depedent of the TCG accelerator
via a call to cpu_loop_exit().

Ideally we would only build semihosting support when TCG
is available, but unfortunately this is not trivial because
semihosting is used by many targets in different configurations.
For now add a simple stub to avoid link failure when building
with --disable-tcg:

  hw/semihosting/console.c:160: undefined reference to `cpu_loop_exit'

Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 accel/stubs/tcg-stub.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index e4bbf997aa..1eec7fb90e 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -29,3 +29,8 @@ void *probe_access(CPUArchState *env, target_ulong addr, int size,
      /* Handled by hardware accelerator. */
      g_assert_not_reached();
 }
+
+void cpu_loop_exit(CPUState *cpu)
+{
+    g_assert_not_reached();
+}
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé,
	Claudio Fontana

Extend the generic Meson script to pass optional target Kconfig
file to the minikconf script.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
We could use fs.exists() but is_file() is more specific
(can not be a directory).

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Claudio Fontana <cfontana@suse.de>
---
 meson.build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index d36dd085b5..9ab5d514d7 100644
--- a/meson.build
+++ b/meson.build
@@ -529,6 +529,7 @@ kconfig_external_symbols = [
 ]
 ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
 
+fs = import('fs')
 foreach target : target_dirs
   config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
 
@@ -569,8 +570,13 @@ foreach target : target_dirs
     endforeach
 
     config_devices_mak = target + '-config-devices.mak'
+    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
+    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
+    if fs.is_file(target_kconfig)
+      minikconf_input += [target_kconfig]
+    endif
     config_devices_mak = configure_file(
-      input: ['default-configs' / target + '.mak', 'Kconfig'],
+      input: minikconf_input,
       output: config_devices_mak,
       depfile: config_devices_mak + '.d',
       capture: true,
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Claudio Fontana, Paolo Bonzini,
	Alex Bennée, Richard Henderson

Extend the generic Meson script to pass optional target Kconfig
file to the minikconf script.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
We could use fs.exists() but is_file() is more specific
(can not be a directory).

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Claudio Fontana <cfontana@suse.de>
---
 meson.build | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index d36dd085b5..9ab5d514d7 100644
--- a/meson.build
+++ b/meson.build
@@ -529,6 +529,7 @@ kconfig_external_symbols = [
 ]
 ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
 
+fs = import('fs')
 foreach target : target_dirs
   config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
 
@@ -569,8 +570,13 @@ foreach target : target_dirs
     endforeach
 
     config_devices_mak = target + '-config-devices.mak'
+    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
+    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
+    if fs.is_file(target_kconfig)
+      minikconf_input += [target_kconfig]
+    endif
     config_devices_mak = configure_file(
-      input: ['default-configs' / target + '.mak', 'Kconfig'],
+      input: minikconf_input,
       output: config_devices_mak,
       depfile: config_devices_mak + '.d',
       capture: true,
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 03/12] target/arm: Select SEMIHOSTING if TCG is available
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

Add a kconfig entry which not explicitly selected by another
entry, but which selects SEMIHOSTING if TCG is available.

This avoids:

  /usr/bin/ld: libqemu-aarch64-softmmu.fa.p/target_arm_arm-semi.c.o: in function `do_arm_semihosting':
  target/arm/arm-semi.c:784: undefined reference to `qemu_semihosting_console_outc'
  target/arm/arm-semi.c:787: undefined reference to `qemu_semihosting_console_outs'
  /usr/bin/ld: target/arm/arm-semi.c:815: undefined reference to `qemu_semihosting_console_inc'

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 target/arm/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 target/arm/Kconfig

diff --git a/target/arm/Kconfig b/target/arm/Kconfig
new file mode 100644
index 0000000000..972d9a1b9a
--- /dev/null
+++ b/target/arm/Kconfig
@@ -0,0 +1,4 @@
+# arch-specific rule to select SEMIHOSTING if ARM && TCG
+config ARM_SEMIHOSTING
+    default y if TCG
+    select SEMIHOSTING
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 03/12] target/arm: Select SEMIHOSTING if TCG is available
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

Add a kconfig entry which not explicitly selected by another
entry, but which selects SEMIHOSTING if TCG is available.

This avoids:

  /usr/bin/ld: libqemu-aarch64-softmmu.fa.p/target_arm_arm-semi.c.o: in function `do_arm_semihosting':
  target/arm/arm-semi.c:784: undefined reference to `qemu_semihosting_console_outc'
  target/arm/arm-semi.c:787: undefined reference to `qemu_semihosting_console_outs'
  /usr/bin/ld: target/arm/arm-semi.c:815: undefined reference to `qemu_semihosting_console_inc'

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 target/arm/Kconfig | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 target/arm/Kconfig

diff --git a/target/arm/Kconfig b/target/arm/Kconfig
new file mode 100644
index 0000000000..972d9a1b9a
--- /dev/null
+++ b/target/arm/Kconfig
@@ -0,0 +1,4 @@
+# arch-specific rule to select SEMIHOSTING if ARM && TCG
+config ARM_SEMIHOSTING
+    default y if TCG
+    select SEMIHOSTING
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 04/12] target/arm: Restrict ARMv4 cpus to TCG accel
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

KVM requires a cpu based on (at least) the ARMv7 architecture.

Only enable the following ARMv4 CPUs when TCG is available:

  - StrongARM (SA1100/1110)
  - OMAP1510 (TI925T)

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 7d040827af..b546b20654 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -1,3 +1,7 @@
+config ARM_V4
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -30,6 +34,7 @@ config ARM_VIRT
 
 config CHEETAH
     bool
+    select ARM_V4
     select OMAP
     select TSC210X
 
@@ -244,6 +249,7 @@ config COLLIE
 
 config SX1
     bool
+    select ARM_V4
     select OMAP
 
 config VERSATILE
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 04/12] target/arm: Restrict ARMv4 cpus to TCG accel
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

KVM requires a cpu based on (at least) the ARMv7 architecture.

Only enable the following ARMv4 CPUs when TCG is available:

  - StrongARM (SA1100/1110)
  - OMAP1510 (TI925T)

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 7d040827af..b546b20654 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -1,3 +1,7 @@
+config ARM_V4
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -30,6 +34,7 @@ config ARM_VIRT
 
 config CHEETAH
     bool
+    select ARM_V4
     select OMAP
     select TSC210X
 
@@ -244,6 +249,7 @@ config COLLIE
 
 config SX1
     bool
+    select ARM_V4
     select OMAP
 
 config VERSATILE
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 05/12] target/arm: Restrict ARMv5 cpus to TCG accel
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

KVM requires a cpu based on (at least) the ARMv7 architecture.

Only enable the following ARMv5 CPUs when TCG is available:

  - ARM926
  - ARM946
  - ARM1026
  - XScale (PXA250/255/260/261/262/270)

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index b546b20654..d2876b2c8b 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -2,6 +2,10 @@ config ARM_V4
     bool
     select TCG
 
+config ARM_V5
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -44,6 +48,7 @@ config CUBIEBOARD
 
 config DIGIC
     bool
+    select ARM_V5
     select PTIMER
     select PFLASH_CFI02
 
@@ -73,6 +78,7 @@ config HIGHBANK
 
 config INTEGRATOR
     bool
+    select ARM_V5
     select ARM_TIMER
     select INTEGRATOR_DEBUG
     select PL011 # UART
@@ -99,6 +105,7 @@ config MUSCA
 
 config MUSICPAL
     bool
+    select ARM_V5
     select BITBANG_I2C
     select MARVELL_88W8618
     select PTIMER
@@ -138,6 +145,7 @@ config OMAP
 
 config PXA2XX
     bool
+    select ARM_V5
     select FRAMEBUFFER
     select I2C
     select SERIAL
@@ -254,6 +262,7 @@ config SX1
 
 config VERSATILE
     bool
+    select ARM_V5
     select ARM_TIMER # sp804
     select PFLASH_CFI01
     select LSI_SCSI_PCI
@@ -373,6 +382,7 @@ config NPCM7XX
 
 config FSL_IMX25
     bool
+    select ARM_V5
     select IMX
     select IMX_FEC
     select IMX_I2C
@@ -399,6 +409,7 @@ config FSL_IMX6
 
 config ASPEED_SOC
     bool
+    select ARM_V5
     select DS1338
     select FTGMAC100
     select I2C
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 05/12] target/arm: Restrict ARMv5 cpus to TCG accel
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

KVM requires a cpu based on (at least) the ARMv7 architecture.

Only enable the following ARMv5 CPUs when TCG is available:

  - ARM926
  - ARM946
  - ARM1026
  - XScale (PXA250/255/260/261/262/270)

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index b546b20654..d2876b2c8b 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -2,6 +2,10 @@ config ARM_V4
     bool
     select TCG
 
+config ARM_V5
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -44,6 +48,7 @@ config CUBIEBOARD
 
 config DIGIC
     bool
+    select ARM_V5
     select PTIMER
     select PFLASH_CFI02
 
@@ -73,6 +78,7 @@ config HIGHBANK
 
 config INTEGRATOR
     bool
+    select ARM_V5
     select ARM_TIMER
     select INTEGRATOR_DEBUG
     select PL011 # UART
@@ -99,6 +105,7 @@ config MUSCA
 
 config MUSICPAL
     bool
+    select ARM_V5
     select BITBANG_I2C
     select MARVELL_88W8618
     select PTIMER
@@ -138,6 +145,7 @@ config OMAP
 
 config PXA2XX
     bool
+    select ARM_V5
     select FRAMEBUFFER
     select I2C
     select SERIAL
@@ -254,6 +262,7 @@ config SX1
 
 config VERSATILE
     bool
+    select ARM_V5
     select ARM_TIMER # sp804
     select PFLASH_CFI01
     select LSI_SCSI_PCI
@@ -373,6 +382,7 @@ config NPCM7XX
 
 config FSL_IMX25
     bool
+    select ARM_V5
     select IMX
     select IMX_FEC
     select IMX_I2C
@@ -399,6 +409,7 @@ config FSL_IMX6
 
 config ASPEED_SOC
     bool
+    select ARM_V5
     select DS1338
     select FTGMAC100
     select I2C
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 06/12] target/arm: Restrict ARMv6 cpus to TCG accel
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

KVM requires a cpu based on (at least) the ARMv7 architecture.

Only enable the following ARMv6 CPUs when TCG is available:

  - ARM1136
  - ARM1176
  - ARM11MPCore
  - Cortex-M0

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index d2876b2c8b..e01eb55bc0 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -6,6 +6,10 @@ config ARM_V5
     bool
     select TCG
 
+config ARM_V6
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -123,6 +127,7 @@ config NETDUINOPLUS2
 
 config NSERIES
     bool
+    select ARM_V6
     select OMAP
     select TMP105   # tempature sensor
     select BLIZZARD # LCD/TV controller
@@ -391,6 +396,7 @@ config FSL_IMX25
 
 config FSL_IMX31
     bool
+    select ARM_V6
     select SERIAL
     select IMX
     select IMX_I2C
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 06/12] target/arm: Restrict ARMv6 cpus to TCG accel
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

KVM requires a cpu based on (at least) the ARMv7 architecture.

Only enable the following ARMv6 CPUs when TCG is available:

  - ARM1136
  - ARM1176
  - ARM11MPCore
  - Cortex-M0

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index d2876b2c8b..e01eb55bc0 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -6,6 +6,10 @@ config ARM_V5
     bool
     select TCG
 
+config ARM_V6
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -123,6 +127,7 @@ config NETDUINOPLUS2
 
 config NSERIES
     bool
+    select ARM_V6
     select OMAP
     select TMP105   # tempature sensor
     select BLIZZARD # LCD/TV controller
@@ -391,6 +396,7 @@ config FSL_IMX25
 
 config FSL_IMX31
     bool
+    select ARM_V6
     select SERIAL
     select IMX
     select IMX_I2C
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 07/12] target/arm: Restrict ARMv7 R-profile cpus to TCG accel
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

A KVM-only build won't be able to run R-profile cpus.

Only enable the following ARMv7 R-Profile CPUs when TCG is available:

  - Cortex-R5
  - Cortex-R5F

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index e01eb55bc0..7f19872722 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -10,6 +10,10 @@ config ARM_V6
     bool
     select TCG
 
+config ARM_V7R
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -358,6 +362,7 @@ config XLNX_ZYNQMP_ARM
     bool
     select AHCI
     select ARM_GIC
+    select ARM_V7R
     select CADENCE
     select DDC
     select DPCD
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 07/12] target/arm: Restrict ARMv7 R-profile cpus to TCG accel
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

A KVM-only build won't be able to run R-profile cpus.

Only enable the following ARMv7 R-Profile CPUs when TCG is available:

  - Cortex-R5
  - Cortex-R5F

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/arm/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index e01eb55bc0..7f19872722 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -10,6 +10,10 @@ config ARM_V6
     bool
     select TCG
 
+config ARM_V7R
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
@@ -358,6 +362,7 @@ config XLNX_ZYNQMP_ARM
     bool
     select AHCI
     select ARM_GIC
+    select ARM_V7R
     select CADENCE
     select DDC
     select DPCD
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 08/12] target/arm: Restrict ARMv7 M-profile cpus to TCG accel
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

A KVM-only build won't be able to run M-profile cpus.

Only enable the following ARMv7 M-Profile CPUs when TCG is available:

  - Cortex-M0
  - Cortex-M3
  - Cortex-M4
  - Cortex-M33

We don't need to enforce CONFIG_ARM_V7M in default-configs because
all machines using a Cortex-M are already explicitly selected.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 default-configs/arm-softmmu.mak | 3 ---
 hw/arm/Kconfig                  | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 08a32123b4..002c97862b 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -1,8 +1,5 @@
 # Default configuration for arm-softmmu
 
-# TODO: ARM_V7M is currently always required - make this more flexible!
-CONFIG_ARM_V7M=y
-
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 7f19872722..15faa2f2d7 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -14,6 +14,10 @@ config ARM_V7R
     bool
     select TCG
 
+config ARM_V7M
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 08/12] target/arm: Restrict ARMv7 M-profile cpus to TCG accel
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

A KVM-only build won't be able to run M-profile cpus.

Only enable the following ARMv7 M-Profile CPUs when TCG is available:

  - Cortex-M0
  - Cortex-M3
  - Cortex-M4
  - Cortex-M33

We don't need to enforce CONFIG_ARM_V7M in default-configs because
all machines using a Cortex-M are already explicitly selected.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 default-configs/arm-softmmu.mak | 3 ---
 hw/arm/Kconfig                  | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak
index 08a32123b4..002c97862b 100644
--- a/default-configs/arm-softmmu.mak
+++ b/default-configs/arm-softmmu.mak
@@ -1,8 +1,5 @@
 # Default configuration for arm-softmmu
 
-# TODO: ARM_V7M is currently always required - make this more flexible!
-CONFIG_ARM_V7M=y
-
 # CONFIG_PCI_DEVICES=n
 # CONFIG_TEST_DEVICES=n
 
diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
index 7f19872722..15faa2f2d7 100644
--- a/hw/arm/Kconfig
+++ b/hw/arm/Kconfig
@@ -14,6 +14,10 @@ config ARM_V7R
     bool
     select TCG
 
+config ARM_V7M
+    bool
+    select TCG
+
 config ARM_VIRT
     bool
     imply PCI_DEVICES
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 09/12] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

From: Thomas Huth <thuth@redhat.com>

We've already got the CONFIG_ARM_V7M switch, but it currently can
not be disabled yet. The m_helper.c code should not be compiled
into the binary if the switch is not enabled. We also have to
provide some stubs in a separate file to make sure that we still
can link the other code without CONFIG_ARM_V7M.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190903154810.27365-4-thuth@redhat.com>
[PMD: Keep m_helper-stub.c but extend it, rewrite the rest]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Rewrite since v3, therefore removed Richard R-b tag.
---
 target/arm/cpu.h           | 12 -------
 target/arm/cpu_tcg.c       |  4 ++-
 target/arm/helper.c        |  7 ----
 target/arm/m_helper-stub.c | 73 ++++++++++++++++++++++++++++++++++++++
 target/arm/meson.build     |  4 ++-
 5 files changed, 79 insertions(+), 21 deletions(-)
 create mode 100644 target/arm/m_helper-stub.c

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 6036f61d60..c5f4c1b181 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2117,12 +2117,6 @@ uint32_t arm_phys_excp_target_el(CPUState *cs, uint32_t excp_idx,
 /* Interface between CPU and Interrupt controller.  */
 #ifndef CONFIG_USER_ONLY
 bool armv7m_nvic_can_take_pending_exception(void *opaque);
-#else
-static inline bool armv7m_nvic_can_take_pending_exception(void *opaque)
-{
-    return true;
-}
-#endif
 /**
  * armv7m_nvic_set_pending: mark the specified exception as pending
  * @opaque: the NVIC
@@ -2228,13 +2222,7 @@ int armv7m_nvic_raw_execution_priority(void *opaque);
  * @secure: the security state to test
  * This corresponds to the pseudocode IsReqExecPriNeg().
  */
-#ifndef CONFIG_USER_ONLY
 bool armv7m_nvic_neg_prio_requested(void *opaque, bool secure);
-#else
-static inline bool armv7m_nvic_neg_prio_requested(void *opaque, bool secure)
-{
-    return false;
-}
 #endif
 
 /* Interface for defining coprocessor registers.
diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c
index 00b0e08f33..563b0e82bc 100644
--- a/target/arm/cpu_tcg.c
+++ b/target/arm/cpu_tcg.c
@@ -15,6 +15,7 @@
 /* CPU models. These are not needed for the AArch64 linux-user build. */
 #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
 
+#ifndef CONFIG_USER_ONLY
 static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
 {
     CPUClass *cc = CPU_GET_CLASS(cs);
@@ -38,6 +39,7 @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
     }
     return ret;
 }
+#endif /* CONFIG_USER_ONLY */
 
 static void arm926_initfn(Object *obj)
 {
@@ -602,9 +604,9 @@ static void arm_v7m_class_init(ObjectClass *oc, void *data)
     acc->info = data;
 #ifndef CONFIG_USER_ONLY
     cc->do_interrupt = arm_v7m_cpu_do_interrupt;
+    cc->cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt;
 #endif
 
-    cc->cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt;
     cc->gdb_core_xml_file = "arm-m-profile.xml";
 }
 
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 88bd9dd35d..5196a17bdb 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -12653,13 +12653,6 @@ int arm_mmu_idx_to_el(ARMMMUIdx mmu_idx)
     }
 }
 
-#ifndef CONFIG_TCG
-ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate)
-{
-    g_assert_not_reached();
-}
-#endif
-
 ARMMMUIdx arm_mmu_idx_el(CPUARMState *env, int el)
 {
     if (arm_feature(env, ARM_FEATURE_M)) {
diff --git a/target/arm/m_helper-stub.c b/target/arm/m_helper-stub.c
new file mode 100644
index 0000000000..6d751424e8
--- /dev/null
+++ b/target/arm/m_helper-stub.c
@@ -0,0 +1,73 @@
+/*
+ * ARM V7M related stubs.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#include "qemu/osdep.h"
+#include "cpu.h"
+#include "exec/helper-proto.h"
+#include "internals.h"
+
+void HELPER(v7m_bxns)(CPUARMState *env, uint32_t dest)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_blxns)(CPUARMState *env, uint32_t dest)
+{
+    g_assert_not_reached();
+}
+
+uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val)
+{
+    g_assert_not_reached();
+}
+
+uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr, uint32_t op)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_preserve_fp_state)(CPUARMState *env)
+{
+    g_assert_not_reached();
+}
+
+void write_v7m_exception(CPUARMState *env, uint32_t new_exc)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_vlldm)(CPUARMState *env, uint32_t fptr)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_vlstm)(CPUARMState *env, uint32_t fptr)
+{
+    g_assert_not_reached();
+}
+
+ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate)
+{
+    g_assert_not_reached();
+}
+
+#ifndef CONFIG_USER_ONLY
+
+bool armv7m_nvic_can_take_pending_exception(void *opaque)
+{
+    g_assert_not_reached();
+}
+
+void arm_v7m_cpu_do_interrupt(CPUState *cs)
+{
+    g_assert_not_reached();
+}
+
+#endif /* CONFIG_USER_ONLY */
diff --git a/target/arm/meson.build b/target/arm/meson.build
index f5de2a77b8..f6a88297a8 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -21,7 +21,6 @@ arm_ss.add(files(
   'gdbstub.c',
   'helper.c',
   'iwmmxt_helper.c',
-  'm_helper.c',
   'neon_helper.c',
   'op_helper.c',
   'tlb_helper.c',
@@ -30,9 +29,12 @@ arm_ss.add(files(
   'vfp_helper.c',
   'cpu_tcg.c',
 ))
+arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
+
 arm_ss.add(zlib)
 
 arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
+arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
 
 arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
 
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 09/12] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

From: Thomas Huth <thuth@redhat.com>

We've already got the CONFIG_ARM_V7M switch, but it currently can
not be disabled yet. The m_helper.c code should not be compiled
into the binary if the switch is not enabled. We also have to
provide some stubs in a separate file to make sure that we still
can link the other code without CONFIG_ARM_V7M.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20190903154810.27365-4-thuth@redhat.com>
[PMD: Keep m_helper-stub.c but extend it, rewrite the rest]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Rewrite since v3, therefore removed Richard R-b tag.
---
 target/arm/cpu.h           | 12 -------
 target/arm/cpu_tcg.c       |  4 ++-
 target/arm/helper.c        |  7 ----
 target/arm/m_helper-stub.c | 73 ++++++++++++++++++++++++++++++++++++++
 target/arm/meson.build     |  4 ++-
 5 files changed, 79 insertions(+), 21 deletions(-)
 create mode 100644 target/arm/m_helper-stub.c

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 6036f61d60..c5f4c1b181 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -2117,12 +2117,6 @@ uint32_t arm_phys_excp_target_el(CPUState *cs, uint32_t excp_idx,
 /* Interface between CPU and Interrupt controller.  */
 #ifndef CONFIG_USER_ONLY
 bool armv7m_nvic_can_take_pending_exception(void *opaque);
-#else
-static inline bool armv7m_nvic_can_take_pending_exception(void *opaque)
-{
-    return true;
-}
-#endif
 /**
  * armv7m_nvic_set_pending: mark the specified exception as pending
  * @opaque: the NVIC
@@ -2228,13 +2222,7 @@ int armv7m_nvic_raw_execution_priority(void *opaque);
  * @secure: the security state to test
  * This corresponds to the pseudocode IsReqExecPriNeg().
  */
-#ifndef CONFIG_USER_ONLY
 bool armv7m_nvic_neg_prio_requested(void *opaque, bool secure);
-#else
-static inline bool armv7m_nvic_neg_prio_requested(void *opaque, bool secure)
-{
-    return false;
-}
 #endif
 
 /* Interface for defining coprocessor registers.
diff --git a/target/arm/cpu_tcg.c b/target/arm/cpu_tcg.c
index 00b0e08f33..563b0e82bc 100644
--- a/target/arm/cpu_tcg.c
+++ b/target/arm/cpu_tcg.c
@@ -15,6 +15,7 @@
 /* CPU models. These are not needed for the AArch64 linux-user build. */
 #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
 
+#ifndef CONFIG_USER_ONLY
 static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
 {
     CPUClass *cc = CPU_GET_CLASS(cs);
@@ -38,6 +39,7 @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
     }
     return ret;
 }
+#endif /* CONFIG_USER_ONLY */
 
 static void arm926_initfn(Object *obj)
 {
@@ -602,9 +604,9 @@ static void arm_v7m_class_init(ObjectClass *oc, void *data)
     acc->info = data;
 #ifndef CONFIG_USER_ONLY
     cc->do_interrupt = arm_v7m_cpu_do_interrupt;
+    cc->cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt;
 #endif
 
-    cc->cpu_exec_interrupt = arm_v7m_cpu_exec_interrupt;
     cc->gdb_core_xml_file = "arm-m-profile.xml";
 }
 
diff --git a/target/arm/helper.c b/target/arm/helper.c
index 88bd9dd35d..5196a17bdb 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -12653,13 +12653,6 @@ int arm_mmu_idx_to_el(ARMMMUIdx mmu_idx)
     }
 }
 
-#ifndef CONFIG_TCG
-ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate)
-{
-    g_assert_not_reached();
-}
-#endif
-
 ARMMMUIdx arm_mmu_idx_el(CPUARMState *env, int el)
 {
     if (arm_feature(env, ARM_FEATURE_M)) {
diff --git a/target/arm/m_helper-stub.c b/target/arm/m_helper-stub.c
new file mode 100644
index 0000000000..6d751424e8
--- /dev/null
+++ b/target/arm/m_helper-stub.c
@@ -0,0 +1,73 @@
+/*
+ * ARM V7M related stubs.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#include "qemu/osdep.h"
+#include "cpu.h"
+#include "exec/helper-proto.h"
+#include "internals.h"
+
+void HELPER(v7m_bxns)(CPUARMState *env, uint32_t dest)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_blxns)(CPUARMState *env, uint32_t dest)
+{
+    g_assert_not_reached();
+}
+
+uint32_t HELPER(v7m_mrs)(CPUARMState *env, uint32_t reg)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_msr)(CPUARMState *env, uint32_t maskreg, uint32_t val)
+{
+    g_assert_not_reached();
+}
+
+uint32_t HELPER(v7m_tt)(CPUARMState *env, uint32_t addr, uint32_t op)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_preserve_fp_state)(CPUARMState *env)
+{
+    g_assert_not_reached();
+}
+
+void write_v7m_exception(CPUARMState *env, uint32_t new_exc)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_vlldm)(CPUARMState *env, uint32_t fptr)
+{
+    g_assert_not_reached();
+}
+
+void HELPER(v7m_vlstm)(CPUARMState *env, uint32_t fptr)
+{
+    g_assert_not_reached();
+}
+
+ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate)
+{
+    g_assert_not_reached();
+}
+
+#ifndef CONFIG_USER_ONLY
+
+bool armv7m_nvic_can_take_pending_exception(void *opaque)
+{
+    g_assert_not_reached();
+}
+
+void arm_v7m_cpu_do_interrupt(CPUState *cs)
+{
+    g_assert_not_reached();
+}
+
+#endif /* CONFIG_USER_ONLY */
diff --git a/target/arm/meson.build b/target/arm/meson.build
index f5de2a77b8..f6a88297a8 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -21,7 +21,6 @@ arm_ss.add(files(
   'gdbstub.c',
   'helper.c',
   'iwmmxt_helper.c',
-  'm_helper.c',
   'neon_helper.c',
   'op_helper.c',
   'tlb_helper.c',
@@ -30,9 +29,12 @@ arm_ss.add(files(
   'vfp_helper.c',
   'cpu_tcg.c',
 ))
+arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
+
 arm_ss.add(zlib)
 
 arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
+arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
 
 arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
 
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 10/12] target/arm: Do not build TCG objects when TCG is off
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé,
	Samuel Ortiz

From: Samuel Ortiz <sameo@linux.intel.com>

We can now safely turn all TCG dependent build off when CONFIG_TCG is
off. This allows building ARM binaries with --disable-tcg.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
[PMD: Heavily rebased during almost 2 years then finally rewritten =) ]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 target/arm/meson.build | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/target/arm/meson.build b/target/arm/meson.build
index f6a88297a8..9b7727d4bb 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -16,24 +16,29 @@ arm_ss = ss.source_set()
 arm_ss.add(gen)
 arm_ss.add(files(
   'cpu.c',
-  'crypto_helper.c',
-  'debug_helper.c',
   'gdbstub.c',
   'helper.c',
+  'vfp_helper.c',
+))
+
+arm_tcg_ss = ss.source_set()
+arm_tcg_ss.add(files(
+  'arm-semi.c',
+  'cpu_tcg.c',
+  'crypto_helper.c',
+  'debug_helper.c',
   'iwmmxt_helper.c',
   'neon_helper.c',
   'op_helper.c',
   'tlb_helper.c',
   'translate.c',
   'vec_helper.c',
-  'vfp_helper.c',
-  'cpu_tcg.c',
 ))
-arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
+
+arm_tcg_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
 
 arm_ss.add(zlib)
 
-arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
 arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
 
 arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
@@ -41,6 +46,9 @@ arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: fil
 arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'cpu64.c',
   'gdbstub64.c',
+))
+
+arm_tcg_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'helper-a64.c',
   'mte_helper.c',
   'pauth_helper.c',
@@ -49,14 +57,16 @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'translate-sve.c',
 ))
 
+arm_ss.add_all(when: 'CONFIG_TCG', if_true: arm_tcg_ss)
+
 arm_softmmu_ss = ss.source_set()
 arm_softmmu_ss.add(files(
   'arch_dump.c',
   'arm-powerctl.c',
   'machine.c',
   'monitor.c',
-  'psci.c',
 ))
+arm_softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('psci.c'))
 
 target_arch += {'arm': arm_ss}
 target_softmmu_arch += {'arm': arm_softmmu_ss}
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 10/12] target/arm: Do not build TCG objects when TCG is off
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Samuel Ortiz, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

From: Samuel Ortiz <sameo@linux.intel.com>

We can now safely turn all TCG dependent build off when CONFIG_TCG is
off. This allows building ARM binaries with --disable-tcg.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
[PMD: Heavily rebased during almost 2 years then finally rewritten =) ]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 target/arm/meson.build | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/target/arm/meson.build b/target/arm/meson.build
index f6a88297a8..9b7727d4bb 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -16,24 +16,29 @@ arm_ss = ss.source_set()
 arm_ss.add(gen)
 arm_ss.add(files(
   'cpu.c',
-  'crypto_helper.c',
-  'debug_helper.c',
   'gdbstub.c',
   'helper.c',
+  'vfp_helper.c',
+))
+
+arm_tcg_ss = ss.source_set()
+arm_tcg_ss.add(files(
+  'arm-semi.c',
+  'cpu_tcg.c',
+  'crypto_helper.c',
+  'debug_helper.c',
   'iwmmxt_helper.c',
   'neon_helper.c',
   'op_helper.c',
   'tlb_helper.c',
   'translate.c',
   'vec_helper.c',
-  'vfp_helper.c',
-  'cpu_tcg.c',
 ))
-arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
+
+arm_tcg_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
 
 arm_ss.add(zlib)
 
-arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
 arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
 
 arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
@@ -41,6 +46,9 @@ arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: fil
 arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'cpu64.c',
   'gdbstub64.c',
+))
+
+arm_tcg_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'helper-a64.c',
   'mte_helper.c',
   'pauth_helper.c',
@@ -49,14 +57,16 @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'translate-sve.c',
 ))
 
+arm_ss.add_all(when: 'CONFIG_TCG', if_true: arm_tcg_ss)
+
 arm_softmmu_ss = ss.source_set()
 arm_softmmu_ss.add(files(
   'arch_dump.c',
   'arm-powerctl.c',
   'machine.c',
   'monitor.c',
-  'psci.c',
 ))
+arm_softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('psci.c'))
 
 target_arch += {'arm': arm_ss}
 target_softmmu_arch += {'arm': arm_softmmu_ss}
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 11/12] target/arm: Reorder meson.build rules
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

Reorder the rules to make this file easier to modify.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
I prefer to not squash that with the previous patch,
as it makes it harder to review.
---
 target/arm/meson.build | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/target/arm/meson.build b/target/arm/meson.build
index 9b7727d4bb..341af8f2ca 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -14,6 +14,7 @@ gen = [
 
 arm_ss = ss.source_set()
 arm_ss.add(gen)
+arm_ss.add(zlib)
 arm_ss.add(files(
   'cpu.c',
   'gdbstub.c',
@@ -21,6 +22,13 @@ arm_ss.add(files(
   'vfp_helper.c',
 ))
 
+arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
+
+arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
+  'cpu64.c',
+  'gdbstub64.c',
+))
+
 arm_tcg_ss = ss.source_set()
 arm_tcg_ss.add(files(
   'arm-semi.c',
@@ -35,26 +43,16 @@ arm_tcg_ss.add(files(
   'vec_helper.c',
 ))
 
-arm_tcg_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
-
-arm_ss.add(zlib)
-
 arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
-
-arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
-
-arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
-  'cpu64.c',
-  'gdbstub64.c',
-))
+arm_tcg_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
 
 arm_tcg_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'helper-a64.c',
   'mte_helper.c',
   'pauth_helper.c',
-  'sve_helper.c',
   'translate-a64.c',
   'translate-sve.c',
+  'sve_helper.c',
 ))
 
 arm_ss.add_all(when: 'CONFIG_TCG', if_true: arm_tcg_ss)
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 11/12] target/arm: Reorder meson.build rules
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

Reorder the rules to make this file easier to modify.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
I prefer to not squash that with the previous patch,
as it makes it harder to review.
---
 target/arm/meson.build | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/target/arm/meson.build b/target/arm/meson.build
index 9b7727d4bb..341af8f2ca 100644
--- a/target/arm/meson.build
+++ b/target/arm/meson.build
@@ -14,6 +14,7 @@ gen = [
 
 arm_ss = ss.source_set()
 arm_ss.add(gen)
+arm_ss.add(zlib)
 arm_ss.add(files(
   'cpu.c',
   'gdbstub.c',
@@ -21,6 +22,13 @@ arm_ss.add(files(
   'vfp_helper.c',
 ))
 
+arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
+
+arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
+  'cpu64.c',
+  'gdbstub64.c',
+))
+
 arm_tcg_ss = ss.source_set()
 arm_tcg_ss.add(files(
   'arm-semi.c',
@@ -35,26 +43,16 @@ arm_tcg_ss.add(files(
   'vec_helper.c',
 ))
 
-arm_tcg_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
-
-arm_ss.add(zlib)
-
 arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
-
-arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c'))
-
-arm_ss.add(when: 'TARGET_AARCH64', if_true: files(
-  'cpu64.c',
-  'gdbstub64.c',
-))
+arm_tcg_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
 
 arm_tcg_ss.add(when: 'TARGET_AARCH64', if_true: files(
   'helper-a64.c',
   'mte_helper.c',
   'pauth_helper.c',
-  'sve_helper.c',
   'translate-a64.c',
   'translate-sve.c',
+  'sve_helper.c',
 ))
 
 arm_ss.add_all(when: 'CONFIG_TCG', if_true: arm_tcg_ss)
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson, Philippe Mathieu-Daudé

Add a job to build QEMU on Aarch64 with TCG disabled, so
this configuration won't bitrot over time.

We explicitly modify default-configs/aarch64-softmmu.mak to
only select the 'virt' and 'SBSA-REF' machines.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Job ran for 7 min 30 sec
https://travis-ci.org/github/philmd/qemu/jobs/731428859
---
 .travis.yml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index c75221dca3..cad65cf181 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -402,6 +402,41 @@ jobs:
         - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
         - UNRELIABLE=true
 
+    - name: "[aarch64] GCC (disable-tcg)"
+      arch: arm64
+      dist: bionic
+      addons:
+        apt_packages:
+          - libaio-dev
+          - libattr1-dev
+          - libcap-ng-dev
+          - libgcrypt20-dev
+          - libgnutls28-dev
+          - libiscsi-dev
+          - liblttng-ust-dev
+          - libnfs-dev
+          - libnss3-dev
+          - libpixman-1-dev
+          - libpng-dev
+          - librados-dev
+          - libseccomp-dev
+          - liburcu-dev
+          - libusb-1.0-0-dev
+          - libvdeplug-dev
+          - libvte-2.91-dev
+          # Tests dependencies
+          - genisoimage
+      env:
+        - CONFIG="--disable-containers --disable-tcg --enable-kvm --disable-tools"
+        - TEST_CMD="make check-unit"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-aarch64"
+      before_script:
+        # Only use the 'virt' and 'sbsa-ref' machine which don't need TCG.
+        - echo CONFIG_ARM_VIRT=y > default-configs/aarch64-softmmu.mak
+        - echo CONFIG_SBSA_REF=y >> default-configs/aarch64-softmmu.mak
+        - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
+        - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
+
     - name: "[ppc64] GCC check-tcg"
       arch: ppc64le
       dist: xenial
-- 
2.26.2


^ permalink raw reply	[flat|nested] 70+ messages in thread

* [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
@ 2020-09-29 22:43   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:43 UTC (permalink / raw)
  To: qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Philippe Mathieu-Daudé,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

Add a job to build QEMU on Aarch64 with TCG disabled, so
this configuration won't bitrot over time.

We explicitly modify default-configs/aarch64-softmmu.mak to
only select the 'virt' and 'SBSA-REF' machines.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Job ran for 7 min 30 sec
https://travis-ci.org/github/philmd/qemu/jobs/731428859
---
 .travis.yml | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index c75221dca3..cad65cf181 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -402,6 +402,41 @@ jobs:
         - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}"
         - UNRELIABLE=true
 
+    - name: "[aarch64] GCC (disable-tcg)"
+      arch: arm64
+      dist: bionic
+      addons:
+        apt_packages:
+          - libaio-dev
+          - libattr1-dev
+          - libcap-ng-dev
+          - libgcrypt20-dev
+          - libgnutls28-dev
+          - libiscsi-dev
+          - liblttng-ust-dev
+          - libnfs-dev
+          - libnss3-dev
+          - libpixman-1-dev
+          - libpng-dev
+          - librados-dev
+          - libseccomp-dev
+          - liburcu-dev
+          - libusb-1.0-0-dev
+          - libvdeplug-dev
+          - libvte-2.91-dev
+          # Tests dependencies
+          - genisoimage
+      env:
+        - CONFIG="--disable-containers --disable-tcg --enable-kvm --disable-tools"
+        - TEST_CMD="make check-unit"
+        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-aarch64"
+      before_script:
+        # Only use the 'virt' and 'sbsa-ref' machine which don't need TCG.
+        - echo CONFIG_ARM_VIRT=y > default-configs/aarch64-softmmu.mak
+        - echo CONFIG_SBSA_REF=y >> default-configs/aarch64-softmmu.mak
+        - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
+        - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; }
+
     - name: "[ppc64] GCC check-tcg"
       arch: ppc64le
       dist: xenial
-- 
2.26.2



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 01/12] accel/tcg: Add stub for cpu_loop_exit()
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-09-30  7:08     ` Thomas Huth
  -1 siblings, 0 replies; 70+ messages in thread
From: Thomas Huth @ 2020-09-30  7:08 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, Richard Henderson, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson, Keith Packard

On 30/09/2020 00.43, Philippe Mathieu-Daudé wrote:
> Since the support of SYS_READC in commit 8de702cb67 the
> semihosting code is strongly depedent of the TCG accelerator
> via a call to cpu_loop_exit().
> 
> Ideally we would only build semihosting support when TCG
> is available, but unfortunately this is not trivial because
> semihosting is used by many targets in different configurations.
> For now add a simple stub to avoid link failure when building
> with --disable-tcg:
> 
>   hw/semihosting/console.c:160: undefined reference to `cpu_loop_exit'
> 
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  accel/stubs/tcg-stub.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
> index e4bbf997aa..1eec7fb90e 100644
> --- a/accel/stubs/tcg-stub.c
> +++ b/accel/stubs/tcg-stub.c
> @@ -29,3 +29,8 @@ void *probe_access(CPUArchState *env, target_ulong addr, int size,
>       /* Handled by hardware accelerator. */
>       g_assert_not_reached();
>  }
> +
> +void cpu_loop_exit(CPUState *cpu)
> +{
> +    g_assert_not_reached();
> +}
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 01/12] accel/tcg: Add stub for cpu_loop_exit()
@ 2020-09-30  7:08     ` Thomas Huth
  0 siblings, 0 replies; 70+ messages in thread
From: Thomas Huth @ 2020-09-30  7:08 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Keith Packard, kvm, Richard Henderson,
	qemu-arm, Paolo Bonzini, Alex Bennée, Richard Henderson

On 30/09/2020 00.43, Philippe Mathieu-Daudé wrote:
> Since the support of SYS_READC in commit 8de702cb67 the
> semihosting code is strongly depedent of the TCG accelerator
> via a call to cpu_loop_exit().
> 
> Ideally we would only build semihosting support when TCG
> is available, but unfortunately this is not trivial because
> semihosting is used by many targets in different configurations.
> For now add a simple stub to avoid link failure when building
> with --disable-tcg:
> 
>   hw/semihosting/console.c:160: undefined reference to `cpu_loop_exit'
> 
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  accel/stubs/tcg-stub.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
> index e4bbf997aa..1eec7fb90e 100644
> --- a/accel/stubs/tcg-stub.c
> +++ b/accel/stubs/tcg-stub.c
> @@ -29,3 +29,8 @@ void *probe_access(CPUArchState *env, target_ulong addr, int size,
>       /* Handled by hardware accelerator. */
>       g_assert_not_reached();
>  }
> +
> +void cpu_loop_exit(CPUState *cpu)
> +{
> +    g_assert_not_reached();
> +}
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2020-09-30  7:58   ` Igor Mammedov
  -1 siblings, 0 replies; 70+ messages in thread
From: Igor Mammedov @ 2020-09-30  7:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

On Wed, 30 Sep 2020 00:43:43 +0200
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Cover from Samuel Ortiz from (part 1) [1]:
> 
>   This patchset allows for building and running ARM targets with TCG
>   disabled. [...]
> 
>   The rationale behind this work comes from the NEMU project where we're
>   trying to only support x86 and ARM 64-bit architectures, without
>   including the TCG code base. We can only do so if we can build and run
>   ARM binaries with TCG disabled.

I don't recall exact reason but TCG variant is used by bios-tables-test
to test arm/virt so it will probably break that
(it has something to do with how KVM uses CPU/GIC, which was making
ACPI tables not stable (i.e. depend on host), so comparison with master
tables was failing)


> 
> v4 almost 2 years later... [2]:
> - Rebased on Meson
> - Addressed Richard review comments
> - Addressed Claudio review comments
> 
> v3 almost 18 months later [3]:
> - Rebased
> - Addressed Thomas review comments
> - Added Travis-CI job to keep building --disable-tcg on ARM
> 
> v2 [4]:
> - Addressed review comments from Richard and Thomas from v1 [1]
> 
> Regards,
> 
> Phil.
> 
> [1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
> [2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
> [3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
> [4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html
> 
> Green CI:
> - https://cirrus-ci.com/build/4572961761918976
> - https://gitlab.com/philmd/qemu/-/pipelines/196047779
> - https://travis-ci.org/github/philmd/qemu/builds/731370972
> 
> Based-on: <20200929125609.1088330-1-philmd@redhat.com>
> "hw/arm: Restrict APEI tables generation to the 'virt' machine"
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html
> 
> Philippe Mathieu-Daudé (10):
>   accel/tcg: Add stub for cpu_loop_exit()
>   meson: Allow optional target/${ARCH}/Kconfig
>   target/arm: Select SEMIHOSTING if TCG is available
>   target/arm: Restrict ARMv4 cpus to TCG accel
>   target/arm: Restrict ARMv5 cpus to TCG accel
>   target/arm: Restrict ARMv6 cpus to TCG accel
>   target/arm: Restrict ARMv7 R-profile cpus to TCG accel
>   target/arm: Restrict ARMv7 M-profile cpus to TCG accel
>   target/arm: Reorder meson.build rules
>   .travis.yml: Add a KVM-only Aarch64 job
> 
> Samuel Ortiz (1):
>   target/arm: Do not build TCG objects when TCG is off
> 
> Thomas Huth (1):
>   target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
> 
>  default-configs/arm-softmmu.mak |  3 --
>  meson.build                     |  8 +++-
>  target/arm/cpu.h                | 12 ------
>  accel/stubs/tcg-stub.c          |  5 +++
>  target/arm/cpu_tcg.c            |  4 +-
>  target/arm/helper.c             |  7 ----
>  target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
>  .travis.yml                     | 35 ++++++++++++++++
>  hw/arm/Kconfig                  | 32 +++++++++++++++
>  target/arm/Kconfig              |  4 ++
>  target/arm/meson.build          | 40 +++++++++++-------
>  11 files changed, 184 insertions(+), 39 deletions(-)
>  create mode 100644 target/arm/m_helper-stub.c
>  create mode 100644 target/arm/Kconfig
> 


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
@ 2020-09-30  7:58   ` Igor Mammedov
  0 siblings, 0 replies; 70+ messages in thread
From: Igor Mammedov @ 2020-09-30  7:58 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Richard Henderson,
	qemu-devel, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

On Wed, 30 Sep 2020 00:43:43 +0200
Philippe Mathieu-Daudé <philmd@redhat.com> wrote:

> Cover from Samuel Ortiz from (part 1) [1]:
> 
>   This patchset allows for building and running ARM targets with TCG
>   disabled. [...]
> 
>   The rationale behind this work comes from the NEMU project where we're
>   trying to only support x86 and ARM 64-bit architectures, without
>   including the TCG code base. We can only do so if we can build and run
>   ARM binaries with TCG disabled.

I don't recall exact reason but TCG variant is used by bios-tables-test
to test arm/virt so it will probably break that
(it has something to do with how KVM uses CPU/GIC, which was making
ACPI tables not stable (i.e. depend on host), so comparison with master
tables was failing)


> 
> v4 almost 2 years later... [2]:
> - Rebased on Meson
> - Addressed Richard review comments
> - Addressed Claudio review comments
> 
> v3 almost 18 months later [3]:
> - Rebased
> - Addressed Thomas review comments
> - Added Travis-CI job to keep building --disable-tcg on ARM
> 
> v2 [4]:
> - Addressed review comments from Richard and Thomas from v1 [1]
> 
> Regards,
> 
> Phil.
> 
> [1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
> [2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
> [3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
> [4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html
> 
> Green CI:
> - https://cirrus-ci.com/build/4572961761918976
> - https://gitlab.com/philmd/qemu/-/pipelines/196047779
> - https://travis-ci.org/github/philmd/qemu/builds/731370972
> 
> Based-on: <20200929125609.1088330-1-philmd@redhat.com>
> "hw/arm: Restrict APEI tables generation to the 'virt' machine"
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html
> 
> Philippe Mathieu-Daudé (10):
>   accel/tcg: Add stub for cpu_loop_exit()
>   meson: Allow optional target/${ARCH}/Kconfig
>   target/arm: Select SEMIHOSTING if TCG is available
>   target/arm: Restrict ARMv4 cpus to TCG accel
>   target/arm: Restrict ARMv5 cpus to TCG accel
>   target/arm: Restrict ARMv6 cpus to TCG accel
>   target/arm: Restrict ARMv7 R-profile cpus to TCG accel
>   target/arm: Restrict ARMv7 M-profile cpus to TCG accel
>   target/arm: Reorder meson.build rules
>   .travis.yml: Add a KVM-only Aarch64 job
> 
> Samuel Ortiz (1):
>   target/arm: Do not build TCG objects when TCG is off
> 
> Thomas Huth (1):
>   target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
> 
>  default-configs/arm-softmmu.mak |  3 --
>  meson.build                     |  8 +++-
>  target/arm/cpu.h                | 12 ------
>  accel/stubs/tcg-stub.c          |  5 +++
>  target/arm/cpu_tcg.c            |  4 +-
>  target/arm/helper.c             |  7 ----
>  target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
>  .travis.yml                     | 35 ++++++++++++++++
>  hw/arm/Kconfig                  | 32 +++++++++++++++
>  target/arm/Kconfig              |  4 ++
>  target/arm/meson.build          | 40 +++++++++++-------
>  11 files changed, 184 insertions(+), 39 deletions(-)
>  create mode 100644 target/arm/m_helper-stub.c
>  create mode 100644 target/arm/Kconfig
> 



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 04/12] target/arm: Restrict ARMv4 cpus to TCG accel
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-09-30  8:03     ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-30  8:03 UTC (permalink / raw)
  To: qemu-devel, Thomas Huth, Paolo Bonzini
  Cc: Richard Henderson, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson

On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
> KVM requires a cpu based on (at least) the ARMv7 architecture.
> 
> Only enable the following ARMv4 CPUs when TCG is available:
> 
>   - StrongARM (SA1100/1110)
>   - OMAP1510 (TI925T)
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/arm/Kconfig | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index 7d040827af..b546b20654 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -1,3 +1,7 @@
> +config ARM_V4
> +    bool
> +    select TCG

This should be 'depends on TCG' because we can not
*select* TCG, either we enabled it or not.

The problem is the machines are already selected in
default-configs/arm-softmmu.mak, so we can not build
the current config without TCG.

> +
>  config ARM_VIRT
>      bool
>      imply PCI_DEVICES
> @@ -30,6 +34,7 @@ config ARM_VIRT
>  
>  config CHEETAH
>      bool
> +    select ARM_V4
>      select OMAP
>      select TSC210X
>  
> @@ -244,6 +249,7 @@ config COLLIE
>  
>  config SX1
>      bool
> +    select ARM_V4
>      select OMAP
>  
>  config VERSATILE
> 


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 04/12] target/arm: Restrict ARMv4 cpus to TCG accel
@ 2020-09-30  8:03     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-30  8:03 UTC (permalink / raw)
  To: qemu-devel, Thomas Huth, Paolo Bonzini
  Cc: Fam Zheng, Peter Maydell, kvm, Richard Henderson, qemu-arm,
	Alex Bennée, Richard Henderson

On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
> KVM requires a cpu based on (at least) the ARMv7 architecture.
> 
> Only enable the following ARMv4 CPUs when TCG is available:
> 
>   - StrongARM (SA1100/1110)
>   - OMAP1510 (TI925T)
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  hw/arm/Kconfig | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
> index 7d040827af..b546b20654 100644
> --- a/hw/arm/Kconfig
> +++ b/hw/arm/Kconfig
> @@ -1,3 +1,7 @@
> +config ARM_V4
> +    bool
> +    select TCG

This should be 'depends on TCG' because we can not
*select* TCG, either we enabled it or not.

The problem is the machines are already selected in
default-configs/arm-softmmu.mak, so we can not build
the current config without TCG.

> +
>  config ARM_VIRT
>      bool
>      imply PCI_DEVICES
> @@ -30,6 +34,7 @@ config ARM_VIRT
>  
>  config CHEETAH
>      bool
> +    select ARM_V4
>      select OMAP
>      select TSC210X
>  
> @@ -244,6 +249,7 @@ config COLLIE
>  
>  config SX1
>      bool
> +    select ARM_V4
>      select OMAP
>  
>  config VERSATILE
> 



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
  2020-09-30  7:58   ` Igor Mammedov
@ 2020-09-30 10:20     ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-30 10:20 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: qemu-devel, Fam Zheng, Peter Maydell, Thomas Huth, kvm,
	Richard Henderson, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

On 9/30/20 9:58 AM, Igor Mammedov wrote:
> On Wed, 30 Sep 2020 00:43:43 +0200
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> 
>> Cover from Samuel Ortiz from (part 1) [1]:
>>
>>   This patchset allows for building and running ARM targets with TCG
>>   disabled. [...]
>>
>>   The rationale behind this work comes from the NEMU project where we're
>>   trying to only support x86 and ARM 64-bit architectures, without
>>   including the TCG code base. We can only do so if we can build and run
>>   ARM binaries with TCG disabled.
> 
> I don't recall exact reason but TCG variant is used by bios-tables-test
> to test arm/virt so it will probably break that
> (it has something to do with how KVM uses CPU/GIC, which was making
> ACPI tables not stable (i.e. depend on host), so comparison with master
> tables was failing)

Not a problem, we can restrict bios-tables-test to TCG.

I don't expect the KVM-only build being able to run many
of our current tests, as most of them expect TCG.

I'll have a look at restricting the TCG-dependent tests
after this series get accepted.

> 
>>
>> v4 almost 2 years later... [2]:
>> - Rebased on Meson
>> - Addressed Richard review comments
>> - Addressed Claudio review comments
>>
>> v3 almost 18 months later [3]:
>> - Rebased
>> - Addressed Thomas review comments
>> - Added Travis-CI job to keep building --disable-tcg on ARM
>>
>> v2 [4]:
>> - Addressed review comments from Richard and Thomas from v1 [1]
>>
>> Regards,
>>
>> Phil.
>>
>> [1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
>> [2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
>> [3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
>> [4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html
>>
>> Green CI:
>> - https://cirrus-ci.com/build/4572961761918976
>> - https://gitlab.com/philmd/qemu/-/pipelines/196047779
>> - https://travis-ci.org/github/philmd/qemu/builds/731370972
>>
>> Based-on: <20200929125609.1088330-1-philmd@redhat.com>
>> "hw/arm: Restrict APEI tables generation to the 'virt' machine"
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html
>>
>> Philippe Mathieu-Daudé (10):
>>   accel/tcg: Add stub for cpu_loop_exit()
>>   meson: Allow optional target/${ARCH}/Kconfig
>>   target/arm: Select SEMIHOSTING if TCG is available
>>   target/arm: Restrict ARMv4 cpus to TCG accel
>>   target/arm: Restrict ARMv5 cpus to TCG accel
>>   target/arm: Restrict ARMv6 cpus to TCG accel
>>   target/arm: Restrict ARMv7 R-profile cpus to TCG accel
>>   target/arm: Restrict ARMv7 M-profile cpus to TCG accel
>>   target/arm: Reorder meson.build rules
>>   .travis.yml: Add a KVM-only Aarch64 job
>>
>> Samuel Ortiz (1):
>>   target/arm: Do not build TCG objects when TCG is off
>>
>> Thomas Huth (1):
>>   target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
>>
>>  default-configs/arm-softmmu.mak |  3 --
>>  meson.build                     |  8 +++-
>>  target/arm/cpu.h                | 12 ------
>>  accel/stubs/tcg-stub.c          |  5 +++
>>  target/arm/cpu_tcg.c            |  4 +-
>>  target/arm/helper.c             |  7 ----
>>  target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
>>  .travis.yml                     | 35 ++++++++++++++++
>>  hw/arm/Kconfig                  | 32 +++++++++++++++
>>  target/arm/Kconfig              |  4 ++
>>  target/arm/meson.build          | 40 +++++++++++-------
>>  11 files changed, 184 insertions(+), 39 deletions(-)
>>  create mode 100644 target/arm/m_helper-stub.c
>>  create mode 100644 target/arm/Kconfig
>>
> 


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
@ 2020-09-30 10:20     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-30 10:20 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Richard Henderson,
	qemu-devel, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

On 9/30/20 9:58 AM, Igor Mammedov wrote:
> On Wed, 30 Sep 2020 00:43:43 +0200
> Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
> 
>> Cover from Samuel Ortiz from (part 1) [1]:
>>
>>   This patchset allows for building and running ARM targets with TCG
>>   disabled. [...]
>>
>>   The rationale behind this work comes from the NEMU project where we're
>>   trying to only support x86 and ARM 64-bit architectures, without
>>   including the TCG code base. We can only do so if we can build and run
>>   ARM binaries with TCG disabled.
> 
> I don't recall exact reason but TCG variant is used by bios-tables-test
> to test arm/virt so it will probably break that
> (it has something to do with how KVM uses CPU/GIC, which was making
> ACPI tables not stable (i.e. depend on host), so comparison with master
> tables was failing)

Not a problem, we can restrict bios-tables-test to TCG.

I don't expect the KVM-only build being able to run many
of our current tests, as most of them expect TCG.

I'll have a look at restricting the TCG-dependent tests
after this series get accepted.

> 
>>
>> v4 almost 2 years later... [2]:
>> - Rebased on Meson
>> - Addressed Richard review comments
>> - Addressed Claudio review comments
>>
>> v3 almost 18 months later [3]:
>> - Rebased
>> - Addressed Thomas review comments
>> - Added Travis-CI job to keep building --disable-tcg on ARM
>>
>> v2 [4]:
>> - Addressed review comments from Richard and Thomas from v1 [1]
>>
>> Regards,
>>
>> Phil.
>>
>> [1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
>> [2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
>> [3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
>> [4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html
>>
>> Green CI:
>> - https://cirrus-ci.com/build/4572961761918976
>> - https://gitlab.com/philmd/qemu/-/pipelines/196047779
>> - https://travis-ci.org/github/philmd/qemu/builds/731370972
>>
>> Based-on: <20200929125609.1088330-1-philmd@redhat.com>
>> "hw/arm: Restrict APEI tables generation to the 'virt' machine"
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html
>>
>> Philippe Mathieu-Daudé (10):
>>   accel/tcg: Add stub for cpu_loop_exit()
>>   meson: Allow optional target/${ARCH}/Kconfig
>>   target/arm: Select SEMIHOSTING if TCG is available
>>   target/arm: Restrict ARMv4 cpus to TCG accel
>>   target/arm: Restrict ARMv5 cpus to TCG accel
>>   target/arm: Restrict ARMv6 cpus to TCG accel
>>   target/arm: Restrict ARMv7 R-profile cpus to TCG accel
>>   target/arm: Restrict ARMv7 M-profile cpus to TCG accel
>>   target/arm: Reorder meson.build rules
>>   .travis.yml: Add a KVM-only Aarch64 job
>>
>> Samuel Ortiz (1):
>>   target/arm: Do not build TCG objects when TCG is off
>>
>> Thomas Huth (1):
>>   target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
>>
>>  default-configs/arm-softmmu.mak |  3 --
>>  meson.build                     |  8 +++-
>>  target/arm/cpu.h                | 12 ------
>>  accel/stubs/tcg-stub.c          |  5 +++
>>  target/arm/cpu_tcg.c            |  4 +-
>>  target/arm/helper.c             |  7 ----
>>  target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
>>  .travis.yml                     | 35 ++++++++++++++++
>>  hw/arm/Kconfig                  | 32 +++++++++++++++
>>  target/arm/Kconfig              |  4 ++
>>  target/arm/meson.build          | 40 +++++++++++-------
>>  11 files changed, 184 insertions(+), 39 deletions(-)
>>  create mode 100644 target/arm/m_helper-stub.c
>>  create mode 100644 target/arm/Kconfig
>>
> 



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-09-30 12:50     ` Claudio Fontana
  -1 siblings, 0 replies; 70+ messages in thread
From: Claudio Fontana @ 2020-09-30 12:50 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Thomas Huth, Paolo Bonzini, Richard Henderson,
	Fam Zheng, Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson

On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
> Extend the generic Meson script to pass optional target Kconfig
> file to the minikconf script.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> We could use fs.exists() but is_file() is more specific
> (can not be a directory).
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Claudio Fontana <cfontana@suse.de>
> ---
>  meson.build | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index d36dd085b5..9ab5d514d7 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -529,6 +529,7 @@ kconfig_external_symbols = [
>  ]
>  ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
>  
> +fs = import('fs')
>  foreach target : target_dirs
>    config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
>  
> @@ -569,8 +570,13 @@ foreach target : target_dirs
>      endforeach
>  
>      config_devices_mak = target + '-config-devices.mak'
> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
> +    if fs.is_file(target_kconfig)
> +      minikconf_input += [target_kconfig]
> +    endif
>      config_devices_mak = configure_file(
> -      input: ['default-configs' / target + '.mak', 'Kconfig'],
> +      input: minikconf_input,
>        output: config_devices_mak,
>        depfile: config_devices_mak + '.d',
>        capture: true,
> 

I can't say I understand it, but the general idea seems right to me.

Ciao,

Claudio

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
@ 2020-09-30 12:50     ` Claudio Fontana
  0 siblings, 0 replies; 70+ messages in thread
From: Claudio Fontana @ 2020-09-30 12:50 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Richard Henderson,
	qemu-devel, qemu-arm, Paolo Bonzini, Alex Bennée,
	Richard Henderson

On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
> Extend the generic Meson script to pass optional target Kconfig
> file to the minikconf script.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> We could use fs.exists() but is_file() is more specific
> (can not be a directory).
> 
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Claudio Fontana <cfontana@suse.de>
> ---
>  meson.build | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index d36dd085b5..9ab5d514d7 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -529,6 +529,7 @@ kconfig_external_symbols = [
>  ]
>  ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
>  
> +fs = import('fs')
>  foreach target : target_dirs
>    config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
>  
> @@ -569,8 +570,13 @@ foreach target : target_dirs
>      endforeach
>  
>      config_devices_mak = target + '-config-devices.mak'
> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
> +    if fs.is_file(target_kconfig)
> +      minikconf_input += [target_kconfig]
> +    endif
>      config_devices_mak = configure_file(
> -      input: ['default-configs' / target + '.mak', 'Kconfig'],
> +      input: minikconf_input,
>        output: config_devices_mak,
>        depfile: config_devices_mak + '.d',
>        capture: true,
> 

I can't say I understand it, but the general idea seems right to me.

Ciao,

Claudio


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
  2020-09-30 12:50     ` Claudio Fontana
@ 2020-09-30 13:17       ` Paolo Bonzini
  -1 siblings, 0 replies; 70+ messages in thread
From: Paolo Bonzini @ 2020-09-30 13:17 UTC (permalink / raw)
  To: Claudio Fontana, Philippe Mathieu-Daudé
  Cc: qemu-devel, Thomas Huth, Richard Henderson, Fam Zheng,
	Peter Maydell, kvm, Alex Bennée, qemu-arm,
	Richard Henderson

On 30/09/20 14:50, Claudio Fontana wrote:
> On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
>> Extend the generic Meson script to pass optional target Kconfig
>> file to the minikconf script.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> We could use fs.exists() but is_file() is more specific
>> (can not be a directory).
>>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Claudio Fontana <cfontana@suse.de>
>> ---
>>  meson.build | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/meson.build b/meson.build
>> index d36dd085b5..9ab5d514d7 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -529,6 +529,7 @@ kconfig_external_symbols = [
>>  ]
>>  ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
>>  
>> +fs = import('fs')
>>  foreach target : target_dirs
>>    config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
>>  
>> @@ -569,8 +570,13 @@ foreach target : target_dirs
>>      endforeach
>>  
>>      config_devices_mak = target + '-config-devices.mak'
>> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
>> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
>> +    if fs.is_file(target_kconfig)
>> +      minikconf_input += [target_kconfig]
>> +    endif
>>      config_devices_mak = configure_file(
>> -      input: ['default-configs' / target + '.mak', 'Kconfig'],
>> +      input: minikconf_input,
>>        output: config_devices_mak,
>>        depfile: config_devices_mak + '.d',
>>        capture: true,
>>
> 
> I can't say I understand it, but the general idea seems right to me.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
@ 2020-09-30 13:17       ` Paolo Bonzini
  0 siblings, 0 replies; 70+ messages in thread
From: Paolo Bonzini @ 2020-09-30 13:17 UTC (permalink / raw)
  To: Claudio Fontana, Philippe Mathieu-Daudé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Richard Henderson,
	qemu-devel, qemu-arm, Alex Bennée, Richard Henderson

On 30/09/20 14:50, Claudio Fontana wrote:
> On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
>> Extend the generic Meson script to pass optional target Kconfig
>> file to the minikconf script.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> We could use fs.exists() but is_file() is more specific
>> (can not be a directory).
>>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Claudio Fontana <cfontana@suse.de>
>> ---
>>  meson.build | 8 +++++++-
>>  1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/meson.build b/meson.build
>> index d36dd085b5..9ab5d514d7 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -529,6 +529,7 @@ kconfig_external_symbols = [
>>  ]
>>  ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
>>  
>> +fs = import('fs')
>>  foreach target : target_dirs
>>    config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
>>  
>> @@ -569,8 +570,13 @@ foreach target : target_dirs
>>      endforeach
>>  
>>      config_devices_mak = target + '-config-devices.mak'
>> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
>> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
>> +    if fs.is_file(target_kconfig)
>> +      minikconf_input += [target_kconfig]
>> +    endif
>>      config_devices_mak = configure_file(
>> -      input: ['default-configs' / target + '.mak', 'Kconfig'],
>> +      input: minikconf_input,
>>        output: config_devices_mak,
>>        depfile: config_devices_mak + '.d',
>>        capture: true,
>>
> 
> I can't say I understand it, but the general idea seems right to me.

Acked-by: Paolo Bonzini <pbonzini@redhat.com>



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 01/12] accel/tcg: Add stub for cpu_loop_exit()
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-10-03  9:09     ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson, Keith Packard

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Since the support of SYS_READC in commit 8de702cb67 the
> semihosting code is strongly depedent of the TCG accelerator
> via a call to cpu_loop_exit().
> 
> Ideally we would only build semihosting support when TCG
> is available, but unfortunately this is not trivial because
> semihosting is used by many targets in different configurations.
> For now add a simple stub to avoid link failure when building
> with --disable-tcg:
> 
>   hw/semihosting/console.c:160: undefined reference to `cpu_loop_exit'
> 
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  accel/stubs/tcg-stub.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 01/12] accel/tcg: Add stub for cpu_loop_exit()
@ 2020-10-03  9:09     ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Keith Packard,
	qemu-arm, Paolo Bonzini, Alex Bennée, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Since the support of SYS_READC in commit 8de702cb67 the
> semihosting code is strongly depedent of the TCG accelerator
> via a call to cpu_loop_exit().
> 
> Ideally we would only build semihosting support when TCG
> is available, but unfortunately this is not trivial because
> semihosting is used by many targets in different configurations.
> For now add a simple stub to avoid link failure when building
> with --disable-tcg:
> 
>   hw/semihosting/console.c:160: undefined reference to `cpu_loop_exit'
> 
> Cc: Keith Packard <keithp@keithp.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  accel/stubs/tcg-stub.c | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-10-03  9:13     ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:13 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson, Claudio Fontana

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> +++ b/meson.build
> @@ -529,6 +529,7 @@ kconfig_external_symbols = [
>  ]
>  ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
>  
> +fs = import('fs')

Note that I have this in the capstone update, and I placed it closer to the top
of the file with some other imports.


>  foreach target : target_dirs
>    config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
>  
> @@ -569,8 +570,13 @@ foreach target : target_dirs
>      endforeach
>  
>      config_devices_mak = target + '-config-devices.mak'
> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
> +    if fs.is_file(target_kconfig)

Missing a meson.current_source_dir()?
Leastwise that was a comment that Paolo had for me.


r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
@ 2020-10-03  9:13     ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:13 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Claudio Fontana, Paolo Bonzini, Alex Bennée,
	Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> +++ b/meson.build
> @@ -529,6 +529,7 @@ kconfig_external_symbols = [
>  ]
>  ignored = ['TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_DIRS']
>  
> +fs = import('fs')

Note that I have this in the capstone update, and I placed it closer to the top
of the file with some other imports.


>  foreach target : target_dirs
>    config_target = keyval.load(meson.current_build_dir() / target / 'config-target.mak')
>  
> @@ -569,8 +570,13 @@ foreach target : target_dirs
>      endforeach
>  
>      config_devices_mak = target + '-config-devices.mak'
> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
> +    if fs.is_file(target_kconfig)

Missing a meson.current_source_dir()?
Leastwise that was a comment that Paolo had for me.


r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
  2020-10-03  9:13     ` Richard Henderson
@ 2020-10-03  9:15       ` Paolo Bonzini
  -1 siblings, 0 replies; 70+ messages in thread
From: Paolo Bonzini @ 2020-10-03  9:15 UTC (permalink / raw)
  To: Richard Henderson, Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Fam Zheng, Peter Maydell, kvm, Alex Bennée,
	qemu-arm, Richard Henderson, Claudio Fontana

On 03/10/20 11:13, Richard Henderson wrote:
>> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
>> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
>> +    if fs.is_file(target_kconfig)
> Missing a meson.current_source_dir()?
> Leastwise that was a comment that Paolo had for me.

Not sure, but it was the only way I thought the BSD build could fail;
unless the capstone submodule really was not present in Peter's checkout
and submodule update was disabled.

Paolo


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
@ 2020-10-03  9:15       ` Paolo Bonzini
  0 siblings, 0 replies; 70+ messages in thread
From: Paolo Bonzini @ 2020-10-03  9:15 UTC (permalink / raw)
  To: Richard Henderson, Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Claudio Fontana, Alex Bennée, Richard Henderson

On 03/10/20 11:13, Richard Henderson wrote:
>> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
>> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
>> +    if fs.is_file(target_kconfig)
> Missing a meson.current_source_dir()?
> Leastwise that was a comment that Paolo had for me.

Not sure, but it was the only way I thought the BSD build could fail;
unless the capstone submodule really was not present in Peter's checkout
and submodule update was disabled.

Paolo



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 04/12] target/arm: Restrict ARMv4 cpus to TCG accel
  2020-09-30  8:03     ` Philippe Mathieu-Daudé
@ 2020-10-03  9:17       ` Thomas Huth
  -1 siblings, 0 replies; 70+ messages in thread
From: Thomas Huth @ 2020-10-03  9:17 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini
  Cc: Richard Henderson, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson

On 30/09/2020 10.03, Philippe Mathieu-Daudé wrote:
> On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
>> KVM requires a cpu based on (at least) the ARMv7 architecture.
>>
>> Only enable the following ARMv4 CPUs when TCG is available:
>>
>>    - StrongARM (SA1100/1110)
>>    - OMAP1510 (TI925T)
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   hw/arm/Kconfig | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>> index 7d040827af..b546b20654 100644
>> --- a/hw/arm/Kconfig
>> +++ b/hw/arm/Kconfig
>> @@ -1,3 +1,7 @@
>> +config ARM_V4
>> +    bool
>> +    select TCG
> 
> This should be 'depends on TCG' because we can not
> *select* TCG, either we enabled it or not.
> 
> The problem is the machines are already selected in
> default-configs/arm-softmmu.mak, so we can not build
> the current config without TCG.

Is it really a problem? If the users disabled TCG and still have these 
machines in their arm-softmmu.mak, it's a configuration issue on their side, 
so it's ok if they get an error in that case.

  Thomas


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 04/12] target/arm: Restrict ARMv4 cpus to TCG accel
@ 2020-10-03  9:17       ` Thomas Huth
  0 siblings, 0 replies; 70+ messages in thread
From: Thomas Huth @ 2020-10-03  9:17 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini
  Cc: Fam Zheng, Peter Maydell, kvm, Richard Henderson, qemu-arm,
	Alex Bennée, Richard Henderson

On 30/09/2020 10.03, Philippe Mathieu-Daudé wrote:
> On 9/30/20 12:43 AM, Philippe Mathieu-Daudé wrote:
>> KVM requires a cpu based on (at least) the ARMv7 architecture.
>>
>> Only enable the following ARMv4 CPUs when TCG is available:
>>
>>    - StrongARM (SA1100/1110)
>>    - OMAP1510 (TI925T)
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>   hw/arm/Kconfig | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig
>> index 7d040827af..b546b20654 100644
>> --- a/hw/arm/Kconfig
>> +++ b/hw/arm/Kconfig
>> @@ -1,3 +1,7 @@
>> +config ARM_V4
>> +    bool
>> +    select TCG
> 
> This should be 'depends on TCG' because we can not
> *select* TCG, either we enabled it or not.
> 
> The problem is the machines are already selected in
> default-configs/arm-softmmu.mak, so we can not build
> the current config without TCG.

Is it really a problem? If the users disabled TCG and still have these 
machines in their arm-softmmu.mak, it's a configuration issue on their side, 
so it's ok if they get an error in that case.

  Thomas



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
  2020-10-03  9:15       ` Paolo Bonzini
@ 2020-10-03  9:32         ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:32 UTC (permalink / raw)
  To: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Fam Zheng, Peter Maydell, kvm, Alex Bennée,
	qemu-arm, Richard Henderson, Claudio Fontana

On 10/3/20 4:15 AM, Paolo Bonzini wrote:
> On 03/10/20 11:13, Richard Henderson wrote:
>>> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
>>> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
>>> +    if fs.is_file(target_kconfig)
>> Missing a meson.current_source_dir()?
>> Leastwise that was a comment that Paolo had for me.
> 
> Not sure, but it was the only way I thought the BSD build could fail;
> unless the capstone submodule really was not present in Peter's checkout
> and submodule update was disabled.

I don't think the build actually failed, I think it was just the cmake warning
from the missing method: to which Peter objected.

FWIW with and without source_dir work for me when testing, and I'm about to
include it in the v3 pull for an abundance of caution.


r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig
@ 2020-10-03  9:32         ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:32 UTC (permalink / raw)
  To: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Claudio Fontana, Alex Bennée, Richard Henderson

On 10/3/20 4:15 AM, Paolo Bonzini wrote:
> On 03/10/20 11:13, Richard Henderson wrote:
>>> +    target_kconfig = 'target' / config_target['TARGET_BASE_ARCH'] / 'Kconfig'
>>> +    minikconf_input = ['default-configs' / target + '.mak', 'Kconfig']
>>> +    if fs.is_file(target_kconfig)
>> Missing a meson.current_source_dir()?
>> Leastwise that was a comment that Paolo had for me.
> 
> Not sure, but it was the only way I thought the BSD build could fail;
> unless the capstone submodule really was not present in Peter's checkout
> and submodule update was disabled.

I don't think the build actually failed, I think it was just the cmake warning
from the missing method: to which Peter objected.

FWIW with and without source_dir work for me when testing, and I'm about to
include it in the v3 pull for an abundance of caution.


r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 03/12] target/arm: Select SEMIHOSTING if TCG is available
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-10-03  9:43     ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:43 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Add a kconfig entry which not explicitly selected by another
> entry, but which selects SEMIHOSTING if TCG is available.
> 
> This avoids:
> 
>   /usr/bin/ld: libqemu-aarch64-softmmu.fa.p/target_arm_arm-semi.c.o: in function `do_arm_semihosting':
>   target/arm/arm-semi.c:784: undefined reference to `qemu_semihosting_console_outc'
>   target/arm/arm-semi.c:787: undefined reference to `qemu_semihosting_console_outs'
>   /usr/bin/ld: target/arm/arm-semi.c:815: undefined reference to `qemu_semihosting_console_inc'
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  target/arm/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
>  create mode 100644 target/arm/Kconfig

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 03/12] target/arm: Select SEMIHOSTING if TCG is available
@ 2020-10-03  9:43     ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:43 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Paolo Bonzini, Alex Bennée, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Add a kconfig entry which not explicitly selected by another
> entry, but which selects SEMIHOSTING if TCG is available.
> 
> This avoids:
> 
>   /usr/bin/ld: libqemu-aarch64-softmmu.fa.p/target_arm_arm-semi.c.o: in function `do_arm_semihosting':
>   target/arm/arm-semi.c:784: undefined reference to `qemu_semihosting_console_outc'
>   target/arm/arm-semi.c:787: undefined reference to `qemu_semihosting_console_outs'
>   /usr/bin/ld: target/arm/arm-semi.c:815: undefined reference to `qemu_semihosting_console_inc'
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  target/arm/Kconfig | 4 ++++
>  1 file changed, 4 insertions(+)
>  create mode 100644 target/arm/Kconfig

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 09/12] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-10-03  9:48     ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> +arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
> +
>  arm_ss.add(zlib)
>  
>  arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
> +arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))

I'm a bit surprised about adding the file twice.
Since ARM_V7M depends on TCG, isn't the second line redundant?


r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 09/12] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
@ 2020-10-03  9:48     ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:48 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Paolo Bonzini, Alex Bennée, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> +arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
> +
>  arm_ss.add(zlib)
>  
>  arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
> +arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))

I'm a bit surprised about adding the file twice.
Since ARM_V7M depends on TCG, isn't the second line redundant?


r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 10/12] target/arm: Do not build TCG objects when TCG is off
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-10-03  9:52     ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:52 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson, Samuel Ortiz

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> -arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))

Aha, so you remove the line in the next patch anyway.
I suspect that you can not add it in the previous.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 10/12] target/arm: Do not build TCG objects when TCG is off
@ 2020-10-03  9:52     ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:52 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, Samuel Ortiz, kvm,
	qemu-arm, Paolo Bonzini, Alex Bennée, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> -arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))

Aha, so you remove the line in the next patch anyway.
I suspect that you can not add it in the previous.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 11/12] target/arm: Reorder meson.build rules
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-10-03  9:53     ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:53 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Reorder the rules to make this file easier to modify.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> I prefer to not squash that with the previous patch,
> as it makes it harder to review.
> ---
>  target/arm/meson.build | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 11/12] target/arm: Reorder meson.build rules
@ 2020-10-03  9:53     ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03  9:53 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Paolo Bonzini, Alex Bennée, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Reorder the rules to make this file easier to modify.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> I prefer to not squash that with the previous patch,
> as it makes it harder to review.
> ---
>  target/arm/meson.build | 22 ++++++++++------------
>  1 file changed, 10 insertions(+), 12 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
  2020-09-29 22:43   ` Philippe Mathieu-Daudé
@ 2020-10-03 10:03     ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03 10:03 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Thomas Huth, Paolo Bonzini, Fam Zheng, Peter Maydell, kvm,
	Alex Bennée, qemu-arm, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Add a job to build QEMU on Aarch64 with TCG disabled, so
> this configuration won't bitrot over time.
> 
> We explicitly modify default-configs/aarch64-softmmu.mak to
> only select the 'virt' and 'SBSA-REF' machines.

I really wish we didn't have to do this.

Can't we e.g. *not* list all of the arm boards explicitly in default-configs,
but use the Kconfig "default y if ..."?

Seems like that would let --disable-tcg work as expected.
One should still be able to create custom configs with e.g.
CONFIG_EXYNOS4=n or CONIFIG_ARM_V4=n, correct?


r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
@ 2020-10-03 10:03     ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03 10:03 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Paolo Bonzini, Alex Bennée, Richard Henderson

On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
> Add a job to build QEMU on Aarch64 with TCG disabled, so
> this configuration won't bitrot over time.
> 
> We explicitly modify default-configs/aarch64-softmmu.mak to
> only select the 'virt' and 'SBSA-REF' machines.

I really wish we didn't have to do this.

Can't we e.g. *not* list all of the arm boards explicitly in default-configs,
but use the Kconfig "default y if ..."?

Seems like that would let --disable-tcg work as expected.
One should still be able to create custom configs with e.g.
CONFIG_EXYNOS4=n or CONIFIG_ARM_V4=n, correct?


r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
  2020-10-03 10:03     ` Richard Henderson
@ 2020-10-03 10:14       ` Thomas Huth
  -1 siblings, 0 replies; 70+ messages in thread
From: Thomas Huth @ 2020-10-03 10:14 UTC (permalink / raw)
  To: Richard Henderson, Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, Fam Zheng, Peter Maydell, kvm, Alex Bennée,
	qemu-arm, Richard Henderson

On 03/10/2020 12.03, Richard Henderson wrote:
> On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
>> Add a job to build QEMU on Aarch64 with TCG disabled, so
>> this configuration won't bitrot over time.
>>
>> We explicitly modify default-configs/aarch64-softmmu.mak to
>> only select the 'virt' and 'SBSA-REF' machines.
> 
> I really wish we didn't have to do this.
> 
> Can't we e.g. *not* list all of the arm boards explicitly in default-configs,
> but use the Kconfig "default y if ..."?
> 
> Seems like that would let --disable-tcg work as expected.
> One should still be able to create custom configs with e.g.
> CONFIG_EXYNOS4=n or CONIFIG_ARM_V4=n, correct?

But that would be different from how we handle all other targets currently...
IMHO we shoud go into a different direction instead, e.g. by adding a 
"--kconfig-dir" switch to the configure script. If it has not been 
specified, the configs will be read from default-configs/ (or maybe we 
should then rename it to configs/default/). But if the switch has been 
specified with a directory as parameter, the config files will be read from 
that directory instead. We could then have folders like:

- configs/default (current default-configs)
- configs/no-tcg (all machines that work without tcg)
- configs/lean-kvm (for "nemu"-style minimalistic settings)

etc.

What do you think?

  Thomas


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
@ 2020-10-03 10:14       ` Thomas Huth
  0 siblings, 0 replies; 70+ messages in thread
From: Thomas Huth @ 2020-10-03 10:14 UTC (permalink / raw)
  To: Richard Henderson, Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, kvm, qemu-arm, Paolo Bonzini,
	Alex Bennée, Richard Henderson

On 03/10/2020 12.03, Richard Henderson wrote:
> On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
>> Add a job to build QEMU on Aarch64 with TCG disabled, so
>> this configuration won't bitrot over time.
>>
>> We explicitly modify default-configs/aarch64-softmmu.mak to
>> only select the 'virt' and 'SBSA-REF' machines.
> 
> I really wish we didn't have to do this.
> 
> Can't we e.g. *not* list all of the arm boards explicitly in default-configs,
> but use the Kconfig "default y if ..."?
> 
> Seems like that would let --disable-tcg work as expected.
> One should still be able to create custom configs with e.g.
> CONFIG_EXYNOS4=n or CONIFIG_ARM_V4=n, correct?

But that would be different from how we handle all other targets currently...
IMHO we shoud go into a different direction instead, e.g. by adding a 
"--kconfig-dir" switch to the configure script. If it has not been 
specified, the configs will be read from default-configs/ (or maybe we 
should then rename it to configs/default/). But if the switch has been 
specified with a directory as parameter, the config files will be read from 
that directory instead. We could then have folders like:

- configs/default (current default-configs)
- configs/no-tcg (all machines that work without tcg)
- configs/lean-kvm (for "nemu"-style minimalistic settings)

etc.

What do you think?

  Thomas



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
  2020-10-03 10:14       ` Thomas Huth
@ 2020-10-03 10:37         ` Richard Henderson
  -1 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03 10:37 UTC (permalink / raw)
  To: Thomas Huth, Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, Fam Zheng, Peter Maydell, kvm, Alex Bennée,
	qemu-arm, Richard Henderson

On 10/3/20 5:14 AM, Thomas Huth wrote:
> On 03/10/2020 12.03, Richard Henderson wrote:
>> On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
>>> Add a job to build QEMU on Aarch64 with TCG disabled, so
>>> this configuration won't bitrot over time.
>>>
>>> We explicitly modify default-configs/aarch64-softmmu.mak to
>>> only select the 'virt' and 'SBSA-REF' machines.
>>
>> I really wish we didn't have to do this.
>>
>> Can't we e.g. *not* list all of the arm boards explicitly in default-configs,
>> but use the Kconfig "default y if ..."?
>>
>> Seems like that would let --disable-tcg work as expected.
>> One should still be able to create custom configs with e.g.
>> CONFIG_EXYNOS4=n or CONIFIG_ARM_V4=n, correct?
> 
> But that would be different from how we handle all other targets currently...

So?  Does that automatically mean they're golden?
Perhaps they should be doing it the other way around too.


> IMHO we shoud go into a different direction instead, e.g. by adding a
> "--kconfig-dir" switch to the configure script. If it has not been specified,
> the configs will be read from default-configs/ (or maybe we should then rename
> it to configs/default/). But if the switch has been specified with a directory
> as parameter, the config files will be read from that directory instead. We
> could then have folders like:
> 
> - configs/default (current default-configs)
> - configs/no-tcg (all machines that work without tcg)
> - configs/lean-kvm (for "nemu"-style minimalistic settings)
> 
> etc.
> 
> What do you think?

I don't really understand the suggestion.  My first reaction is that this is
more confusing than --disable-tcg, and trying to automatically dtrt with that.


r~

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job
@ 2020-10-03 10:37         ` Richard Henderson
  0 siblings, 0 replies; 70+ messages in thread
From: Richard Henderson @ 2020-10-03 10:37 UTC (permalink / raw)
  To: Thomas Huth, Philippe Mathieu-Daudé, qemu-devel
  Cc: Fam Zheng, Peter Maydell, kvm, qemu-arm, Paolo Bonzini,
	Alex Bennée, Richard Henderson

On 10/3/20 5:14 AM, Thomas Huth wrote:
> On 03/10/2020 12.03, Richard Henderson wrote:
>> On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
>>> Add a job to build QEMU on Aarch64 with TCG disabled, so
>>> this configuration won't bitrot over time.
>>>
>>> We explicitly modify default-configs/aarch64-softmmu.mak to
>>> only select the 'virt' and 'SBSA-REF' machines.
>>
>> I really wish we didn't have to do this.
>>
>> Can't we e.g. *not* list all of the arm boards explicitly in default-configs,
>> but use the Kconfig "default y if ..."?
>>
>> Seems like that would let --disable-tcg work as expected.
>> One should still be able to create custom configs with e.g.
>> CONFIG_EXYNOS4=n or CONIFIG_ARM_V4=n, correct?
> 
> But that would be different from how we handle all other targets currently...

So?  Does that automatically mean they're golden?
Perhaps they should be doing it the other way around too.


> IMHO we shoud go into a different direction instead, e.g. by adding a
> "--kconfig-dir" switch to the configure script. If it has not been specified,
> the configs will be read from default-configs/ (or maybe we should then rename
> it to configs/default/). But if the switch has been specified with a directory
> as parameter, the config files will be read from that directory instead. We
> could then have folders like:
> 
> - configs/default (current default-configs)
> - configs/no-tcg (all machines that work without tcg)
> - configs/lean-kvm (for "nemu"-style minimalistic settings)
> 
> etc.
> 
> What do you think?

I don't really understand the suggestion.  My first reaction is that this is
more confusing than --disable-tcg, and trying to automatically dtrt with that.


r~


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
  2020-09-29 22:43 ` Philippe Mathieu-Daudé
@ 2021-01-28  0:41   ` Alex Bennée
  -1 siblings, 0 replies; 70+ messages in thread
From: Alex Bennée @ 2021-01-28  0:41 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Thomas Huth, Paolo Bonzini, Richard Henderson,
	Fam Zheng, Peter Maydell, kvm, qemu-arm, Richard Henderson


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Cover from Samuel Ortiz from (part 1) [1]:
>
>   This patchset allows for building and running ARM targets with TCG
>   disabled. [...]
>
>   The rationale behind this work comes from the NEMU project where we're
>   trying to only support x86 and ARM 64-bit architectures, without
>   including the TCG code base. We can only do so if we can build and run
>   ARM binaries with TCG disabled.
>
> v4 almost 2 years later... [2]:
> - Rebased on Meson
> - Addressed Richard review comments
> - Addressed Claudio review comments

Have you re-based recently because I was having a look but ran into
merge conflicts. I'd like to get the merged at some point because I ran
into similar issues with the Xen only build without TCG.

>
> v3 almost 18 months later [3]:
> - Rebased
> - Addressed Thomas review comments
> - Added Travis-CI job to keep building --disable-tcg on ARM
>
> v2 [4]:
> - Addressed review comments from Richard and Thomas from v1 [1]
>
> Regards,
>
> Phil.
>
> [1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
> [2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
> [3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
> [4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html
>
> Green CI:
> - https://cirrus-ci.com/build/4572961761918976
> - https://gitlab.com/philmd/qemu/-/pipelines/196047779
> - https://travis-ci.org/github/philmd/qemu/builds/731370972
>
> Based-on: <20200929125609.1088330-1-philmd@redhat.com>
> "hw/arm: Restrict APEI tables generation to the 'virt' machine"
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html
>
> Philippe Mathieu-Daudé (10):
>   accel/tcg: Add stub for cpu_loop_exit()
>   meson: Allow optional target/${ARCH}/Kconfig
>   target/arm: Select SEMIHOSTING if TCG is available
>   target/arm: Restrict ARMv4 cpus to TCG accel
>   target/arm: Restrict ARMv5 cpus to TCG accel
>   target/arm: Restrict ARMv6 cpus to TCG accel
>   target/arm: Restrict ARMv7 R-profile cpus to TCG accel
>   target/arm: Restrict ARMv7 M-profile cpus to TCG accel
>   target/arm: Reorder meson.build rules
>   .travis.yml: Add a KVM-only Aarch64 job
>
> Samuel Ortiz (1):
>   target/arm: Do not build TCG objects when TCG is off
>
> Thomas Huth (1):
>   target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
>
>  default-configs/arm-softmmu.mak |  3 --
>  meson.build                     |  8 +++-
>  target/arm/cpu.h                | 12 ------
>  accel/stubs/tcg-stub.c          |  5 +++
>  target/arm/cpu_tcg.c            |  4 +-
>  target/arm/helper.c             |  7 ----
>  target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
>  .travis.yml                     | 35 ++++++++++++++++
>  hw/arm/Kconfig                  | 32 +++++++++++++++
>  target/arm/Kconfig              |  4 ++
>  target/arm/meson.build          | 40 +++++++++++-------
>  11 files changed, 184 insertions(+), 39 deletions(-)
>  create mode 100644 target/arm/m_helper-stub.c
>  create mode 100644 target/arm/Kconfig


-- 
Alex Bennée

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
@ 2021-01-28  0:41   ` Alex Bennée
  0 siblings, 0 replies; 70+ messages in thread
From: Alex Bennée @ 2021-01-28  0:41 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Richard Henderson,
	qemu-devel, qemu-arm, Paolo Bonzini, Richard Henderson


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Cover from Samuel Ortiz from (part 1) [1]:
>
>   This patchset allows for building and running ARM targets with TCG
>   disabled. [...]
>
>   The rationale behind this work comes from the NEMU project where we're
>   trying to only support x86 and ARM 64-bit architectures, without
>   including the TCG code base. We can only do so if we can build and run
>   ARM binaries with TCG disabled.
>
> v4 almost 2 years later... [2]:
> - Rebased on Meson
> - Addressed Richard review comments
> - Addressed Claudio review comments

Have you re-based recently because I was having a look but ran into
merge conflicts. I'd like to get the merged at some point because I ran
into similar issues with the Xen only build without TCG.

>
> v3 almost 18 months later [3]:
> - Rebased
> - Addressed Thomas review comments
> - Added Travis-CI job to keep building --disable-tcg on ARM
>
> v2 [4]:
> - Addressed review comments from Richard and Thomas from v1 [1]
>
> Regards,
>
> Phil.
>
> [1]: https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg02451.html
> [2]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg689168.html
> [3]: https://www.mail-archive.com/qemu-devel@nongnu.org/msg641796.html
> [4]: https://lists.gnu.org/archive/html/qemu-devel/2019-08/msg05003.html
>
> Green CI:
> - https://cirrus-ci.com/build/4572961761918976
> - https://gitlab.com/philmd/qemu/-/pipelines/196047779
> - https://travis-ci.org/github/philmd/qemu/builds/731370972
>
> Based-on: <20200929125609.1088330-1-philmd@redhat.com>
> "hw/arm: Restrict APEI tables generation to the 'virt' machine"
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg745792.html
>
> Philippe Mathieu-Daudé (10):
>   accel/tcg: Add stub for cpu_loop_exit()
>   meson: Allow optional target/${ARCH}/Kconfig
>   target/arm: Select SEMIHOSTING if TCG is available
>   target/arm: Restrict ARMv4 cpus to TCG accel
>   target/arm: Restrict ARMv5 cpus to TCG accel
>   target/arm: Restrict ARMv6 cpus to TCG accel
>   target/arm: Restrict ARMv7 R-profile cpus to TCG accel
>   target/arm: Restrict ARMv7 M-profile cpus to TCG accel
>   target/arm: Reorder meson.build rules
>   .travis.yml: Add a KVM-only Aarch64 job
>
> Samuel Ortiz (1):
>   target/arm: Do not build TCG objects when TCG is off
>
> Thomas Huth (1):
>   target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
>
>  default-configs/arm-softmmu.mak |  3 --
>  meson.build                     |  8 +++-
>  target/arm/cpu.h                | 12 ------
>  accel/stubs/tcg-stub.c          |  5 +++
>  target/arm/cpu_tcg.c            |  4 +-
>  target/arm/helper.c             |  7 ----
>  target/arm/m_helper-stub.c      | 73 +++++++++++++++++++++++++++++++++
>  .travis.yml                     | 35 ++++++++++++++++
>  hw/arm/Kconfig                  | 32 +++++++++++++++
>  target/arm/Kconfig              |  4 ++
>  target/arm/meson.build          | 40 +++++++++++-------
>  11 files changed, 184 insertions(+), 39 deletions(-)
>  create mode 100644 target/arm/m_helper-stub.c
>  create mode 100644 target/arm/Kconfig


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
  2021-01-28  0:41   ` Alex Bennée
@ 2021-01-28 11:02     ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-28 11:02 UTC (permalink / raw)
  To: Alex Bennée, Claudio Fontana
  Cc: qemu-devel, Thomas Huth, Paolo Bonzini, Richard Henderson,
	Fam Zheng, Peter Maydell, kvm, qemu-arm, Richard Henderson

Hi Alex,

On 1/28/21 1:41 AM, Alex Bennée wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> Cover from Samuel Ortiz from (part 1) [1]:
>>
>>   This patchset allows for building and running ARM targets with TCG
>>   disabled. [...]
>>
>>   The rationale behind this work comes from the NEMU project where we're
>>   trying to only support x86 and ARM 64-bit architectures, without
>>   including the TCG code base. We can only do so if we can build and run
>>   ARM binaries with TCG disabled.
>>
>> v4 almost 2 years later... [2]:
>> - Rebased on Meson
>> - Addressed Richard review comments
>> - Addressed Claudio review comments
> 
> Have you re-based recently because I was having a look but ran into
> merge conflicts. I'd like to get the merged at some point because I ran
> into similar issues with the Xen only build without TCG.

I addressed most of this review comments locally. Since Claudio's
accelerator series was getting more attention (and is bigger) I was
waiting it gets merged first. He just respun v14:
https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg07171.html


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
@ 2021-01-28 11:02     ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-28 11:02 UTC (permalink / raw)
  To: Alex Bennée, Claudio Fontana
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Richard Henderson,
	qemu-devel, qemu-arm, Paolo Bonzini, Richard Henderson

Hi Alex,

On 1/28/21 1:41 AM, Alex Bennée wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> Cover from Samuel Ortiz from (part 1) [1]:
>>
>>   This patchset allows for building and running ARM targets with TCG
>>   disabled. [...]
>>
>>   The rationale behind this work comes from the NEMU project where we're
>>   trying to only support x86 and ARM 64-bit architectures, without
>>   including the TCG code base. We can only do so if we can build and run
>>   ARM binaries with TCG disabled.
>>
>> v4 almost 2 years later... [2]:
>> - Rebased on Meson
>> - Addressed Richard review comments
>> - Addressed Claudio review comments
> 
> Have you re-based recently because I was having a look but ran into
> merge conflicts. I'd like to get the merged at some point because I ran
> into similar issues with the Xen only build without TCG.

I addressed most of this review comments locally. Since Claudio's
accelerator series was getting more attention (and is bigger) I was
waiting it gets merged first. He just respun v14:
https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg07171.html



^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
  2021-01-28 11:02     ` Philippe Mathieu-Daudé
@ 2021-01-28 15:42       ` Alex Bennée
  -1 siblings, 0 replies; 70+ messages in thread
From: Alex Bennée @ 2021-01-28 15:42 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Claudio Fontana, qemu-devel, Thomas Huth, Paolo Bonzini,
	Richard Henderson, Fam Zheng, Peter Maydell, kvm, qemu-arm,
	Richard Henderson


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Hi Alex,
>
> On 1/28/21 1:41 AM, Alex Bennée wrote:
>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>> 
>>> Cover from Samuel Ortiz from (part 1) [1]:
>>>
>>>   This patchset allows for building and running ARM targets with TCG
>>>   disabled. [...]
>>>
>>>   The rationale behind this work comes from the NEMU project where we're
>>>   trying to only support x86 and ARM 64-bit architectures, without
>>>   including the TCG code base. We can only do so if we can build and run
>>>   ARM binaries with TCG disabled.
>>>
>>> v4 almost 2 years later... [2]:
>>> - Rebased on Meson
>>> - Addressed Richard review comments
>>> - Addressed Claudio review comments
>> 
>> Have you re-based recently because I was having a look but ran into
>> merge conflicts. I'd like to get the merged at some point because I ran
>> into similar issues with the Xen only build without TCG.
>
> I addressed most of this review comments locally. Since Claudio's
> accelerator series was getting more attention (and is bigger) I was
> waiting it gets merged first. He just respun v14:
> https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg07171.html

OK I'll have a look at Claudio's first ;-)



-- 
Alex Bennée

^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 00/12] Support disabling TCG on ARM (part 2)
@ 2021-01-28 15:42       ` Alex Bennée
  0 siblings, 0 replies; 70+ messages in thread
From: Alex Bennée @ 2021-01-28 15:42 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, Richard Henderson,
	qemu-devel, qemu-arm, Claudio Fontana, Paolo Bonzini,
	Richard Henderson


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Hi Alex,
>
> On 1/28/21 1:41 AM, Alex Bennée wrote:
>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>> 
>>> Cover from Samuel Ortiz from (part 1) [1]:
>>>
>>>   This patchset allows for building and running ARM targets with TCG
>>>   disabled. [...]
>>>
>>>   The rationale behind this work comes from the NEMU project where we're
>>>   trying to only support x86 and ARM 64-bit architectures, without
>>>   including the TCG code base. We can only do so if we can build and run
>>>   ARM binaries with TCG disabled.
>>>
>>> v4 almost 2 years later... [2]:
>>> - Rebased on Meson
>>> - Addressed Richard review comments
>>> - Addressed Claudio review comments
>> 
>> Have you re-based recently because I was having a look but ran into
>> merge conflicts. I'd like to get the merged at some point because I ran
>> into similar issues with the Xen only build without TCG.
>
> I addressed most of this review comments locally. Since Claudio's
> accelerator series was getting more attention (and is bigger) I was
> waiting it gets merged first. He just respun v14:
> https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg07171.html

OK I'll have a look at Claudio's first ;-)



-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 09/12] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
  2020-10-03  9:48     ` Richard Henderson
@ 2021-01-29 18:53       ` Philippe Mathieu-Daudé
  -1 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-29 18:53 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel, Paolo Bonzini, Marc-André Lureau
  Cc: Thomas Huth, Fam Zheng, Peter Maydell, kvm, Alex Bennée,
	qemu-arm, Richard Henderson

On 10/3/20 11:48 AM, Richard Henderson wrote:
> On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
>> +arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
>> +
>>  arm_ss.add(zlib)
>>  
>>  arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
>> +arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
> 
> I'm a bit surprised about adding the file twice.
> Since ARM_V7M depends on TCG, isn't the second line redundant?

This does:

if TCG
    if CONFIG_ARM_V7M
        files('m_helper.c')
    else #!V7M
        files('m_helper-stub.c'))
    endif
else #!TCG
    files('m_helper-stub.c'))
endif

So:

if !TCG or !V7M
    files('m_helper-stub.c'))
else
    files('m_helper.c')
endif

There might be a better way to express that in Meson...
I only understood how to do AND with arrays, but not OR.

Paolo/Marc-André, is it possible?

Thanks,

Phil.


^ permalink raw reply	[flat|nested] 70+ messages in thread

* Re: [PATCH v4 09/12] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M
@ 2021-01-29 18:53       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 70+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-29 18:53 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel, Paolo Bonzini, Marc-André Lureau
  Cc: Fam Zheng, Peter Maydell, Thomas Huth, kvm, qemu-arm,
	Alex Bennée, Richard Henderson

On 10/3/20 11:48 AM, Richard Henderson wrote:
> On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
>> +arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false: files('m_helper-stub.c'))
>> +
>>  arm_ss.add(zlib)
>>  
>>  arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
>> +arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
> 
> I'm a bit surprised about adding the file twice.
> Since ARM_V7M depends on TCG, isn't the second line redundant?

This does:

if TCG
    if CONFIG_ARM_V7M
        files('m_helper.c')
    else #!V7M
        files('m_helper-stub.c'))
    endif
else #!TCG
    files('m_helper-stub.c'))
endif

So:

if !TCG or !V7M
    files('m_helper-stub.c'))
else
    files('m_helper.c')
endif

There might be a better way to express that in Meson...
I only understood how to do AND with arrays, but not OR.

Paolo/Marc-André, is it possible?

Thanks,

Phil.



^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2021-01-29 18:54 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 22:43 [PATCH v4 00/12] Support disabling TCG on ARM (part 2) Philippe Mathieu-Daudé
2020-09-29 22:43 ` Philippe Mathieu-Daudé
2020-09-29 22:43 ` [PATCH v4 01/12] accel/tcg: Add stub for cpu_loop_exit() Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-09-30  7:08   ` Thomas Huth
2020-09-30  7:08     ` Thomas Huth
2020-10-03  9:09   ` Richard Henderson
2020-10-03  9:09     ` Richard Henderson
2020-09-29 22:43 ` [PATCH v4 02/12] meson: Allow optional target/${ARCH}/Kconfig Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-09-30 12:50   ` Claudio Fontana
2020-09-30 12:50     ` Claudio Fontana
2020-09-30 13:17     ` Paolo Bonzini
2020-09-30 13:17       ` Paolo Bonzini
2020-10-03  9:13   ` Richard Henderson
2020-10-03  9:13     ` Richard Henderson
2020-10-03  9:15     ` Paolo Bonzini
2020-10-03  9:15       ` Paolo Bonzini
2020-10-03  9:32       ` Richard Henderson
2020-10-03  9:32         ` Richard Henderson
2020-09-29 22:43 ` [PATCH v4 03/12] target/arm: Select SEMIHOSTING if TCG is available Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-10-03  9:43   ` Richard Henderson
2020-10-03  9:43     ` Richard Henderson
2020-09-29 22:43 ` [PATCH v4 04/12] target/arm: Restrict ARMv4 cpus to TCG accel Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-09-30  8:03   ` Philippe Mathieu-Daudé
2020-09-30  8:03     ` Philippe Mathieu-Daudé
2020-10-03  9:17     ` Thomas Huth
2020-10-03  9:17       ` Thomas Huth
2020-09-29 22:43 ` [PATCH v4 05/12] target/arm: Restrict ARMv5 " Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-09-29 22:43 ` [PATCH v4 06/12] target/arm: Restrict ARMv6 " Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-09-29 22:43 ` [PATCH v4 07/12] target/arm: Restrict ARMv7 R-profile " Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-09-29 22:43 ` [PATCH v4 08/12] target/arm: Restrict ARMv7 M-profile " Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-09-29 22:43 ` [PATCH v4 09/12] target/arm: Make m_helper.c optional via CONFIG_ARM_V7M Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-10-03  9:48   ` Richard Henderson
2020-10-03  9:48     ` Richard Henderson
2021-01-29 18:53     ` Philippe Mathieu-Daudé
2021-01-29 18:53       ` Philippe Mathieu-Daudé
2020-09-29 22:43 ` [PATCH v4 10/12] target/arm: Do not build TCG objects when TCG is off Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-10-03  9:52   ` Richard Henderson
2020-10-03  9:52     ` Richard Henderson
2020-09-29 22:43 ` [PATCH v4 11/12] target/arm: Reorder meson.build rules Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-10-03  9:53   ` Richard Henderson
2020-10-03  9:53     ` Richard Henderson
2020-09-29 22:43 ` [PATCH v4 12/12] .travis.yml: Add a KVM-only Aarch64 job Philippe Mathieu-Daudé
2020-09-29 22:43   ` Philippe Mathieu-Daudé
2020-10-03 10:03   ` Richard Henderson
2020-10-03 10:03     ` Richard Henderson
2020-10-03 10:14     ` Thomas Huth
2020-10-03 10:14       ` Thomas Huth
2020-10-03 10:37       ` Richard Henderson
2020-10-03 10:37         ` Richard Henderson
2020-09-30  7:58 ` [PATCH v4 00/12] Support disabling TCG on ARM (part 2) Igor Mammedov
2020-09-30  7:58   ` Igor Mammedov
2020-09-30 10:20   ` Philippe Mathieu-Daudé
2020-09-30 10:20     ` Philippe Mathieu-Daudé
2021-01-28  0:41 ` Alex Bennée
2021-01-28  0:41   ` Alex Bennée
2021-01-28 11:02   ` Philippe Mathieu-Daudé
2021-01-28 11:02     ` Philippe Mathieu-Daudé
2021-01-28 15:42     ` Alex Bennée
2021-01-28 15:42       ` Alex Bennée

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.