* [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user)
@ 2020-01-18 14:06 Philippe Mathieu-Daudé
2020-01-18 14:06 ` [PATCH v2 1/6] configure: Do not build libfdt if not required Philippe Mathieu-Daudé
` (6 more replies)
0 siblings, 7 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:06 UTC (permalink / raw)
To: qemu-devel, Riku Voipio, Laurent Vivier
Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, Paolo Bonzini,
Philippe Mathieu-Daudé,
Richard Henderson
In some configuration (linux-user, tools) we can ignore building
various objects (and the libfdt).
Tested with all the combinations of --[enable|disable]-tools,
--[enable|disable]-user and --[enable|disable]-system using the
following commands (suggested by Laurent Vivier in v1):
$ mkdir build
$ cd build
$ for user in enable disable; do \
for tools in enable disable; do \
for system in enable disable; do \
rm -fr build-$user-$system-$tools && \
mkdir build-$user-$system-$tools && \
(cd build-$user-$system-$tools && \
../../configure \
--${user}-user \
--${system}-system \
--${tools}-tools \
--disable-docs \
); \
done; \
done; \
done
Then building each of the 8 subdirectories on x86_64 and aarch64
hosts, running 'make check', and only on x86_64:
'make run-tcg-tests-x86_64-linux-user'.
All CI green:
https://gitlab.com/philmd/qemu/pipelines/110420332
https://travis-ci.org/philmd/qemu/builds/638781159
https://app.shippable.com/github/philmd/qemu/runs/587/summary/console
Since v1:
- no code change, improved commit description, added review tags
- added 2 new patches touching hw/core/ (remove reset.o from linux-user)
$ git backport-diff -u v1
Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
001/6:[----] [--] 'configure: Do not build libfdt if not required'
002/6:[----] [--] 'Makefile: Clarify all the codebase requires qom/ objects'
003/6:[----] [--] 'Makefile: Restrict system emulation and tools objects'
004/6:[----] [--] 'Makefile: Remove unhelpful comment'
005/6:[down] 'hw/core: Restrict reset handlers API to system-mode'
006/6:[down] 'hw/core/Makefile: Group generic objects versus system-mode objects'
Supersedes: <20200109153939.27173-1-philmd@redhat.com>
Philippe Mathieu-Daudé (6):
configure: Do not build libfdt if not required
Makefile: Clarify all the codebase requires qom/ objects
Makefile: Restrict system emulation and tools objects
Makefile: Remove unhelpful comment
hw/core: Restrict reset handlers API to system-mode
hw/core/Makefile: Group generic objects versus system-mode objects
configure | 2 ++
Makefile.objs | 31 ++++++++++---------------------
hw/core/Makefile.objs | 31 ++++++++++++++++---------------
3 files changed, 28 insertions(+), 36 deletions(-)
--
2.21.1
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/6] configure: Do not build libfdt if not required
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
@ 2020-01-18 14:06 ` Philippe Mathieu-Daudé
2020-01-20 11:02 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects Philippe Mathieu-Daudé
` (5 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:06 UTC (permalink / raw)
To: qemu-devel, Riku Voipio, Laurent Vivier
Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, Alistair Francis,
Paolo Bonzini, Philippe Mathieu-Daudé,
Richard Henderson
We only require libfdt for system emulation, in a small set
of architecture:
4077 # fdt support is mandatory for at least some target architectures,
4078 # so insist on it if we're building those system emulators.
4079 fdt_required=no
4080 for target in $target_list; do
4081 case $target in
4082 aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
4083 fdt_required=yes
Do not build libfdt if we did not manually specified --enable-fdt,
or have one of the platforms that require it in our target list.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v2: Improved description (thuth)
---
configure | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure b/configure
index 557e4382ea..c67a7e73db 100755
--- a/configure
+++ b/configure
@@ -4095,6 +4095,8 @@ if test "$fdt_required" = "yes"; then
"targets which need it (by specifying a cut down --target-list)."
fi
fdt=yes
+elif test "$fdt" != "yes" ; then
+ fdt=no
fi
if test "$fdt" != "no" ; then
--
2.21.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
2020-01-18 14:06 ` [PATCH v2 1/6] configure: Do not build libfdt if not required Philippe Mathieu-Daudé
@ 2020-01-18 14:06 ` Philippe Mathieu-Daudé
2020-01-20 11:03 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects Philippe Mathieu-Daudé
` (4 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:06 UTC (permalink / raw)
To: qemu-devel, Riku Voipio, Laurent Vivier
Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, Paolo Bonzini,
Philippe Mathieu-Daudé,
Richard Henderson
QEMU user-mode also requires the qom/ objects, it is not only
used by "system emulation and qemu-img". As we will use a big
if() block, move it upper in the "Common libraries for tools
and emulators" section.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Makefile.objs | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index 7c1e50f9d6..5aae561984 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -2,6 +2,7 @@
# Common libraries for tools and emulators
stub-obj-y = stubs/
util-obj-y = crypto/ util/ qobject/ qapi/
+qom-obj-y = qom/
chardev-obj-y = chardev/
@@ -26,11 +27,6 @@ block-obj-m = block/
crypto-obj-y = crypto/
-#######################################################################
-# qom-obj-y is code used by both qemu system emulation and qemu-img
-
-qom-obj-y = qom/
-
#######################################################################
# io-obj-y is code used by both qemu system emulation and qemu-img
--
2.21.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
2020-01-18 14:06 ` [PATCH v2 1/6] configure: Do not build libfdt if not required Philippe Mathieu-Daudé
2020-01-18 14:06 ` [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects Philippe Mathieu-Daudé
@ 2020-01-18 14:06 ` Philippe Mathieu-Daudé
2020-01-20 11:03 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 4/6] Makefile: Remove unhelpful comment Philippe Mathieu-Daudé
` (3 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:06 UTC (permalink / raw)
To: qemu-devel, Riku Voipio, Laurent Vivier
Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, Paolo Bonzini,
Philippe Mathieu-Daudé,
Richard Henderson
Restrict all the system emulation and tools objects with a
Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check.
Using the same description over and over is not very helpful.
Use it once, just before the if() block.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Makefile.objs | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index 5aae561984..395dd1e670 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -4,16 +4,15 @@ stub-obj-y = stubs/
util-obj-y = crypto/ util/ qobject/ qapi/
qom-obj-y = qom/
+#######################################################################
+# code used by both qemu system emulation and qemu-img
+
+ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
+
chardev-obj-y = chardev/
-#######################################################################
-# authz-obj-y is code used by both qemu system emulation and qemu-img
-
authz-obj-y = authz/
-#######################################################################
-# block-obj-y is code used by both qemu system emulation and qemu-img
-
block-obj-y = nbd/
block-obj-y += block.o blockjob.o job.o
block-obj-y += block/ scsi/
@@ -22,16 +21,12 @@ block-obj-$(CONFIG_REPLICATION) += replication.o
block-obj-m = block/
-#######################################################################
-# crypto-obj-y is code used by both qemu system emulation and qemu-img
-
crypto-obj-y = crypto/
-#######################################################################
-# io-obj-y is code used by both qemu system emulation and qemu-img
-
io-obj-y = io/
+endif # CONFIG_SOFTMMU or CONFIG_TOOLS
+
######################################################################
# Target independent part of system emulation. The long term path is to
# suppress *all* target specific code in case of system emulation, i.e. a
--
2.21.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 4/6] Makefile: Remove unhelpful comment
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
` (2 preceding siblings ...)
2020-01-18 14:06 ` [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects Philippe Mathieu-Daudé
@ 2020-01-18 14:06 ` Philippe Mathieu-Daudé
2020-01-20 11:04 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode Philippe Mathieu-Daudé
` (2 subsequent siblings)
6 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:06 UTC (permalink / raw)
To: qemu-devel, Riku Voipio, Laurent Vivier
Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, Paolo Bonzini,
Philippe Mathieu-Daudé,
Richard Henderson
It is pointless to keep qapi/ object separate from the other
common-objects. Drop the comment.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Makefile.objs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/Makefile.objs b/Makefile.objs
index 395dd1e670..c6321d0465 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -71,11 +71,9 @@ qemu-seccomp.o-libs := $(SECCOMP_LIBS)
common-obj-$(CONFIG_FDT) += device_tree.o
-######################################################################
-# qapi
-
common-obj-y += qapi/
-endif
+
+endif # CONFIG_SOFTMMU
#######################################################################
# Target-independent parts used in system and user emulation
--
2.21.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
` (3 preceding siblings ...)
2020-01-18 14:06 ` [PATCH v2 4/6] Makefile: Remove unhelpful comment Philippe Mathieu-Daudé
@ 2020-01-18 14:06 ` Philippe Mathieu-Daudé
2020-01-20 5:27 ` Thomas Huth
2020-01-20 11:07 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects Philippe Mathieu-Daudé
2020-01-18 14:22 ` [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
6 siblings, 2 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:06 UTC (permalink / raw)
To: qemu-devel, Riku Voipio, Laurent Vivier
Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, Paolo Bonzini,
Philippe Mathieu-Daudé,
Richard Henderson
The user-mode code does not use this API, restrict it
to the system-mode.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/core/Makefile.objs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index 0edd9e635d..2fea68ccf7 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -1,6 +1,7 @@
# core qdev-related obj files, also used by *-user:
common-obj-y += qdev.o qdev-properties.o
-common-obj-y += bus.o reset.o
+common-obj-y += bus.o
+common-obj-$(CONFIG_SOFTMMU) += reset.o
common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
# irq.o needed for qdev GPIO handling:
--
2.21.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
` (4 preceding siblings ...)
2020-01-18 14:06 ` [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode Philippe Mathieu-Daudé
@ 2020-01-18 14:06 ` Philippe Mathieu-Daudé
2020-01-20 11:14 ` Alex Bennée
2020-01-18 14:22 ` [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
6 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:06 UTC (permalink / raw)
To: qemu-devel, Riku Voipio, Laurent Vivier
Cc: Thomas Huth, Eduardo Habkost, Alex Bennée, Paolo Bonzini,
Philippe Mathieu-Daudé,
Richard Henderson
To ease review/modifications of this Makefile, group generic
objects first, then system-mode specific ones, and finally
peripherals (which are only used in system-mode).
No logical changes introduced here.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/core/Makefile.objs | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index 2fea68ccf7..a522b7297d 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -1,32 +1,32 @@
# core qdev-related obj files, also used by *-user:
common-obj-y += qdev.o qdev-properties.o
common-obj-y += bus.o
+common-obj-y += cpu.o
+common-obj-y += hotplug.o
+common-obj-y += vmstate-if.o
+# irq.o needed for qdev GPIO handling:
+common-obj-y += irq.o
+
common-obj-$(CONFIG_SOFTMMU) += reset.o
common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
-# irq.o needed for qdev GPIO handling:
-common-obj-y += irq.o
-common-obj-y += hotplug.o
common-obj-$(CONFIG_SOFTMMU) += nmi.o
common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
-common-obj-y += cpu.o
-common-obj-y += vmstate-if.o
+common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
+common-obj-$(CONFIG_SOFTMMU) += sysbus.o
+common-obj-$(CONFIG_SOFTMMU) += machine.o
+common-obj-$(CONFIG_SOFTMMU) += null-machine.o
+common-obj-$(CONFIG_SOFTMMU) += loader.o
+common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
+obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
+obj-$(CONFIG_SOFTMMU) += numa.o
common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
common-obj-$(CONFIG_XILINX_AXI) += stream.o
common-obj-$(CONFIG_PTIMER) += ptimer.o
-common-obj-$(CONFIG_SOFTMMU) += sysbus.o
-common-obj-$(CONFIG_SOFTMMU) += machine.o
-common-obj-$(CONFIG_SOFTMMU) += loader.o
common-obj-$(CONFIG_FITLOADER) += loader-fit.o
-common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
common-obj-$(CONFIG_REGISTER) += register.o
common-obj-$(CONFIG_OR_IRQ) += or-irq.o
common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o
common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o
-common-obj-$(CONFIG_SOFTMMU) += null-machine.o
-
-obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
-obj-$(CONFIG_SOFTMMU) += numa.o
-common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
--
2.21.1
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user)
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
` (5 preceding siblings ...)
2020-01-18 14:06 ` [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects Philippe Mathieu-Daudé
@ 2020-01-18 14:22 ` Philippe Mathieu-Daudé
2020-01-21 10:54 ` Paolo Bonzini
6 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-18 14:22 UTC (permalink / raw)
To: qemu-devel, Paolo Bonzini, Kevin Wolf
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, Laurent Vivier,
Alex Bennée, Richard Henderson
On 1/18/20 3:06 PM, Philippe Mathieu-Daudé wrote:
> In some configuration (linux-user, tools) we can ignore building
> various objects (and the libfdt).
>
> Tested with all the combinations of --[enable|disable]-tools,
> --[enable|disable]-user and --[enable|disable]-system using the
> following commands (suggested by Laurent Vivier in v1):
>
> $ mkdir build
> $ cd build
> $ for user in enable disable; do \
> for tools in enable disable; do \
> for system in enable disable; do \
> rm -fr build-$user-$system-$tools && \
> mkdir build-$user-$system-$tools && \
> (cd build-$user-$system-$tools && \
> ../../configure \
> --${user}-user \
> --${system}-system \
> --${tools}-tools \
> --disable-docs \
> ); \
> done; \
> done; \
> done
>
> Then building each of the 8 subdirectories on x86_64 and aarch64
> hosts, running 'make check', and only on x86_64:
> 'make run-tcg-tests-x86_64-linux-user'.
>
> All CI green:
> https://gitlab.com/philmd/qemu/pipelines/110420332
> https://travis-ci.org/philmd/qemu/builds/638781159
> https://app.shippable.com/github/philmd/qemu/runs/587/summary/console
>
> Since v1:
> - no code change, improved commit description, added review tags
> - added 2 new patches touching hw/core/ (remove reset.o from linux-user)
>
> $ git backport-diff -u v1
> Key:
> [----] : patches are identical
> [####] : number of functional differences between upstream/downstream patch
> [down] : patch is downstream-only
> The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively
>
> 001/6:[----] [--] 'configure: Do not build libfdt if not required'
> 002/6:[----] [--] 'Makefile: Clarify all the codebase requires qom/ objects'
> 003/6:[----] [--] 'Makefile: Restrict system emulation and tools objects'
> 004/6:[----] [--] 'Makefile: Remove unhelpful comment'
> 005/6:[down] 'hw/core: Restrict reset handlers API to system-mode'
> 006/6:[down] 'hw/core/Makefile: Group generic objects versus system-mode objects'
>
> Supersedes: <20200109153939.27173-1-philmd@redhat.com>
^ testing latest patchew feature, v2 has different subject name
than v1, but patchew successfully linked them :)
See "Diff against v1" in v2:
https://patchew.org/QEMU/20200118140619.26333-1-philmd@redhat.com/
https://patchew.org/QEMU/20200109153939.27173-1-philmd@redhat.com/diff/20200118140619.26333-1-philmd@redhat.com/
Thanks Kevin & Paolo for this feature :)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode
2020-01-18 14:06 ` [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode Philippe Mathieu-Daudé
@ 2020-01-20 5:27 ` Thomas Huth
2020-01-20 11:07 ` Alex Bennée
1 sibling, 0 replies; 17+ messages in thread
From: Thomas Huth @ 2020-01-20 5:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel, Riku Voipio, Laurent Vivier
Cc: Paolo Bonzini, Alex Bennée, Eduardo Habkost, Richard Henderson
On 18/01/2020 15.06, Philippe Mathieu-Daudé wrote:
> The user-mode code does not use this API, restrict it
> to the system-mode.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/core/Makefile.objs | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index 0edd9e635d..2fea68ccf7 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -1,6 +1,7 @@
> # core qdev-related obj files, also used by *-user:
> common-obj-y += qdev.o qdev-properties.o
> -common-obj-y += bus.o reset.o
> +common-obj-y += bus.o
> +common-obj-$(CONFIG_SOFTMMU) += reset.o
> common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
> common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
> # irq.o needed for qdev GPIO handling:
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/6] configure: Do not build libfdt if not required
2020-01-18 14:06 ` [PATCH v2 1/6] configure: Do not build libfdt if not required Philippe Mathieu-Daudé
@ 2020-01-20 11:02 ` Alex Bennée
0 siblings, 0 replies; 17+ messages in thread
From: Alex Bennée @ 2020-01-20 11:02 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, qemu-devel,
Laurent Vivier, Alistair Francis, Paolo Bonzini,
Richard Henderson
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> We only require libfdt for system emulation, in a small set
> of architecture:
>
> 4077 # fdt support is mandatory for at least some target architectures,
> 4078 # so insist on it if we're building those system emulators.
> 4079 fdt_required=no
> 4080 for target in $target_list; do
> 4081 case $target in
> 4082 aarch64*-softmmu|arm*-softmmu|ppc*-softmmu|microblaze*-softmmu|mips64el-softmmu|riscv*-softmmu)
> 4083 fdt_required=yes
>
> Do not build libfdt if we did not manually specified --enable-fdt,
> or have one of the platforms that require it in our target list.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> v2: Improved description (thuth)
> ---
> configure | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/configure b/configure
> index 557e4382ea..c67a7e73db 100755
> --- a/configure
> +++ b/configure
> @@ -4095,6 +4095,8 @@ if test "$fdt_required" = "yes"; then
> "targets which need it (by specifying a cut down --target-list)."
> fi
> fdt=yes
> +elif test "$fdt" != "yes" ; then
> + fdt=no
> fi
>
> if test "$fdt" != "no" ; then
--
Alex Bennée
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects
2020-01-18 14:06 ` [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects Philippe Mathieu-Daudé
@ 2020-01-20 11:03 ` Alex Bennée
0 siblings, 0 replies; 17+ messages in thread
From: Alex Bennée @ 2020-01-20 11:03 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, qemu-devel,
Laurent Vivier, Paolo Bonzini, Richard Henderson
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> QEMU user-mode also requires the qom/ objects, it is not only
> used by "system emulation and qemu-img". As we will use a big
> if() block, move it upper in the "Common libraries for tools
> and emulators" section.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> Makefile.objs | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/Makefile.objs b/Makefile.objs
> index 7c1e50f9d6..5aae561984 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -2,6 +2,7 @@
> # Common libraries for tools and emulators
> stub-obj-y = stubs/
> util-obj-y = crypto/ util/ qobject/ qapi/
> +qom-obj-y = qom/
>
> chardev-obj-y = chardev/
>
> @@ -26,11 +27,6 @@ block-obj-m = block/
>
> crypto-obj-y = crypto/
>
> -#######################################################################
> -# qom-obj-y is code used by both qemu system emulation and qemu-img
> -
> -qom-obj-y = qom/
> -
> #######################################################################
> # io-obj-y is code used by both qemu system emulation and qemu-img
--
Alex Bennée
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects
2020-01-18 14:06 ` [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects Philippe Mathieu-Daudé
@ 2020-01-20 11:03 ` Alex Bennée
0 siblings, 0 replies; 17+ messages in thread
From: Alex Bennée @ 2020-01-20 11:03 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, qemu-devel,
Laurent Vivier, Paolo Bonzini, Richard Henderson
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> Restrict all the system emulation and tools objects with a
> Makefile IF (CONFIG_SOFTMMU OR CONFIG_TOOLS) check.
>
> Using the same description over and over is not very helpful.
> Use it once, just before the if() block.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> Makefile.objs | 19 +++++++------------
> 1 file changed, 7 insertions(+), 12 deletions(-)
>
> diff --git a/Makefile.objs b/Makefile.objs
> index 5aae561984..395dd1e670 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -4,16 +4,15 @@ stub-obj-y = stubs/
> util-obj-y = crypto/ util/ qobject/ qapi/
> qom-obj-y = qom/
>
> +#######################################################################
> +# code used by both qemu system emulation and qemu-img
> +
> +ifeq ($(call lor,$(CONFIG_SOFTMMU),$(CONFIG_TOOLS)),y)
> +
> chardev-obj-y = chardev/
>
> -#######################################################################
> -# authz-obj-y is code used by both qemu system emulation and qemu-img
> -
> authz-obj-y = authz/
>
> -#######################################################################
> -# block-obj-y is code used by both qemu system emulation and qemu-img
> -
> block-obj-y = nbd/
> block-obj-y += block.o blockjob.o job.o
> block-obj-y += block/ scsi/
> @@ -22,16 +21,12 @@ block-obj-$(CONFIG_REPLICATION) += replication.o
>
> block-obj-m = block/
>
> -#######################################################################
> -# crypto-obj-y is code used by both qemu system emulation and qemu-img
> -
> crypto-obj-y = crypto/
>
> -#######################################################################
> -# io-obj-y is code used by both qemu system emulation and qemu-img
> -
> io-obj-y = io/
>
> +endif # CONFIG_SOFTMMU or CONFIG_TOOLS
> +
> ######################################################################
> # Target independent part of system emulation. The long term path is to
> # suppress *all* target specific code in case of system emulation, i.e. a
--
Alex Bennée
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 4/6] Makefile: Remove unhelpful comment
2020-01-18 14:06 ` [PATCH v2 4/6] Makefile: Remove unhelpful comment Philippe Mathieu-Daudé
@ 2020-01-20 11:04 ` Alex Bennée
0 siblings, 0 replies; 17+ messages in thread
From: Alex Bennée @ 2020-01-20 11:04 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, qemu-devel,
Laurent Vivier, Paolo Bonzini, Richard Henderson
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> It is pointless to keep qapi/ object separate from the other
> common-objects. Drop the comment.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> ---
> Makefile.objs | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile.objs b/Makefile.objs
> index 395dd1e670..c6321d0465 100644
> --- a/Makefile.objs
> +++ b/Makefile.objs
> @@ -71,11 +71,9 @@ qemu-seccomp.o-libs := $(SECCOMP_LIBS)
>
> common-obj-$(CONFIG_FDT) += device_tree.o
>
> -######################################################################
> -# qapi
> -
> common-obj-y += qapi/
> -endif
> +
> +endif # CONFIG_SOFTMMU
>
> #######################################################################
> # Target-independent parts used in system and user emulation
--
Alex Bennée
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode
2020-01-18 14:06 ` [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode Philippe Mathieu-Daudé
2020-01-20 5:27 ` Thomas Huth
@ 2020-01-20 11:07 ` Alex Bennée
2020-01-21 10:59 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 17+ messages in thread
From: Alex Bennée @ 2020-01-20 11:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, qemu-devel,
Laurent Vivier, Paolo Bonzini, Richard Henderson
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> The user-mode code does not use this API, restrict it
> to the system-mode.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/core/Makefile.objs | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index 0edd9e635d..2fea68ccf7 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -1,6 +1,7 @@
> # core qdev-related obj files, also used by *-user:
> common-obj-y += qdev.o qdev-properties.o
> -common-obj-y += bus.o reset.o
> +common-obj-y += bus.o
> +common-obj-$(CONFIG_SOFTMMU) += reset.o
This seems a very minor tweaks as far as it goes. I though the only
thing needed in hw was hw/core/cpu and everything else was system
emulation?
However it at least moves the needle in the right direction:
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
> common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
> # irq.o needed for qdev GPIO handling:
--
Alex Bennée
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects
2020-01-18 14:06 ` [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects Philippe Mathieu-Daudé
@ 2020-01-20 11:14 ` Alex Bennée
0 siblings, 0 replies; 17+ messages in thread
From: Alex Bennée @ 2020-01-20 11:14 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, qemu-devel,
Laurent Vivier, Paolo Bonzini, Richard Henderson
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> To ease review/modifications of this Makefile, group generic
> objects first, then system-mode specific ones, and finally
> peripherals (which are only used in system-mode).
>
> No logical changes introduced here.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/core/Makefile.objs | 28 ++++++++++++++--------------
> 1 file changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
> index 2fea68ccf7..a522b7297d 100644
> --- a/hw/core/Makefile.objs
> +++ b/hw/core/Makefile.objs
> @@ -1,32 +1,32 @@
> # core qdev-related obj files, also used by *-user:
> common-obj-y += qdev.o qdev-properties.o
> common-obj-y += bus.o
> +common-obj-y += cpu.o
> +common-obj-y += hotplug.o
> +common-obj-y += vmstate-if.o
> +# irq.o needed for qdev GPIO handling:
how are IRQs relevant to linux-user? or vmstate and hotplug?
> +common-obj-y += irq.o
> +
> common-obj-$(CONFIG_SOFTMMU) += reset.o
> common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
> common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
> -# irq.o needed for qdev GPIO handling:
> -common-obj-y += irq.o
> -common-obj-y += hotplug.o
> common-obj-$(CONFIG_SOFTMMU) += nmi.o
> common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
> -common-obj-y += cpu.o
> -common-obj-y += vmstate-if.o
> +common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
> +common-obj-$(CONFIG_SOFTMMU) += sysbus.o
> +common-obj-$(CONFIG_SOFTMMU) += machine.o
> +common-obj-$(CONFIG_SOFTMMU) += null-machine.o
> +common-obj-$(CONFIG_SOFTMMU) += loader.o
> +common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
> +obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
> +obj-$(CONFIG_SOFTMMU) += numa.o
>
> common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
> common-obj-$(CONFIG_XILINX_AXI) += stream.o
> common-obj-$(CONFIG_PTIMER) += ptimer.o
> -common-obj-$(CONFIG_SOFTMMU) += sysbus.o
> -common-obj-$(CONFIG_SOFTMMU) += machine.o
> -common-obj-$(CONFIG_SOFTMMU) += loader.o
> common-obj-$(CONFIG_FITLOADER) += loader-fit.o
> -common-obj-$(CONFIG_SOFTMMU) += qdev-properties-system.o
> common-obj-$(CONFIG_REGISTER) += register.o
> common-obj-$(CONFIG_OR_IRQ) += or-irq.o
> common-obj-$(CONFIG_SPLIT_IRQ) += split-irq.o
> common-obj-$(CONFIG_PLATFORM_BUS) += platform-bus.o
> common-obj-$(CONFIG_GENERIC_LOADER) += generic-loader.o
> -common-obj-$(CONFIG_SOFTMMU) += null-machine.o
> -
> -obj-$(CONFIG_SOFTMMU) += machine-qmp-cmds.o
> -obj-$(CONFIG_SOFTMMU) += numa.o
> -common-obj-$(CONFIG_SOFTMMU) += machine-hmp-cmds.o
--
Alex Bennée
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user)
2020-01-18 14:22 ` [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
@ 2020-01-21 10:54 ` Paolo Bonzini
0 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2020-01-21 10:54 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel, Kevin Wolf
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, Laurent Vivier,
Alex Bennée, Richard Henderson
On 18/01/20 15:22, Philippe Mathieu-Daudé wrote:
>>
>> Supersedes: <20200109153939.27173-1-philmd@redhat.com>
>
> ^ testing latest patchew feature, v2 has different subject name
> than v1, but patchew successfully linked them :)
Appreciated! You've now demonstrated the case where the header is
included in the cover letter rather than a separate message. :)
Series queued, thanks.
Paolo
> See "Diff against v1" in v2:
> https://patchew.org/QEMU/20200118140619.26333-1-philmd@redhat.com/
>
> https://patchew.org/QEMU/20200109153939.27173-1-philmd@redhat.com/diff/20200118140619.26333-1-philmd@redhat.com/
>
>
> Thanks Kevin & Paolo for this feature :)
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode
2020-01-20 11:07 ` Alex Bennée
@ 2020-01-21 10:59 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-01-21 10:59 UTC (permalink / raw)
To: Alex Bennée
Cc: Thomas Huth, Eduardo Habkost, Riku Voipio, qemu-devel,
Laurent Vivier, Paolo Bonzini, Richard Henderson
On 1/20/20 12:07 PM, Alex Bennée wrote:
>
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>
>> The user-mode code does not use this API, restrict it
>> to the system-mode.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> hw/core/Makefile.objs | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
>> index 0edd9e635d..2fea68ccf7 100644
>> --- a/hw/core/Makefile.objs
>> +++ b/hw/core/Makefile.objs
>> @@ -1,6 +1,7 @@
>> # core qdev-related obj files, also used by *-user:
>> common-obj-y += qdev.o qdev-properties.o
>> -common-obj-y += bus.o reset.o
>> +common-obj-y += bus.o
>> +common-obj-$(CONFIG_SOFTMMU) += reset.o
>
> This seems a very minor tweaks as far as it goes. I though the only
> thing needed in hw was hw/core/cpu and everything else was system
> emulation?
Unfortunately qdev.o pulls in a lot of unnecessary code (qbus, machine
properties...).
>
> However it at least moves the needle in the right direction:
>
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Thanks!
>> common-obj-$(CONFIG_SOFTMMU) += qdev-fw.o
>> common-obj-$(CONFIG_SOFTMMU) += fw-path-provider.o
>> # irq.o needed for qdev GPIO handling:
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2020-01-21 11:00 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-18 14:06 [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
2020-01-18 14:06 ` [PATCH v2 1/6] configure: Do not build libfdt if not required Philippe Mathieu-Daudé
2020-01-20 11:02 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 2/6] Makefile: Clarify all the codebase requires qom/ objects Philippe Mathieu-Daudé
2020-01-20 11:03 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 3/6] Makefile: Restrict system emulation and tools objects Philippe Mathieu-Daudé
2020-01-20 11:03 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 4/6] Makefile: Remove unhelpful comment Philippe Mathieu-Daudé
2020-01-20 11:04 ` Alex Bennée
2020-01-18 14:06 ` [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode Philippe Mathieu-Daudé
2020-01-20 5:27 ` Thomas Huth
2020-01-20 11:07 ` Alex Bennée
2020-01-21 10:59 ` Philippe Mathieu-Daudé
2020-01-18 14:06 ` [PATCH v2 6/6] hw/core/Makefile: Group generic objects versus system-mode objects Philippe Mathieu-Daudé
2020-01-20 11:14 ` Alex Bennée
2020-01-18 14:22 ` [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user) Philippe Mathieu-Daudé
2020-01-21 10:54 ` Paolo Bonzini
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.