Re: [PATCH v5 00/13] Instantiate VT82xx functions in host device

2022-10-27 Thread Philippe Mathieu-Daudé
Hi Daniel, Bernhard, On 27/10/22 11:47, Daniel Henrique Barboza wrote: On 10/27/22 05:21, Bernhard Beschow wrote: Am 16. September 2022 14:36:05 UTC schrieb "Philippe Mathieu-Daudé" : On 12/9/22 21:50, Bernhard Beschow wrote: Am 1. September 2022 11:41:14 UTC schrieb Bernhard Beschow :

Re: [PATCH v4 6/7] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-10-27 Thread Philippe Mathieu-Daudé
Hi Bernhard, On 18/10/22 23:01, Bernhard Beschow wrote: Will allow e500 boards to access SD cards using just their own devices. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 120 +- include/hw/sd/sdhci.h | 3 ++ 2 files changed, 122

Re: [PATCH v4 5/7] hw/ppc/e500: Implement pflash handling

2022-10-27 Thread Philippe Mathieu-Daudé
On 18/10/22 23:01, Bernhard Beschow wrote: Allows e500 boards to have their root file system reside on flash using only builtin devices located in the eLBC memory region. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the

Re: [PATCH v4 7/7] hw/ppc/e500: Add Freescale eSDHC to e500plat

2022-10-27 Thread Philippe Mathieu-Daudé
On 18/10/22 23:01, Bernhard Beschow wrote: Adds missing functionality to e500plat machine which increases the chance of given "real" firmware images to access SD cards. Signed-off-by: Bernhard Beschow --- docs/system/ppc/ppce500.rst | 12 hw/ppc/Kconfig | 1 +

Re: [PATCH v2 09/43] hw/usb/hcd-uhci: Introduce TYPE_ defines for device models

2022-10-27 Thread Philippe Mathieu-Daudé
On 22/10/22 17:04, Bernhard Beschow wrote: Suggested-by: Mark Cave-Ayland Signed-off-by: Bernhard Beschow --- hw/i386/pc_piix.c | 3 ++- hw/i386/pc_q35.c | 13 +++-- hw/isa/piix4.c| 2 +- hw/usb/hcd-uhci.c | 16 hw/usb/hcd-uhci.h | 9 + 5 files

Re: [PATCH v3 1/2] hw/nvme: Support for Namespaces Management from guest OS - create-ns

2022-10-27 Thread Keith Busch
On Thu, Oct 27, 2022 at 01:00:45PM -0500, Jonathan Derrick wrote: > +Parameters: > + > +``auto-ns-path=`` > + If specified indicates a support for dynamic management of nvme namespaces > + by means of nvme create-ns command. This path points > + to the storage area for backend images must

Re: [PATCH v4 01/17] hw/vfio/pci: Ensure MSI and MSI-X do not overlap

2022-10-27 Thread Alex Williamson
On Thu, 27 Oct 2022 15:36:49 +0900 Akihiko Odaki wrote: > vfio_add_std_cap() is designed to ensure that capabilities do not > overlap, but it failed to do so for MSI and MSI-X capabilities. > > Ensure MSI and MSI-X capabilities do not overlap with others by omitting > other overlapping

[PULL 56/58] vmdk: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-24-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vmdk.c | 54 ++-- 1 file changed, 27

[PULL 33/58] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Kevin Wolf
From: Bin Meng libnfs.h declares nfs_fstat() as the following for win32: int nfs_fstat(struct nfs_context *nfs, struct nfsfh *nfsfh, struct __stat64 *st); The 'st' parameter should be of type 'struct __stat64'. The codes happen to build successfully for 64-bit Windows, but it

[PULL 52/58] qcow2: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-20-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c | 8 block/qcow2-refcount.c | 10 +- block/qcow2-snapshot.c

[PULL 04/58] vvfat: allow some writes to bootsector

2022-10-27 Thread Kevin Wolf
From: Hervé Poussineau 'reserved1' field in bootsector is used to mark volume dirty, or need to verify. Allow writes to bootsector which only changes the 'reserved1' field. This fixes I/O errors on Windows guests. Resolves: https://bugs.launchpad.net/qemu/+bug/1889421 Signed-off-by: Hervé

