All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v9 00/10] accel: Allow targets to use Kconfig
@ 2020-06-18 12:33 Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 01/10] MAINTAINERS: Fix KVM path expansion glob Philippe Mathieu-Daudé
                   ` (11 more replies)
  0 siblings, 12 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Richard Henderson

Missing review:
- 03/10 MAINTAINERS: Cover the HAX accelerator stub
- 04/10 configure: Generate rule to calculate base arch of target

This series include generic patches I took of the KVM/ARM
specific series which will follow.

- Update accelerators in MAINTAINERS
- Add accel/Kconfig
- Allow targets to use their how Kconfig

Since v8:
- Fixed typo in patch 10 (Stefan)

Since v7:
- Generate base-arch() (Alex)
- Do not deprecate HAXM

Since v6:
- Fixed typo 'startwith' -> 'startswith' (armbru)

Since v5:
- Fixed typo in patch #4 subject
- Added David R-b tag
- Stripped --- comments

Since v4:
- Addressed rth review comments in rules.mak

Since v3:
- Fixed base-arch() rule (rth)
- Dropped 'semihosting: Make the feature depend of TCG'

Since v2:
- Addressed Thomas review comments
- Fixed problem when including TARGET instead of BASE_TARGET

Since v1:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg689024.html
- Drop HVF MAINTAINERS patch (merged elsewhere)
- Kconfig-select SEMIHOSTING (bonzini)
- Drop user-mode selection patches
- consider m68k/nios2/xtensa/riscv (pm215)
- reword Kconfig SEMIHOSTING description (pm215)
- reset some of rth R-b tags

Previous RFC for semihosting posted earlier:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg631218.html

Alex Bennée (1):
  configure: Generate rule to calculate the base architecture of a
    target

Philippe Mathieu-Daudé (9):
  MAINTAINERS: Fix KVM path expansion glob
  MAINTAINERS: Add an 'overall' entry for accelerators
  MAINTAINERS: Cover the HAX accelerator stub
  Makefile: Remove dangerous EOL trailing backslash
  Makefile: Write MINIKCONF variables as one entry per line
  accel/Kconfig: Extract accel selectors into their own config
  accel/Kconfig: Add the TCG selector
  Makefile: Allow target-specific optional Kconfig
  accel/tcg: Add stub for probe_access()

 configure              | 19 +++++++++++++++++++
 Makefile               | 15 +++++++++++----
 accel/stubs/tcg-stub.c |  7 +++++++
 Kconfig.host           |  7 -------
 MAINTAINERS            | 14 +++++++++++++-
 accel/Kconfig          |  9 +++++++++
 6 files changed, 59 insertions(+), 12 deletions(-)
 create mode 100644 accel/Kconfig

-- 
2.21.3



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

* [PATCH v9 01/10] MAINTAINERS: Fix KVM path expansion glob
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 02/10] MAINTAINERS: Add an 'overall' entry for accelerators Philippe Mathieu-Daudé
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Philippe Mathieu-Daudé,
	Richard Henderson, Paolo Bonzini, Alex Bennée,
	Richard Henderson

The KVM files has been moved from target-ARCH to the target/ARCH/
folder in commit fcf5ef2a. Fix the pathname expansion.

Fixes: fcf5ef2a ("Move target-* CPU file into a target/ folder")
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 955cc8dd5c..5184cf46b3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -362,7 +362,7 @@ Overall KVM CPUs
 M: Paolo Bonzini <pbonzini@redhat.com>
 L: kvm@vger.kernel.org
 S: Supported
-F: */kvm.*
+F: */*/kvm*
 F: accel/kvm/
 F: accel/stubs/kvm-stub.c
 F: include/hw/kvm/
-- 
2.21.3



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

* [PATCH v9 02/10] MAINTAINERS: Add an 'overall' entry for accelerators
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 01/10] MAINTAINERS: Fix KVM path expansion glob Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 03/10] MAINTAINERS: Cover the HAX accelerator stub Philippe Mathieu-Daudé
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Paolo Bonzini, Richard Henderson,
	Philippe Mathieu-Daudé,
	Richard Henderson

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 MAINTAINERS | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5184cf46b3..426439a2c3 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -416,6 +416,17 @@ S: Supported
 F: target/i386/kvm.c
 F: scripts/kvm/vmxcap
 
+Guest CPU Cores (other accelerators)
+------------------------------------
+Overall
+M: Richard Henderson <rth@twiddle.net>
+R: Paolo Bonzini <pbonzini@redhat.com>
+S: Maintained
+F: include/sysemu/accel.h
+F: accel/accel.c
+F: accel/Makefile.objs
+F: accel/stubs/Makefile.objs
+
 X86 HVF CPUs
 M: Roman Bolshakov <r.bolshakov@yadro.com>
 S: Maintained
-- 
2.21.3



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

* [PATCH v9 03/10] MAINTAINERS: Cover the HAX accelerator stub
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 01/10] MAINTAINERS: Fix KVM path expansion glob Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 02/10] MAINTAINERS: Add an 'overall' entry for accelerators Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-22 16:47   ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target Philippe Mathieu-Daudé
                   ` (8 subsequent siblings)
  11 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Richard Henderson

Cover accel/stubs/hax-stub.c in the HAXM section.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index 426439a2c3..cebb0d385a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -476,6 +476,7 @@ M: Colin Xu <colin.xu@intel.com>
 L: haxm-team@intel.com
 W: https://github.com/intel/haxm/issues
 S: Maintained
+F: accel/stubs/hax-stub.c
 F: include/sysemu/hax.h
 F: target/i386/hax-*
 
-- 
2.21.3



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

* [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 03/10] MAINTAINERS: Cover the HAX accelerator stub Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-19 11:08   ` Philippe Mathieu-Daudé
  2020-06-23  8:01   ` Claudio Fontana
  2020-06-18 12:33 ` [PATCH v9 05/10] Makefile: Remove dangerous EOL trailing backslash Philippe Mathieu-Daudé
                   ` (7 subsequent siblings)
  11 siblings, 2 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Philippe Mathieu-Daudé,
	Alex Bennée, Richard Henderson

From: Alex Bennée <alex.bennee@linaro.org>

As we encode the base architecture in configure.sh, we can emit
the base-arch() function into config-host.mak.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 configure | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/configure b/configure
index ba88fd1824..c0d7fbc30e 100755
--- a/configure
+++ b/configure
@@ -7927,6 +7927,8 @@ if test "$linux" = "yes" ; then
     fi
 fi
 
+target_to_base_map=""
+
 for target in $target_list; do
 target_dir="$target"
 config_target_mak=$target_dir/config-target.mak
@@ -8155,6 +8157,7 @@ target_arch_name="$(upper $TARGET_ARCH)"
 echo "TARGET_$target_arch_name=y" >> $config_target_mak
 echo "TARGET_NAME=$target_name" >> $config_target_mak
 echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
+target_to_base_map="$target_dir,$TARGET_BASE_ARCH $target_to_base_map"
 if [ "$TARGET_ABI_DIR" = "" ]; then
   TARGET_ABI_DIR=$TARGET_ARCH
 fi
@@ -8370,6 +8373,22 @@ if test "$ccache_cpp2" = "yes"; then
   echo "export CCACHE_CPP2=y" >> $config_host_mak
 fi
 
+# Export a rule for calculating base arch from target_dir for use by
+# the Kconfig generator
+echo "# Usage: \$(call base-arch, target-dir)" >> $config_host_mak
+echo "# Return the base architecture for a target." >> $config_host_mak
+echo "# e.g \$(call base-arch, aarch64-linux-user) returns 'arm'" >> $config_host_mak
+echo "base-arch = \$(strip \\" >> $config_host_mak
+close_braces=""
+for pairs in $target_to_base_map
+do
+    dir="${pairs%%,*}"
+    base="${pairs#*,}"
+    echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak
+    close_braces="$close_braces )"
+done
+echo "$close_braces )" >> $config_host_mak
+
 # If we're using a separate build tree, set it up now.
 # DIRS are directories which we simply mkdir in the build tree;
 # LINKS are things to symlink back into the source tree
-- 
2.21.3



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

* [PATCH v9 05/10] Makefile: Remove dangerous EOL trailing backslash
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 06/10] Makefile: Write MINIKCONF variables as one entry per line Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Philippe Mathieu-Daudé,
	Alistair Francis, Paolo Bonzini, Alex Bennée,
	Richard Henderson

One might get caught trying to understand unexpected Makefile
behavior. Trailing backslash can help to split very long lines,
but are rather dangerous when nothing follow. Preserve other
developers debugging time by removing this one.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 48f23aa978..0d9ef87e6d 100644
--- a/Makefile
+++ b/Makefile
@@ -420,7 +420,7 @@ MINIKCONF_ARGS = \
 
 MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
 MINIKCONF_DEPS = $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig)
-MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py \
+MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py
 
 $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_DEPS) $(BUILD_DIR)/config-host.mak
 	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
-- 
2.21.3



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

* [PATCH v9 06/10] Makefile: Write MINIKCONF variables as one entry per line
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 05/10] Makefile: Remove dangerous EOL trailing backslash Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 07/10] accel/Kconfig: Extract accel selectors into their own config Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Paolo Bonzini, Richard Henderson,
	Philippe Mathieu-Daudé,
	Richard Henderson

Having one entry per line helps reviews/refactors. As we are
going to modify the MINIKCONF variables, split them now to
ease further review.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 0d9ef87e6d..b7f41a2ef2 100644
--- a/Makefile
+++ b/Makefile
@@ -418,12 +418,15 @@ MINIKCONF_ARGS = \
     CONFIG_LINUX=$(CONFIG_LINUX) \
     CONFIG_PVRDMA=$(CONFIG_PVRDMA)
 
-MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host $(SRC_PATH)/hw/Kconfig
-MINIKCONF_DEPS = $(MINIKCONF_INPUTS) $(wildcard $(SRC_PATH)/hw/*/Kconfig)
+MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host \
+                   $(SRC_PATH)/hw/Kconfig
+MINIKCONF_DEPS = $(MINIKCONF_INPUTS) \
+                 $(wildcard $(SRC_PATH)/hw/*/Kconfig)
 MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py
 
 $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_DEPS) $(BUILD_DIR)/config-host.mak
-	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) > $@.tmp, "GEN", "$@.tmp")
+	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) \
+		> $@.tmp, "GEN", "$@.tmp")
 	$(call quiet-command, if test -f $@; then \
 	  if cmp -s $@.old $@; then \
 	    mv $@.tmp $@; \
-- 
2.21.3



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

* [PATCH v9 07/10] accel/Kconfig: Extract accel selectors into their own config
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 06/10] Makefile: Write MINIKCONF variables as one entry per line Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 08/10] accel/Kconfig: Add the TCG selector Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Paolo Bonzini, Richard Henderson,
	Philippe Mathieu-Daudé,
	Richard Henderson

Move the accel selectors from the global Kconfig.host to their
own Kconfig file.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile      | 1 +
 Kconfig.host  | 7 -------
 accel/Kconfig | 6 ++++++
 3 files changed, 7 insertions(+), 7 deletions(-)
 create mode 100644 accel/Kconfig

diff --git a/Makefile b/Makefile
index b7f41a2ef2..f14f59fb2b 100644
--- a/Makefile
+++ b/Makefile
@@ -419,6 +419,7 @@ MINIKCONF_ARGS = \
     CONFIG_PVRDMA=$(CONFIG_PVRDMA)
 
 MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host \
