[PATCH v2] hw/sd/sdhci: Set reset value of interrupt registers

2025-02-10 Thread BALATON Zoltan
The interrupt enable registers are not reset to 0 on Freescale eSDHC but some bits are enabled on reset. At least some U-Boot versions seem to expect this and not initialise these registers before expecting interrupts. Use existing vendor property for Freescale eSDHC and set the reset value of the

[PULL 07/25] scripts/qemu-gdb: Support coroutine dumps in coredumps

2025-02-10 Thread Kevin Wolf
From: Peter Xu Dumping coroutines don't yet work with coredumps. Let's make it work. We still kept most of the old code because they can be either more flexible, or prettier. Only add the fallbacks when they stop working. Currently the raw unwind is pretty ugly, but it works, like this: (g

[PULL 15/25] block: Add option to create inactive nodes

2025-02-10 Thread Kevin Wolf
In QEMU, nodes are automatically created inactive while expecting an incoming migration (i.e. RUN_STATE_INMIGRATE). In qemu-storage-daemon, the notion of runstates doesn't exist. It also wouldn't necessarily make sense to introduce it because a single daemon can serve multiple VMs that can be in di

[PULL 06/25] scripts/qemu-gdb: Simplify fs_base fetching for coroutines

2025-02-10 Thread Kevin Wolf
From: Peter Xu There're a bunch of code trying to fetch fs_base in different ways. IIUC the simplest way instead is "$fs_base". It also has the benefit that it'll work for both live gdb session or coredumps. Signed-off-by: Peter Xu Message-ID: <20241212204801.1420528-3-pet...@redhat.com> Revi

[PULL 00/25] Block layer patches

2025-02-10 Thread Kevin Wolf
The following changes since commit d922088eb4ba6bc31a99f17b32cf75e59dd306cd: Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2025-02-03 13:42:02 -0500) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL 03/25] block: Improve blk_get_attached_dev_id() docstring

2025-02-10 Thread Kevin Wolf
From: Philippe Mathieu-Daudé Expose the method docstring in the header, and mention returned value must be free'd by caller. Reported-by: Fabiano Rosas Signed-off-by: Philippe Mathieu-Daudé Message-ID: <2024170333.43833-2-phi...@linaro.org> Signed-off-by: Kevin Wolf --- include/system/bl

[PULL 04/25] block: Fix leak in send_qmp_error_event

2025-02-10 Thread Kevin Wolf
From: Fabiano Rosas ASAN detected a leak when running the ahci-test /ahci/io/dma/lba28/retry: Direct leak of 35 byte(s) in 1 object(s) allocated from: #0 in malloc #1 in __vasprintf_internal #2 in vasprintf #3 in g_vasprintf #4 in g_strdup_vprintf #5 in g_strdup_printf

[PULL 18/25] block/export: Don't ignore image activation error in blk_exp_add()

2025-02-10 Thread Kevin Wolf
Currently, block exports can't handle inactive images correctly. Incoming write requests would run into assertion failures. Make sure that we return an error when creating an export can't activate the image. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Reviewed-by:

[PULL 02/25] vpc: Read images exported from Azure correctly

2025-02-10 Thread Kevin Wolf
From: Vitaly Kuznetsov It was found that 'qemu-nbd' is not able to work with some disk images exported from Azure. Looking at the 512b footer (which contains VPC metadata): 63 6f 6e 65 63 74 69 78 00 00 00 02 00 01 00 00 |conectix| 0010 ff ff ff ff ff ff ff ff 2e c7 9b

[PULL 25/25] block: remove unused BLOCK_OP_TYPE_DATAPLANE

2025-02-10 Thread Kevin Wolf
From: Stefan Hajnoczi BLOCK_OP_TYPE_DATAPLANE prevents BlockDriverState from being used by virtio-blk/virtio-scsi with IOThread. Commit b112a65c52aa ("block: declare blockjobs and dataplane friends!") eliminated the main reason for this blocker in 2014. Nowadays the block layer supports I/O from

[PULL 13/25] block: Don't attach inactive child to active node

2025-02-10 Thread Kevin Wolf
An active node makes unrestricted use of its children and would possibly run into assertion failures when it operates on an inactive child node. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-ID: <20250204211407.381505-6-kw...@red

[PULL 08/25] block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'

2025-02-10 Thread Kevin Wolf
From: Peter Krempa Commit 7452162adec25c10 introduced 'qom-path' argument to BLOCK_IO_ERROR event but when the event is instantiated in 'send_qmp_error_event()' the arguments for 'device' and 'qom_path' in qapi_event_send_block_io_error() were reversed : Generated code for sending event: void

[PULL 14/25] block: Fix crash on block_resize on inactive node

2025-02-10 Thread Kevin Wolf
In order for block_resize to fail gracefully on an inactive node instead of crashing with an assertion failure in bdrv_co_write_req_prepare() (called from bdrv_co_truncate()), we need to check for inactive nodes also when they are attached as a root node and make sure that BLK_PERM_RESIZE isn't amo

[PULL 19/25] block: Drain nodes before inactivating them

2025-02-10 Thread Kevin Wolf
So far the assumption has always been that if we try to inactivate a node, it is already idle. This doesn't hold true any more if we allow inactivating exported nodes because we can't know when new external requests come in. Drain the node around setting BDRV_O_INACTIVE so that requests can't star

[PULL 17/25] block: Support inactive nodes in blk_insert_bs()