[PULL 23/58] block.c: assert bs->aio_context is written under BQL and drains

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Also here ->aio_context is read by I/O threads and written under BQL. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Reviewed-by: Hanna Reitz Message-Id: <20221025084952.2139888-2-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- block.c

[PULL 39/58] coroutine-lock: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The functions are marked coroutine_fn in the definition. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-7-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/qemu/coroutine.h | 10 +- 1

[PULL 14/58] block: document connection between child roles and bs->backing/bs->file

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Make the informal rules formal. In further commit we'll add corresponding assertions. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id: <20220726201134.924743-8-vsement...@yandex-team.ru> Reviewed-by: Kevin Wolf Signed-off-by:

[PULL 16/58] Revert "block: Let replace_child_noperm free children"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We are going to reimplement this behavior (clear bs->file / bs->backing pointers automatically when child->bs is cleared) in a nicer way, see further commit "block: Manipulate bs->file / bs->backing pointers in .attach/.detach". With this revert we bring back

[PULL 46/58] vmdk: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini The validity of these was double-checked with Alberto Faria's static analyzer. Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-14-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vmdk.c | 34

[PULL 41/58] block: add missing coroutine_fn annotation to BlockDriverState callbacks

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-9-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.h| 14 +++--- include/block/block_int-common.h | 12

[PULL 50/58] parallels: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-18-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/parallels.c | 28 ++-- 1 file changed, 14 insertions(+), 14

[PULL 35/58] block: remove incorrect coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-3-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/io.c

[PULL 53/58] qed: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-21-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qed-table.c | 2 +- block/qed.c | 12 ++-- 2 files changed, 7 insertions(+), 7

[PULL 48/58] block: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-16-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block.c| 2 +- block/io.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[PULL 09/58] block: introduce bdrv_open_file_child() helper

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Almost all drivers call bdrv_open_child() similarly. Let's create a helper for this. The only not updated drivers that call bdrv_open_child() to set bs->file are raw-format and snapshot-access: raw-format sometimes want to have filtered child but

[PULL 54/58] vdi: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-22-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vdi.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PULL 26/58] blockjob: implement .change_aio_ctx in child_job

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito child_job_change_aio_ctx() is very similar to child_job_can_set_aio_ctx(), but it implements a new transaction so that if all check pass, the new transaction's .commit() will take care of changin the BlockJob AioContext. child_job_set_aio_ctx_commit() is similar

[PULL 57/58] monitor: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-25-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c

[PULL 21/58] block/snapshot: drop indirection around bdrv_snapshot_fallback_ptr

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Now the indirection is not actually used, we can safely reduce it to simple pointer. For consistency do a bit of refactoring to get rid of _ptr suffixes that become meaningless. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id:

[PULL 38/58] block: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The functions are marked coroutine_fn in the definition. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-6-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block-io.h | 5 +++-- 1 file

[PULL 31/58] block: rename bdrv_child_try_change_aio_context in bdrv_try_change_aio_context

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito No functional changes intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-10-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- include/block/block-global-state.h | 4 ++-- block.c

[PULL 29/58] block: use the new _change_ API instead of _can_set_ and _set_

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Replace all direct usage of ->can_set_aio_ctx and ->set_aio_ctx, and call bdrv_child_try_change_aio_context() in bdrv_try_set_aio_context(), the main function called through the whole block layer. >From this point onwards, ->can_set_aio_ctx and ->set_aio_ctx

[PULL 58/58] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE but can be invoked from iothreads when handling scsi requests. This triggers an assertion failure: 0x7fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6 0x7fd6c34ff537 in abort ()

[PULL 24/58] block: use transactions as a replacement of ->{can_}set_aio_context()

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Simplify the way the aiocontext can be changed in a BDS graph. There are currently two problems in bdrv_try_set_aio_context: - There is a confusion of AioContext locks taken and released, because we assume that old aiocontext is always taken and new one is

