Max Reitz
cb5c6cd2dc
iotests: Test node/bitmap aliases during migration
...
Signed-off-by: Max Reitz <mreitz@redhat.com >
Message-Id: <20200820150725.68687-4-mreitz@redhat.com >
Reviewed-by: Eric Blake <eblake@redhat.com >
Tested-by: Eric Blake <eblake@redhat.com >
[eblake: fold in python cleanups recommended by Vladimir]
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Max Reitz
4bf63c8035
iotests.py: Let wait_migration() return on failure
...
Let wait_migration() return on failure (with the return value indicating
whether the migration was completed or has failed), so we can use it for
migrations that are expected to fail, too.
Signed-off-by: Max Reitz <mreitz@redhat.com >
Reviewed-by: Eric Blake <eblake@redhat.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <20200820150725.68687-3-mreitz@redhat.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Max Reitz
31e4c354b3
migration: Add block-bitmap-mapping parameter
...
This migration parameter allows mapping block node names and bitmap
names to aliases for the purpose of block dirty bitmap migration.
This way, management tools can use different node and bitmap names on
the source and destination and pass the mapping of how bitmaps are to be
transferred to qemu (on the source, the destination, or even both with
arbitrary aliases in the migration stream).
While touching this code, fix a bug where bitmap names longer than 255
bytes would fail an assertion in qemu_put_counted_string().
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Signed-off-by: Max Reitz <mreitz@redhat.com >
Message-Id: <20200820150725.68687-2-mreitz@redhat.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
76bbbb2d8b
iotests: dump QCOW2 header in JSON in #303
...
Extend the test case #303 by dumping QCOW2 image metadata in JSON
format.
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-12-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
4edcca5741
qcow2_format.py: support dumping metadata in JSON format
...
Implementation of dumping QCOW2 image metadata.
The sample output:
{
"Header_extensions": [
{
"name": "Feature table",
"magic": 1745090647,
"length": 192,
"data_str": "<binary>"
},
{
"name": "Bitmaps",
"magic": 595929205,
"length": 24,
"data": {
"nb_bitmaps": 2,
"reserved32": 0,
"bitmap_directory_size": 64,
"bitmap_directory_offset": 1048576,
"bitmap_directory": [
{
"name": "bitmap-1",
"bitmap_table_offset": 589824,
"bitmap_table_size": 1,
"flags": 2,
"type": 1,
"granularity_bits": 15,
"name_size": 8,
"extra_data_size": 0,
"bitmap_table": [
{
"type": "serialized",
"offset": 655360
},
...
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-11-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
b4e927799c
qcow2_format.py: collect fields to dump in JSON format
...
As __dict__ is being extended with class members we do not want to
print, add the to_json() method to classes that returns a json-dumpable
object with desired fields and their values. Extend it in subclass when
necessary to print the final dictionary in the JSON output which
follows.
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Message-Id: <1596742557-320265-10-git-send-email-andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
2c6d9ca48c
qcow2.py: Introduce '-j' key to dump in JSON format
...
Add the command key to the qcow2.py arguments list to dump QCOW2
metadata in JSON format. Here is the suggested way to do that. The
implementation of the dump in JSON format is in the patch that follows.
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-9-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
9427784124
qcow2_format.py: Dump bitmap table serialized entries
...
Add bitmap table information to the QCOW2 metadata dump.
Bitmap name bitmap-1
...
Bitmap table type size offset
0 serialized 65536 10092544
1 all-zeroes 0 0
2 all-zeroes 0 0
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-8-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
e3f5aad7be
qcow2_format.py: pass cluster size to substructures
...
The cluster size of an image is the QcowHeader class member and may be
obtained by dependent extension structures such as Qcow2BitmapExt for
further bitmap table details print.
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-7-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
1117393195
qcow2_format.py: Dump bitmap directory information
...
Read and dump entries from the bitmap directory of QCOW2 image.
Header extension:
magic 0x23852875 (Bitmaps)
...
Bitmap name bitmap-1
bitmap_table_offset 0xf0000
bitmap_table_size 1
flags 0x2 (['auto'])
type 1
granularity_bits 16
name_size 8
extra_data_size 0
Suggested-by: Kevin Wolf <kwolf@redhat.com >
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-6-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
82cb822324
qcow2_format.py: dump bitmap flags in human readable way.
...
Introduce the class BitmapFlags that parses a bitmap flags mask.
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-5-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
991a02ca7f
qcow2_format.py: change Qcow2BitmapExt initialization method
...
There are two ways to initialize a class derived from Qcow2Struct:
1. Pass a block of binary data to the constructor.
2. Pass the file descriptor to allow reading the file from constructor.
Let's change the Qcow2BitmapExt initialization method from 1 to 2 to
support a scattered reading in the initialization chain.
The implementation comes with the patch that follows.
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-4-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
4539b3645b
qcow2_format.py: make printable data an extension class member
...
Let us differ binary data type from string one for the extension data
variable and keep the string as the QcowHeaderExtension class member.
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Eric Blake <eblake@redhat.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-3-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:09 -05:00
Andrey Shinkevich
bf654b37e1
iotests: add test for QCOW2 header dump
...
The simple script creates a QCOW2 image and fills it with some data.
Two bitmaps are created as well. Then the script reads the image header
with extensions from the disk by running the script qcow2.py and dumps
the information to the output. Other entities, such as snapshots, may
be added to the test later.
Suggested-by: Eric Blake <eblake@redhat.com >
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com >
Reviewed-by: Eric Blake <eblake@redhat.com >
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com >
Message-Id: <1596742557-320265-2-git-send-email-andrey.shinkevich@virtuozzo.com >
Signed-off-by: Eric Blake <eblake@redhat.com >
2020-08-21 08:56:07 -05:00
Peter Maydell
d6f83a72a7
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/acceptance-testing-20200812' into staging
...
Acceptance tests patches
- Use stable URLs for the Debian and Ubuntu installer
(Ubuntu has been updated last Wednesday, August 5, 2020).
CI jobs results:
. https://cirrus-ci.com/build/6385815351721984
. https://gitlab.com/philmd/qemu/-/pipelines/177054604
# gpg: Signature made Wed 12 Aug 2020 14:17:09 BST
# gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org >" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD 6BB2 E3E3 2C2C DEAD C0DE
* remotes/philmd-gitlab/tags/acceptance-testing-20200812:
acceptance: use stable URLs for the Debian and Ubuntu installer
tests/acceptance/boot_linux: Extract common URL from xlnx-versal test
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-21 14:51:43 +01:00
Peter Maydell
7fd51e68c3
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
...
New build system, with "fake in-tree builds" support.
Missing:
* converting configure tests
* converting unit tests
* converting some remaining parts of the installation
# gpg: Signature made Fri 21 Aug 2020 11:33:35 BST
# gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg: issuer "pbonzini@redhat.com "
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org >" [full]
# gpg: aka "Paolo Bonzini <pbonzini@redhat.com >" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini-gitlab/tags/for-upstream: (152 commits)
docs: convert build system documentation to rST
meson: update build-system documentation
meson: avoid unstable module warning with Meson 0.56.0 or newer
meson: convert po/
meson: convert VNC and dependent libraries to meson
meson: move SDL and SDL-image detection to meson
meson: convert sample plugins
meson: replace create-config with meson configure_file
rules.mak: drop unneeded macros
meson: convert check-block
meson: build texi doc
docs: automatically track manual dependencies
meson: sphinx-build
remove Makefile.target
rules.mak: remove version.o
meson: convert systemtap files
configure: place compatibility symlinks in target directories
meson: link emulators without Makefile.target
meson: plugins
meson: cpu-emu
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2020-08-21 12:42:49 +01:00
Paolo Bonzini
a14f0bf165
docs: convert build system documentation to rST
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:45 -04:00
Paolo Bonzini
77d27b9271
meson: update build-system documentation
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:45 -04:00
Paolo Bonzini
b29b40f4ab
meson: avoid unstable module warning with Meson 0.56.0 or newer
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:45 -04:00
Marc-André Lureau
e8f3bd71d8
meson: convert po/
...
Meson warns if xgettext is not found. In the future we may want to add
a required argument to i18n.gettext(); in the meanwhile, I am adding a
--enable-gettext/--disable-gettext option and feature detection in
configure. This preserves QEMU's default behavior of detecting system
features, without any warning, if neither --enable-* nor --disable-*
is requested.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:45 -04:00
Paolo Bonzini
a0b93237d8
meson: convert VNC and dependent libraries to meson
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:44 -04:00
Paolo Bonzini
35be72ba72
meson: move SDL and SDL-image detection to meson
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:44 -04:00
Paolo Bonzini
ffac93df19
meson: convert sample plugins
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:43 -04:00
Paolo Bonzini
859aef026e
meson: replace create-config with meson configure_file
...
Move the create-config logic to meson.build; create a
configuration_data object and let meson handle the
quoting and output.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:43 -04:00
Paolo Bonzini
484e2cc730
rules.mak: drop unneeded macros
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:42 -04:00
Paolo Bonzini
d3ca592b3c
meson: convert check-block
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:42 -04:00
Paolo Bonzini
acfdaac577
meson: build texi doc
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:42 -04:00
Paolo Bonzini
bac35bf517
docs: automatically track manual dependencies
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:41 -04:00
Paolo Bonzini
f8aa24ea9a
meson: sphinx-build
...
For now, sphinx is run on every invocation of make. The previous mechanism
using $(wildcard) is not reproducible in Meson and was also brittle; for
example some .rst.inc files were left out. The next patch will introduce
a Sphinx extension to emit a depfile.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:41 -04:00
Paolo Bonzini
5e6d1573b4
remove Makefile.target
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:41 -04:00
Marc-André Lureau
8000047e99
rules.mak: remove 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:41 -04:00
Marc-André Lureau
10e1d2636d
meson: convert systemtap files
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:41 -04:00
Paolo Bonzini
2898503c03
configure: place compatibility symlinks in target directories
...
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:40 -04:00
Paolo Bonzini
64ed6f92ff
meson: link emulators without Makefile.target
...
The binaries move to the root directory, e.g. qemu-system-i386 or
qemu-arm. This requires changes to qtests, CI, etc.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:40 -04:00
Paolo Bonzini
f556b4a10d
meson: plugins
...
For now link arguments end up in Makefile.target, they will move to the
right place soon.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:39 -04:00
Marc-André Lureau
c9322ab5bf
meson: cpu-emu
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:39 -04:00
Marc-André Lureau
b309c32125
meson: bsd-user
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:38 -04:00
Marc-André Lureau
3a30446aed
meson: linux-user
...
The most interesting or most complicated part here is the syscall_nr.h
generators. In order to keep the generation logic all in meson.build,
I am adding to config_target the name of the .tbl file, and making the
generated file syscall<SUFFIX>_nr.h for input file syscall<SUFFIX>.tbl.
For architectures where the input file is not named syscall_nr.tbl,
syscall_nr.h has to be a source file; it's just a forwarder for x86
(i386/x86_64), while for MIPS64 it chooses between N32 and N64 ABIs.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:38 -04:00
Marc-André Lureau
1a82878a08
meson: accel
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:36 -04:00
Paolo Bonzini
abff1abfe8
meson: target
...
Similar to hw_arch, each architecture defines two sourceset which are placed in
dictionaries target_arch and target_softmmu_arch. These are then picked up
from there when building the per-emulator static_library.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:35 -04:00
Marc-André Lureau
2c44220d05
meson: convert hw/arch*
...
Each architecture's sourceset is placed in an hw_arch dictionary, and picked up
from there when building the per-emulator static_library.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:33 -04:00
Marc-André Lureau
b2c00bce54
meson: convert hw/9pfs, cleanup
...
hw/Makefile.objs is gone so there is more code that can be removed.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:33 -04:00
Marc-André Lureau
36b34c359f
meson: convert hw/acpi
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:32 -04:00
Marc-André Lureau
b53d555f69
meson: convert hw/adc
...
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:32 -04:00
Marc-André Lureau
a9d4825542
meson: convert hw/audio
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:32 -04:00
Marc-André Lureau
6bcb5d9665
meson: convert hw/block
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:32 -04:00
Marc-André Lureau
a518e03cdb
meson: convert hw/char
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:32 -04:00
Marc-André Lureau
cff3c5d2b4
meson: convert hw/cpu
...
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:31 -04:00
Marc-André Lureau
b4c8eece57
meson: convert hw/display
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:31 -04:00
Marc-André Lureau
7d744257a8
meson: convert hw/dma
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2020-08-21 06:30:31 -04:00