]> git.proxmox.com Git - mirror_qemu.git/log
mirror_qemu.git
3 years agomeson: convert fsdev/
Marc-André Lureau [Thu, 25 Jul 2019 10:22:34 +0000 (14:22 +0400)]
meson: convert fsdev/

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert backends directory to Meson
Marc-André Lureau [Wed, 24 Jul 2019 15:23:16 +0000 (19:23 +0400)]
meson: convert backends directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert net directory to Meson
Marc-André Lureau [Mon, 22 Jul 2019 19:47:50 +0000 (23:47 +0400)]
meson: convert net directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert migration directory to Meson
Marc-André Lureau [Wed, 24 Jul 2019 15:16:22 +0000 (19:16 +0400)]
meson: convert migration directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert replay directory to Meson
Marc-André Lureau [Mon, 22 Jul 2019 19:40:45 +0000 (23:40 +0400)]
meson: convert replay directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert qemu-storage-daemon
Paolo Bonzini [Tue, 4 Aug 2020 18:18:36 +0000 (20:18 +0200)]
meson: convert qemu-storage-daemon

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert common QMP bits for qemu and qemu-storage-daemon
Paolo Bonzini [Tue, 4 Aug 2020 19:14:26 +0000 (21:14 +0200)]
meson: convert common QMP bits for qemu and qemu-storage-daemon

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert dump/
Marc-André Lureau [Tue, 3 Sep 2019 12:59:33 +0000 (16:59 +0400)]
meson: convert dump/

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert trace/
Marc-André Lureau [Tue, 3 Sep 2019 12:47:00 +0000 (16:47 +0400)]
meson: convert trace/

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert most of softmmu/
Paolo Bonzini [Thu, 6 Aug 2020 11:40:26 +0000 (13:40 +0200)]
meson: convert most of softmmu/

Leave out main.c, it's special due to fuzzing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert root directory to Meson
Paolo Bonzini [Mon, 3 Aug 2020 14:22:28 +0000 (16:22 +0200)]
meson: convert root directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert ui directory to Meson
Marc-André Lureau [Tue, 16 Jul 2019 19:21:02 +0000 (23:21 +0400)]
meson: convert ui directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert audio directory to Meson
Paolo Bonzini [Mon, 17 Aug 2020 10:47:55 +0000 (12:47 +0200)]
meson: convert audio directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert tests/qtest to meson
Paolo Bonzini [Tue, 4 Aug 2020 18:00:40 +0000 (20:00 +0200)]
meson: convert tests/qtest to meson

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert chardev directory to Meson (emulator part)
Paolo Bonzini [Mon, 29 Jul 2019 13:40:07 +0000 (15:40 +0200)]
meson: convert chardev directory to Meson (emulator part)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoconfigure, Makefile; remove TOOLS and HELPERS-y variable
Paolo Bonzini [Thu, 18 Jul 2019 11:21:28 +0000 (13:21 +0200)]
configure, Makefile; remove TOOLS and HELPERS-y variable

Everything involving tools is now done by meson.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: qemu-pr-helper
Marc-André Lureau [Tue, 16 Jul 2019 17:54:15 +0000 (21:54 +0400)]
meson: qemu-pr-helper

The executable moves back from libexecdir to bindir, when it was
in 5.0 and earlier.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: qemu-{img,io,nbd}
Marc-André Lureau [Tue, 16 Jul 2019 17:37:25 +0000 (21:37 +0400)]
meson: qemu-{img,io,nbd}

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert block
Marc-André Lureau [Thu, 29 Aug 2019 18:34:43 +0000 (22:34 +0400)]
meson: convert block

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert chardev directory to Meson (tools part)
Marc-André Lureau [Mon, 15 Jul 2019 19:18:07 +0000 (23:18 +0400)]
meson: convert chardev directory to Meson (tools part)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add modules infrastructure
Marc-André Lureau [Thu, 29 Aug 2019 18:07:01 +0000 (22:07 +0400)]
meson: add modules infrastructure

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: infrastructure for building emulators
Paolo Bonzini [Mon, 3 Feb 2020 10:42:03 +0000 (11:42 +0100)]
meson: infrastructure for building emulators

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert target/s390x/gen-features.h
Marc-André Lureau [Sat, 17 Aug 2019 10:55:32 +0000 (14:55 +0400)]
meson: convert target/s390x/gen-features.h

