- Nov 17, 2021
-
-
Kashyap Chamarthy authored
The original wiki is here[1]. I converted by copying the wiki source into a .wiki file and convert to rST using `pandoc`: $ pandoc -f Mediawiki -t rst trivial-patches.wiki -o trivial-patches.rst Update the active maintainer names (and drop Michael Tokarev's inactive repo) to reflect current reality. [1] https://wiki.qemu.org/Contribute/TrivialPatches Signed-off-by:
Kashyap Chamarthy <kchamart@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211110144902.388183-2-kchamart@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
These are unused since commit 075e52b8 ("s390x/cpumodel: we are always in zarchitecture mode") and it's unlikely that we will ever need them again. So let's simply remove them now. Message-Id: <20211015124219.1330830-1-thuth@redhat.com> Reviewed-by:
David Hildenbrand <david@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
https://gitlab.com/jsnow/qemuRichard Henderson authored
Pull request # gpg: Signature made Wed 17 Nov 2021 01:33:06 AM CET # gpg: using RSA key F9B7ABDBBCACDF95BE76CBD07DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" [full] * tag 'python-pull-request' of https://gitlab.com/jsnow/qemu : scripts/device-crash-test: hide tracebacks for QMP connect errors scripts/device-crash-test: don't emit AQMP connection errors to stdout scripts/device-crash-test: simplify Exception handling python/aqmp: fix ConnectError string method python/aqmp: Fix disconnect during capabilities negotiation Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Nov 16, 2021
-
-
Richard Henderson authored
Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
John Snow authored
Generally, the traceback for a connection failure is uninteresting and all we need to know is that the connection attempt failed. Reduce the verbosity in these cases, except when debugging. Signed-off-by:
John Snow <jsnow@redhat.com> Reported-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-6-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
These errors are expected, so they shouldn't clog up terminal output. In the event that they're *not* expected, we'll be seeing an awful lot more output concerning the nature of the failure. Reported-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-5-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
We don't need to handle KeyboardInterruptError specifically; we can instead tighten the scope of the broad Exception handlers to only catch "Exception", which has the effect of allowing all BaseException classes that do not inherit from Exception to be raised through. KeyboardInterruptError and a few other important ones are BaseExceptions, so this does the same thing with less code. Signed-off-by:
John Snow <jsnow@redhat.com> Reported-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-4-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
When ConnectError is used to wrap an Exception that was initialized without an error message, we are treated to a traceback with a rubbish line like this: ... ConnectError: Failed to establish session: Correct this to use the name of an exception as a fallback message: ... ConnectError: Failed to establish session: EOFError Better! Signed-off-by:
John Snow <jsnow@redhat.com> Reported-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-3-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
John Snow authored
If we receive ConnectionResetError (ECONNRESET) while attempting to perform capabilities negotiation -- prior to the establishment of the async reader/writer tasks -- the disconnect function is not aware that we are in an error pathway. As a result, when attempting to close the StreamWriter, we'll see the same ConnectionResetError that caused us to initiate a disconnect in the first place, which will cause the disconnect task itself to fail, which emits a CRITICAL logging event. I still don't know if there's a smarter way to check to see if an exception received at this point is "the same" exception as the one that caused the initial disconnect, but for now the problem can be avoided by improving the error pathway detection in the exit path. Reported-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
John Snow <jsnow@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-id: 20211111143719.2162525-2-jsnow@redhat.com Signed-off-by:
John Snow <jsnow@redhat.com>
-
https://repo.or.cz/qemu/ericbRichard Henderson authored
nbd patches for 2021-11-16 - Rich Jones: Add 'qemu-nbd --selinux-label' option for running Unix socket with appropriate SELinux labeling - Eric Blake: Address clang sanitizer warning # gpg: Signature made Tue 16 Nov 2021 05:32:26 PM CET # gpg: using RSA key 71C2CC22B1C4602927D2F3AAA7A16B4A2527436A # gpg: Good signature from "Eric Blake <eblake@redhat.com>" [full] # gpg: aka "Eric Blake (Free Software Programmer) <ebb9@byu.net>" [full] # gpg: aka "[jpeg image of size 6874]" [full] * tag 'pull-nbd-2021-11-16' of https://repo.or.cz/qemu/ericb : nbd/server: Add --selinux-label option nbd/server: Silence clang sanitizer warning Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
https://github.com/stsquad/qemuRichard Henderson authored
Misc build and test fixes: - force NOUSER for base docker images - don't run TCG VM tests by default - remove useless meson test - add Centos 8 custom runner - split up custom-runners to individual files - skip cirrus checks on master/stable branches # gpg: Signature made Tue 16 Nov 2021 05:22:09 PM CET # gpg: using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44 # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full] * tag 'pull-for-6.2-161121-1' of https://github.com/stsquad/qemu : gitlab: skip cirrus jobs on master and stable branches gitlab-ci: Split custom-runners.yml in one file per runner Jobs based on custom runners: add CentOS Stream 8 meson: remove useless libdl test tests/vm: don't build using TCG by default tests/vm: sort the special variable list tests/docker: force NOUSER=1 for base images Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Daniel P. Berrangé authored
On the primary QEMU repository we want the CI jobs to run on the staging branch as a gating CI test. Cirrus CI has very limited job concurrency, so if there are too many jobs triggered they'll queue up and hit the GitLab CI job timeout before they complete on Cirrus. If we let Cirrus jobs run again on the master branch immediately after merging from staging, that just increases the chances jobs will get queued and subsequently timeout. The same applies for merges to the stable branches. User forks meanwhile should be allowed to run Cirrus CI jobs freely. Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Message-Id: <20211116112757.1909176-1-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org>
-
Philippe Mathieu-Daudé authored
To ease maintenance, add the custom-runners/ directory and split custom-runners.yml in 3 files, all included by the current custom-runners.yml: - ubuntu-18.04-s390x.yml - ubuntu-20.04-aarch64.yml - centos-stream-8-x86_64.yml Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20211115095608.2436223-1-philmd@redhat.com> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Message-Id: <20211115142915.3797652-7-alex.bennee@linaro.org>
-
Cleber Rosa authored
This introduces three different parts of a job designed to run on a custom runner managed by Red Hat. The goals include: a) propose a model for other organizations that want to onboard their own runners, with their specific platforms, build configuration and tests. b) bring awareness to the differences between upstream QEMU and the version available under CentOS Stream, which is "A preview of upcoming Red Hat Enterprise Linux minor and major releases". c) because of b), it should be easier to identify and reduce the gap between Red Hat's downstream and upstream QEMU. The components of this custom job are: I) OS build environment setup code: - additions to the existing "build-environment.yml" playbook that can be used to set up CentOS/EL 8 systems. - a CentOS Stream 8 specific "build-environment.yml" playbook that adds to the generic one. II) QEMU build configuration: a script that will produce binaries with features as similar as possible to the ones built and packaged on CentOS stream 8. III) Scripts that define the minimum amount of testing that the binaries built with the given configuration (point II) under the given OS build environment (point I) should be subjected to. IV) Job definition: GitLab CI jobs that will dispatch the build/test jobs (see points #II and #III) to the machine specifically configured according to #I. Signed-off-by:
Cleber Rosa <crosa@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Tested-by:
Willian Rampazzo <willianr@redhat.com> Message-Id: <20211111160501.862396-2-crosa@redhat.com> Message-Id: <20211115142915.3797652-6-alex.bennee@linaro.org>
-
Paolo Bonzini authored
dlopen is never used after it is sought via cc.find_library, because plugins use gmodule instead; remove the test. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20211110092454.30916-1-pbonzini@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211115142915.3797652-5-alex.bennee@linaro.org>
-
Alex Bennée authored
While it is useful to run these images using TCG their performance will not be anything like the native guests. Don't do it by default. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/393 Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211115142915.3797652-4-alex.bennee@linaro.org>
-
Alex Bennée authored
Making the list alphabetical makes it easier to find the config option you are looking for. Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Willian Rampazzo <willianr@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-Id: <20211115142915.3797652-3-alex.bennee@linaro.org>
-
Alex Bennée authored
As base images are often used to build further images like toolchains ensure we don't add the local user by accident. The local user should only exist on local images and not anything that gets pushed up to the public registry. Reported-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211115142915.3797652-2-alex.bennee@linaro.org>
-
Richard W.M. Jones authored
Under SELinux, Unix domain sockets have two labels. One is on the disk and can be set with commands such as chcon(1). There is a different label stored in memory (called the process label). This can only be set by the process creating the socket. When using SELinux + SVirt and wanting qemu to be able to connect to a qemu-nbd instance, you must set both labels correctly first. For qemu-nbd the options to set the second label are awkward. You can create the socket in a wrapper program and then exec into qemu-nbd. Or you could try something with LD_PRELOAD. This commit adds the ability to set the label straightforwardly on the command line, via the new --selinux-label flag. (The name of the flag is the same as the equivalent nbdkit option.) A worked example showing how to use the new option can be found in this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1984938 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1984938 Signed-off-by:
Richard W.M. Jones <rjones@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> [eblake: rebase to configure changes, reject --selinux-label if it is not compiled in or not used on a Unix socket] Note that we may relax some of these restrictions at a later date, such as making it possible to label a TCP socket, although it may be smarter to do so as a generic QMP action rather than more one-off command lines in qemu-nbd. Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20211115202944.615966-1-eblake@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> [eblake: adjust meson output as suggested by thuth] Signed-off-by:
Eric Blake <eblake@redhat.com>
-
Eric Blake authored
clang's sanitizer is picky: memset(NULL, x, 0) is technically undefined behavior, even though no sane implementation of memset() deferences the NULL. Caught by the nbd-qemu-allocation iotest. The alternative to checking before each memset is to instead force an allocation of 1 element instead of g_new0(type, 0)'s behavior of returning NULL for a 0-length array. Reported-by:
Peter Maydell <peter.maydell@linaro.org> Fixes: 3b1f244c (nbd: Allow export of multiple bitmaps for one device) Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20211115223943.626416-1-eblake@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com>
-
https://gitlab.com/hreitz/qemuRichard Henderson authored
Block patches for 6.2.0-rc1: - Fixes to image streaming job and block layer reconfiguration to make iotest 030 pass again - docs: Deprecate incorrectly typed device_add arguments - file-posix: Fix alignment after reopen changing O_DIRECT # gpg: Signature made Tue 16 Nov 2021 01:57:03 PM CET # gpg: using RSA key CB62D7A0EE3829E45F004D34A1FA40D098019CDF # gpg: issuer "hreitz@redhat.com" # gpg: Good signature from "Hanna Reitz <hreitz@redhat.com>" [marginal] # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: CB62 D7A0 EE38 29E4 5F00 4D34 A1FA 40D0 9801 9CDF * tag 'pull-block-2021-11-16' of https://gitlab.com/hreitz/qemu : file-posix: Fix alignment after reopen changing O_DIRECT softmmu/qdev-monitor: fix use-after-free in qdev_set_id() docs: Deprecate incorrectly typed device_add arguments iotests/030: Unthrottle parallel jobs in reverse block: Let replace_child_noperm free children block: Let replace_child_tran keep indirect pointer transactions: Invoke clean() after everything else block: Restructure remove_file_or_backing_child() block: Pass BdrvChild ** to replace_child_noperm block: Drop detached child from ignore list block: Unite remove_empty_child and child_free block: Manipulate children list in .attach/.detach stream: Traverse graph after modification Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
https://github.com/philmd/qemuRichard Henderson authored
Machine core patches - Rework SMP parsing unit test to work on WinGW: https://github.com/qemu/qemu/runs/4078386652 This fixes: Test smp_parse failed! Expected error report: Invalid SMP CPUs 1. The min CPUs supported by machine '(null)' is 2 Output error report: Invalid SMP CPUs 1. The min CPUs supported by machine '(NULL)' is 2 # gpg: Signature made Mon 15 Nov 2021 11:46:36 PM CET # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full] * tag 'machine-core-20211115' of https://github.com/philmd/qemu : tests/unit/test-smp-parse: Explicit MachineClass name tests/unit/test-smp-parse: QOM'ify smp_machine_class_init() tests/unit/test-smp-parse: Restore MachineClass fields after modifying Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Kevin Wolf authored
At the end of a reopen, we already call bdrv_refresh_limits(), which should update bs->request_alignment according to the new file descriptor. However, raw_probe_alignment() relies on s->needs_alignment and just uses 1 if it isn't set. We neglected to update this field, so starting with cache=writeback and then reopening with cache=none means that we get an incorrect bs->request_alignment == 1 and unaligned requests fail instead of being automatically aligned. Fix this by recalculating s->needs_alignment in raw_refresh_limits() before calling raw_probe_alignment(). Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211104113109.56336-1-kwolf@redhat.com> Reviewed-by:
Hanna Reitz <hreitz@redhat.com> Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-13-kwolf@redhat.com> [hreitz: Fix iotest 142 for block sizes greater than 512 by operating on a file with a size of 1 MB] Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211116101431.105252-1-hreitz@redhat.com>
-
Stefan Hajnoczi authored
Reported by Coverity (CID 1465222). Fixes: 4a1d9377 ("softmmu/qdev-monitor: add error handling in qdev_set_id") Cc: Damien Hedde <damien.hedde@greensocs.com> Cc: Kevin Wolf <kwolf@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20211102163342.31162-1-stefanha@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-14-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Richard Henderson authored
Merge tag 'pull-target-arm-20211115-1' of https://git.linaro.org/people/pmaydell/qemu-arm into staging target-arm queue: * Support multiple redistributor regions for TCG GICv3 * Send RTC_CHANGE QMP event from pl031 # gpg: Signature made Mon 15 Nov 2021 07:53:40 PM CET # gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE # gpg: issuer "peter.maydell@linaro.org" # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [full] # gpg: aka "Peter Maydell <pmaydell@gmail.com>" [full] # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [full] * tag 'pull-target-arm-20211115-1' of https://git.linaro.org/people/pmaydell/qemu-arm : hw/rtc/pl031: Send RTC_CHANGE QMP event hw/intc/arm_gicv3: Support multiple redistributor regions hw/intc/arm_gicv3: Set GICR_TYPER.Last correctly when nb_redist_regions > 1 hw/intc/arm_gicv3: Move checking of redist-region-count to arm_gicv3_common_realize Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Kevin Wolf authored
While introducing a non-QemuOpts code path for device creation for JSON -device, we noticed that QMP device_add doesn't check its input correctly (accepting arguments that should have been rejected), and that users may be relying on this behaviour (libvirt did until it was fixed recently). Let's use a deprecation period before we fix this bug in QEMU to avoid nasty surprises for users. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211111143530.18985-1-kwolf@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-12-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
See the comment for why this is necessary. Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211111120829.81329-11-hreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-11-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
In most of the block layer, especially when traversing down from other BlockDriverStates, we assume that BdrvChild.bs can never be NULL. When it becomes NULL, it is expected that the corresponding BdrvChild pointer also becomes NULL and the BdrvChild object is freed. Therefore, once bdrv_replace_child_noperm() sets the BdrvChild.bs pointer to NULL, it should also immediately set the corresponding BdrvChild pointer (like bs->file or bs->backing) to NULL. In that context, it also makes sense for this function to free the child. Sometimes we cannot do so, though, because it is called in a transactional context where the caller might still want to reinstate the child in the abort branch (and free it only on commit), so this behavior has to remain optional. In bdrv_replace_child_tran()'s abort handler, we now rely on the fact that the BdrvChild passed to bdrv_replace_child_tran() must have had a non-NULL .bs pointer initially. Make a note of that and assert it. Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211111120829.81329-10-hreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-10-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
As of a future commit, bdrv_replace_child_noperm() will clear the indirect BdrvChild pointer passed to it if the new child BDS is NULL. bdrv_replace_child_tran() will want to let it do that, but revert this change in its abort handler. For that, we need to have it receive a BdrvChild ** pointer, too, and keep it stored in the BdrvReplaceChildState object that we attach to the transaction. Note that we do not need to store it in the BdrvReplaceChildState when new_bs is not NULL, because then there is nothing to revert. This is important so that bdrv_replace_node_noperm() can pass a pointer to a loop-local variable to bdrv_replace_child_tran() without worrying that this pointer will outlive one loop iteration. (Of course, for that to work, bdrv_replace_node_noperm() and in turn bdrv_replace_node() and its relatives may not be called with a NULL @to node. Luckily, they already are not, but now we should assert this.) bdrv_remove_file_or_backing_child() on the other hand needs to ensure that the indirect pointer it passes will stay valid for the duration of the transaction. Ensure this by keeping a strong reference to the BDS whose &bs->backing or &bs->file it passes to bdrv_replace_child_tran(), and giving up that reference only in the transaction .clean() handler. Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211111120829.81329-9-hreitz@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-9-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
Invoke the transaction drivers' .clean() methods only after all .commit() or .abort() handlers are done. This makes it easier to have nested transactions where the top-level transactions pass objects to lower transactions that the latter can still use throughout their commit/abort phases, while the top-level transaction keeps a reference that is released in its .clean() method. (Before this commit, that is also possible, but the top-level transaction would need to take care to invoke tran_add() before the lower-level transaction does. This commit makes the ordering irrelevant, which is just a bit nicer.) Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211111120829.81329-8-hreitz@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-8-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
As of a future patch, bdrv_replace_child_tran() will take a BdrvChild ** pointer. Prepare for that by getting such a pointer and using it where applicable, and (dereferenced) as a parameter for bdrv_replace_child_tran(). Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211111120829.81329-7-hreitz@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-7-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
bdrv_replace_child_noperm() modifies BdrvChild.bs, and can potentially set it to NULL. That is dangerous, because BDS parents generally assume that their children's .bs pointer is never NULL. We therefore want to let bdrv_replace_child_noperm() set the corresponding BdrvChild pointer to NULL, too. This patch lays the foundation for it by passing a BdrvChild ** pointer to bdrv_replace_child_noperm() so that it can later use it to NULL the BdrvChild pointer immediately after setting BdrvChild.bs to NULL. (We will still need to undertake some intermediate steps, though.) Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Message-Id: <20211111120829.81329-6-hreitz@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-6-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
bdrv_attach_child_common_abort() restores the parent's AioContext. To do so, the child (which was supposed to be attached, but is now detached again by this abort handler) is added to the ignore list for the AioContext changing functions. However, since we modify a BDS's children list in the BdrvChildClass's .attach and .detach handlers, the child is already effectively detached from the parent by this point. We do not need to put it into the ignore list. Use this opportunity to clean up the empty line structure: Keep setting the ignore list, invoking the AioContext function, and freeing the ignore list in blocks separated by empty lines. Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211111120829.81329-5-hreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-5-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
Now that bdrv_remove_empty_child() no longer removes the child from the parent's children list but only checks that it is not in such a list, it is only a wrapper around bdrv_child_free() that checks that the child is empty and unused. That should apply to all children that we free, so put those checks into bdrv_child_free() and drop bdrv_remove_empty_child(). Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211111120829.81329-4-hreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-4-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
The children list is specific to BDS parents. We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has the advantage that a BdrvChild is removed from the children list before its .bs pointer can become NULL. BDS parents generally assume that their children's .bs pointer is never NULL, so this is actually a bug fix. Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211111120829.81329-3-hreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-3-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
Hanna Reitz authored
bdrv_cor_filter_drop() modifies the block graph. That means that other parties can also modify the block graph before it returns. Therefore, we cannot assume that the result of a graph traversal we did before remains valid afterwards. We should thus fetch `base` and `unfiltered_base` afterwards instead of before. Signed-off-by:
Hanna Reitz <hreitz@redhat.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20211111120829.81329-2-hreitz@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211115145409.176785-2-kwolf@redhat.com> Signed-off-by:
Hanna Reitz <hreitz@redhat.com>
-
- Nov 15, 2021
-
-
git://git.kernel.org/pub/scm/virt/kvm/mst/qemuRichard Henderson authored
pci,pc,virtio: bugfixes pci power management fixes acpi hotplug fixes misc other fixes Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 15 Nov 2021 05:15:09 PM CET # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] * tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu : pcie: expire pending delete pcie: fast unplug when slot power is off pcie: factor out pcie_cap_slot_unplug() pcie: add power indicator blink check pcie: implement slot power control for pcie root ports pci: implement power state vdpa: Check for existence of opts.vhostdev vdpa: Replace qemu_open_old by qemu_open at virtio: use virtio accessor to access packed event virtio: use virtio accessor to access packed descriptor flags tests: bios-tables-test update expected blobs hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC bios-tables-test: Allow changes in DSDT ACPI tables hw/acpi/ich9: Add compat prop to keep HPC bit set for 6.1 machine type pcie: rename 'native-hotplug' to 'x-native-hotplug' hw/mem/pc-dimm: Restrict NUMA-specific code to NUMA machines vhost: Fix last vq queue index of devices with no cvq vhost: Rename last_index to vq_index_end softmmu/qdev-monitor: fix use-after-free in qdev_set_id() net/vhost-vdpa: fix memory leak in vhost_vdpa_get_max_queue_pairs() Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Philippe Mathieu-Daudé authored
If the MachineClass::name pointer is not explicitly set, it is NULL. Per the C standard, passing a NULL pointer to printf "%s" format is undefined. Some implementations display it as 'NULL', other as 'null'. Since we are comparing the formatted output, we need a stable value. The easiest is to explicit a machine name string. Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Yanan Wang <wangyanan55@huawei.com> Tested-by:
Yanan Wang <wangyanan55@huawei.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211115145900.2531865-4-philmd@redhat.com>
-
Philippe Mathieu-Daudé authored
smp_machine_class_init() is the actual TypeInfo::class_init(). Declare it as such in smp_machine_info, and avoid to call it manually in each test. Move smp_machine_info definition just before we register the type to avoid a forward declaration. Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Yanan Wang <wangyanan55@huawei.com> Tested-by:
Yanan Wang <wangyanan55@huawei.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211115145900.2531865-3-philmd@redhat.com>
-
Philippe Mathieu-Daudé authored
There is a single MachineClass object, registered with type_register_static(&smp_machine_info). Since the same object is used multiple times (an MachineState object is instantiated in both test_generic and test_with_dies), we should restore its internal state after modifying for the test purpose. Reviewed-by:
Andrew Jones <drjones@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Reviewed-by:
Yanan Wang <wangyanan55@huawei.com> Tested-by:
Yanan Wang <wangyanan55@huawei.com> Signed-off-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20211115145900.2531865-2-philmd@redhat.com>
-