2025-02-10 Thread Kevin Wolf
Device models have a relatively complex way to set up their block backends, in which blk_attach_dev() sets blk->disable_perm = true. We want to support inactive images in exports, too, so that qemu-storage-daemon can be used with migration. Because they don't use blk_attach_dev(), they need another

[PULL 05/25] scripts/qemu-gdb: Always do full stack dump for python errors

2025-02-10 Thread Kevin Wolf
From: Peter Xu It's easier for either debugging plugin errors, or issue reports. Signed-off-by: Peter Xu Message-ID: <20241212204801.1420528-2-pet...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- scripts/qemu-gdb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sc

[PULL 21/25] nbd/server: Support inactive nodes

2025-02-10 Thread Kevin Wolf
In order to support running an NBD export on inactive nodes, we must make sure to return errors for any operations that aren't allowed on inactive nodes. Reads are the only operation we know we need for inactive images, so to err on the side of caution, return errors for everything else, even if so

[PULL 09/25] block: Add 'active' field to BlockDeviceInfo

2025-02-10 Thread Kevin Wolf
This allows querying from QMP (and also HMP) whether an image is currently active or inactive (in the sense of BDRV_O_INACTIVE). Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Reviewed-by: Stefan Hajnoczi Message-ID: <20250204211407.381505-2-kw...@redhat.com> Signed-

[PULL 24/25] iotests: Add (NBD-based) tests for inactive nodes

2025-02-10 Thread Kevin Wolf
This tests different types of operations on inactive block nodes (including graph changes, block jobs and NBD exports) to make sure that users manually activating and inactivating nodes doesn't break things. Support for inactive nodes in other export types will have to come with separate test case

[PULL 12/25] migration/block-active: Remove global active flag

2025-02-10 Thread Kevin Wolf
Block devices have an individual active state, a single global flag can't cover this correctly. This becomes more important as we allow users to manually manage which nodes are active or inactive. Now that it's allowed to call bdrv_inactivate_all() even when some nodes are already inactive, we can

[PULL 10/25] block: Allow inactivating already inactive nodes

2025-02-10 Thread Kevin Wolf
What we wanted to catch with the assertion is cases where the recursion finds that a child was inactive before its parent. This should never happen. But if the user tries to inactivate an image that is already inactive, that's harmless and we don't want to fail the assertion. Signed-off-by: Kevin

[PULL 11/25] block: Inactivate external snapshot overlays when necessary

2025-02-10 Thread Kevin Wolf
Putting an active block node on top of an inactive one is strictly speaking an invalid configuration and the next patch will turn it into a hard error. However, taking a snapshot while disk images are inactive after completing migration has an important use case: After migrating to a file, taking

[PULL 22/25] iotests: Add filter_qtest()

2025-02-10 Thread Kevin Wolf
The open-coded form of this filter has been copied into enough tests that it's better to move it into iotests.py. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Message-ID: <20250204211407.381505-15-kw...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin

[PULL 20/25] block/export: Add option to allow export of inactive nodes

2025-02-10 Thread Kevin Wolf
Add an option in BlockExportOptions to allow creating an export on an inactive node without activating the node. This mode needs to be explicitly supported by the export type (so that it doesn't perform any operations that are forbidden for inactive nodes), so this patch alone doesn't allow this op

[PULL 01/25] vpc: Split off vpc_ignore_current_size() helper

2025-02-10 Thread Kevin Wolf
From: Vitaly Kuznetsov In preparation to making changes to the logic deciding whether CHS or 'current_size' need to be used in determining the image size, split off vpc_ignore_current_size() helper. No functional change intended. Signed-off-by: Vitaly Kuznetsov Message-ID: <20241212134504.1983

[PULL 16/25] block: Add blockdev-set-active QMP command

2025-02-10 Thread Kevin Wolf
The system emulator tries to automatically activate and inactivate block nodes at the right point during migration. However, there are still cases where it's necessary that the user can do this manually. Images are only activated on the destination VM of a migration when the VM is actually resumed

[PULL 23/25] iotests: Add qsd-migrate case

2025-02-10 Thread Kevin Wolf
Test that it's possible to migrate a VM that uses an image on shared storage through qemu-storage-daemon. Signed-off-by: Kevin Wolf Acked-by: Fabiano Rosas Reviewed-by: Eric Blake Message-ID: <20250204211407.381505-16-kw...@redhat.com> Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --

Re: [PATCH] block: Remove unused blk_op_is_blocked()

2025-02-10 Thread Philippe Mathieu-Daudé
On 6/2/25 21:44, Kevin Wolf wrote: Am 06.02.2025 um 18:25 hat Philippe Mathieu-Daudé geschrieben: On 6/2/25 17:53, Kevin Wolf wrote: Commit fc4e394b28 removed the last caller of blk_op_is_blocked(). Remove the now unused function. fatal: ambiguous argument 'fc4e394b28': unknown revision or pa

Re: [PATCH 2/2] nbd/server: Allow users to adjust handshake limit in QMP

2025-02-10 Thread Eric Blake
On Thu, Feb 06, 2025 at 10:20:09AM +0300, Vladimir Sementsov-Ogievskiy wrote: > > --- > > qapi/block-export.json | 10 ++ > > include/block/nbd.h| 6 +++--- > > [..] > > > @@ -52,6 +57,10 @@ > > # > > # @addr: Address on which to listen. > > # > > +# @handshak

Re: [PULL 00/25] Block layer patches

2025-02-10 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.0 for any user-visible changes. signature.asc Description: PGP signature