Needed by linux-user/s390x/cpu_loop.c; this removes the only use of HOST_CC.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert io directory to Meson
Marc-André Lureau [Tue, 16 Jul 2019 15:33:55 +0000 (19:33 +0400)]
meson: convert io directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert crypto directory to Meson
Marc-André Lureau [Tue, 16 Jul 2019 15:28:54 +0000 (19:28 +0400)]
meson: convert crypto directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert authz directory to Meson
Marc-André Lureau [Mon, 15 Jul 2019 18:54:34 +0000 (22:54 +0400)]
meson: convert authz directory to Meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert qom directory to Meson (tools part)
Marc-André Lureau [Tue, 16 Jul 2019 15:40:16 +0000 (19:40 +0400)]
meson: convert qom directory to Meson (tools part)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert check-qapi-schema
Paolo Bonzini [Tue, 28 Jan 2020 17:05:14 +0000 (18:05 +0100)]
meson: convert check-qapi-schema

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert tests/fp and check-softfloat
Paolo Bonzini [Thu, 6 Aug 2020 12:08:31 +0000 (14:08 +0200)]
meson: convert tests/fp and check-softfloat

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert check-decodetree
Paolo Bonzini [Tue, 28 Jan 2020 15:41:44 +0000 (16:41 +0100)]
meson: convert check-decodetree

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: handle edk2 bios and descriptors
Marc-André Lureau [Mon, 15 Jul 2019 17:22:31 +0000 (21:22 +0400)]
meson: handle edk2 bios and descriptors

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: generate hxtool files
Marc-André Lureau [Mon, 15 Jul 2019 14:06:04 +0000 (18:06 +0400)]
meson: generate hxtool files

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: generate shader headers
Marc-André Lureau [Mon, 15 Jul 2019 13:36:47 +0000 (17:36 +0400)]
meson: generate shader headers

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: generate qemu-version.h
Marc-André Lureau [Mon, 15 Jul 2019 13:10:19 +0000 (17:10 +0400)]
meson: generate qemu-version.h

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: keymap-gen
Marc-André Lureau [Mon, 15 Jul 2019 12:00:36 +0000 (16:00 +0400)]
meson: keymap-gen

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add virtfs-proxy-helper
Marc-André Lureau [Mon, 15 Jul 2019 11:04:49 +0000 (15:04 +0400)]
meson: add virtfs-proxy-helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add qemu-edid
Marc-André Lureau [Mon, 15 Jul 2019 10:50:58 +0000 (14:50 +0400)]
meson: add qemu-edid

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add qemu-keymap
Marc-André Lureau [Mon, 15 Jul 2019 10:48:31 +0000 (14:48 +0400)]
meson: add qemu-keymap

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add qemu-bridge-helper
Marc-André Lureau [Mon, 15 Jul 2019 10:39:25 +0000 (14:39 +0400)]
meson: add qemu-bridge-helper

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert dummy Windows qga/qemu-ga target
Paolo Bonzini [Tue, 28 Jan 2020 14:06:16 +0000 (15:06 +0100)]
meson: convert dummy Windows qga/qemu-ga target

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add msi generation
Marc-André Lureau [Mon, 15 Jul 2019 09:06:20 +0000 (13:06 +0400)]
meson: add msi generation

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert vss-win32
Marc-André Lureau [Mon, 15 Jul 2019 07:39:13 +0000 (11:39 +0400)]
meson: convert vss-win32

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: convert qemu-ga
Paolo Bonzini [Thu, 18 Jul 2019 11:19:02 +0000 (13:19 +0200)]
meson: convert qemu-ga

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add solaris and Haiku libraries
Paolo Bonzini [Sun, 9 Aug 2020 21:47:45 +0000 (23:47 +0200)]
meson: add solaris and Haiku libraries