[PULL 55/58] vhdx: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-23-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vhdx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PULL 25/58] bdrv_change_aio_context: use hash table instead of list of visited nodes

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Minor performance improvement, but given that we have hash tables available, avoid iterating in the visited nodes list every time just to check if a node has been already visited. The data structure is not actually a proper hash map, but an hash set, as we are

[PULL 11/58] test-bdrv-graph-mod: update test_parallel_perm_update test case

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy test_parallel_perm_update() does two things that we are going to restrict in the near future: 1. It updates bs->file field by hand. bs->file will be managed automatically by generic code (together with bs->children list). Let's better refactor our

[PULL 36/58] monitor: add missing coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria hmp_block_resize and hmp_screendump are defined as a ".coroutine = true" command, so they must be coroutine_fn. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-4-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by:

[PULL 49/58] mirror: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-17-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PULL 07/58] vhost-user-blk: fix the resize crash

2022-10-27 Thread Kevin Wolf
From: Li Feng If the os is not installed and doesn't have the virtio guest driver, the vhost dev isn't started, so the dev->vdev is NULL. Reproduce: mount a Win 2019 iso, go into the install ui, then resize the virtio-blk device, qemu crash. Signed-off-by: Li Feng Message-Id:

[PULL 47/58] commit: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-15-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/commit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/commit.c

[PULL 34/58] backup: remove incorrect coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria The .set_speed callback is not called from coroutine. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-2-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/backup.c | 2 +- 1 file changed, 1

[PULL 37/58] ssh: add missing coroutine_fn annotation

2022-10-27 Thread Kevin Wolf
From: Alberto Faria ssh_write is only called from ssh_co_writev. Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-5-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/ssh.c | 6 +++--- 1 file changed, 3

[PULL 06/58] block/io_uring: revert "Use io_uring_register_ring_fd() to skip fd operations"

2022-10-27 Thread Kevin Wolf
From: Sam Li Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1193 The commit "Use io_uring_register_ring_fd() to skip fd operations" broke when booting a guest with iothread and io_uring. That is because the io_uring_register_ring_fd() call is made from the main thread instead of

[PULL 45/58] qcow2: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini The validity of these was double-checked with Alberto Faria's static analyzer. Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-13-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.h | 18 +-

[PULL 01/58] MAINTAINERS: Fold "Block QAPI, monitor, ..." into "Block layer core"

2022-10-27 Thread Kevin Wolf
From: Markus Armbruster Section "Block QAPI, monitor, command line" is about the external interfaces we provide for block devices. It covers the relevant QAPI schema parts, monitor and command line code, more or less. The section's files are also covered by section "Block layer core", except

[PULL 15/58] block/snapshot: stress that we fallback to primary child

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Actually what we chose is a primary child. Let's stress it in the code. We are going to drop indirect pointer logic here in future. Actually this commit simplifies the future work: we drop use of indirection in the assertion now. Signed-off-by: Vladimir

[PATCH v4 13/30] block/vvfat: Unify the mkdir() call

2022-10-27 Thread Alex Bennée
From: Bin Meng There is a difference in the mkdir() call for win32 and non-win32 platforms, and currently is handled in the codes with #ifdefs. glib provides a portable g_mkdir() API and we can use it to unify the codes without #ifdefs. Signed-off-by: Bin Meng Reviewed-by: Marc-André Lureau

[PULL 51/58] qcow: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-19-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow.c | 45 +++-- 1 file changed, 23 insertions(+),

[PULL 08/58] block: BlockDriver: add .filtered_child_is_backing field

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Unfortunately not all filters use .file child as filtered child. Two exclusions are mirror_top and commit_top. Happily they both are private filters. Bad thing is that this inconsistency is observable through qmp commands query-block / query-named-block-nodes.

[PULL 43/58] blkdebug: add missing coroutine_fn annotation for indirect-called functions

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-11-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/blkdebug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index

[PULL 40/58] coroutine-io: add missing coroutine_fn annotation to prototypes

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-8-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/qemu/coroutine.h | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

[PULL 32/58] block: remove bdrv_try_set_aio_context and replace it with bdrv_try_change_aio_context

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-11-eespo...@redhat.com> Signed-off-by: Kevin Wolf --- docs/devel/multiple-iothreads.txt | 4 ++--

