Commit Graph

79280 Commits

Author SHA1 Message Date
Marc-André Lureau 8f51e01c01 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>
2020-08-21 06:30:13 -04:00
Paolo Bonzini 588a19fa9d meson: convert dummy Windows qga/qemu-ga target
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:12 -04:00
Marc-André Lureau 328ec32d7d meson: add msi generation
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:12 -04:00
Marc-André Lureau 7272fc7268 meson: convert vss-win32
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:12 -04:00
Paolo Bonzini f15bff25f7 meson: convert qemu-ga
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:12 -04:00
Paolo Bonzini cfad62f1fa 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>
2020-08-21 06:30:11 -04:00
Marc-André Lureau d92989aa2e 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>
2020-08-21 06:30:11 -04:00
Marc-André Lureau 1d7bb6ab2c contrib/elf2dmp: convert to meson
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:11 -04:00
Marc-André Lureau 5ee24e78f5 contrib/ivshmem: convert to meson
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:11 -04:00
Marc-André Lureau ea458960ec 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>
2020-08-21 06:30:10 -04:00
Marc-André Lureau 32fcc6244c 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>
2020-08-21 06:30:10 -04:00
Paolo Bonzini a9c9727c02 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>
2020-08-21 06:30:10 -04:00
Paolo Bonzini 99650b628f 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>
2020-08-21 06:30:09 -04:00
Paolo Bonzini 7af0dbf990 vhost-user-scsi: add compatibility for libiscsi 1.9.0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:09 -04:00
Paolo Bonzini 2d7ac0af9d 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>
2020-08-21 06:30:09 -04:00
Paolo Bonzini 3f99cf5710 tools/virtiofsd: convert to Meson
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:09 -04:00
Paolo Bonzini 931049b46c 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>
2020-08-21 06:30:08 -04:00
Marc-André Lureau 04c6f1e798 meson: add version.o
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:08 -04:00
Marc-André Lureau 71c782f5cc 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>
2020-08-21 06:30:08 -04:00
Paolo Bonzini a81df1b68b 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>
2020-08-21 06:30:08 -04:00
Paolo Bonzini 245dac4a1b 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>
2020-08-21 06:30:07 -04:00
Paolo Bonzini 968b4db38a 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>
2020-08-21 06:30:07 -04:00
Marc-André Lureau bf0e56a3ca meson: use coverage option
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:07 -04:00
Marc-André Lureau da6d48b969 meson: enable pie
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:06 -04:00
Paolo Bonzini f933275789 meson: move summary to meson.build
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:06 -04:00
Marc-André Lureau 0a01d76fc1 build-sys: add meson submodule
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:06 -04:00
Marc-André Lureau 1f0a1d8a51 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>
2020-08-21 06:30:06 -04:00
Marc-André Lureau fc92989286 configure: generate Meson cross file
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:30:05 -04:00
Paolo Bonzini a56650518f 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>
2020-08-21 06:30:05 -04:00
Daniel P. Berrangé dedad02720 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>
2020-08-21 06:29:58 -04:00
Paolo Bonzini bfea7012fe tests/vm: include setuptools
They are a dependency of Meson, so install them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:18:36 -04:00
Paolo Bonzini 086d5f7529 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>
2020-08-21 06:18:36 -04:00
Marc-André Lureau 22a87800e6 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>
2020-08-21 06:18:36 -04:00
Paolo Bonzini 25211446ec 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>
2020-08-21 06:18:36 -04:00
Paolo Bonzini 1b00a4c476 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>
2020-08-21 06:18:36 -04:00
Paolo Bonzini b861f59593 tests/docker: add test script for static linux-user builds
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:18:35 -04:00
Paolo Bonzini 00eb3db0aa 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>
2020-08-21 06:18:35 -04:00
Paolo Bonzini f5c730698a 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>
2020-08-21 06:18:35 -04:00
Marc-André Lureau ac76f9d17c 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>
2020-08-21 06:18:35 -04:00
Paolo Bonzini 0979ed017f 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>
2020-08-21 06:18:35 -04:00
Paolo Bonzini 139c1837db 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>
2020-08-21 06:18:30 -04:00
Paolo Bonzini 243af0225a 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>
2020-08-21 06:18:24 -04:00
Thomas Huth 22fb2ab096 pc-bios/s390-ccw: do not use rules.mak
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-08-21 06:18:23 -04:00
Marc-André Lureau bf708f3c4a 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>
2020-08-21 06:18:23 -04:00
Paolo Bonzini 77afc75f69 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>
2020-08-21 06:18:22 -04:00
Peter Maydell 1d806cef0e 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
 -----BEGIN PGP SIGNATURE-----
 
 iQFGBAABCAAwFiEEkb62CjDbPohX0Rgp9AfbAGHVz0AFAl8yZPcSHG1yZWl0ekBy
 ZWRoYXQuY29tAAoJEPQH2wBh1c9AzsMIAMCapgITYAakNx8tC02YShFYCzwQxt90
 N/+gyMXR1pZ48j1Ui4gCCRU2XJvbUIxfwzO2K0H432mkg4Y7fwIyJx7BOmDMyiNs
 NPWSMN6/ORZz0dIHwb0Days9vJMsLnuUmc6FmGaVsAyBa6pDFNfkX0GCQQURKags
 jvOp7fPsOrX65SCHv/UIlhooo1z3+7VCN6BQNPNz2bWv4UBpi5nZhXxZFagzT1/l
 zJ5MbIe+5yQcTkSgOoNNTAIP4XZHQPXpGx7nPTyK/trOGigCM8aVLB0vffUoEJfJ
 hFKjKODJsRJTL9IlTnqdUdqoYT8GJpzqzTLRf+TrOCA/vOZkwuqIyp4=
 =iw8l
 -----END PGP SIGNATURE-----

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>
2020-08-19 22:19:11 +01:00
Peter Maydell 672b2f2695 Open 5.2 development tree
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-08-18 13:44:04 +01:00
Peter Maydell d0ed6a69d3 Update version for v5.1.0 release
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-08-11 17:07:03 +01:00
Stefan Reiter 1f3765b652 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>
2020-08-11 09:29:31 +02:00
Stefan Reiter 7661a886a1 block/block-copy: always align copied region to cluster size
Since commit 42ac214406 (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>
2020-08-10 17:12:46 +02:00