There is no probing in configure, so no need to pass them as
variables to meson.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add macos dependencies
Marc-André Lureau [Tue, 20 Aug 2019 15:48:59 +0000 (19:48 +0400)]
meson: add macos dependencies

There is no probing in configure, so no need to pass them as
variables to meson. Do a regular meson dependency() instead.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/elf2dmp: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 19:47:06 +0000 (23:47 +0400)]
contrib/elf2dmp: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/ivshmem: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 19:16:54 +0000 (23:16 +0400)]
contrib/ivshmem: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/vhost-user-gpu: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 18:23:46 +0000 (22:23 +0400)]
contrib/vhost-user-gpu: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/vhost-user-input: convert to meson
Marc-André Lureau [Fri, 12 Jul 2019 18:11:20 +0000 (22:11 +0400)]
contrib/vhost-user-input: convert to meson

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/rdmacm-mux: convert to Meson
Paolo Bonzini [Mon, 10 Jun 2019 10:27:52 +0000 (12:27 +0200)]
contrib/rdmacm-mux: convert to Meson

We can use config-host.mak to decide whether the tool has to be built,
apart from that the conversion is straightforward.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/vhost-user-scsi: convert to Meson
Paolo Bonzini [Mon, 10 Jun 2019 10:21:14 +0000 (12:21 +0200)]
contrib/vhost-user-scsi: convert to Meson

The libiscsi pkg-config information is extracted from config-host.mak and
used to link vhost-user-blk.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agovhost-user-scsi: add compatibility for libiscsi 1.9.0
Paolo Bonzini [Mon, 10 Aug 2020 19:15:19 +0000 (21:15 +0200)]
vhost-user-scsi: add compatibility for libiscsi 1.9.0

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/vhost-user-blk: convert to Meson
Paolo Bonzini [Mon, 10 Jun 2019 10:18:02 +0000 (12:18 +0200)]
contrib/vhost-user-blk: convert to Meson

The GLib pkg-config information is extracted from config-host.mak and
used to link vhost-user-blk.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agotools/virtiofsd: convert to Meson
Paolo Bonzini [Wed, 5 Feb 2020 08:45:39 +0000 (09:45 +0100)]
tools/virtiofsd: convert to Meson

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agocontrib/libvhost-user: convert to Meson
Paolo Bonzini [Wed, 5 Feb 2020 08:44:24 +0000 (09:44 +0100)]
contrib/libvhost-user: convert to Meson

Since libqemuutil.a has been converted to Meson, the conversion is
straightforward.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add version.o
Marc-André Lureau [Wed, 17 Jul 2019 20:31:05 +0000 (00:31 +0400)]
meson: add version.o

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add remaining generated tcg trace helpers
Marc-André Lureau [Mon, 15 Jul 2019 14:48:06 +0000 (18:48 +0400)]
meson: add remaining generated tcg trace helpers

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agolibqemuutil, qapi, trace: convert to meson
Paolo Bonzini [Wed, 19 Aug 2020 12:44:56 +0000 (08:44 -0400)]
libqemuutil, qapi, trace: convert to meson

This shows how to do some "computations" in meson.build using its array
and dictionary data structures, and also a basic usage of the sourceset
module for conditional compilation.

Notice the new "if have_system" part of util/meson.build, which fixes
a bug in the old build system was buggy: util/dbus.c was built even for
non-softmmu builds, but the dependency on -lgio was lost when the linking
was done through libqemuutil.a.  Because all of its users required gio
otherwise, the bug was hidden.  Meson instead propagates libqemuutil's
dependencies down to its users, and shows the problem.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add testsuite Makefile generator
Paolo Bonzini [Tue, 28 Jan 2020 13:48:54 +0000 (14:48 +0100)]
meson: add testsuite Makefile generator

