summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-01-07hw/display/sm501: Always map the UART0Philippe Mathieu-Daudé
The SM501 is a Mobile Multimedia Companion Chip with 2 UARTs. This model only implements the first UART. Being part of the chipset, the UART block is always mapped in memory, regardless of whether we provide a chardev backend. Since commit 12051d82f, qemu_chr_fe_init() accepts a NULL chardev. Let's remove the chardev check and always map the UART in the chipset memory. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20191122133623.13004-1-philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-07Merge remote-tracking branch 'remotes/xtensa/tags/20200106-xtensa' into stagingPeter Maydell
target/xtensa improvements for v5.0: - fix ps.ring use in MPU configs; - use MPU background map from the configuration overlay. # gpg: Signature made Mon 06 Jan 2020 20:00:33 GMT # gpg: using RSA key 2B67854B98E5327DCDEB17D851F9CC91F83FA044 # gpg: issuer "jcmvbkbc@gmail.com" # gpg: Good signature from "Max Filippov <filippov@cadence.com>" [unknown] # gpg: aka "Max Filippov <max.filippov@cogentembedded.com>" [full] # gpg: aka "Max Filippov <jcmvbkbc@gmail.com>" [full] # Primary key fingerprint: 2B67 854B 98E5 327D CDEB 17D8 51F9 CC91 F83F A044 * remotes/xtensa/tags/20200106-xtensa: target/xtensa: use MPU background map from core configuration target/xtensa: import xtensa/config/core-isa.h target/xtensa: fix ps.ring use in MPU configs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-06target/xtensa: use MPU background map from core configurationMax Filippov
Configuration overlay may define MPU background map. Import core-matmap.h from the overlay and use XCHAL_MPU_BACKGROUND_MAP macro if it's defined. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2020-01-06target/xtensa: import xtensa/config/core-isa.hMax Filippov
Import core-isa.h from its canonical place in the configuration overlay. Drop --xform option from the tar command line. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2020-01-06target/xtensa: fix ps.ring use in MPU configsMax Filippov
Allow ps.ring modification by wsr.ps/xsr.ps and use ps.ring value in xtensa_get_[c]ring on configurations with MPU. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2020-01-06Merge remote-tracking branch ↵Peter Maydell
'remotes/elmarco/tags/dbus-vmstate7-pull-request' into staging Add dbus-vmstate Hi, With external processes or helpers participating to the VM support, it becomes necessary to handle their migration. Various options exist to transfer their state: 1) as the VM memory, RAM or devices (we could say that's how vhost-user devices can be handled today, they are expected to restore from ring state) 2) other "vmstate" (as with TPM emulator state blobs) 3) left to be handled by management layer 1) is not practical, since an external processes may legitimatelly need arbitrary state date to back a device or a service, or may not even have an associated device. 2) needs ad-hoc code for each helper, but is simple and working 3) is complicated for management layer, QEMU has the migration timing The proposed "dbus-vmstate" object will connect to a given D-Bus address, and save/load from org.qemu.VMState1 owners on migration. Thus helpers can easily have their state migrated with QEMU, without implementing ad-hoc support (such as done for TPM emulation) D-Bus is ubiquitous on Linux (it is systemd IPC), and can be made to work on various other OSes. There are several implementations and good bindings for various languages. (the tests/dbus-vmstate-test.c is a good example of how simple the implementation of services can be, even in C) dbus-vmstate is put into use by the libvirt series "[PATCH 00/23] Use a slirp helper process". v2: - fix build with broken mingw-glib # gpg: Signature made Mon 06 Jan 2020 14:43:35 GMT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/dbus-vmstate7-pull-request: tests: add dbus-vmstate-test tests: add migration-helpers unit dockerfiles: add dbus-daemon to some of latest distributions configure: add GDBUS_CODEGEN Add dbus-vmstate object util: add dbus helper unit docs: start a document to describe D-Bus usage vmstate: replace DeviceState with VMStateIf vmstate: add qom interface to get id Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-06Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2020-01-06' ↵Peter Maydell
into staging Block patches: - Minor fixes and tests from the freeze period (too minor to be included in 4.2) - Allow many bash iotests to test qcow2's external data file feature - Add compress filter driver - Fix Python iotests after 6f6e1698a6 - Fix for the backup job # gpg: Signature made Mon 06 Jan 2020 14:33:06 GMT # 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-01-06: (34 commits) backup-top: Begin drain earlier tests/qemu-iotests: Update tests to recent desugarized -accel option tests/qemu-iotests: add case to write compressed data of multiple clusters qcow2: Allow writing compressed data of multiple clusters block: introduce compress filter driver iotests: Allow check -o data_file iotests: Disable data_file where it cannot be used iotests: Make 198 work with data_file iotests: Make 137 work with data_file iotests: Make 110 work with data_file iotests: Make 091 work with data_file iotests: Avoid cp/mv of test images iotests: Use _rm_test_img for deleting test images iotests: Avoid qemu-img create iotests: Drop IMGOPTS use in 267 iotests: Replace IMGOPTS='' by --no-opts iotests: Replace IMGOPTS= by -o iotests: Inject space into -ocompat=0.10 in 051 iotests: Add -o and --no-opts to _make_test_img iotests: Let _make_test_img parse its parameters ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-06Merge remote-tracking branch ↵Peter Maydell
'remotes/kraxel/tags/audio-20200106-pull-request' into staging audio: bugfixes. # gpg: Signature made Mon 06 Jan 2020 12:51:15 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/audio-20200106-pull-request: audio: fix integer overflow paaudio: wait until the recording stream is ready paaudio: try to drain the recording stream paaudio: drop recording stream in qpa_fini_in hda-codec: fix recording rate control hda-codec: fix playback rate control Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-06Merge remote-tracking branch 'remotes/elmarco/tags/screendump-pull-request' ↵Peter Maydell
into staging console: screendump improvements Hi, The following patches have been extracted from the "[PATCH v6 00/25] monitor: add asynchronous command type", as they are reviewable/mergeable independantly. They introduce some internal API changes, and fix qemu_open()/qemu_close()/unlink() misusages which should be quite harmless. # gpg: Signature made Fri 03 Jan 2020 09:07:51 GMT # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/screendump-pull-request: screendump: use qemu_unlink() osdep: add qemu_unlink() screendump: replace FILE with QIOChannel and fix close()/qemu_close() object: add g_autoptr support ui: add pixman image g_autoptr support ppm-save: pass opened fd console: add graphic_hw_update_done() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-06tests: add dbus-vmstate-testMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-06tests: add migration-helpers unitMarc-André Lureau
Move a few helper functions from migration-test.c to migration-helpers.c Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-06dockerfiles: add dbus-daemon to some of latest distributionsMarc-André Lureau
To get dbus-vmstate test covered. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-06configure: add GDBUS_CODEGENMarc-André Lureau
gdbus-codegen generated code requires gio-unix on Unix, so add it to GIO libs/cflags. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-06Add dbus-vmstate objectMarc-André Lureau
When instantiated, this object will connect to the given D-Bus bus "addr". During migration, it will take/restore the data from org.qemu.VMState1 instances. See documentation for details. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-06util: add dbus helper unitMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-06docs: start a document to describe D-Bus usageMarc-André Lureau
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2020-01-06vmstate: replace DeviceState with VMStateIfMarc-André Lureau
Replace DeviceState dependency with VMStateIf on vmstate API. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Acked-by: Halil Pasic <pasic@linux.ibm.com>
2020-01-06vmstate: add qom interface to get idMarc-André Lureau
Add an interface to get the instance id, instead of depending on Device and qdev_get_dev_path(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-01-06Merge remote-tracking branch ↵Peter Maydell
'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging x86 and machine queue, 2019-12-20 Bug fix: * Resolve CPU models to v1 by default (Eduardo Habkost) Cleanup: * Remove incorrect numa_mem_supported checks (Igor Mammedov) # gpg: Signature made Fri 20 Dec 2019 19:19:02 GMT # gpg: using RSA key 5A322FD5ABC4D3DBACCFD1AA2807936F984DC5A6 # gpg: issuer "ehabkost@redhat.com" # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" [full] # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF D1AA 2807 936F 984D C5A6 * remotes/ehabkost/tags/x86-and-machine-pull-request: numa: properly check if numa is supported numa: remove not needed check i386: Resolve CPU models to v1 by default Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2020-01-06backup-top: Begin drain earlierMax Reitz
When dropping backup-top, we need to drain the node before freeing the BlockCopyState. Otherwise, requests may still be in flight and then the assertion in shres_destroy() will fail. (This becomes visible in intermittent failure of 056.) Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20191219182638.104621-1-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06tests/qemu-iotests: Update tests to recent desugarized -accel optionPhilippe Mathieu-Daudé
Commit 6f6e1698a6 desugarized "-machine accel=" to a list of "-accel" options. Since now "-machine accel" and "-accel" became incompatible, update the iotests to the new format. Error reported here: https://gitlab.com/qemu-project/qemu/-/jobs/385801004#L3400 Reported-by: GitLab CI Fixes: 6f6e1698a6 (vl: configure accelerators from -accel options) Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20200106130951.29873-1-philmd@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06tests/qemu-iotests: add case to write compressed data of multiple clustersAndrey Shinkevich
Add the case to the iotest #214 that checks possibility of writing compressed data of more than one cluster size. The test case involves the compress filter driver showing a sample usage of that. Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1575288906-551879-4-git-send-email-andrey.shinkevich@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06qcow2: Allow writing compressed data of multiple clustersAndrey Shinkevich
QEMU currently supports writing compressed data of the size equal to one cluster. This patch allows writing QCOW2 compressed data that exceed one cluster. Now, we split buffered data into separate clusters and write them compressed using the block/aio_task API. Suggested-by: Pavel Butsykin <pbutsykin@virtuozzo.com> 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> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1575288906-551879-3-git-send-email-andrey.shinkevich@virtuozzo.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06block: introduce compress filter driverAndrey Shinkevich
Allow writing all the data compressed through the filter driver. The written data will be aligned by the cluster size. Based on the QEMU current implementation, that data can be written to unallocated clusters only. May be used for a backup job. Suggested-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 1575288906-551879-2-git-send-email-andrey.shinkevich@virtuozzo.com [mreitz: Replace NULL bdrv_get_format_name() by "(no format)"] Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Allow check -o data_fileMax Reitz
The problem with allowing the data_file option is that you want to use a different data file per image used in the test. Therefore, we need to allow patterns like -o data_file='$TEST_IMG.data_file'. Then, we need to filter it out from qemu-img map, qemu-img create, and remove the data file in _rm_test_img. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-23-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Disable data_file where it cannot be usedMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20191107163708.833192-22-mreitz@redhat.com [mreitz: Also disable 273] Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Make 198 work with data_fileMax Reitz
We do not care about the json:{} filenames here, so we can just filter them out and thus make the test work both with and without external data files. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-21-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Make 137 work with data_fileMax Reitz
When using an external data file, there are no refcounts for data clusters. We thus have to adjust the corruption test in this patch to not be based around a data cluster allocation, but the L2 table allocation (L2 tables are still refcounted with external data files). Furthermore, we should not print qcow2.py's list of incompatible features because it differs depending on whether there is an external data file or not. With those two changes, the test will work both with and without external data files (once that options works with the iotests at all). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-20-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Make 110 work with data_fileMax Reitz
The only difference is that the json:{} filename of the image looks different. We actually do not care about that filename in this test, we are only interested in (1) that there is a json:{} filename, and (2) whether the backing filename can be constructed. So just filter out the json:{} data, thus making this test pass both with and without data_file. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-19-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Make 091 work with data_fileMax Reitz
The image end offset as reported by qemu-img check is different when using an external data file; we do not care about its value here, so we can just filter it. Incidentally, common.rc already has _check_test_img for us which does exactly that. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-18-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Avoid cp/mv of test imagesMax Reitz
This will not work with external data files, so try to get tests working without it as far as possible. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-17-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Use _rm_test_img for deleting test imagesMax Reitz
Just rm will not delete external data files. Use _rm_test_img every time we delete a test image. (In the process, clean up the indentation of every _cleanup() this patch touches.) ((Also, use quotes consistently. I am happy to see unquoted instances like "rm -rf $TEST_DIR/..." go.)) Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-16-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Avoid qemu-img createMax Reitz
Use _make_test_img whenever possible. This way, we will not ignore user-specified image options. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-15-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Drop IMGOPTS use in 267Max Reitz
Overwriting IMGOPTS means ignoring all user-supplied options, which is not what we want. Replace the current IMGOPTS use by a new BACKING_FILE variable. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-14-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Replace IMGOPTS='' by --no-optsMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-13-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Replace IMGOPTS= by -oMax Reitz
Tests should not overwrite all user-supplied image options, but only add to it (which will effectively overwrite conflicting values). Accomplish this by passing options to _make_test_img via -o instead of $IMGOPTS. For some tests, there is no functional change because they already only appended options to IMGOPTS. For these, this patch is just a simplification. For others, this is a change, so they now heed user-specified $IMGOPTS. Some of those tests do not work with all image options, though, so we need to disable them accordingly. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-12-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Inject space into -ocompat=0.10 in 051Max Reitz
It did not matter before, but now that _make_test_img understands -o, we should use it properly here. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-11-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Add -o and --no-opts to _make_test_imgMax Reitz
Blindly overriding IMGOPTS is suboptimal as this discards user-specified options. Whatever options the test needs should simply be appended. Some tests do this (with IMGOPTS=$(_optstr_add "$IMGOPTS" "...")), but that is cumbersome. It’s simpler to just give _make_test_img an -o parameter with which tests can add options. Some tests actually must override the user-specified options, though, for example when creating an image in a different format than the test $IMGFMT. For such cases, --no-opts allows clearing the current option list. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-10-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Let _make_test_img parse its parametersMax Reitz
This will allow us to add more options than just -b. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-9-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Drop compat=1.1 in 050Max Reitz
IMGOPTS can never be empty for qcow2, because the check scripts adds compat=1.1 unless the user specified any compat option themselves. Thus, this block does not do anything and can be dropped. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-8-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Replace IMGOPTS by _unsupported_imgoptsMax Reitz
Some tests require compat=1.1 and thus set IMGOPTS='compat=1.1' globally. That is not how it should be done; instead, they should simply set _unsupported_imgopts to compat=0.10 (compat=1.1 is the default anyway). This makes the tests heed user-specified $IMGOPTS. Some do not work with all image options, though, so we need to disable them accordingly. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsky@redhat.com> Message-id: 20191107163708.833192-7-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Filter refcount_order in 036Max Reitz
This test can run just fine with other values for refcount_bits, so we should filter the value from qcow2.py's dump-header. In fact, we can filter everything but the feature bits and header extensions, because that is what the test is about. (036 currently ignores user-specified image options, but that will be fixed in the next patch.) Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-6-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Add _filter_json_filenameMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-5-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests/qcow2.py: Split feature fields into bitsMax Reitz
Print the feature fields as a set of bits so that filtering is easier. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-4-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests/qcow2.py: Add dump-header-extsMax Reitz
This is useful for tests that want to whitelist fields from dump-header (with grep) but still print all header extensions. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Message-id: 20191107163708.833192-3-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: s/qocw2/qcow2/Max Reitz
Probably due to blind copy-pasting, we have several instances of "qocw2" in our iotests. Fix them. Reported-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 20191107163708.833192-2-mreitz@redhat.com Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06qcow2-bitmaps: fix qcow2_can_store_new_dirty_bitmapVladimir Sementsov-Ogievskiy
qcow2_can_store_new_dirty_bitmap works wrong, as it considers only bitmaps already stored in the qcow2 image and ignores persistent BdrvDirtyBitmap objects. So, let's instead count persistent BdrvDirtyBitmaps. We load all qcow2 bitmaps on open, so there should not be any bitmap in the image for which we don't have BdrvDirtyBitmaps version. If it is - it's a kind of corruption, and no reason to check for corruptions here (open() and close() are better places for it). Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20191014115126.15360-2-vsementsov@virtuozzo.com Reviewed-by: Max Reitz <mreitz@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06throttle-groups: fix memory leak in throttle_group_set_limit:PanNengyuan
This avoid a memory leak when qom-set is called to set throttle_group limits, here is an easy way to reproduce: 1. run qemu-iotests as follow and check the result with asan: ./check -qcow2 184 Following is the asan output backtrack: Direct leak of 912 byte(s) in 3 object(s) allocated from: #0 0xffff8d7ab3c3 in __interceptor_calloc (/lib64/libasan.so.4+0xd33c3) #1 0xffff8d4c31cb in g_malloc0 (/lib64/libglib-2.0.so.0+0x571cb) #2 0x190c857 in qobject_input_start_struct /mnt/sdc/qemu-master/qemu-4.2.0-rc0/qapi/qobject-input-visitor.c:295 #3 0x19070df in visit_start_struct /mnt/sdc/qemu-master/qemu-4.2.0-rc0/qapi/qapi-visit-core.c:49 #4 0x1948b87 in visit_type_ThrottleLimits qapi/qapi-visit-block-core.c:3759 #5 0x17e4aa3 in throttle_group_set_limits /mnt/sdc/qemu-master/qemu-4.2.0-rc0/block/throttle-groups.c:900 #6 0x1650eff in object_property_set /mnt/sdc/qemu-master/qemu-4.2.0-rc0/qom/object.c:1272 #7 0x1658517 in object_property_set_qobject /mnt/sdc/qemu-master/qemu-4.2.0-rc0/qom/qom-qobject.c:26 #8 0x15880bb in qmp_qom_set /mnt/sdc/qemu-master/qemu-4.2.0-rc0/qom/qom-qmp-cmds.c:74 #9 0x157e3e3 in qmp_marshal_qom_set qapi/qapi-commands-qom.c:154 Reported-by: Euler Robot <euler.robot@huawei.com> Signed-off-by: PanNengyuan <pannengyuan@huawei.com> Message-id: 1574835614-42028-1-git-send-email-pannengyuan@huawei.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Add test for failing mirror completeMax Reitz
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Tested-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 20191108123455.39445-6-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2020-01-06iotests: Add @error to wait_until_completedMax Reitz
Callers can use this new parameter to expect failure during the completion process. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20191108123455.39445-5-mreitz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>