[PULL 19/58] Revert "block: Pass BdrvChild ** to replace_child_noperm"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit be64bbb0149748f3999c49b13976aafb8330ea86. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 42/58] qcow2: add coroutine_fn annotation for indirect-called functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-10-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/qcow2.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PULL 44/58] qcow: manually add more coroutine_fn annotations

2022-10-27 Thread Kevin Wolf
From: Paolo Bonzini get_cluster_offset() and decompress_cluster() are only called from the read and write paths. The validity of these was double-checked with Alberto Faria's static analyzer. Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-12-pbonz...@redhat.com> Reviewed-by:

[PULL 30/58] block: remove all unused ->can_set_aio_ctx and ->set_aio_ctx callbacks

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Together with all _can_set_ and _set_ APIs, as they are not needed anymore. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Kevin Wolf Message-Id: <20221025084952.2139888-9-eespo...@redhat.com> Signed-off-by: Kevin Wolf ---

[PULL 12/58] tests-bdrv-drain: bdrv_replace_test driver: declare supports_backing

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We do add COW child to the node. In future we are going to forbid adding COW child to the node that doesn't support backing. So, fix it here now. Don't worry about setting bs->backing itself: in further commit we'll update the block-layer to automatically

[PULL 13/58] test-bdrv-graph-mod: fix filters to be filters

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy bdrv_pass_through is used as filter, even all node variables has corresponding names. We want to append it, so it should be backing-child-based filter like mirror_top. So, in test_update_perm_tree, first child should be DATA, as we don't want filters with two

[PULL 05/58] vvfat: allow spaces in file names

2022-10-27 Thread Kevin Wolf
From: Hervé Poussineau In R/W mode, files with spaces were never created on host side. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1176 Fixes: c79e243ed67683d6d06692bd7040f7394da178b0 Signed-off-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf

[PULL 20/58] block: Manipulate bs->file / bs->backing pointers in .attach/.detach

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy bs->file and bs->backing are a kind of duplication of part of bs->children. But very useful diplication, so let's not drop them at all:) We should manage bs->file and bs->backing in same place, where we manage bs->children, to keep them in sync. Moreover,

[PULL 27/58] block: implement .change_aio_ctx in child_of_bds

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_child_cb_change_aio_ctx() is identical to bdrv_child_cb_can_set_aio_ctx(), as we only need to recursively go on the parent bs. Note: bdrv_child_try_change_aio_context() is not called by anyone at this point. Signed-off-by: Emanuele Giuseppe Esposito

[PULL 22/58] block: refactor bdrv_remove_file_or_backing_child to bdrv_remove_child

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Now the function can remove any child, so give it more common name. Drop assertions and drop bs argument which becomes unused. Function would be reused in a further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id:

[PULL 28/58] block-backend: implement .change_aio_ctx in child_root

2022-10-27 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito blk_root_change_aio_ctx() is very similar to blk_root_can_set_aio_ctx(), but implements a new transaction so that if all check pass, the new transaction's .commit will take care of changing the BlockBackend AioContext. blk_root_set_aio_ctx_commit() is the same as

[PULL 18/58] Revert "block: Restructure remove_file_or_backing_child()"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 562bda8bb41879eeda0bd484dd3d55134579b28e. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 00/58] Block layer patches

2022-10-27 Thread Kevin Wolf
The following changes since commit 344744e148e6e865f5a57e745b02a87e5ea534ad: Merge tag 'dump-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2022-10-26 10:53:49 -0400) are available in the Git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[PULL 17/58] Revert "block: Let replace_child_tran keep indirect pointer"

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy That's a preparation to previously reverted "block: Let replace_child_noperm free children". Drop it too, we don't need it for a new approach. This reverts commit 82b54cf51656bf3cd5ed1ac549e8a1085a0e3290. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PULL 03/58] block: Refactor get_tmp_filename()

2022-10-27 Thread Kevin Wolf
From: Bin Meng At present there are two callers of get_tmp_filename() and they are inconsistent. One does: /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ char *tmp_filename = g_malloc0(PATH_MAX + 1); ... ret = get_tmp_filename(tmp_filename, PATH_MAX + 1);