Rules to execute tests are generated by a simple Python program
that integrates into the existing "make check" mechanism.  This
provides familiarity for developers, and also allows piecewise
conversion of the testsuite Makefiles to meson.

The generated rules are based on QEMU's existing test harness
Makefile and TAP parser.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: add sparse support
Paolo Bonzini [Mon, 3 Feb 2020 13:45:33 +0000 (14:45 +0100)]
meson: add sparse support

Do not use cgcc; instead, extract compilation commands from compile_commands.json
and invoke sparse directly.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: use coverage option
Marc-André Lureau [Fri, 4 Oct 2019 13:35:16 +0000 (17:35 +0400)]
meson: use coverage option

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: enable pie
Marc-André Lureau [Tue, 17 Sep 2019 11:39:36 +0000 (15:39 +0400)]
meson: enable pie

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: move summary to meson.build
Paolo Bonzini [Mon, 3 Feb 2020 12:28:38 +0000 (13:28 +0100)]
meson: move summary to meson.build

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agobuild-sys: add meson submodule
Marc-André Lureau [Wed, 21 Aug 2019 07:21:16 +0000 (11:21 +0400)]
build-sys: add meson submodule

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agobuild-sys hack: link with whole .fa archives
Marc-André Lureau [Tue, 16 Jul 2019 08:30:43 +0000 (12:30 +0400)]
build-sys hack: link with whole .fa archives

In order to link the *-obj-y files into tests, we will make static
libraries of them in Meson, and then link them as whole archives
into the tests.  To separate regular static libraries from link-whole
libraries, give them a different file extension.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoconfigure: generate Meson cross file
Marc-André Lureau [Fri, 12 Jul 2019 21:47:54 +0000 (01:47 +0400)]
configure: generate Meson cross file

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoconfigure: integrate Meson in the build system
Paolo Bonzini [Mon, 10 Jun 2019 10:05:14 +0000 (12:05 +0200)]
configure: integrate Meson in the build system

The Meson build system is integrated in the existing configure/make steps
by invoking Meson from the configure script and converting Meson's build.ninja
rules to an included Makefile.

build.ninja already provides tags/ctags/cscope rules, so they are removed.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoconfigure: add support for pseudo-"in source tree" builds
Daniel P. Berrangé [Fri, 21 Aug 2020 10:22:04 +0000 (12:22 +0200)]
configure: add support for pseudo-"in source tree" builds

Meson requires the build dir to be separate from the source tree. Many
people are used to just running "./configure && make" though and the
meson conversion breaks that.

This introduces some backcompat support to make it appear as if an
"in source tree" build is being done, but with the results in the
"build/" directory. This allows "./configure && make" to work as it
did historically, albeit with the output binaries staying under build/.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agotests/vm: include setuptools
Paolo Bonzini [Mon, 10 Aug 2020 11:44:26 +0000 (13:44 +0200)]
tests/vm: include setuptools

They are a dependency of Meson, so install them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoconfigure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson
Paolo Bonzini [Mon, 3 Feb 2020 14:22:17 +0000 (15:22 +0100)]
configure: prepare CFLAGS/CXXFLAGS/LDFLAGS for Meson

Split between CFLAGS/QEMU_CFLAGS and CXXFLAGS/QEMU_CXXFLAGS so that
we will use CFLAGS and CXXFLAGS for flags that we do not want to
pass to add_project_arguments.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoconfigure: expand path variables for meson configure
Marc-André Lureau [Thu, 11 Jul 2019 15:13:39 +0000 (19:13 +0400)]
configure: expand path variables for meson configure

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoconfigure: do not include $(...) variables in config-host.mak
Paolo Bonzini [Mon, 10 Jun 2019 10:03:04 +0000 (12:03 +0200)]
configure: do not include $(...) variables in config-host.mak