+                   $(SRC_PATH)/accel/Kconfig \
                    $(SRC_PATH)/hw/Kconfig
 MINIKCONF_DEPS = $(MINIKCONF_INPUTS) \
                  $(wildcard $(SRC_PATH)/hw/*/Kconfig)
diff --git a/Kconfig.host b/Kconfig.host
index 55136e037d..a6d871c399 100644
--- a/Kconfig.host
+++ b/Kconfig.host
@@ -2,9 +2,6 @@
 # down to Kconfig.  See also MINIKCONF_ARGS in the Makefile:
 # these two need to be kept in sync.
 
-config KVM
-    bool
-
 config LINUX
     bool
 
@@ -31,10 +28,6 @@ config VHOST_KERNEL
     bool
     select VHOST
 
-config XEN
-    bool
-    select FSDEV_9P if VIRTFS
-
 config VIRTFS
     bool
 
diff --git a/accel/Kconfig b/accel/Kconfig
new file mode 100644
index 0000000000..c21802bb49
--- /dev/null
+++ b/accel/Kconfig
@@ -0,0 +1,6 @@
+config KVM
+    bool
+
+config XEN
+    bool
+    select FSDEV_9P if VIRTFS
-- 
2.21.3



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

* [PATCH v9 08/10] accel/Kconfig: Add the TCG selector
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 07/10] accel/Kconfig: Extract accel selectors into their own config Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 09/10] Makefile: Allow target-specific optional Kconfig Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Paolo Bonzini, Richard Henderson,
	Philippe Mathieu-Daudé,
	Richard Henderson

Expose the CONFIG_TCG selector to let minikconf.py uses it.

When building with --disable-tcg build, this helps to deselect
devices that are TCG-dependent.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile      | 1 +
 accel/Kconfig | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index f14f59fb2b..00e8553745 100644
--- a/Makefile
+++ b/Makefile
@@ -405,6 +405,7 @@ endif
 MINIKCONF_ARGS = \
     $(CONFIG_MINIKCONF_MODE) \
     $@ $*/config-devices.mak.d $< $(MINIKCONF_INPUTS) \
+    CONFIG_TCG=$(CONFIG_TCG) \
     CONFIG_KVM=$(CONFIG_KVM) \
     CONFIG_SPICE=$(CONFIG_SPICE) \
     CONFIG_IVSHMEM=$(CONFIG_IVSHMEM) \
diff --git a/accel/Kconfig b/accel/Kconfig
index c21802bb49..2ad94a3839 100644
--- a/accel/Kconfig
+++ b/accel/Kconfig
@@ -1,3 +1,6 @@
+config TCG
+    bool
+
 config KVM
     bool
 
-- 
2.21.3



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

* [PATCH v9 09/10] Makefile: Allow target-specific optional Kconfig
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (7 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 08/10] accel/Kconfig: Add the TCG selector Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 12:33 ` [PATCH v9 10/10] accel/tcg: Add stub for probe_access() Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Bennée, Paolo Bonzini, Richard Henderson,
	Philippe Mathieu-Daudé,
	Richard Henderson

Allow use of target-specific Kconfig file.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 00e8553745..c131c4e99d 100644
--- a/Makefile
+++ b/Makefile
@@ -423,11 +423,13 @@ MINIKCONF_INPUTS = $(SRC_PATH)/Kconfig.host \
                    $(SRC_PATH)/accel/Kconfig \
                    $(SRC_PATH)/hw/Kconfig
 MINIKCONF_DEPS = $(MINIKCONF_INPUTS) \
-                 $(wildcard $(SRC_PATH)/hw/*/Kconfig)
+                 $(wildcard $(SRC_PATH)/hw/*/Kconfig) \
+                 $(wildcard $(SRC_PATH)/target/*/Kconfig)
 MINIKCONF = $(PYTHON) $(SRC_PATH)/scripts/minikconf.py
 
 $(SUBDIR_DEVICES_MAK): %/config-devices.mak: default-configs/%.mak $(MINIKCONF_DEPS) $(BUILD_DIR)/config-host.mak
 	$(call quiet-command, $(MINIKCONF) $(MINIKCONF_ARGS) \
+		$(wildcard $(SRC_PATH)/target/$(call base-arch, $@)/Kconfig) \
 		> $@.tmp, "GEN", "$@.tmp")
 	$(call quiet-command, if test -f $@; then \
 	  if cmp -s $@.old $@; then \
-- 
2.21.3



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

* [PATCH v9 10/10] accel/tcg: Add stub for probe_access()
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (8 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 09/10] Makefile: Allow target-specific optional Kconfig Philippe Mathieu-Daudé
@ 2020-06-18 12:33 ` Philippe Mathieu-Daudé
  2020-06-18 13:28 ` [PATCH v9 00/10] accel: Allow targets to use Kconfig no-reply
  2020-06-22 16:47 ` Philippe Mathieu-Daudé
  11 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-18 12:33 UTC (permalink / raw)
  To: qemu-devel
  Cc: David Hildenbrand, Richard Henderson, Philippe Mathieu-Daudé,
	Paolo Bonzini, Alex Bennée, Richard Henderson

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

The TCG helpers were added in b92e5a22ec3 in softmmu_template.h.
probe_write() was added in there in 3b4afc9e75a to be moved out
to accel/tcg/cputlb.c in 3b08f0a9254, and was later refactored
as probe_access() in c25c283df0f.
Since it is a TCG specific helper, add a stub to avoid failures
when building without TCG, such:

  target/arm/helper.o: In function `probe_read':
  include/exec/exec-all.h:362: undefined reference to `probe_access'

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 accel/stubs/tcg-stub.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/accel/stubs/tcg-stub.c b/accel/stubs/tcg-stub.c
index 677191a69c..e4bbf997aa 100644
--- a/accel/stubs/tcg-stub.c
+++ b/accel/stubs/tcg-stub.c
@@ -22,3 +22,10 @@ void tb_flush(CPUState *cpu)
 void tlb_set_dirty(CPUState *cpu, target_ulong vaddr)
 {
 }
+
+void *probe_access(CPUArchState *env, target_ulong addr, int size,
+                   MMUAccessType access_type, int mmu_idx, uintptr_t retaddr)
+{
+     /* Handled by hardware accelerator. */
+     g_assert_not_reached();
+}
-- 
2.21.3



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

* Re: [PATCH v9 00/10] accel: Allow targets to use Kconfig
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (9 preceding siblings ...)
  2020-06-18 12:33 ` [PATCH v9 10/10] accel/tcg: Add stub for probe_access() Philippe Mathieu-Daudé
@ 2020-06-18 13:28 ` no-reply
  2020-06-22 16:47 ` Philippe Mathieu-Daudé
  11 siblings, 0 replies; 22+ messages in thread
From: no-reply @ 2020-06-18 13:28 UTC (permalink / raw)
  To: philmd; +Cc: pbonzini, philmd, qemu-devel, rth

Patchew URL: https://patchew.org/QEMU/20200618123342.10693-1-philmd@redhat.com/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      qga/main.o
  CC      qga/commands-posix.o
  CC      qga/channel-posix.o
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  CC      qga/qapi-generated/qga-qapi-types.o
  CC      qga/qapi-generated/qga-qapi-visit.o
  CC      qga/qapi-generated/qga-qapi-commands.o
---
  AR      libvhost-user.a
  GEN     docs/interop/qemu-ga-ref.html
  GEN     docs/interop/qemu-ga-ref.txt
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  GEN     docs/interop/qemu-ga-ref.7
  LINK    qemu-ga
  LINK    qemu-keymap
  LINK    ivshmem-client
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    ivshmem-server
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    qemu-nbd
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    qemu-storage-daemon
  AS      pc-bios/optionrom/multiboot.o
  AS      pc-bios/optionrom/linuxboot.o
  CC      pc-bios/optionrom/linuxboot_dma.o
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    qemu-img
  AS      pc-bios/optionrom/kvmvapic.o
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    qemu-io
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  AS      pc-bios/optionrom/pvh.o
  LINK    qemu-edid
  BUILD   pc-bios/optionrom/multiboot.img
---
  BUILD   pc-bios/optionrom/kvmvapic.img
  BUILD   pc-bios/optionrom/multiboot.raw
  BUILD   pc-bios/optionrom/linuxboot.raw
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  BUILD   pc-bios/optionrom/linuxboot_dma.raw
  BUILD   pc-bios/optionrom/kvmvapic.raw
  SIGN    pc-bios/optionrom/multiboot.bin
---
  BUILD   pc-bios/optionrom/pvh.raw
  SIGN    pc-bios/optionrom/pvh.bin
  LINK    scsi/qemu-pr-helper
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    qemu-bridge-helper
  LINK    virtiofsd
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  LINK    vhost-user-input
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
  GEN     x86_64-softmmu/config-devices.h
  GEN     x86_64-softmmu/hmp-commands.h
  GEN     x86_64-softmmu/hmp-commands-info.h
---
  CC      x86_64-softmmu/gdbstub-xml.o
  CC      x86_64-softmmu/trace/generated-helpers.o
  LINK    x86_64-softmmu/qemu-system-x86_64
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
common.rc: line 50: test: check: binary operator expected
(printf '#define QEMU_PKGVERSION ""\n'; printf '#define QEMU_FULL_VERSION "5.0.50"\n'; ) > qemu-version.h.tmp
make -C /tmp/qemu-test/src/slirp BUILD_DIR="/tmp/qemu-test/build/slirp" PKG_CONFIG="pkg-config" CC="clang" AR="ar"      LD="ld" RANLIB="ranlib" CFLAGS="-I/usr/include/pixman-1   -Werror -fsanitize=undefined -fsanitize=address  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99  -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong   -I/usr/include/p11-kit-1   -DSTRUCT_IOVEC_DEFINED  -I/usr/include/libpng16  -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pixman-1   -I/tmp/qemu-test/src/tests -I/tmp/qemu-test/src/tests/qtest -g " LDFLAGS="-Wl,--warn-common -fsanitize=undefined -fsanitize=address -Wl,-z,relro -Wl,-z,now -pie -m64  -fstack-protector-strong"
---
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong -I/usr/include/p11-kit-1 -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT writeCase_z_ui32.o -MF ./writeCase_z_ui32.d -g   -c -o writeCase_z_ui32.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/writeCase_z_ui32.c
clang -iquote /tmp/qemu-test/build/tests/qtest/libqos -iquote tests/qtest/libqos -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/usr/include/pixman-1   -Werror -fsanitize=undefined -fsanitize=address  -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include  -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99  -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong   -I/usr/include/p11-kit-1   -DSTRUCT_IOVEC_DEFINED  -I/usr/include/libpng16  -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pixman-1   -I/tmp/qemu-test/src/tests -I/tmp/qemu-test/src/tests/qtest -MMD -MP -MT tests/qtest/libqos/virtio-net.o -MF tests/qtest/libqos/virtio-net.d -g   -c -o tests/qtest/libqos/virtio-net.o /tmp/qemu-test/src/tests/qtest/libqos/virtio-net.c
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong -I/usr/include/p11-kit-1 -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT writeCase_z_ui64.o -MF ./writeCase_z_ui64.d -g   -c -o writeCase_z_ui64.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/writeCase_z_ui64.c
/tmp/qemu-test/src/tests/qht-bench.c:287:29: error: implicit conversion from 'unsigned long' to 'double' changes value from 18446744073709551615 to 18446744073709551616 [-Werror,-Wimplicit-int-float-conversion]
        *threshold = rate * UINT64_MAX;
                          ~ ^~~~~~~~~~
/usr/include/stdint.h:130:23: note: expanded from macro 'UINT64_MAX'
---
18446744073709551615UL
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [/tmp/qemu-test/src/rules.mak:69: tests/qht-bench.o] Error 1
make: *** Waiting for unfinished jobs....
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong -I/usr/include/p11-kit-1 -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT writeCase_z_f16.o -MF ./writeCase_z_f16.d -g   -c -o writeCase_z_f16.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/writeCase_z_f16.c
clang -iquote /tmp/qemu-test/build/. -iquote . -iquote /tmp/qemu-test/src/tcg/i386 -isystem /tmp/qemu-test/src/linux-headers -isystem /tmp/qemu-test/build/linux-headers -iquote . -iquote /tmp/qemu-test/src -iquote /tmp/qemu-test/src/accel/tcg -iquote /tmp/qemu-test/src/include -iquote /tmp/qemu-test/src/disas/libvixl -I/tmp/qemu-test/src/tests/fp -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/include -I/tmp/qemu-test/src/tests/fp/berkeley-softfloat-3/source/8086-SSE -I/tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source -I/usr/include/pixman-1 -Werror -fsanitize=undefined -fsanitize=address -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -fPIE -DPIE -m64 -mcx16 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -std=gnu99 -Wold-style-definition -Wtype-limits -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wempty-body -Wnested-externs -Wendif-labels -Wexpansion-to-defined -Wno-initializer-overrides -Wno-missing-include-dirs -Wno-shift-negative-value -Wno-string-plus-int -Wno-typedef-redefinition -Wno-tautological-type-limit-compare -fstack-protector-strong -I/usr/include/p11-kit-1 -DSTRUCT_IOVEC_DEFINED -I/usr/include/libpng16 -I/usr/include/spice-1 -I/usr/include/spice-server -I/usr/include/cacard -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/nss3 -I/usr/include/nspr4 -pthread -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/pixman-1 -DHW_POISON_H -DTARGET_ARM  -DSOFTFLOAT_ROUND_ODD -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV32TO16 -DSOFTFLOAT_FAST_DIV64TO32 -DSOFTFLOAT_FAST_INT64  -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD -DLONG_DOUBLE_IS_EXTFLOAT80  -Wno-strict-prototypes -Wno-unknown-pragmas -Wno-uninitialized -Wno-missing-prototypes -Wno-return-type -Wno-unused-function -Wno-error -MMD -MP -MT writeCase_z_f32.o -MF ./writeCase_z_f32.d -g   -c -o writeCase_z_f32.o /tmp/qemu-test/src/tests/fp/berkeley-testfloat-3/source/writeCase_z_f32.c
---
rm -f libtestfloat.a && ar rcs libtestfloat.a uint128_inline.o uint128.o fail.o functions_common.o functionInfos.o standardFunctionInfos.o random.o genCases_common.o genCases_ui32.o genCases_ui64.o genCases_i32.o genCases_i64.o genCases_f16.o genCases_f32.o genCases_f64.o genCases_extF80.o genCases_f128.o genCases_writeTestsTotal.o verCases_inline.o verCases_common.o verCases_writeFunctionName.o readHex.o writeHex.o writeCase_a_ui32.o writeCase_a_ui64.o writeCase_a_f16.o writeCase_ab_f16.o writeCase_abc_f16.o writeCase_a_f32.o writeCase_ab_f32.o writeCase_abc_f32.o writeCase_a_f64.o writeCase_ab_f64.o writeCase_abc_f64.o writeCase_a_extF80M.o writeCase_ab_extF80M.o writeCase_a_f128M.o writeCase_ab_f128M.o writeCase_abc_f128M.o writeCase_z_bool.o writeCase_z_ui32.o writeCase_z_ui64.o writeCase_z_f16.o writeCase_z_f32.o writeCase_z_f64.o writeCase_z_extF80M.o writeCase_z_f128M.o testLoops_common.o test_a_ui32_z_f16.o test_a_ui32_z_f32.o test_a_ui32_z_f64.o test_a_ui32_z_extF80.o test_a_ui32_z_f128.o test_a_ui64_z_f16.o test_a_ui64_z_f32.o test_a_ui64_z_f64.o test_a_ui64_z_extF80.o test_a_ui64_z_f128.o test_a_i32_z_f16.o test_a_i32_z_f32.o test_a_i32_z_f64.o test_a_i32_z_extF80.o test_a_i32_z_f128.o test_a_i64_z_f16.o test_a_i64_z_f32.o test_a_i64_z_f64.o test_a_i64_z_extF80.o test_a_i64_z_f128.o test_a_f16_z_ui32_rx.o test_a_f16_z_ui64_rx.o test_a_f16_z_i32_rx.o test_a_f16_z_i64_rx.o test_a_f16_z_ui32_x.o test_a_f16_z_ui64_x.o test_a_f16_z_i32_x.o test_a_f16_z_i64_x.o test_a_f16_z_f32.o test_a_f16_z_f64.o test_a_f16_z_extF80.o test_a_f16_z_f128.o test_az_f16.o test_az_f16_rx.o test_abz_f16.o test_abcz_f16.o test_ab_f16_z_bool.o test_a_f32_z_ui32_rx.o test_a_f32_z_ui64_rx.o test_a_f32_z_i32_rx.o test_a_f32_z_i64_rx.o test_a_f32_z_ui32_x.o test_a_f32_z_ui64_x.o test_a_f32_z_i32_x.o test_a_f32_z_i64_x.o test_a_f32_z_f16.o test_a_f32_z_f64.o test_a_f32_z_extF80.o test_a_f32_z_f128.o test_az_f32.o test_az_f32_rx.o test_abz_f32.o test_abcz_f32.o test_ab_f32_z_bool.o test_a_f64_z_ui32_rx.o test_a_f64_z_ui64_rx.o test_a_f64_z_i32_rx.o test_a_f64_z_i64_rx.o test_a_f64_z_ui32_x.o test_a_f64_z_ui64_x.o test_a_f64_z_i32_x.o test_a_f64_z_i64_x.o test_a_f64_z_f16.o test_a_f64_z_f32.o test_a_f64_z_extF80.o test_a_f64_z_f128.o test_az_f64.o test_az_f64_rx.o test_abz_f64.o test_abcz_f64.o test_ab_f64_z_bool.o test_a_extF80_z_ui32_rx.o test_a_extF80_z_ui64_rx.o test_a_extF80_z_i32_rx.o test_a_extF80_z_i64_rx.o test_a_extF80_z_ui32_x.o test_a_extF80_z_ui64_x.o test_a_extF80_z_i32_x.o test_a_extF80_z_i64_x.o test_a_extF80_z_f16.o test_a_extF80_z_f32.o test_a_extF80_z_f64.o test_a_extF80_z_f128.o test_az_extF80.o test_az_extF80_rx.o test_abz_extF80.o test_ab_extF80_z_bool.o test_a_f128_z_ui32_rx.o test_a_f128_z_ui64_rx.o test_a_f128_z_i32_rx.o test_a_f128_z_i64_rx.o test_a_f128_z_ui32_x.o test_a_f128_z_ui64_x.o test_a_f128_z_i32_x.o test_a_f128_z_i64_x.o test_a_f128_z_f16.o test_a_f128_z_f32.o test_a_f128_z_f64.o test_a_f128_z_extF80.o test_az_f128.o test_az_f128_rx.o test_abz_f128.o test_abcz_f128.o test_ab_f128_z_bool.o
rm -f libsoftfloat.a && ar rcs libsoftfloat.a s_eq128.o s_le128.o s_lt128.o s_shortShiftLeft128.o s_shortShiftRight128.o s_shortShiftRightJam64.o s_shortShiftRightJam64Extra.o s_shortShiftRightJam128.o s_shortShiftRightJam128Extra.o s_shiftRightJam32.o s_shiftRightJam64.o s_shiftRightJam64Extra.o s_shiftRightJam128.o s_shiftRightJam128Extra.o s_shiftRightJam256M.o s_countLeadingZeros8.o s_countLeadingZeros16.o s_countLeadingZeros32.o s_countLeadingZeros64.o s_add128.o s_add256M.o s_sub128.o s_sub256M.o s_mul64ByShifted32To128.o s_mul64To128.o s_mul128By32.o s_mul128To256M.o s_approxRecip_1Ks.o s_approxRecip32_1.o s_approxRecipSqrt_1Ks.o s_approxRecipSqrt32_1.o s_roundToUI32.o s_roundToUI64.o s_roundToI32.o s_roundToI64.o s_normSubnormalF16Sig.o s_roundPackToF16.o s_normRoundPackToF16.o s_addMagsF16.o s_subMagsF16.o s_mulAddF16.o s_normSubnormalF32Sig.o s_roundPackToF32.o s_normRoundPackToF32.o s_addMagsF32.o s_subMagsF32.o s_mulAddF32.o s_normSubnormalF64Sig.o s_roundPackToF64.o s_normRoundPackToF64.o s_addMagsF64.o s_subMagsF64.o s_mulAddF64.o s_normSubnormalExtF80Sig.o s_roundPackToExtF80.o s_normRoundPackToExtF80.o s_addMagsExtF80.o s_subMagsExtF80.o s_normSubnormalF128Sig.o s_roundPackToF128.o s_normRoundPackToF128.o s_addMagsF128.o s_subMagsF128.o s_mulAddF128.o softfloat_state.o ui32_to_f16.o ui32_to_f32.o ui32_to_f64.o ui32_to_extF80.o ui32_to_extF80M.o ui32_to_f128.o ui32_to_f128M.o ui64_to_f16.o ui64_to_f32.o ui64_to_f64.o ui64_to_extF80.o ui64_to_extF80M.o ui64_to_f128.o ui64_to_f128M.o i32_to_f16.o i32_to_f32.o i32_to_f64.o i32_to_extF80.o i32_to_extF80M.o i32_to_f128.o i32_to_f128M.o i64_to_f16.o i64_to_f32.o i64_to_f64.o i64_to_extF80.o i64_to_extF80M.o i64_to_f128.o i64_to_f128M.o f16_to_ui32.o f16_to_ui64.o f16_to_i32.o f16_to_i64.o f16_to_ui32_r_minMag.o f16_to_ui64_r_minMag.o f16_to_i32_r_minMag.o f16_to_i64_r_minMag.o f16_to_f32.o f16_to_f64.o f16_to_extF80.o f16_to_extF80M.o f16_to_f128.o f16_to_f128M.o f16_roundToInt.o f16_add.o f16_sub.o f16_mul.o f16_mulAdd.o f16_div.o f16_rem.o f16_sqrt.o f16_eq.o f16_le.o f16_lt.o f16_eq_signaling.o f16_le_quiet.o f16_lt_quiet.o f16_isSignalingNaN.o f32_to_ui32.o f32_to_ui64.o f32_to_i32.o f32_to_i64.o f32_to_ui32_r_minMag.o f32_to_ui64_r_minMag.o f32_to_i32_r_minMag.o f32_to_i64_r_minMag.o f32_to_f16.o f32_to_f64.o f32_to_extF80.o f32_to_extF80M.o f32_to_f128.o f32_to_f128M.o f32_roundToInt.o f32_add.o f32_sub.o f32_mul.o f32_mulAdd.o f32_div.o f32_rem.o f32_sqrt.o f32_eq.o f32_le.o f32_lt.o f32_eq_signaling.o f32_le_quiet.o f32_lt_quiet.o f32_isSignalingNaN.o f64_to_ui32.o f64_to_ui64.o f64_to_i32.o f64_to_i64.o f64_to_ui32_r_minMag.o f64_to_ui64_r_minMag.o f64_to_i32_r_minMag.o f64_to_i64_r_minMag.o f64_to_f16.o f64_to_f32.o f64_to_extF80.o f64_to_extF80M.o f64_to_f128.o f64_to_f128M.o f64_roundToInt.o f64_add.o f64_sub.o f64_mul.o f64_mulAdd.o f64_div.o f64_rem.o f64_sqrt.o f64_eq.o f64_le.o f64_lt.o f64_eq_signaling.o f64_le_quiet.o f64_lt_quiet.o f64_isSignalingNaN.o extF80_to_ui32.o extF80_to_ui64.o extF80_to_i32.o extF80_to_i64.o extF80_to_ui32_r_minMag.o extF80_to_ui64_r_minMag.o extF80_to_i32_r_minMag.o extF80_to_i64_r_minMag.o extF80_to_f16.o extF80_to_f32.o extF80_to_f64.o extF80_to_f128.o extF80_roundToInt.o extF80_add.o extF80_sub.o extF80_mul.o extF80_div.o extF80_rem.o extF80_sqrt.o extF80_eq.o extF80_le.o extF80_lt.o extF80_eq_signaling.o extF80_le_quiet.o extF80_lt_quiet.o extF80_isSignalingNaN.o extF80M_to_ui32.o extF80M_to_ui64.o extF80M_to_i32.o extF80M_to_i64.o extF80M_to_ui32_r_minMag.o extF80M_to_ui64_r_minMag.o extF80M_to_i32_r_minMag.o extF80M_to_i64_r_minMag.o extF80M_to_f16.o extF80M_to_f32.o extF80M_to_f64.o extF80M_to_f128M.o extF80M_roundToInt.o extF80M_add.o extF80M_sub.o extF80M_mul.o extF80M_div.o extF80M_rem.o extF80M_sqrt.o extF80M_eq.o extF80M_le.o extF80M_lt.o extF80M_eq_signaling.o extF80M_le_quiet.o extF80M_lt_quiet.o f128_to_ui32.o f128_to_ui64.o f128_to_i32.o f128_to_i64.o f128_to_ui32_r_minMag.o f128_to_ui64_r_minMag.o f128_to_i32_r_minMag.o f128_to_i64_r_minMag.o f128_to_f16.o f128_to_f32.o f128_to_extF80.o f128_to_f64.o f128_roundToInt.o f128_add.o f128_sub.o f128_mul.o f128_mulAdd.o f128_div.o f128_rem.o f128_sqrt.o f128_eq.o f128_le.o f128_lt.o f128_eq_signaling.o f128_le_quiet.o f128_lt_quiet.o f128_isSignalingNaN.o f128M_to_ui32.o f128M_to_ui64.o f128M_to_i32.o f128M_to_i64.o f128M_to_ui32_r_minMag.o f128M_to_ui64_r_minMag.o f128M_to_i32_r_minMag.o f128M_to_i64_r_minMag.o f128M_to_f16.o f128M_to_f32.o f128M_to_extF80M.o f128M_to_f64.o f128M_roundToInt.o f128M_add.o f128M_sub.o f128M_mul.o f128M_mulAdd.o f128M_div.o f128M_rem.o f128M_sqrt.o f128M_eq.o f128M_le.o f128M_lt.o f128M_eq_signaling.o f128M_le_quiet.o f128M_lt_quiet.o softfloat_raiseFlags.o s_f16UIToCommonNaN.o s_commonNaNToF16UI.o s_propagateNaNF16UI.o s_f32UIToCommonNaN.o s_commonNaNToF32UI.o s_propagateNaNF32UI.o s_f64UIToCommonNaN.o s_commonNaNToF64UI.o s_propagateNaNF64UI.o extF80M_isSignalingNaN.o s_extF80UIToCommonNaN.o s_commonNaNToExtF80UI.o s_propagateNaNExtF80UI.o f128M_isSignalingNaN.o s_f128UIToCommonNaN.o s_commonNaNToF128UI.o s_propagateNaNF128UI.o
clang++ -g  -Wl,--warn-common -fsanitize=undefined -fsanitize=address -Wl,-z,relro -Wl,-z,now -pie -m64  -fstack-protector-strong -o fp-test fp-test.o slowfloat.o softfloat.o  libtestfloat.a libsoftfloat.a /tmp/qemu-test/build/libqemuutil.a   -lm -lz  -lgthread-2.0 -pthread -lglib-2.0  -lnettle  -lgnutls  -lzstd   -lrt
/usr/bin/ld: /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors_vfork.S.o): warning: common of `__interception::real_vfork' overridden by definition from /usr/lib64/clang/10.0.0/lib/linux/libclang_rt.asan-x86_64.a(asan_interceptors.cpp.o)
make[1]: Leaving directory '/tmp/qemu-test/build/tests/fp'
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 669, in <module>
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=e2cc80aa9ac143a3a064dd8e72b75eb1', '-u', '1001', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-0xjr59ae/src/docker-src.2020-06-18-09.22.52.9039:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=e2cc80aa9ac143a3a064dd8e72b75eb1
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-0xjr59ae/src'
make: *** [docker-run-test-debug@fedora] Error 2

real    5m36.853s
user    0m8.871s


The full log is available at
http://patchew.org/logs/20200618123342.10693-1-philmd@redhat.com/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com

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

* Re: [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target
  2020-06-18 12:33 ` [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target Philippe Mathieu-Daudé
@ 2020-06-19 11:08   ` Philippe Mathieu-Daudé
  2020-06-23  8:01   ` Claudio Fontana
  1 sibling, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-19 11:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Alex Bennée, Richard Henderson

On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
> From: Alex Bennée <alex.bennee@linaro.org>
> 
> As we encode the base architecture in configure.sh, we can emit
> the base-arch() function into config-host.mak.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

I'm not sure it is implicit by the S-o-b tag following, so:

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

> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  configure | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/configure b/configure
> index ba88fd1824..c0d7fbc30e 100755
> --- a/configure
> +++ b/configure
> @@ -7927,6 +7927,8 @@ if test "$linux" = "yes" ; then
>      fi
>  fi
>  
> +target_to_base_map=""
> +
>  for target in $target_list; do
>  target_dir="$target"
>  config_target_mak=$target_dir/config-target.mak
> @@ -8155,6 +8157,7 @@ target_arch_name="$(upper $TARGET_ARCH)"
>  echo "TARGET_$target_arch_name=y" >> $config_target_mak
>  echo "TARGET_NAME=$target_name" >> $config_target_mak
>  echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
> +target_to_base_map="$target_dir,$TARGET_BASE_ARCH $target_to_base_map"
>  if [ "$TARGET_ABI_DIR" = "" ]; then
>    TARGET_ABI_DIR=$TARGET_ARCH
>  fi
> @@ -8370,6 +8373,22 @@ if test "$ccache_cpp2" = "yes"; then
>    echo "export CCACHE_CPP2=y" >> $config_host_mak
>  fi
>  
> +# Export a rule for calculating base arch from target_dir for use by
> +# the Kconfig generator
> +echo "# Usage: \$(call base-arch, target-dir)" >> $config_host_mak
> +echo "# Return the base architecture for a target." >> $config_host_mak
> +echo "# e.g \$(call base-arch, aarch64-linux-user) returns 'arm'" >> $config_host_mak
> +echo "base-arch = \$(strip \\" >> $config_host_mak
> +close_braces=""
> +for pairs in $target_to_base_map
> +do
> +    dir="${pairs%%,*}"
> +    base="${pairs#*,}"
> +    echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak
> +    close_braces="$close_braces )"
> +done
> +echo "$close_braces )" >> $config_host_mak
> +
>  # If we're using a separate build tree, set it up now.
>  # DIRS are directories which we simply mkdir in the build tree;
>  # LINKS are things to symlink back into the source tree
> 



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

* Re: [PATCH v9 00/10] accel: Allow targets to use Kconfig
  2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
                   ` (10 preceding siblings ...)
  2020-06-18 13:28 ` [PATCH v9 00/10] accel: Allow targets to use Kconfig no-reply
@ 2020-06-22 16:47 ` Philippe Mathieu-Daudé
  2020-06-25  7:49   ` Philippe Mathieu-Daudé
  11 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-22 16:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, haxm-team, Richard Henderson

On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
> Missing review:
> - 03/10 MAINTAINERS: Cover the HAX accelerator stub

I forgot again to include the HAXM team...

> - 04/10 configure: Generate rule to calculate base arch of target
> 
> This series include generic patches I took of the KVM/ARM
> specific series which will follow.
> 
> - Update accelerators in MAINTAINERS
> - Add accel/Kconfig
> - Allow targets to use their how Kconfig
> 
> Since v8:
> - Fixed typo in patch 10 (Stefan)
> 
> Since v7:
> - Generate base-arch() (Alex)
> - Do not deprecate HAXM
> 
> Since v6:
> - Fixed typo 'startwith' -> 'startswith' (armbru)
> 
> Since v5:
> - Fixed typo in patch #4 subject
> - Added David R-b tag
> - Stripped --- comments
> 
> Since v4:
> - Addressed rth review comments in rules.mak
> 
> Since v3:
> - Fixed base-arch() rule (rth)
> - Dropped 'semihosting: Make the feature depend of TCG'
> 
> Since v2:
> - Addressed Thomas review comments
> - Fixed problem when including TARGET instead of BASE_TARGET
> 
> Since v1:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg689024.html
> - Drop HVF MAINTAINERS patch (merged elsewhere)
> - Kconfig-select SEMIHOSTING (bonzini)
> - Drop user-mode selection patches
> - consider m68k/nios2/xtensa/riscv (pm215)
> - reword Kconfig SEMIHOSTING description (pm215)
> - reset some of rth R-b tags
> 
> Previous RFC for semihosting posted earlier:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg631218.html
> 
> Alex Bennée (1):
>   configure: Generate rule to calculate the base architecture of a
>     target
> 
> Philippe Mathieu-Daudé (9):
>   MAINTAINERS: Fix KVM path expansion glob
>   MAINTAINERS: Add an 'overall' entry for accelerators
>   MAINTAINERS: Cover the HAX accelerator stub
>   Makefile: Remove dangerous EOL trailing backslash
>   Makefile: Write MINIKCONF variables as one entry per line
>   accel/Kconfig: Extract accel selectors into their own config
>   accel/Kconfig: Add the TCG selector
>   Makefile: Allow target-specific optional Kconfig
>   accel/tcg: Add stub for probe_access()
> 
>  configure              | 19 +++++++++++++++++++
>  Makefile               | 15 +++++++++++----
>  accel/stubs/tcg-stub.c |  7 +++++++
>  Kconfig.host           |  7 -------
>  MAINTAINERS            | 14 +++++++++++++-
>  accel/Kconfig          |  9 +++++++++
>  6 files changed, 59 insertions(+), 12 deletions(-)
>  create mode 100644 accel/Kconfig
> 



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

* Re: [PATCH v9 03/10] MAINTAINERS: Cover the HAX accelerator stub
  2020-06-18 12:33 ` [PATCH v9 03/10] MAINTAINERS: Cover the HAX accelerator stub Philippe Mathieu-Daudé
@ 2020-06-22 16:47   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-22 16:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, haxm-team, Richard Henderson

On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
> Cover accel/stubs/hax-stub.c in the HAXM section.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  MAINTAINERS | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 426439a2c3..cebb0d385a 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -476,6 +476,7 @@ M: Colin Xu <colin.xu@intel.com>
>  L: haxm-team@intel.com

Cc'ing this list now.

>  W: https://github.com/intel/haxm/issues
>  S: Maintained
> +F: accel/stubs/hax-stub.c
>  F: include/sysemu/hax.h
>  F: target/i386/hax-*
>  
> 



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

* Re: [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target
  2020-06-18 12:33 ` [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target Philippe Mathieu-Daudé
  2020-06-19 11:08   ` Philippe Mathieu-Daudé
@ 2020-06-23  8:01   ` Claudio Fontana
  2020-06-23  8:45     ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 22+ messages in thread
From: Claudio Fontana @ 2020-06-23  8:01 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, Alex Bennée, Richard Henderson

Hi Philippe, Alex,

On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
> From: Alex Bennée <alex.bennee@linaro.org>
> 
> As we encode the base architecture in configure.sh, we can emit
> the base-arch() function into config-host.mak.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>

I found this change a bit strange, but maybe I am missing some context.

Would it not be easier to read the information from the
config-target.mak files as it is already emitted there?

Ciao,

Claudio


> ---
>  configure | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/configure b/configure
> index ba88fd1824..c0d7fbc30e 100755
> --- a/configure
> +++ b/configure
> @@ -7927,6 +7927,8 @@ if test "$linux" = "yes" ; then
>      fi
>  fi
>  
> +target_to_base_map=""
> +
>  for target in $target_list; do
>  target_dir="$target"
>  config_target_mak=$target_dir/config-target.mak
> @@ -8155,6 +8157,7 @@ target_arch_name="$(upper $TARGET_ARCH)"
>  echo "TARGET_$target_arch_name=y" >> $config_target_mak
>  echo "TARGET_NAME=$target_name" >> $config_target_mak
>  echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
> +target_to_base_map="$target_dir,$TARGET_BASE_ARCH $target_to_base_map"
>  if [ "$TARGET_ABI_DIR" = "" ]; then
>    TARGET_ABI_DIR=$TARGET_ARCH
>  fi
> @@ -8370,6 +8373,22 @@ if test "$ccache_cpp2" = "yes"; then
>    echo "export CCACHE_CPP2=y" >> $config_host_mak
>  fi
>  
> +# Export a rule for calculating base arch from target_dir for use by
> +# the Kconfig generator
> +echo "# Usage: \$(call base-arch, target-dir)" >> $config_host_mak
> +echo "# Return the base architecture for a target." >> $config_host_mak
> +echo "# e.g \$(call base-arch, aarch64-linux-user) returns 'arm'" >> $config_host_mak
> +echo "base-arch = \$(strip \\" >> $config_host_mak
> +close_braces=""
> +for pairs in $target_to_base_map
> +do
> +    dir="${pairs%%,*}"
> +    base="${pairs#*,}"
> +    echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak
> +    close_braces="$close_braces )"
> +done
> +echo "$close_braces )" >> $config_host_mak
> +
>  # If we're using a separate build tree, set it up now.
>  # DIRS are directories which we simply mkdir in the build tree;
>  # LINKS are things to symlink back into the source tree
> 



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

* Re: [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target
  2020-06-23  8:01   ` Claudio Fontana
@ 2020-06-23  8:45     ` Philippe Mathieu-Daudé
  2020-06-23 13:17       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-23  8:45 UTC (permalink / raw)
  To: Claudio Fontana, qemu-devel, Paolo Bonzini
  Cc: Alex Bennée, Richard Henderson

On 6/23/20 10:01 AM, Claudio Fontana wrote:
> Hi Philippe, Alex,
> 
> On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
>> From: Alex Bennée <alex.bennee@linaro.org>
>>
>> As we encode the base architecture in configure.sh, we can emit
>> the base-arch() function into config-host.mak.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> I found this change a bit strange, but maybe I am missing some context.

This is used in patch 9:
"Makefile: Allow target-specific optional Kconfig"
https://www.mail-archive.com/qemu-devel@nongnu.org/msg713823.html

> 
> Would it not be easier to read the information from the
> config-target.mak files as it is already emitted there?

So you are suggesting moving the SUBDIR_DEVICES_MAK creation code
to Makefile.target, before until now it is target-agnostic but we
are making it target-specific. Yes, it could work...

I keep respining this series since the semihosting rework. Frankly
I don't remember why it became so complicated, I need to jump into
the code again.

I guess when Paolo introduced Kconfig, the accelerator configs were
almost static, so SUBDIR_DEVICES_MAK was only dependent of host
config.

The semihosting "device" depends of accelerator and target configs.

Maybe the problem is to see minikconf generating device selectors,
as kconfig is also used for generic features (such accelerator,
not really "device").

> 
> Ciao,
> 
> Claudio
> 
> 
>> ---
>>  configure | 19 +++++++++++++++++++
>>  1 file changed, 19 insertions(+)
>>
>> diff --git a/configure b/configure
>> index ba88fd1824..c0d7fbc30e 100755
>> --- a/configure
>> +++ b/configure
>> @@ -7927,6 +7927,8 @@ if test "$linux" = "yes" ; then
>>      fi
>>  fi
>>  
>> +target_to_base_map=""
>> +
>>  for target in $target_list; do
>>  target_dir="$target"
>>  config_target_mak=$target_dir/config-target.mak
>> @@ -8155,6 +8157,7 @@ target_arch_name="$(upper $TARGET_ARCH)"
>>  echo "TARGET_$target_arch_name=y" >> $config_target_mak
>>  echo "TARGET_NAME=$target_name" >> $config_target_mak
>>  echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
>> +target_to_base_map="$target_dir,$TARGET_BASE_ARCH $target_to_base_map"
>>  if [ "$TARGET_ABI_DIR" = "" ]; then
>>    TARGET_ABI_DIR=$TARGET_ARCH
>>  fi
>> @@ -8370,6 +8373,22 @@ if test "$ccache_cpp2" = "yes"; then
>>    echo "export CCACHE_CPP2=y" >> $config_host_mak
>>  fi
>>  
>> +# Export a rule for calculating base arch from target_dir for use by
>> +# the Kconfig generator
>> +echo "# Usage: \$(call base-arch, target-dir)" >> $config_host_mak
>> +echo "# Return the base architecture for a target." >> $config_host_mak
>> +echo "# e.g \$(call base-arch, aarch64-linux-user) returns 'arm'" >> $config_host_mak
>> +echo "base-arch = \$(strip \\" >> $config_host_mak
>> +close_braces=""
>> +for pairs in $target_to_base_map
>> +do
>> +    dir="${pairs%%,*}"
>> +    base="${pairs#*,}"
>> +    echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak
>> +    close_braces="$close_braces )"
>> +done
>> +echo "$close_braces )" >> $config_host_mak
>> +
>>  # If we're using a separate build tree, set it up now.
>>  # DIRS are directories which we simply mkdir in the build tree;
>>  # LINKS are things to symlink back into the source tree
>>
> 



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

* Re: [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target
  2020-06-23  8:45     ` Philippe Mathieu-Daudé
@ 2020-06-23 13:17       ` Philippe Mathieu-Daudé
  2020-06-25  8:45         ` Claudio Fontana
  0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-23 13:17 UTC (permalink / raw)
  To: Claudio Fontana, qemu-devel, Paolo Bonzini
  Cc: Marc-André Lureau, Alex Bennée, Richard Henderson

On 6/23/20 10:45 AM, Philippe Mathieu-Daudé wrote:
> On 6/23/20 10:01 AM, Claudio Fontana wrote:
>> Hi Philippe, Alex,
>>
>> On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
>>> From: Alex Bennée <alex.bennee@linaro.org>
>>>
>>> As we encode the base architecture in configure.sh, we can emit
>>> the base-arch() function into config-host.mak.
>>>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>
>> I found this change a bit strange, but maybe I am missing some context.
> 
> This is used in patch 9:
> "Makefile: Allow target-specific optional Kconfig"
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg713823.html
> 
>>
>> Would it not be easier to read the information from the
>> config-target.mak files as it is already emitted there?
> 
> So you are suggesting moving the SUBDIR_DEVICES_MAK creation code
> to Makefile.target, before until now it is target-agnostic but we
> are making it target-specific. Yes, it could work...
> 
> I keep respining this series since the semihosting rework. Frankly
> I don't remember why it became so complicated, I need to jump into
> the code again.
> 
> I guess when Paolo introduced Kconfig, the accelerator configs were
> almost static, so SUBDIR_DEVICES_MAK was only dependent of host
> config.
> 
> The semihosting "device" depends of accelerator and target configs.
> 
> Maybe the problem is to see minikconf generating device selectors,
> as kconfig is also used for generic features (such accelerator,
> not really "device").

This might be solved easily using Meson... Maybe better wait for it?

>
>>
>>> ---
>>>  configure | 19 +++++++++++++++++++
>>>  1 file changed, 19 insertions(+)
>>>
>>> diff --git a/configure b/configure
>>> index ba88fd1824..c0d7fbc30e 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -7927,6 +7927,8 @@ if test "$linux" = "yes" ; then
>>>      fi
>>>  fi
>>>  
>>> +target_to_base_map=""
>>> +
>>>  for target in $target_list; do
>>>  target_dir="$target"
>>>  config_target_mak=$target_dir/config-target.mak
>>> @@ -8155,6 +8157,7 @@ target_arch_name="$(upper $TARGET_ARCH)"
>>>  echo "TARGET_$target_arch_name=y" >> $config_target_mak
>>>  echo "TARGET_NAME=$target_name" >> $config_target_mak
>>>  echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
>>> +target_to_base_map="$target_dir,$TARGET_BASE_ARCH $target_to_base_map"
>>>  if [ "$TARGET_ABI_DIR" = "" ]; then
>>>    TARGET_ABI_DIR=$TARGET_ARCH
>>>  fi
>>> @@ -8370,6 +8373,22 @@ if test "$ccache_cpp2" = "yes"; then
>>>    echo "export CCACHE_CPP2=y" >> $config_host_mak
>>>  fi
>>>  
>>> +# Export a rule for calculating base arch from target_dir for use by
>>> +# the Kconfig generator
>>> +echo "# Usage: \$(call base-arch, target-dir)" >> $config_host_mak
>>> +echo "# Return the base architecture for a target." >> $config_host_mak
>>> +echo "# e.g \$(call base-arch, aarch64-linux-user) returns 'arm'" >> $config_host_mak
>>> +echo "base-arch = \$(strip \\" >> $config_host_mak
>>> +close_braces=""
>>> +for pairs in $target_to_base_map
>>> +do
>>> +    dir="${pairs%%,*}"
>>> +    base="${pairs#*,}"
>>> +    echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak
>>> +    close_braces="$close_braces )"
>>> +done
>>> +echo "$close_braces )" >> $config_host_mak
>>> +
>>>  # If we're using a separate build tree, set it up now.
>>>  # DIRS are directories which we simply mkdir in the build tree;
>>>  # LINKS are things to symlink back into the source tree
>>>
>>
> 



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

* Re: [PATCH v9 00/10] accel: Allow targets to use Kconfig
  2020-06-22 16:47 ` Philippe Mathieu-Daudé
@ 2020-06-25  7:49   ` Philippe Mathieu-Daudé
  2020-06-25 10:20     ` Paolo Bonzini
  0 siblings, 1 reply; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-25  7:49 UTC (permalink / raw)
  To: qemu-devel, Paolo Bonzini
  Cc: Alex Bennée, Samuel Ortiz, haxm-team, Claudio Fontana,
	Richard Henderson

Hi Paolo,

Claudio raised an issue with patch #4, so at this point
I have to admit again having the KVM-only build merged
for the next release won't be possible :(

Only patch #9 depends on patch #4. Are you OK to take
the rest of the series, patches 1-3, 5-8, 10 (all but
4 and 9). Patches are fully reviewed. If it is easier
for you I can respin without 4/9.

Thanks,

Phil.

On 6/22/20 6:47 PM, Philippe Mathieu-Daudé wrote:
> On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
>> Missing review:
>> - 03/10 MAINTAINERS: Cover the HAX accelerator stub
> 
> I forgot again to include the HAXM team...
> 
>> - 04/10 configure: Generate rule to calculate base arch of target
>>
>> This series include generic patches I took of the KVM/ARM
>> specific series which will follow.
>>
>> - Update accelerators in MAINTAINERS
>> - Add accel/Kconfig
>> - Allow targets to use their how Kconfig
>>
[...]
>>
>> Previous RFC for semihosting posted earlier:
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg631218.html
>>
>> Alex Bennée (1):
>>   configure: Generate rule to calculate the base architecture of a
>>     target
>>
>> Philippe Mathieu-Daudé (9):
>>   MAINTAINERS: Fix KVM path expansion glob
>>   MAINTAINERS: Add an 'overall' entry for accelerators
>>   MAINTAINERS: Cover the HAX accelerator stub
>>   Makefile: Remove dangerous EOL trailing backslash
>>   Makefile: Write MINIKCONF variables as one entry per line
>>   accel/Kconfig: Extract accel selectors into their own config
>>   accel/Kconfig: Add the TCG selector
>>   Makefile: Allow target-specific optional Kconfig
>>   accel/tcg: Add stub for probe_access()
>>
>>  configure              | 19 +++++++++++++++++++
>>  Makefile               | 15 +++++++++++----
>>  accel/stubs/tcg-stub.c |  7 +++++++
>>  Kconfig.host           |  7 -------
>>  MAINTAINERS            | 14 +++++++++++++-
>>  accel/Kconfig          |  9 +++++++++
>>  6 files changed, 59 insertions(+), 12 deletions(-)
>>  create mode 100644 accel/Kconfig
>>
> 



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

* Re: [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target
  2020-06-23 13:17       ` Philippe Mathieu-Daudé
@ 2020-06-25  8:45         ` Claudio Fontana
  0 siblings, 0 replies; 22+ messages in thread
From: Claudio Fontana @ 2020-06-25  8:45 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel, Paolo Bonzini
  Cc: Marc-André Lureau, Alex Bennée, Richard Henderson

On 6/23/20 3:17 PM, Philippe Mathieu-Daudé wrote:
> On 6/23/20 10:45 AM, Philippe Mathieu-Daudé wrote:
>> On 6/23/20 10:01 AM, Claudio Fontana wrote:
>>> Hi Philippe, Alex,
>>>
>>> On 6/18/20 2:33 PM, Philippe Mathieu-Daudé wrote:
>>>> From: Alex Bennée <alex.bennee@linaro.org>
>>>>
>>>> As we encode the base architecture in configure.sh, we can emit
>>>> the base-arch() function into config-host.mak.
>>>>
>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>
>>> I found this change a bit strange, but maybe I am missing some context.
>>
>> This is used in patch 9:
>> "Makefile: Allow target-specific optional Kconfig"
>> https://www.mail-archive.com/qemu-devel@nongnu.org/msg713823.html
>>
>>>
>>> Would it not be easier to read the information from the
>>> config-target.mak files as it is already emitted there?
>>
>> So you are suggesting moving the SUBDIR_DEVICES_MAK creation code
>> to Makefile.target, before until now it is target-agnostic but we
>> are making it target-specific. Yes, it could work...
>>
>> I keep respining this series since the semihosting rework. Frankly
>> I don't remember why it became so complicated, I need to jump into
>> the code again.
>>
>> I guess when Paolo introduced Kconfig, the accelerator configs were
>> almost static, so SUBDIR_DEVICES_MAK was only dependent of host
>> config.
>>
>> The semihosting "device" depends of accelerator and target configs.
>>
>> Maybe the problem is to see minikconf generating device selectors,
>> as kconfig is also used for generic features (such accelerator,
>> not really "device").

I think you are right, some of the features are not devices. Maybe another variable could
hold the target-specific features, getting the input from the target makefile? hmm...

> 
> This might be solved easily using Meson... Maybe better wait for it?

Not sure about this one, should be possible to solve with makefiles also,
but I didn't try; I'll try to set things up to get a better understanding.

Ciao,

Claudio

> 
>>
>>>
>>>> ---
>>>>  configure | 19 +++++++++++++++++++
>>>>  1 file changed, 19 insertions(+)
>>>>
>>>> diff --git a/configure b/configure
>>>> index ba88fd1824..c0d7fbc30e 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -7927,6 +7927,8 @@ if test "$linux" = "yes" ; then
>>>>      fi
>>>>  fi
>>>>  
>>>> +target_to_base_map=""
>>>> +
>>>>  for target in $target_list; do
>>>>  target_dir="$target"
>>>>  config_target_mak=$target_dir/config-target.mak
>>>> @@ -8155,6 +8157,7 @@ target_arch_name="$(upper $TARGET_ARCH)"
>>>>  echo "TARGET_$target_arch_name=y" >> $config_target_mak
>>>>  echo "TARGET_NAME=$target_name" >> $config_target_mak
>>>>  echo "TARGET_BASE_ARCH=$TARGET_BASE_ARCH" >> $config_target_mak
>>>> +target_to_base_map="$target_dir,$TARGET_BASE_ARCH $target_to_base_map"
>>>>  if [ "$TARGET_ABI_DIR" = "" ]; then
>>>>    TARGET_ABI_DIR=$TARGET_ARCH
>>>>  fi
>>>> @@ -8370,6 +8373,22 @@ if test "$ccache_cpp2" = "yes"; then
>>>>    echo "export CCACHE_CPP2=y" >> $config_host_mak
>>>>  fi
>>>>  
>>>> +# Export a rule for calculating base arch from target_dir for use by
>>>> +# the Kconfig generator
>>>> +echo "# Usage: \$(call base-arch, target-dir)" >> $config_host_mak
>>>> +echo "# Return the base architecture for a target." >> $config_host_mak
>>>> +echo "# e.g \$(call base-arch, aarch64-linux-user) returns 'arm'" >> $config_host_mak
>>>> +echo "base-arch = \$(strip \\" >> $config_host_mak
>>>> +close_braces=""
>>>> +for pairs in $target_to_base_map
>>>> +do
>>>> +    dir="${pairs%%,*}"
>>>> +    base="${pairs#*,}"
>>>> +    echo "\$(if \$(findstring $dir,\$1),$base, \\" >> $config_host_mak
>>>> +    close_braces="$close_braces )"
>>>> +done
>>>> +echo "$close_braces )" >> $config_host_mak
>>>> +
>>>>  # If we're using a separate build tree, set it up now.
>>>>  # DIRS are directories which we simply mkdir in the build tree;
>>>>  # LINKS are things to symlink back into the source tree
>>>>
>>>
>>
> 



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

* Re: [PATCH v9 00/10] accel: Allow targets to use Kconfig
  2020-06-25  7:49   ` Philippe Mathieu-Daudé
@ 2020-06-25 10:20     ` Paolo Bonzini
  2020-06-25 10:22       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 22+ messages in thread
From: Paolo Bonzini @ 2020-06-25 10:20 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Alex Bennée, Samuel Ortiz, haxm-team, Claudio Fontana,
	Richard Henderson

On 25/06/20 09:49, Philippe Mathieu-Daudé wrote:
> Hi Paolo,
> 
> Claudio raised an issue with patch #4, so at this point
> I have to admit again having the KVM-only build merged
> for the next release won't be possible :(
> 
> Only patch #9 depends on patch #4. Are you OK to take
> the rest of the series, patches 1-3, 5-8, 10 (all but
> 4 and 9). Patches are fully reviewed. If it is easier
> for you I can respin without 4/9.

Yes, sounds good.  Patch 4 isn't great and with Meson we can indeed do
better because all config-target.mak files are parsed in a single
non-recursive build.

Paolo



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

* Re: [PATCH v9 00/10] accel: Allow targets to use Kconfig
  2020-06-25 10:20     ` Paolo Bonzini
@ 2020-06-25 10:22       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 22+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-06-25 10:22 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel
  Cc: Alex Bennée, Samuel Ortiz, haxm-team, Claudio Fontana,
	Richard Henderson

On 6/25/20 12:20 PM, Paolo Bonzini wrote:
> On 25/06/20 09:49, Philippe Mathieu-Daudé wrote:
>> Hi Paolo,
>>
>> Claudio raised an issue with patch #4, so at this point
>> I have to admit again having the KVM-only build merged
>> for the next release won't be possible :(
>>
>> Only patch #9 depends on patch #4. Are you OK to take
>> the rest of the series, patches 1-3, 5-8, 10 (all but
>> 4 and 9). Patches are fully reviewed. If it is easier
>> for you I can respin without 4/9.
> 
> Yes, sounds good.  Patch 4 isn't great and with Meson we can indeed do
> better because all config-target.mak files are parsed in a single
> non-recursive build.

OK, thanks!



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

end of thread, other threads:[~2020-06-25 10:23 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 12:33 [PATCH v9 00/10] accel: Allow targets to use Kconfig Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 01/10] MAINTAINERS: Fix KVM path expansion glob Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 02/10] MAINTAINERS: Add an 'overall' entry for accelerators Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 03/10] MAINTAINERS: Cover the HAX accelerator stub Philippe Mathieu-Daudé
2020-06-22 16:47   ` Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 04/10] configure: Generate rule to calculate the base architecture of a target Philippe Mathieu-Daudé
2020-06-19 11:08   ` Philippe Mathieu-Daudé
2020-06-23  8:01   ` Claudio Fontana
2020-06-23  8:45     ` Philippe Mathieu-Daudé
2020-06-23 13:17       ` Philippe Mathieu-Daudé
2020-06-25  8:45         ` Claudio Fontana
2020-06-18 12:33 ` [PATCH v9 05/10] Makefile: Remove dangerous EOL trailing backslash Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 06/10] Makefile: Write MINIKCONF variables as one entry per line Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 07/10] accel/Kconfig: Extract accel selectors into their own config Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 08/10] accel/Kconfig: Add the TCG selector Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 09/10] Makefile: Allow target-specific optional Kconfig Philippe Mathieu-Daudé
2020-06-18 12:33 ` [PATCH v9 10/10] accel/tcg: Add stub for probe_access() Philippe Mathieu-Daudé
2020-06-18 13:28 ` [PATCH v9 00/10] accel: Allow targets to use Kconfig no-reply
2020-06-22 16:47 ` Philippe Mathieu-Daudé
2020-06-25  7:49   ` Philippe Mathieu-Daudé
2020-06-25 10:20     ` Paolo Bonzini
2020-06-25 10:22       ` Philippe Mathieu-Daudé

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.