[PULL 02/58] block: Ignore close() failure in get_tmp_filename()

2022-10-27 Thread Kevin Wolf
From: Bin Meng The temporary file has been created and is ready for use. Checking return value of close() does not seem useful. The file descriptor is almost certainly closed; see close(2) under "Dealing with error returns from close()". Let's simply ignore close() failure here. Suggested-by:

[PULL 10/58] block/blklogwrites: don't care to remove bs->file child on failure

2022-10-27 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy We don't need to remove bs->file, generic layer takes care of it. No other driver cares to remove bs->file on failure by hand. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz Message-Id:

Re: [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Kevin Wolf
Am 27.10.2022 um 09:27 hat Emanuele Giuseppe Esposito geschrieben: > blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE > but can be invoked from iothreads when handling scsi requests. > This triggers an assertion failure: > > 0x7fd6c3515ce1 in raise () from

[PATCH v3 2/2] hw/nvme: Support for Namespaces Management from guest OS - delete-ns

2022-10-27 Thread Jonathan Derrick
From: Michael Kropaczek Added support for NVMEe NameSpaces Mangement allowing the guest OS to delete namespaces by issuing nvme delete-ns command. It is an extension to currently implemented Qemu nvme virtual device. Virtual devices representing namespaces will be created and/or deleted during

[PATCH v3 0/2] hw/nvme: Support for Namespaces Management from guest OS

2022-10-27 Thread Jonathan Derrick
From: Michael Kropaczek Description: Currently namespaces could be configured as follows: 1. Legacy Namespace - just one namespace within Nvme controller's where the back-end was specified for nvme device by -drive parameter pointing directly to the image file. 2. Additional Namespaces -

[PATCH v3 1/2] hw/nvme: Support for Namespaces Management from guest OS - create-ns

2022-10-27 Thread Jonathan Derrick
From: Michael Kropaczek Added support for NVMEe NameSpaces Mangement allowing the guest OS to create namespaces by issuing nvme create-ns command. It is an extension to currently implemented Qemu nvme virtual device. Virtual devices representing namespaces will be created and/or deleted during

Re: [PATCH 00/24] More coroutine_fn fixes

2022-10-27 Thread Kevin Wolf
Am 13.10.2022 um 14:36 hat Paolo Bonzini geschrieben: > Most of these were extracted from Alberto's static analysis series. > After this series, the only errors reported by the analyzer are: > > - a call to bs->drv->bdrv_co_drain_begin from bdrv_open_driver. This > relies on

Re: [PATCH 19/24] qcow2: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
Am 13.10.2022 um 14:37 hat Paolo Bonzini geschrieben: > From: Alberto Faria > > Signed-off-by: Alberto Faria > Signed-off-by: Paolo Bonzini > @@ -1699,8 +1699,8 @@ static int coroutine_fn qcow2_do_open(BlockDriverState > *bs, QDict *options, > } > > s->image_backing_file

Re: [PATCH 23/24] vmdk: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
Am 13.10.2022 um 14:37 hat Paolo Bonzini geschrieben: > From: Alberto Faria > > Signed-off-by: Alberto Faria > Signed-off-by: Paolo Bonzini > @@ -1624,12 +1624,11 @@ static int coroutine_fn > get_cluster_offset(BlockDriverState *bs, > } > l2_table = (char *)extent->l2_cache +

[PATCH v5 0/4] Add zone append write for zoned device

2022-10-27 Thread Sam Li
v5: - fix locking conditions and error handling - drop some trival optimizations - add tracing points for zone append v4: - fix lock related issues[Damien] - drop all field in zone_mgmt op [Damien] - fix state checks in zong_mgmt command [Damien] - return start sector of wp when issuing zap req

[PATCH v13 1/8] include: add zoned device structs

2022-10-27 Thread Sam Li
Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) diff --git a/include/block/block-common.h b/include/block/block-common.h

[PATCH v5 4/4] block: add some trace events for zone append

2022-10-27 Thread Sam Li
Signed-off-by: Sam Li --- block/file-posix.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 9c1afb7749..b23cfb02e3 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2489,6 +2489,8 @@ out: if