This ensures that Meson will be able to reuse the results of
the tests that are performed in the configure script.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agonsis: use "make DESTDIR=" instead of "make prefix="
Paolo Bonzini [Mon, 10 Aug 2020 13:23:28 +0000 (15:23 +0200)]
nsis: use "make DESTDIR=" instead of "make prefix="

The next patch will prevent modifying the prefix on "make install".  Adjust the
creation of the installer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agotests/docker: add test script for static linux-user builds
Paolo Bonzini [Mon, 10 Aug 2020 14:24:29 +0000 (16:24 +0200)]
tests/docker: add test script for static linux-user builds

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agotests/vm: check for Python YAML parser in the Makefile
Paolo Bonzini [Thu, 6 Aug 2020 12:05:50 +0000 (14:05 +0200)]
tests/vm: check for Python YAML parser in the Makefile

No need to do it in the configure file if it is only used for a help message.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agotests/vm: do not pollute configure with --efi-aarch64
Paolo Bonzini [Thu, 6 Aug 2020 12:00:50 +0000 (14:00 +0200)]
tests/vm: do not pollute configure with --efi-aarch64

Just make EFI_AARCH64 a variable in the makefile that defaults to the efi
firmware included with QEMU.  It can be redefined on the "make" command
line.

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agobuild-sys hack: ensure target directory is there
Marc-André Lureau [Tue, 27 Aug 2019 17:57:39 +0000 (21:57 +0400)]
build-sys hack: ensure target directory is there

By removing some unnest-vars calls, we miss some directory creation
that may be required by some/dir/object.d.

This will go away once everything is converted to Meson.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: rename .inc.h files to .h.inc
Paolo Bonzini [Tue, 4 Feb 2020 11:41:01 +0000 (12:41 +0100)]
meson: rename .inc.h files to .h.inc

Make it consistent with '.c.inc' and '.rst.inc'.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agomeson: rename included C source files to .c.inc
Paolo Bonzini [Tue, 4 Feb 2020 11:41:01 +0000 (12:41 +0100)]
meson: rename included C source files to .c.inc

With Makefiles that have automatically generated dependencies, you
generated includes are set as dependencies of the Makefile, so that they
are built before everything else and they are available when first
building the .c files.

Alternatively you can use a fine-grained dependency, e.g.

        target/arm/translate.o: target/arm/decode-neon-shared.inc.c

With Meson you have only one choice and it is a third option, namely
"build at the beginning of the corresponding target"; the way you
express it is to list the includes in the sources of that target.

The problem is that Meson decides if something is a source vs. a
generated include by looking at the extension: '.c', '.cc', '.m', '.C'
are sources, while everything else is considered an include---including
'.inc.c'.

Use '.c.inc' to avoid this, as it is consistent with our other convention
of using '.rst.inc' for included reStructuredText files.  The editorconfig
file is adjusted.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agotrace: switch position of headers to what Meson requires
Paolo Bonzini [Tue, 4 Feb 2020 11:20:10 +0000 (12:20 +0100)]
trace: switch position of headers to what Meson requires

Meson doesn't enjoy the same flexibility we have with Make in choosing
the include path.  In particular the tracing headers are using
$(build_root)/$(<D).

In order to keep the include directives unchanged,
the simplest solution is to generate headers with patterns like
"trace/trace-audio.h" and place forwarding headers in the source tree
such that for example "audio/trace.h" includes "trace/trace-audio.h".

This patch is too ugly to be applied to the Makefiles now.  It's only
a way to separate the changes to the tracing header files from the
Meson rewrite of the tracing logic.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agopc-bios/s390-ccw: do not use rules.mak
Thomas Huth [Fri, 7 Aug 2020 14:14:52 +0000 (16:14 +0200)]
pc-bios/s390-ccw: do not use rules.mak

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agooptionrom: simplify Makefile
Marc-André Lureau [Tue, 8 Oct 2019 15:27:24 +0000 (19:27 +0400)]
optionrom: simplify Makefile

