summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * hw/char/serial: remove duplicate .class_init in serial_mm_infoLaurent Vivier2020-10-131-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .class_init is already set to serial_mm_class_init. Remove the duplicate entry. Fixes: 17fd1a6490b1 ("serial-mm: add "regshift" property") Cc: marcandre.lureau@redhat.com Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Li Qiang <liq3ea@gmail.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20201009113843.60995-1-lvivier@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * block/blkdebug: fix memory leakElena Afanasova2020-10-131-0/+1
| | | | | | | | | | | | | | | | | | Spotted by PVS-Studio Signed-off-by: Elena Afanasova <eafanasova@gmail.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <1e903f928eb3da332cc95e2a6f87243bd9fe66e4.camel@gmail.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * hw/pci: Fix typo in PCI hot-plug error messageJulia Suvorova2020-10-132-2/+2
| | | | | | | | | | | | | | | | | | 'occupied' is spelled like 'ocuppied' in the message. Signed-off-by: Julia Suvorova <jusual@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201006133958.600932-1-jusual@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * softmmu/memory: Log invalid memory accessesPhilippe Mathieu-Daudé2020-10-131-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Log invalid memory accesses with as GUEST_ERROR. This is particularly useful since commit 5d971f9e67 which reverted ("memory: accept mismatching sizes in memory_region_access_valid"). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20201005152725.2143444-1-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * hw/acpi/piix4: Rename piix4_pm_add_propeties() to piix4_pm_add_properties()Greg Kurz2020-10-131-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Message-Id: <160165476743.57452.2128307974125615413.stgit@bahia.lan> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * vmdk: fix maybe uninitialized warningsChristian Borntraeger2020-10-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fedora 32 gcc 10 seems to give false positives: Compiling C object libblock.fa.p/block_vmdk.c.o ../block/vmdk.c: In function ‘vmdk_parse_extents’: ../block/vmdk.c:587:5: error: ‘extent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 587 | g_free(extent->l1_table); | ^~~~~~~~~~~~~~~~~~~~~~~~ ../block/vmdk.c:754:17: note: ‘extent’ was declared here 754 | VmdkExtent *extent; | ^~~~~~ ../block/vmdk.c:620:11: error: ‘extent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 620 | ret = vmdk_init_tables(bs, extent, errp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../block/vmdk.c:598:17: note: ‘extent’ was declared here 598 | VmdkExtent *extent; | ^~~~~~ ../block/vmdk.c:1178:39: error: ‘extent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 1178 | extent->flat_start_offset = flat_offset << 9; | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ ../block/vmdk.c: In function ‘vmdk_open_vmdk4’: ../block/vmdk.c:581:22: error: ‘extent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 581 | extent->l2_cache = | ~~~~~~~~~~~~~~~~~^ 582 | g_malloc(extent->entry_size * extent->l2_size * L2_CACHE_SIZE); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../block/vmdk.c:872:17: note: ‘extent’ was declared here 872 | VmdkExtent *extent; | ^~~~~~ ../block/vmdk.c: In function ‘vmdk_open’: ../block/vmdk.c:620:11: error: ‘extent’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 620 | ret = vmdk_init_tables(bs, extent, errp); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../block/vmdk.c:598:17: note: ‘extent’ was declared here 598 | VmdkExtent *extent; | ^~~~~~ cc1: all warnings being treated as errors make: *** [Makefile.ninja:884: libblock.fa.p/block_vmdk.c.o] Error 1 fix them by assigning a default value. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Fam Zheng <fam@euphon.net> Message-Id: <20200930155859.303148-2-borntraeger@de.ibm.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * tests/test-char: Use a proper fallthrough commentThomas Huth2020-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | For being able to compile with -Werror=implicit-fallthrough we need to use comments that the compiler recognizes. Use "fallthrough" instead of "no break" here. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201002171343.283426-1-thuth@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * hw/block/nvme: Simplify timestamp sumPhilippe Mathieu-Daudé2020-10-131-6/+1Star
| | | | | | | | | | | | | | | | | | | | As the 'timestamp' variable is declared as a 48-bit bitfield, we do not need to wrap the sum result. Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Message-Id: <20201002075716.1657849-1-philmd@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * target/i386/cpu: Update comment that mentions TexinfoMarkus Armbruster2020-10-121-1/+2
| | | | | | | | | | | | | | | | | | | | Missed in commit 41fba1618b "docs/system: convert the documentation of deprecated features to rST." Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200929075824.1517969-3-armbru@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
| * qemu-img-cmds.hx: Update comment that mentions TexinfoMarkus Armbruster2020-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | Missed in 3c95fdef94 "Update comments in .hx files that mention Texinfo". Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200929075824.1517969-2-armbru@redhat.com> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
* | Merge remote-tracking branch ↵Peter Maydell2020-10-1323-108/+313
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'remotes/huth-gitlab/tags/pull-request-2020-10-13' into staging * qtest improvements (test for crash found with the fuzzer, increase downtime in migration test, less verbose output when running w/o KVM) * Improve handling of acceptance tests in the Gitlab-CI * Run checkpatch.pl in the Gitlab-CI * Improve the gitlab-pipeline-status script * Misc patches (mark 'moxie' as deprecated, remove stale .gitignore files, ...) # gpg: Signature made Tue 13 Oct 2020 11:49:06 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-10-13: (23 commits) scripts/ci/gitlab-pipeline-status: wait for pipeline creation scripts/ci/gitlab-pipeline-status: use more descriptive exceptions scripts/ci/gitlab-pipeline-status: handle keyboard interrupts scripts/ci/gitlab-pipeline-status: refactor parser creation scripts/ci/gitlab-pipeline-status: give early feedback on running pipelines scripts/ci/gitlab-pipeline-status: improve message regarding timeout scripts/ci/gitlab-pipeline-status: make branch name configurable gitlab: assign python helper files to GitLab maintainers section gitlab: add a CI job to validate the DCO sign off gitlab: add a CI job for running checkpatch.pl configure: fixes indent of $meson setup docs/system/deprecated: Mark the 'moxie' CPU as deprecated Remove superfluous .gitignore files MAINTAINERS: Ignore bios-tables-test in the qtest section Add a comment in bios-tables-test.c to clarify the reason behind approach softmmu/vl: Be less verbose about missing KVM when running the qtests tests/migration: Allow longer timeouts qtest: add fuzz test case Acceptance tests: show test report on GitLab CI Acceptance tests: do not show canceled test logs on GitLab CI ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | scripts/ci/gitlab-pipeline-status: wait for pipeline creationCleber Rosa2020-10-131-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When called in wait mode, this script will also wait for the pipeline to be get to a "running" state. Because many more status may be seen until a pipeline gets to "running", and those need to be handle too. Reference: https://docs.gitlab.com/ee/api/pipelines.html#list-project-pipelines Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-8-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | scripts/ci/gitlab-pipeline-status: use more descriptive exceptionsCleber Rosa2020-10-131-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | For two very different error conditions. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-7-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | scripts/ci/gitlab-pipeline-status: handle keyboard interruptsCleber Rosa2020-10-131-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | So that exits based on user requests are handled more gracefully. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-6-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | scripts/ci/gitlab-pipeline-status: refactor parser creationCleber Rosa2020-10-131-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Out of the main function. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-5-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | scripts/ci/gitlab-pipeline-status: give early feedback on running pipelinesCleber Rosa2020-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When waiting for a pipeline to run and finish, it's better to give early feedback, and then sleep and wait, than the other wait around. Specially for the first iteration, it's frustrating to see nothing while the script is sleeping. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-4-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | scripts/ci/gitlab-pipeline-status: improve message regarding timeoutCleber Rosa2020-10-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The script has its own timeout, which is about how long the script will wait (when called with --wait) for the pipeline to complete, and not necessarily for the pipeline to complete. Hopefully this new wording will be clearer. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-3-crosa@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | scripts/ci/gitlab-pipeline-status: make branch name configurableCleber Rosa2020-10-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the utility function `get_local_staging_branch_commit()`, the name of the branch is hard coded (including in the function name). For extensibility reasons, let's make that configurable. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20200904164258.240278-2-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | gitlab: assign python helper files to GitLab maintainers sectionDaniel P. Berrangé2020-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200918132903.1848939-4-berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | gitlab: add a CI job to validate the DCO sign offDaniel P. Berrangé2020-10-132-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While checkpatch.pl can validate DCO sign off that job must always be advisory only since it is expected that certain patches will fail some code style rules. We require the DCO sign off to be mandatory for all commits though, so it benefits from being validated in a standalone job. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200918132903.1848939-3-berrange@redhat.com> [thuth: Use "stage: build" to let it run earlier] Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | gitlab: add a CI job for running checkpatch.plDaniel P. Berrangé2020-10-132-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This job is advisory since it is expected that certain patches will fail the style checks and checkpatch.pl provides no way to mark exceptions to the rules. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200918132903.1848939-2-berrange@redhat.com> [thuth: Use "stage: build" to let it run earlier] Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | configure: fixes indent of $meson setupYonggang Luo2020-10-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | convert these line from tab to space Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20201012234348.1427-2-luoyonggang@gmail.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | docs/system/deprecated: Mark the 'moxie' CPU as deprecatedThomas Huth2020-10-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is currently unclear whether anybody is still using the 'moxie' CPU, and there are no images for testing available this CPU, so the code has likely bit-rotten in the course of time. When I asked the maintainer for information, I did not get a reply within four weeks yet (see https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg07201.html). The last Signed-off-by line from Anthony in our repo is from 2013, so it seems like this code is rather unmaintained. Time to put it onto the deprecation list to see whether somebody is still interested in this code or whether we could remove it in a couple of releases. Message-Id: <20200923171815.97801-1-thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | Remove superfluous .gitignore filesThomas Huth2020-10-139-59/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Since we are now always doing out-of-tree builds, these gitignore files should not be necessary anymore. Message-Id: <20200919133637.72744-1-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | MAINTAINERS: Ignore bios-tables-test in the qtest sectionThomas Huth2020-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'm very often getting CC: on rather large patch series that modify the ACPI stuff of either ARM or x86, just because the bios-table-test is often slightly involved here. I can't say much about ACPI, and the bios-table-test is already covered by the ACPI section in MAINTAINERS, so I'd rather prefer to not getting automatically CC-ed on such patch series anymore. If people want my opinion about qtest-related changes, they can still put me on CC manually. Message-Id: <20201001042717.136033-1-thuth@redhat.com> Acked-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | Add a comment in bios-tables-test.c to clarify the reason behind approachAni Sinha2020-10-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A comment is added in bios-tables-test.c that explains the reasoning behind the process of updating the ACPI table blobs when new tests are added or old tests are modified or code is committed that affect tests. The explanation would help future contributors follow the correct process when making code changes that affect ACPI tables. Signed-off-by: Ani Sinha <ani@anisinha.ca> Acked-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20200929142501.1057-1-ani@anisinha.ca> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | softmmu/vl: Be less verbose about missing KVM when running the qtestsThomas Huth2020-10-131-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the qtests use "-accel kvm -accel tcg" to run real guest code. This causes some error messages when kvm is not available. We do not really care about these messages since the fallback to tcg is expected here. So let's silence them to avoid that they spoil the output of the tests. Unfortunately, we can not use the qtest_enabled() wrapper in this case, since the qtest accelerator itself is not initialized. Thus we have to test for the qtest_chrdev variable instead. Message-Id: <20200710085020.28222-1-thuth@redhat.com> Reviewed-by: Alexander Bulekov <alxndr@bu.edu> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | tests/migration: Allow longer timeoutsDr. David Alan Gilbert2020-10-131-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In travis, with gcov and gprof we're seeing timeouts; hopefully fix this by increasing the test timeouts a bit, but for xbzrle ensure it really does get a couple of cycles through to test the cache. I think the problem in travis is we have about 2 host CPU threads, in the test we have at least 3: a) The vCPU thread (100% flat out) b) The source migration thread c) The destination migration thread if (b) & (c) are slow for any reason - gcov+gperf or a slow host - then they're sharing one host CPU thread so limit the migration bandwidth. Tested on my laptop with: taskset -c 0,1 ./tests/qtest/migration-test -p /x86_64/migration Reported-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20201008160330.130431-1-dgilbert@redhat.com> [thuth: Move the #define to the right location] Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | qtest: add fuzz test caseLi Qiang2020-10-132-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the device fuzzer finds more and more issues. For every fuzz case, we need not only the fixes but also the corresponding test case. We can analysis the reproducer for every case and find what happened in where and write a beautiful test case. However the raw data of reproducer is not friendly to analysis. It will take a very long time, even far more than the fixes itself. So let's create a new file to hold all of the fuzz test cases and just use the raw data to act as the test case. This way nobody will be afraid of writing a test case for the fuzz reproducer. This patch adds the issue LP#1878263 test case. Signed-off-by: Li Qiang <liq3ea@163.com> Message-Id: <20200921160605.19329-1-liq3ea@163.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Alexander Bulekov <alxndr@bu.edu> [thuth: Slightly adjusted commit message, removed empty lines] Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | Acceptance tests: show test report on GitLab CICleber Rosa2020-10-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avocado will, by default, produce JUnit files. Let's ask GitLab to present those in the web UI. Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009205513.751968-4-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | Acceptance tests: do not show canceled test logs on GitLab CICleber Rosa2020-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests resulting in "CANCEL" in Avocado are usually canceled on purpose, and are almost identical to "SKIP". The logs for canceled tests are adding a lot of noise to the logs being shown on GitLab CI, and causing distraction from real failures. As a side note, this "after script" is scheduled for removal once the feature is implemented within Avocado itself. Reference: https://github.com/avocado-framework/avocado/issues/4266 Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009205513.751968-3-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | Acceptance tests: bump pycdlib version for easier installationCleber Rosa2020-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On with certain versions of "pip", package installations will attempt to create wheels. And, on environments without a "complete" Python installation (as described in the acceptance tests requirements docs), that will fail. pycdlib, starting with version 1.11.0, is now being made available as wheels, so its instalation on those constrained environments is now possible. Buglink: https://bugs.launchpad.net/qemu/+bug/1897783 Reported-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Cleber Rosa <crosa@redhat.com> Message-Id: <20201009205513.751968-2-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | gitlab-ci.yml: Only run one test-case per fuzzerAlexander Bulekov2020-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With 1000 runs, there is a non-negligible chance that the fuzzer can trigger a crash. With this CI job, we care about catching build/runtime issues in the core fuzzing code. Actual device fuzzing takes place on oss-fuzz. For these purposes, only running one input should be sufficient. Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20201002143524.56930-1-alxndr@bu.edu> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
| * | tests/qtest: Replace magic value by NANOSECONDS_PER_SECOND definitionPhilippe Mathieu-Daudé2020-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use self-explicit NANOSECONDS_PER_SECOND definition instead of a magic value. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20201011194918.3219195-5-f4bug@amsat.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
* | | Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into ↵Peter Maydell2020-10-1252-1497/+1471Star
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging * qtest documentation improvements (Eduardo, myself) * libqtest event buffering (Maxim) * use RCU for list of children of a bus (Maxim) * move more files to softmmu/ (myself) * meson.build cleanups, qemu-storage-daemon fix (Philippe) # gpg: Signature made Mon 12 Oct 2020 16:55:19 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: (38 commits) meson: identify more sections of meson.build scsi/scsi_bus: fix races in REPORT LUNS virtio-scsi: use scsi_device_get scsi/scsi_bus: Add scsi_device_get scsi/scsi-bus: scsi_device_find: don't return unrealized devices device-core: use atomic_set on .realized property scsi: switch to bus->check_address device-core: use RCU for list of children of a bus device_core: use drain_call_rcu in in qmp_device_add scsi/scsi_bus: switch search direction in scsi_device_find qdev: add "check if address free" callback for buses qemu-iotests, qtest: rewrite test 067 as a qtest qtest: check that drives are really appearing and disappearing qtest: switch users back to qtest_qmp_receive device-plug-test: use qtest_qmp to send the device_del command qtest: remove qtest_qmp_receive_success qtest: Reintroduce qtest_qmp_receive with QMP event buffering qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict meson.build: Re-enable KVM support for MIPS build-sys: fix git version from -version ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | meson: identify more sections of meson.buildPaolo Bonzini2020-10-121-11/+25
| | | | | | | | | | | | | | | | | | Add more headers that clarify code organization. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi/scsi_bus: fix races in REPORT LUNSMaxim Levitsky2020-10-121-35/+33Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently scsi_target_emulate_report_luns iterates over the child device list twice, and there is no guarantee that this list is the same in both iterations. The reason for iterating twice is that the first iteration calculates how much memory to allocate. However if we use a dynamic array we can avoid iterating twice, and therefore we avoid this race. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1866707 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-10-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-14-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | virtio-scsi: use scsi_device_getMaxim Levitsky2020-10-121-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will help us to avoid the scsi device disappearing after we took a reference to it. It doesn't by itself forbid case when we try to access an unrealized device Suggested-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-9-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-13-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi/scsi_bus: Add scsi_device_getMaxim Levitsky2020-10-122-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add scsi_device_get which finds the scsi device and takes a reference to it. Suggested-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20200913160259.32145-8-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-12-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi/scsi-bus: scsi_device_find: don't return unrealized devicesPaolo Bonzini2020-10-121-30/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device core first places a device on the bus and then realizes it. Make scsi_device_find avoid returing such devices to avoid races in drivers that use an iothread (currently virtio-scsi) Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1812399 Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-7-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-11-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | device-core: use atomic_set on .realized propertyMaxim Levitsky2020-10-122-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some code might race with placement of new devices on a bus. We currently first place a (unrealized) device on the bus and then realize it. As a workaround, users that scan the child device list, can check the realized property to see if it is safe to access such a device. Use an atomic write here too to aid with this. A separate discussion is what to do with devices that are unrealized: It looks like for this case we only call the hotplug handler's unplug callback and its up to it to unrealize the device. An atomic operation doesn't cause harm for this code path though. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-10-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi: switch to bus->check_addressPaolo Bonzini2020-10-121-47/+75
| | | | | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | device-core: use RCU for list of children of a busMaxim Levitsky2020-10-125-29/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the race between device emulation code that tries to find a child device to dispatch the request to (e.g a scsi disk), and hotplug of a new device to that bus. Note that this doesn't convert all the readers of the list but only these that might go over that list without BQL held. This is a very small first step to make this code thread safe. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-5-mlevitsk@redhat.com> [Use RCU_READ_LOCK_GUARD in more places, adjust testcase now that the delay in DEVICE_DELETED due to RCU is more consistent. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-9-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | device_core: use drain_call_rcu in in qmp_device_addMaxim Levitsky2020-10-121-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Soon, a device removal might only happen on RCU callback execution. This is okay for device-del which provides a DEVICE_DELETED event, but not for the failure case of device-add. To avoid changing monitor semantics, just drain all pending RCU callbacks on error. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Suggested-by: Stefan Hajnoczi <stefanha@gmail.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-4-mlevitsk@redhat.com> [Don't use it in qmp_device_del. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | scsi/scsi_bus: switch search direction in scsi_device_findMaxim Levitsky2020-10-121-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change will allow us to convert the bus children list to RCU, while not changing the logic of this function Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | qdev: add "check if address free" callback for busesPaolo Bonzini2020-10-124-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check if an address is free on the bus before plugging in the device. This makes it possible to do the check without any side effects, and to detect the problem early without having to do it in the realize callback. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | qemu-iotests, qtest: rewrite test 067 as a qtestPaolo Bonzini2020-10-126-599/+191Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test 067 from qemu-iotests is executing QMP commands to hotplug and hot-unplug disks, devices and blockdevs. Because the power of the text-based test harness is limited, it is actually limiting the checks that it does, for example by skipping DEVICE_DELETED events. tests/qtest already has a similar test, drive_del-test.c. We can merge them, and even reuse some of the existing code in drive_del-test.c. This will improve the quality of the test by covering DEVICE_DELETED events and testing multiple architectures (therefore covering multiple PCI hotplug mechanisms as well as s390x virtio-ccw). The only difference is that the new test will always use null-co:// for the medium rather than qcow2 or raw, but this should be irrelevant for what the test is covering. For example there are no "qemu-img check" runs in 067 that would check that the file is properly closed. The new tests requires PCI hot-plug support, so drive_del-test is moved from qemu-system-ppc to qemu-system-ppc64. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | qtest: check that drives are really appearing and disappearingPaolo Bonzini2020-10-121-1/+31
| | | | | | | | | | | | | | | | | | | | | | | | Do not just trust the HMP commands to create and delete the drive, use query-block to check that this is actually the case. Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | qtest: switch users back to qtest_qmp_receiveMaxim Levitsky2020-10-125-22/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let test use the new functionality for buffering events. The only remaining users of qtest_qmp_receive_dict are tests that fuzz the QMP protocol. Tested with 'make check-qtest'. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20201006123904.610658-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * | device-plug-test: use qtest_qmp to send the device_del commandPaolo Bonzini2020-10-121-23/+9Star
| | | | | | | | | | | | | | | | | | | | | Simplify the code now that events are buffered. There is no need anymore to separate sending the command and retrieving the response. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>