[PATCH v5 3/4] qemu-iotests: test zone append operation

2022-10-27 Thread Sam Li
This tests is mainly a helper to indicate append writes in block layer behaves as expected. Signed-off-by: Sam Li --- qemu-io-cmds.c | 63 ++ tests/qemu-iotests/tests/zoned.out | 7 tests/qemu-iotests/tests/zoned.sh | 9 + 3 files

[PATCH v5 1/4] file-posix: add tracking of the zone write pointers

2022-10-27 Thread Sam Li
Since Linux doesn't have a user API to issue zone append operations to zoned devices from user space, the file-posix driver is modified to add zone append emulation using regular writes. To do this, the file-posix driver tracks the wp location of all zones of the device. It uses an array of

[PATCH v5 2/4] block: introduce zone append write for zoned devices

2022-10-27 Thread Sam Li
A zone append command is a write operation that specifies the first logical block of a zone as the write position. When writing to a zoned block device using zone append, the byte offset of writes is pointing to the write pointer of that zone. Upon completion the device will respond with the

[PATCH v13 5/8] config: add check to block layer

2022-10-27 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev --- block.c | 19 +++ block/file-posix.c | 12

[PATCH v13 8/8] docs/zoned-storage: add zoned device documentation

2022-10-27 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Dmitry Fomichev --- docs/devel/zoned-storage.rst | 43 ++

[PATCH v13 2/8] file-posix: introduce helper functions for sysfs attributes

2022-10-27 Thread Sam Li
Use get_sysfs_str_val() to get the string value of device zoned model. Then get_sysfs_zoned_model() can convert it to BlockZoneModel type of QEMU. Use get_sysfs_long_val() to get the long value of zoned device information. Signed-off-by: Sam Li Reviewed-by: Hannes Reinecke Reviewed-by: Stefan

[PATCH v13 6/8] qemu-iotests: test new zone operations

2022-10-27 Thread Sam Li
We have added new block layer APIs of zoned block devices. Test it as follows: Run each zone operation on a newly created null_blk device and see whether the logs show the correct zone information. By: $ ./tests/qemu-iotests/tests/zoned.sh Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi ---

[PATCH v13 7/8] block: add some trace events for new block layer APIs

2022-10-27 Thread Sam Li
Signed-off-by: Sam Li --- block/file-posix.c | 3 +++ block/trace-events | 2 ++ 2 files changed, 5 insertions(+) diff --git a/block/file-posix.c b/block/file-posix.c index 02476c011e..fe52e91da4 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -3259,6 +3259,7 @@ static int

[PATCH v13 4/8] raw-format: add zone operations to pass through requests

2022-10-27 Thread Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li Reviewed-by: Stefan Hajnoczi Reviewed-by: Damien Le Moal Reviewed-by: Hannes Reinecke Reviewed-by: Dmitry Fomichev --- block/raw-format.c | 13 +