Make it independent from the rules.mak, and clean up to use pattern rules.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agooss-fuzz/build: remove LIB_FUZZING_ENGINE
Paolo Bonzini [Sun, 9 Aug 2020 15:17:00 +0000 (17:17 +0200)]
oss-fuzz/build: remove LIB_FUZZING_ENGINE

Meson build scripts will only include qemu-fuzz-TARGET rules if configured
with --enable-fuzzing, and that takes care of adding -fsanitize=fuzzer.
Therefore we can just specify the configure option and stop modifying
the CFLAGS and CONFIG_FUZZ options in the "make" invocation.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
3 years agoMerge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-08-11' into staging
Peter Maydell [Wed, 19 Aug 2020 21:19:11 +0000 (22:19 +0100)]
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-08-11' into staging

Block patches for 5.1.0-rc4:
- Fix abort when running a backup job on an image whose size is not
  aligned to the backup job's cluster size

# gpg: Signature made Tue 11 Aug 2020 10:29:27 BST
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "mreitz@redhat.com"
# gpg: Good signature from "Max Reitz <mreitz@redhat.com>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2020-08-11:
  iotests: add test for unaligned granularity bitmap backup
  block/block-copy: always align copied region to cluster size

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 years agoOpen 5.2 development tree
Peter Maydell [Tue, 18 Aug 2020 12:44:04 +0000 (13:44 +0100)]
Open 5.2 development tree

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 years agoUpdate version for v5.1.0 release v5.1.0
Peter Maydell [Tue, 11 Aug 2020 16:07:03 +0000 (17:07 +0100)]
Update version for v5.1.0 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 years agoiotests: add test for unaligned granularity bitmap backup
Stefan Reiter [Mon, 10 Aug 2020 09:55:23 +0000 (11:55 +0200)]
iotests: add test for unaligned granularity bitmap backup

Start a VM with a 4097 byte image attached, add a 4096 byte granularity
dirty bitmap, mark it dirty, and then do a backup.

