- 06 6月, 2019 15 次提交
-
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NLaurent Vivier <laurent@vivier.eu> Message-Id: <20190528164020.32250-3-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Message-Id: <20190528164020.32250-6-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script (with a bit of manual fix-up, removing an extra space to please checkpatch.pl): // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>. Message-Id: <20190528164020.32250-7-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Acked-by: NAlex Williamson <alex.williamson@redhat.com> Message-Id: <20190528164020.32250-10-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NGerd Hoffmann <kraxel@redhat.com> Message-Id: <20190528164020.32250-9-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a DeviceState with "s->qdev", use the QOM prefered style: "DEVICE(s)". This patch was generated using the following Coccinelle script: // Use DEVICE() macros to access DeviceState.qdev @use_device_macro_to_access_qdev@ expression obj; identifier dev; @@ -&obj->dev.qdev +DEVICE(obj) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <20190528164020.32250-8-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NCornelia Huck <cohuck@redhat.com> Message-Id: <20190528164020.32250-5-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Rather than looking inside the definition of a BusState with "s->bus.qbus", use the QOM prefered style: "BUS(&s->bus)". This patch was generated using the following Coccinelle script: // Use BUS() macros to access BusState.qbus @use_bus_macro_to_access_qbus@ expression obj; identifier bus; @@ -&obj->bus.qbus +BUS(&obj->bus) Suggested-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NMarcel Apfelbaum <marcel.apfelbaum@gmail.com> Message-Id: <20190528164020.32250-4-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
Since the BusState is accesible from the SCSIBus object, it is pointless to use qbus_reset_all_fn. Use qbus_reset_all() directly. Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: NDmitry Fleytman <dmitry.fleytman@gmail.com> Message-Id: <20190528164020.32250-2-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Philippe Mathieu-Daudé 提交于
The default-configs/ example added in 717171bd is no more accurate since fa212a2b (and various further other commits). The Kconfig build system is now in place. Use the aarch64-softmmu config as example. Reviewed-by: NThomas Huth <thuth@redhat.com> Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190529140504.21580-1-philmd@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Markus Armbruster 提交于
Fix a fat-fingered invocation of tap-merge.pl in the recipe of target check-report.tap. Fixes: 9df43317 "test: replace gtester with a TAP driver" Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Tested-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190604080010.23186-1-armbru@redhat.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Richard Henderson 提交于
Explicitly ignore the return value of qemu_guest_getrandom. Because we use error_fatal, all errors are already caught. Fixes: CID 1401701 Signed-off-by: NRichard Henderson <richard.henderson@linaro.org> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20190530173824.30699-1-richard.henderson@linaro.org> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Jie Wang 提交于
fix incorrect print type in vhost_virtqueue_stop Signed-off-by: NJie Wang <wangjie88@huawei.com> Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <1556605773-42019-1-git-send-email-wangjie88@huawei.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Li Qiang 提交于
'postocpy' should be 'postcopy'. CC: qemu-trivial@nongnu.org Signed-off-by: NLi Qiang <liq3ea@163.com> Reviewed-by: NAlex Bennée <alex.bennee@linaro.org> Reviewed-by: NJuan Quintela <quintela@redhat.com> Message-Id: <20190525062832.18009-1-liq3ea@163.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
由 Yuval Shaia 提交于
This is a trivial cleanup patch. Signed-off-by: NYuval Shaia <yuval.shaia@oracle.com> Reviewed-by: NKamal Heib <kheib@redhat.com> Message-Id: <20190505105112.22691-1-yuval.shaia@oracle.com> Signed-off-by: NLaurent Vivier <laurent@vivier.eu>
-
- 05 6月, 2019 1 次提交
-
-
由 Peter Maydell 提交于
Block layer patches: - block: AioContext management, part 2 - Avoid recursive block_status call (i.e. lseek() calls) if possible - linux-aio: Drop unused BlockAIOCB submission method - nvme: add Get/Set Feature Timestamp support - Fix crash on commit job start with active I/O on base node - Fix crash in bdrv_drained_end - Fix integer overflow in qcow2 discard # gpg: Signature made Tue 04 Jun 2019 16:20:02 BST # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: (29 commits) iotests: Fix duplicated diff output on failure iotests: test big qcow2 shrink block/io: bdrv_pdiscard: support int64_t bytes parameter block/qcow2-refcount: add trace-point to qcow2_process_discards block: Remove bdrv_set_aio_context() test-bdrv-drain: Use bdrv_try_set_aio_context() iotests: Attach new devices to node in non-default iothread virtio-scsi-test: Test attaching new overlay with iothreads block: Remove wrong bdrv_set_aio_context() calls blockdev: Use bdrv_try_set_aio_context() for monitor commands block: Move node without parents to main AioContext test-block-iothread: BlockBackend AioContext across root node change test-block-iothread: Test adding parent to iothread node block: Adjust AioContexts when attaching nodes scsi-disk: Use qdev_prop_drive_iothread block: Add qdev_prop_drive_iothread property type block: Add BlockBackend.ctx block: Add Error to blk_set_aio_context() nbd-server: Call blk_set_allow_aio_context_change() test-block-iothread: Check filter node in test_propagate_mirror ... Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
- 04 6月, 2019 24 次提交
-
-
由 Kevin Wolf 提交于
Commit 70ff5b07 wanted to move the diff between actual and reference output to the end after printing the test result line. It really only copied it, though, so the diff is now displayed twice. Remove the old one. Fixes: 70ff5b07Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
This test checks bug in qcow2_process_discards, fixed by previous commit. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
This fixes at least one overflow in qcow2_process_discards, which passes 64bit region length to bdrv_pdiscard where bytes (or sectors in the past) parameter is int since its introduction in 0b919fae. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
Let's at least trace ignored failure. Signed-off-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: NEric Blake <eblake@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
All callers of bdrv_set_aio_context() are eliminated now, they have moved to bdrv_try_set_aio_context() and related safe functions. Remove bdrv_set_aio_context(). With this, we can now know that the .set_aio_ctx callback must be present in bdrv_set_aio_context_ignore() because bdrv_can_set_aio_context() would have returned false previously, so instead of checking the condition, we can assert it. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
No reason to use the unchecked version in tests, even more so when these are the last callers of bdrv_set_aio_context() outside of block.c. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
This tests that devices refuse to be attached to a node that has already been moved to a different iothread if they can't be or aren't configured to work in the same iothread. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
This tests that blockdev-add can correctly add a qcow2 overlay to an image used by a virtio-scsi disk in an iothread. The interesting point here is whether the newly added node gets correctly moved into the iothread AioContext. If it isn't, we get an assertion failure in virtio-scsi while processing the next request: virtio_scsi_ctx_check: Assertion `blk_get_aio_context(d->conf.blk) == s->ctx' failed. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
The mirror and commit block jobs use bdrv_set_aio_context() to move their filter node into the right AioContext before hooking it up in the graph. Similarly, bdrv_open_backing_file() explicitly moves the backing file node into the right AioContext first. This isn't necessary any more, they get automatically moved into the right context now when attaching them. However, in the case of bdrv_open_backing_file() with a node reference, it's actually not only unnecessary, but even wrong: The unchecked bdrv_set_aio_context() changes the AioContext of the child node even if other parents require it to retain the old context. So this is not only a simplification, but a bug fix, too. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1684342Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Monitor commands can handle errors, so they can easily be converted to using the safer bdrv_try_set_aio_context() function. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
A node should only be in a non-default AioContext if a user is attached to it that requires this. When the last parent of a node is gone, it can move back to the main AioContext. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Test that BlockBackends preserve their assigned AioContext even when the root node goes away. Inserting a new root node will move it to the right AioContext. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Opening a new parent node for a node that has already been moved into a different AioContext must cause the new parent to move into the same context. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
So far, we only made sure that updating the AioContext of a node affected the whole subtree. However, if a node is newly attached to a new parent, we also need to make sure that both the subtree of the node and the parent are in the same AioContext. This tries to move the new child node to the parent AioContext and returns an error if this isn't possible. BlockBackends now actually apply their AioContext to their root node. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
This makes use of qdev_prop_drive_iothread for scsi-disk so that the disk can be attached to a node that is already in the target AioContext. We need to check that the HBA actually supports iothreads, otherwise scsi-disk must make sure that the node is already in the main AioContext. This changes the error message for conflicting iothread settings. Previously, virtio-scsi produced the error message, now it comes from blk_set_aio_context(). Update a test case accordingly. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Some qdev block devices have support for iothreads and take care of the AioContext they are running in, but most devices don't know about any of this. For the latter category, the qdev drive property must make sure that their BlockBackend is in the main AioContext. Unfortunately, while the current code just does the same thing for devices that do support iothreads, this is not correct and it would show as soon as we actually try to keep a consistent AioContext assignment across all nodes and users of a block graph subtree: If a node is already in a non-default AioContext because of one of its users, attaching a new device should still be possible if that device can work in the same AioContext. Switching the node back to the main context first and only then into the device AioContext causes failure (because the existing user wouldn't allow the switch to the main context). So devices that support iothreads need a different kind of drive property that leaves the node in its current AioContext, but by using this type, the device promises to check later that it can work with this context. This patch adds the qdev infrastructure that allows devices to signal that they handle iothreads and qdev should leave the AioContext alone. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
This adds a new parameter to blk_new() which requires its callers to declare from which AioContext this BlockBackend is going to be used (or the locks of which AioContext need to be taken anyway). The given context is only stored and kept up to date when changing AioContexts. Actually applying the stored AioContext to the root node is saved for another commit. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Add an Error parameter to blk_set_aio_context() and use bdrv_child_try_set_aio_context() internally to check whether all involved nodes can actually support the AioContext switch. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
The NBD server uses an AioContext notifier, so it can tolerate that its BlockBackend is switched to a different AioContext. Before we start actually calling bdrv_try_set_aio_context(), which checks for consistency, outside of test cases, we need to make sure that the NBD server actually allows this. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kevin Wolf 提交于
Just make the test cover the AioContext of the filter node as well. Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NEric Blake <eblake@redhat.com>
-
由 Kenneth Heitke 提交于
Signed-off-by: NKenneth Heitke <kenneth.heitke@intel.com> Reviewed-by: NKlaus Birkelund Jensen <klaus.jensen@cnexlabs.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Julia Suvorova 提交于
Callback-based laio_submit() and laio_cancel() were left after rewriting Linux AIO backend to coroutines in hope that they would be used in other code that could bypass coroutines. They can be safely removed because they have not been used since that time. Signed-off-by: NJulia Suvorova <jusual@mail.ru> Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
This patch adds a test where we cancel a throttled mirror job and immediately close the VM before it can be cancelled. Doing so will invoke bdrv_drain_all() while the mirror job tries to drain the throttled node. When bdrv_drain_all_end() tries to lift its drain on the throttle node, the job will exit and replace the current root node of the BB drive0 (which is the job's filter node) by the throttle node. Before the previous patch, this replacement did not increase drive0's quiesce_counter by a sufficient amount, so when bdrv_parent_drained_end() (invoked by bdrv_do_drained_end(), invoked by bdrv_drain_all_end()) tried to end the drain on all of the throttle node's parents, it decreased drive0's quiesce_counter below 0 -- which fails an assertion. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Max Reitz 提交于
When ending a drained section, bdrv_do_drained_end() currently first decrements the quiesce_counter, and only then actually ends the drain. The bdrv_drain_invoke(bs, false) call may cause graph changes. Say the graph change involves replacing an existing BB's ("blk") BDS (blk_bs(blk)) by @bs. Let us introducing the following values: - bs_oqc = old_quiesce_counter (so bs->quiesce_counter == bs_oqc - 1) - obs_qc = blk_bs(blk)->quiesce_counter (before bdrv_drain_invoke()) Let us assume there is no blk_pread_unthrottled() involved, so blk->quiesce_counter == obs_qc (before bdrv_drain_invoke()). Now replacing blk_bs(blk) by @bs will reduce blk->quiesce_counter by obs_qc (making it 0) and increase it by bs_oqc-1 (making it bs_oqc-1). bdrv_drain_invoke() returns and we invoke bdrv_parent_drained_end(). This will decrement blk->quiesce_counter by one, so it would be -1 -- were there not an assertion against that in blk_root_drained_end(). We therefore have to keep the quiesce_counter up at least until bdrv_drain_invoke() returns, so that bdrv_parent_drained_end() does the right thing for the parents @bs got during bdrv_drain_invoke(). But let us delay it even further, namely until bdrv_parent_drained_end() returns, because then it mirrors bdrv_do_drained_begin(): There, we first increment the quiesce_counter, then begin draining the parents, and then call bdrv_drain_invoke(). It makes sense to let bdrv_do_drained_end() unravel this exactly in reverse. Signed-off-by: NMax Reitz <mreitz@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-