[PATCH v13 3/8] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-10-27 Thread Sam Li
Add a new zoned_host_device BlockDriver. The zoned_host_device option accepts only zoned host block devices. By adding zone management operations in this new BlockDriver, users can use the new block layer APIs including Report Zone and four zone management operations (open, close, finish, reset,

[PATCH v13 0/8] Add support for zoned device

2022-10-27 Thread Sam Li
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones that are larger than the LBA size. It can only allow sequential writes, which reduces write amplification in SSD, leading to higher throughput and increased capacity. More details about ZBDs can be found at:

Re: [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Antoine Damhet
Thanks, it works for us On Thu, Oct 27, 2022 at 03:27:26AM -0400, Emanuele Giuseppe Esposito wrote: > blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE > but can be invoked from iothreads when handling scsi requests. > This triggers an assertion failure: > > 0x7fd6c3515ce1 in

Re: [PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Hanna Reitz
On 27.10.22 09:27, Emanuele Giuseppe Esposito wrote: blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE but can be invoked from iothreads when handling scsi requests. This triggers an assertion failure: 0x7fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6

Re: [PATCH v5 00/13] Instantiate VT82xx functions in host device

2022-10-27 Thread Daniel Henrique Barboza
On 10/27/22 05:21, Bernhard Beschow wrote: Am 16. September 2022 14:36:05 UTC schrieb "Philippe Mathieu-Daudé" : On 12/9/22 21:50, Bernhard Beschow wrote: Am 1. September 2022 11:41:14 UTC schrieb Bernhard Beschow : Testing done: * `qemu-system-ppc -machine pegasos2 -rtc base=localtime

Re: [PATCH v5 00/13] Instantiate VT82xx functions in host device

2022-10-27 Thread Bernhard Beschow
Am 16. September 2022 14:36:05 UTC schrieb "Philippe Mathieu-Daudé" : >On 12/9/22 21:50, Bernhard Beschow wrote: >> Am 1. September 2022 11:41:14 UTC schrieb Bernhard Beschow >> : > >>> Testing done: >>> >>> * `qemu-system-ppc -machine pegasos2 -rtc base=localtime -device >>>

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Bin Meng
On Thu, Oct 27, 2022 at 3:55 PM Kevin Wolf wrote: > > Am 27.10.2022 um 04:45 hat Bin Meng geschrieben: > > Hi Kevin, > > [...] > > Will you queue this patch via the block tree? > > Just to be sure, you mean only patch 5? Yes, I can do that. > Yes, only this one. Thank you. Regards, Bin

Re: [PATCH 5/7] block/nfs: Fix 32-bit Windows build

2022-10-27 Thread Kevin Wolf
Am 27.10.2022 um 04:45 hat Bin Meng geschrieben: > Hi Kevin, > [...] > Will you queue this patch via the block tree? Just to be sure, you mean only patch 5? Yes, I can do that. Kevin

[PATCH] block/block-backend: blk_set_enable_write_cache is IO_CODE

2022-10-27 Thread Emanuele Giuseppe Esposito
blk_set_enable_write_cache() is defined as GLOBAL_STATE_CODE but can be invoked from iothreads when handling scsi requests. This triggers an assertion failure: 0x7fd6c3515ce1 in raise () from /lib/x86_64-linux-gnu/libc.so.6 0x7fd6c34ff537 in abort () from /lib/x86_64-linux-gnu/libc.so.6

[PATCH v4 00/17] pci: Abort if pci_add_capability fails

2022-10-27 Thread Akihiko Odaki
pci_add_capability appears most PCI devices. Its error handling required lots of code, and led to inconsistent behaviors such as: - passing error_abort - passing error_fatal - asserting the returned value - propagating the error to the caller - skipping the rest of the function - just ignoring

[PATCH v4 07/17] hw/nvme: Omit errp for pci_add_capability

2022-10-27 Thread Akihiko Odaki
Omitting errp for pci_add_capability() causes it to abort if capabilities overlap. This behavior is appropriate here because all of the capabilities set in this device are defined in the program and their overlap should not happen unless there is a programming error. Signed-off-by: Akihiko Odaki

[PATCH v4 12/17] msix: Omit errp for pci_add_capability

2022-10-27 Thread Akihiko Odaki
Omitting errp for pci_add_capability() causes it to abort if capabilities overlap. A caller of msix_init(), which calls pci_add_capability() in turn, is expected to ensure that will not happen. Signed-off-by: Akihiko Odaki --- hw/pci/msix.c | 8 ++-- 1 file changed, 2 insertions(+), 6

[PATCH v4 16/17] virtio-pci: Omit errp for pci_add_capability

2022-10-27 Thread Akihiko Odaki
Omitting errp for pci_add_capability() causes it to abort if capabilities overlap. This behavior is appropriate here because all of the capabilities set in this device are defined in the program and their overlap should not happen unless there is a programming error. Signed-off-by: Akihiko Odaki

[PATCH v4 05/17] e1000e: Omit errp for pci_add_capability

2022-10-27 Thread Akihiko Odaki
Omitting errp for pci_add_capability() causes it to abort if capabilities overlap. This behavior is appropriate here because all of the capabilities set in this device are defined in the program and their overlap should not happen unless there is a programming error. Signed-off-by: Akihiko Odaki

  1   2   >