This used to run into an assert and fail, check that it works as
expected and also check the created image to ensure that misaligned
backups in general work correctly.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Message-Id: <20200810095523.15071-2-s.reiter@proxmox.com>
[mreitz: Drop bitmap, and do not write past the image's end]
Signed-off-by: Max Reitz <mreitz@redhat.com>
3 years agoblock/block-copy: always align copied region to cluster size
Stefan Reiter [Mon, 10 Aug 2020 09:55:22 +0000 (11:55 +0200)]
block/block-copy: always align copied region to cluster size

Since commit 42ac214406e0 (block/block-copy: refactor task creation)
block_copy_task_create calculates the area to be copied via
bdrv_dirty_bitmap_next_dirty_area, but that can return an unaligned byte
count if the image's last cluster end is not aligned to the bitmap's
granularity.

Always ALIGN_UP the resulting bytes value to satisfy block_copy_do_copy,
which requires the 'bytes' parameter to be aligned to cluster size.

Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Message-Id: <20200810095523.15071-1-s.reiter@proxmox.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
3 years agoUpdate version for v5.1.0-rc3 release
Peter Maydell [Wed, 5 Aug 2020 16:37:17 +0000 (17:37 +0100)]
Update version for v5.1.0-rc3 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 years agotarget/arm: Fix Rt/Rt2 in ESR_ELx for copro traps from AArch32 to 64
Peter Maydell [Tue, 4 Aug 2020 19:39:03 +0000 (20:39 +0100)]
target/arm: Fix Rt/Rt2 in ESR_ELx for copro traps from AArch32 to 64

When a coprocessor instruction in an  AArch32 guest traps to AArch32
Hyp mode, the syndrome register (HSR) includes Rt and Rt2 fields
which are simply copies of the Rt and Rt2 fields from the trapped
instruction.  However, if the instruction is trapped from AArch32 to
an AArch64 higher exception level, the Rt and Rt2 fields in the
syndrome register (ESR_ELx) must be the AArch64 view of the register.
This makes a difference if the AArch32 guest was in a mode other than
User or System and it was using r13 or r14, or if it was in FIQ mode
and using r8-r14.

We don't know at translate time which AArch32 CPU mode we are in, so
we leave the values we generate in our prototype syndrome register
value at translate time as the raw Rt/Rt2 from the instruction, and
instead correct them to the AArch64 view when we find we need to take
an exception from AArch32 to AArch64 with one of these syndrome
values.

Fixes: https://bugs.launchpad.net/qemu/+bug/1879587
Reported-by: Julien Freche <julien@bedrocksystems.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200804193903.31240-1-peter.maydell@linaro.org

3 years agoqcow2-cluster: Fix integer left shift error in qcow2_alloc_cluster_link_l2()
Tuguoyi [Wed, 5 Aug 2020 09:22:58 +0000 (09:22 +0000)]
qcow2-cluster: Fix integer left shift error in qcow2_alloc_cluster_link_l2()

When calculating the offset, the result of left shift operation will be promoted
to type int64 automatically because the left operand of + operator is uint64_t.
but the result after integer promotion may be produce an error value for us and
trigger the following asserting error.

For example, consider i=0x2000, cluster_bits=18, the result of left shift
operation will be 0x80000000. Cause argument i is of signed integer type,
the result is automatically promoted to 0xffffffff80000000 which is not
we expected

The way to trigger the assertion error:
  qemu-img create -f qcow2 -o preallocation=full,cluster_size=256k tmpdisk 10G

This patch fix it by casting @i to uint64_t before doing left shift operation

Signed-off-by: Guoyi Tu <tu.guoyi@h3c.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 81ba90fe0c014f269621c283269b42ad@h3c.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 years agoMerge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-08-05' into...
Peter Maydell [Wed, 5 Aug 2020 10:02:46 +0000 (11:02 +0100)]
Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-08-05' into staging

* Test rx-softmmu, avr-softmmu, Centos7 and Debian on gitlab-CI
* Fix compiler warning on 32-bit big endian systems
* Remove remainders of libqemustub.a

# gpg: Signature made Wed 05 Aug 2020 10:51:32 BST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [full]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [full]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [full]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* remotes/huth-gitlab/tags/pull-request-2020-08-05:
  Get rid of the libqemustub.a remainders
  target/riscv/vector_helper: Fix build on 32-bit big endian hosts
  gitlab-ci: Fix Avocado cache usage
  gitlab-ci.yml: Add build-system-debian and build-system-centos jobs
  tests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab
  tests/docker: Add python3-venv and netcat to the debian-amd64 container

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 years agoGet rid of the libqemustub.a remainders
Thomas Huth [Mon, 3 Aug 2020 19:14:57 +0000 (21:14 +0200)]
Get rid of the libqemustub.a remainders

libqemustub.a has been removed in commit ebedb37c8d ("Makefile: Remove
libqemustub.a"). Some remainders have been missed. Remove them now.

Message-Id: <20200804170055.2851-8-thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 years agotarget/riscv/vector_helper: Fix build on 32-bit big endian hosts
Thomas Huth [Mon, 3 Aug 2020 17:54:36 +0000 (19:54 +0200)]
target/riscv/vector_helper: Fix build on 32-bit big endian hosts

The code currently fails to compile on 32-bit big endian hosts:

 target/riscv/vector_helper.c: In function 'vext_clear':
 target/riscv/vector_helper.c:154:16: error: cast to pointer from integer
 of different size [-Werror=int-to-pointer-cast]
         memset((void *)((uintptr_t)tail & ~(7ULL)), 0, part1);
                ^
 target/riscv/vector_helper.c:155:16: error: cast to pointer from integer
 of different size [-Werror=int-to-pointer-cast]
         memset((void *)(((uintptr_t)tail + 8) & ~(7ULL)), 0, part2);
                ^
 cc1: all warnings being treated as errors

We should not use "long long" (i.e. 64-bit) values here to avoid the
problem. Switch to our QEMU_ALIGN_PTR_DOWN/UP macros instead.

Fixes: 751538d5da ("add vector stride load and store instructions")
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200804170055.2851-3-thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 years agogitlab-ci: Fix Avocado cache usage
Thomas Huth [Thu, 30 Jul 2020 08:35:48 +0000 (10:35 +0200)]
gitlab-ci: Fix Avocado cache usage

In commit 6957fd98dc ("gitlab: add avocado asset caching") we
tried to save the Avocado cache (as in commit c1073e44b4 with
Travis-CI) however it doesn't work as expected. For some reason
Avocado uses /root/avocado_cache/ which we can not select later.

Manually generate a Avocado config to force the use of the
current job's directory.

This patch is based on an earlier version from Philippe Mathieu-Daudé.

Message-Id: <20200730141326.8260-5-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 years agogitlab-ci.yml: Add build-system-debian and build-system-centos jobs
Thomas Huth [Tue, 14 Jul 2020 15:35:45 +0000 (17:35 +0200)]
gitlab-ci.yml: Add build-system-debian and build-system-centos jobs

We were missing the two new targets avr-softmmu and rx-softmmu in the
gitlab-CI so far, and did not add some of the "other endianess" targets
like sh4eb-softmmu yet.
Since the current build-system-* jobs run already for a very long time,
let's do not add these missing targets there, but introduce two new
additional build jobs, one running with Debian and one running with
CentOS, and add the new targets there. Also move some targets from
the old build-system-* jobs to these new targets, to distribute the
load and reduce the runtime of the CI.

Message-Id: <20200730141326.8260-4-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 years agotests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab
Thomas Huth [Thu, 23 Jul 2020 06:36:04 +0000 (08:36 +0200)]
tests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab

These tests always time out on Gitlab, not sure what's happening here.
Let's disable them until somebody has enough spare time to debug the
issues.

Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-Id: <20200730141326.8260-3-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 years agotests/docker: Add python3-venv and netcat to the debian-amd64 container
Thomas Huth [Wed, 15 Jul 2020 04:35:01 +0000 (06:35 +0200)]
tests/docker: Add python3-venv and netcat to the debian-amd64 container

Without python3-venv, I get the following message when trying to
run the acceptance tests within the debian container:

 The virtual environment was not created successfully because ensurepip is not
 available.  On Debian/Ubuntu systems, you need to install the python3-venv
 package using the following command.
    apt-get install python3-venv
 You may need to use sudo with that command.  After installing the python3-venv
 package, recreate your virtual environment.

Let's do it as the message suggests.

And while we're at it, also add netcat here since it is required for
some of the acceptance tests.

Message-Id: <20200730141326.8260-2-thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
3 years agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200804' into...
Peter Maydell [Tue, 4 Aug 2020 17:20:32 +0000 (18:20 +0100)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200804' into staging

target-arm queue:
 * Fix decode of LDRA[AB] instructions
 * docs/devel: Document decodetree no-overlap groups

# gpg: Signature made Tue 04 Aug 2020 17:08:11 BST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200804:
  target/arm: Fix decode of LDRA[AB] instructions
  docs/devel: Document decodetree no-overlap groups

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
3 years agoMerge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
Peter Maydell [Tue, 4 Aug 2020 15:51:32 +0000 (16:51 +0100)]
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

virtio: bugfix

A last minute bugfix.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# gpg: Signature made Tue 04 Aug 2020 16:48:37 BST
# gpg:                using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg:                issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full]
# gpg:                 aka "Michael S. Tsirkin <mst@redhat.com>" [full]
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17  0970 C350 3912 AFBE 8E67
#      Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA  8A0D 281F 0DB8 D28D 5469

* remotes/mst/tags/for_upstream:
  virtio-mem: Correct format specifier mismatch for RISC-V

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>