Re: [PATCH 03/13] docs/qapidoc: delint a tiny portion of the module

2024-06-19 Thread Markus Armbruster
_parse(self, rstlist, node): > > > def setup(app): > -""" Register qapi-doc directive with Sphinx""" > -app.add_config_value('qapidoc_srctree', None, 'env') > -app.add_directive('qapi-doc', QAPIDocDirective) > +"""Register qapi-doc directive with Sphinx""" > +app.add_config_value("qapidoc_srctree", None, "env") > +app.add_directive("qapi-doc", QAPIDocDirective) > > -return dict( > -version=__version__, > -parallel_read_safe=True, > -parallel_write_safe=True > -) > +return { > +"version": __version__, > +"parallel_read_safe": True, > +"parallel_write_safe": True, > +} With intersperse() deleted Reviewed-by: Markus Armbruster

Re: [PATCH 09/20] qapi/parser: add undocumented stub members to all_sections

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024 at 4:53 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > This helps simplify the doc generator if it doesn't have to check for >> > undocumented members. >> > >> > Signed-off-by:

Re: [PATCH 20/20] qapi: convert "Example" sections to rST

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024 at 10:39 AM Markus Armbruster > wrote: > >> John Snow writes: >> >> > Eliminate the "Example" sections in QAPI doc blocks, converting them >> > into QMP example code blocks. This is generally done b

Re: [PATCH 19/20] qapi: convert "Note" sections to plain rST

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024, 9:44 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > We do not need a dedicated section for notes. By eliminating a specially >> > parsed section, these notes can be treated as normal rST paragraphs

Re: [PATCH 18/20] qapi: ensure all errors sections are uniformly typset

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024, 7:24 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Transactions have the only instance of an Errors section that isn't a >> > rST list; turn it into one. >> >> Just for consistency?

Re: [PATCH 14/20] qapi: fix non-compliant JSON examples

2024-06-18 Thread Markus Armbruster
John Snow writes: > On Fri, Jun 14, 2024, 6:55 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > If we parse all examples as QMP, we need them to conform to a standard >> > so that they render correctly. Once the QMP lexer is active for >&

Re: [PATCH RESEND v7 00/12] vhost-user: support any POSIX system (tested on macOS, FreeBSD, OpenBSD)

2024-06-17 Thread Markus Armbruster
Stefano Garzarella writes: > Hi Michael, > > On Wed, Jun 12, 2024 at 03:01:28PM GMT, Stefano Garzarella wrote: >>This series should be in a good shape, in which tree should we queue it? >>@Micheal would your tree be okay? > > Markus suggested a small change to patch 10, so do you want me to

Re: [PATCH 20/20] qapi: convert "Example" sections to rST

2024-06-14 Thread Markus Armbruster
John Snow writes: > Eliminate the "Example" sections in QAPI doc blocks, converting them > into QMP example code blocks. This is generally done by converting > "Example:" or "Examples:" lines into ".. code-block:: QMP" lines. > > This patch does also allow for the use of the rST syntax

Re: [PATCH 19/20] qapi: convert "Note" sections to plain rST

2024-06-14 Thread Markus Armbruster
John Snow writes: > We do not need a dedicated section for notes. By eliminating a specially > parsed section, these notes can be treated as normal rST paragraphs in > the new QMP reference manual, and can be placed and styled much more > flexibly. > > Update the QAPI parser to now prohibit

Re: [PATCH 18/20] qapi: ensure all errors sections are uniformly typset

2024-06-14 Thread Markus Armbruster
John Snow writes: > Transactions have the only instance of an Errors section that isn't a > rST list; turn it into one. Just for consistency? Or do you have other shenanigans up your sleeve? If we want the Errors sections to remain all rST lists, we should update docs/devel/qapi-code-gen.rst

Re: [PATCH 14/20] qapi: fix non-compliant JSON examples

2024-06-14 Thread Markus Armbruster
John Snow writes: > If we parse all examples as QMP, we need them to conform to a standard > so that they render correctly. Once the QMP lexer is active for > examples, these will produce warning messages and fail the build. > > The QMP lexer still supports elisions, but they must be represented

Re: [PATCH 13/20] docs/qapidoc: fix nested parsing under untagged sections

2024-06-14 Thread Markus Armbruster
John Snow writes: > Sphinx does not like sections without titles, because it wants to > convert every section into a reference. When there is no title, it > struggles to do this and transforms the tree inproperly. > > Depending on the rST used, this may result in an assertion error deep in > the

Re: [PATCH 11/20] qapi/schema: add doc_visible property to QAPISchemaDefinition

2024-06-14 Thread Markus Armbruster
John Snow writes: > The intent here is to mark only certain definitions as visible in the > end-user docs. > > All commands and events are inherently visible. Everything else is > visible only if it is a member (or a branch member) of a type that is > visible, or if it is named as a return type

Re: [PATCH 09/20] qapi/parser: add undocumented stub members to all_sections

2024-06-14 Thread Markus Armbruster
John Snow writes: > This helps simplify the doc generator if it doesn't have to check for > undocumented members. > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 20 ++-- > 1 file changed, 18 insertions(+), 2 deletions(-) > > diff --git a/scripts/qapi/parser.py

Re: [PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-06-13 Thread Markus Armbruster
John Snow writes: > On Thu, May 16, 2024, 2:18 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > When iterating all_sections, this is helpful to be able to distinguish >> > "members" from "features"; the only other way to

Re: [PATCH 06/20] qapi/parser: fix comment parsing immediately following a doc block

2024-06-13 Thread Markus Armbruster
John Snow writes: > On Thu, May 16, 2024 at 2:01 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > If a comment immediately follows a doc block, the parser doesn't ignore >> > that token appropriately. Fix that. >> >> R

Re: [PATCH RESEND v7 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-12 Thread Markus Armbruster
'type': 'MemoryBackendShmProperties', > + 'if': 'CONFIG_POSIX' }, > 'pr-manager-helper': { 'type': 'PrManagerHelperProperties', >'if': 'CONFIG_LINUX' }, >'qtest': 'QtestProperties', [...] Other than that, QAPI schema Acked-by: Markus Armbruster

Re: [RFC PATCH v2 21/22] qapi: Inline and remove QERR_UNSUPPORTED definition

2024-06-12 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Michael, Konstantin, QERR_UNSUPPORTED is only used by QGA. > > Do you mind giving our maintainer's position on Markus > analysis so we can know how to proceed with this definition? Daniel Berrangé recently posted patches that get rid of most instances of

Re: [PATCH v2 2/2] backup: add minimum cluster size to performance options

2024-06-03 Thread Markus Armbruster
} } > + 'data': { '*use-copy-range': 'bool', '*max-workers': 'int', > +'*max-chunk': 'int64', '*min-cluster-size': 'size' } } > > ## > # @BackupCommon: QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v2 1/2] copy-before-write: allow specifying minimum cluster size

2024-06-03 Thread Markus Armbruster
lock-core.json > index df5e07debd..8fc0a4b234 100644 > --- a/qapi/block-core.json > +++ b/qapi/block-core.json > @@ -4642,12 +4642,18 @@ > # @on-cbw-error parameter will decide how this failure is handled. > # Default 0. (Since 7.1) > # > +# @min-cluster-size: Minimum size of blocks used by copy-before-write > +# operations. Has to be a power of 2. No effect if smaller than > +# the maximum of the target's cluster size and 64 KiB. Default 0. > +# (Since 9.1) > +# > # Since: 6.2 > ## > { 'struct': 'BlockdevOptionsCbw', >'base': 'BlockdevOptionsGenericFormat', >'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap', > -'*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32' } } > +'*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32', > +'*min-cluster-size': 'size' } } > > ## > # @BlockdevOptions: QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-06-03 Thread Markus Armbruster
Stefano Garzarella writes: > On Wed, May 29, 2024 at 04:50:20PM GMT, Markus Armbruster wrote: >>Stefano Garzarella writes: >> >>> shm_open() creates and opens a new POSIX shared memory object. >>> A POSIX shared memory object allows creating memory backend with

Re: [PATCH v6 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-29 Thread Markus Armbruster
Stefano Garzarella writes: > shm_open() creates and opens a new POSIX shared memory object. > A POSIX shared memory object allows creating memory backend with an > associated file descriptor that can be shared with external processes > (e.g. vhost-user). > > The new `memory-backend-shm` can be

Re: [PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-05-27 Thread Markus Armbruster
John Snow writes: > On Thu, May 16, 2024, 1:58 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Instead of using the info object for the doc block as a whole, update >> > the info pointer for each call to ensure_untagged_section when the >

Re: [PATCH 5/6] migration: Rephrase message on failure to save / load Xen device state

2024-05-27 Thread Markus Armbruster
Peter Xu writes: > On Mon, May 13, 2024 at 04:17:02PM +0200, Markus Armbruster wrote: >> Functions that use an Error **errp parameter to return errors should >> not also report them to the user, because reporting is the caller's >> job. When the caller does, the error is

Re: [PATCH 4/6] cpus: Improve error messages on memsave, pmemsave write error

2024-05-27 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 13/5/24 16:45, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> On 13/5/24 16:17, Markus Armbruster wrote: >>>> qmp_memsave() and qmp_pmemsave() report fwrite() error as >>>> >&

Re: [PATCH 08/20] qapi/parser: differentiate intro and outro paragraphs

2024-05-16 Thread Markus Armbruster
John Snow writes: > Add a semantic tag to paragraphs that appear *before* tagged > sections/members/features and those that appear after. This will control > how they are inlined when doc sections are merged and flattened. This future use is not obvious to me now. I guess the effective way to

Re: [PATCH 07/20] qapi/parser: add semantic 'kind' parameter to QAPIDoc.Section

2024-05-16 Thread Markus Armbruster
John Snow writes: > When iterating all_sections, this is helpful to be able to distinguish > "members" from "features"; the only other way to do so is to > cross-reference these sections against QAPIDoc.args or QAPIDoc.features, > but if the desired end goal for QAPIDoc is to remove everything

Re: [PATCH 06/20] qapi/parser: fix comment parsing immediately following a doc block

2024-05-16 Thread Markus Armbruster
John Snow writes: > If a comment immediately follows a doc block, the parser doesn't ignore > that token appropriately. Fix that. Reproducer? > > Signed-off-by: John Snow > --- > scripts/qapi/parser.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 05/20] qapi/parser: adjust info location for doc body section

2024-05-15 Thread Markus Armbruster
John Snow writes: > Instead of using the info object for the doc block as a whole, update > the info pointer for each call to ensure_untagged_section when the > existing section is otherwise empty. This way, Sphinx error information > will match precisely to where the text actually starts. > >

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread Markus Armbruster
John Snow writes: > On Wed, May 15, 2024 at 5:17 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > In the coming patches, it's helpful to have a linting baseline. However, >> > there's no need to shuffle around the deck chairs too much, because mo

Re: [PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-15 Thread Markus Armbruster
John Snow writes: > On Wed, May 15, 2024, 7:50 AM Markus Armbruster wrote: > >> John Snow writes: >> >> > Prior to this patch, a section like this: >> > >> > @name: lorem ipsum >> >dolor sit amet >> > consectetur adipi

Re: [PATCH 04/20] qapi/parser: preserve indentation in QAPIDoc sections

2024-05-15 Thread Markus Armbruster
John Snow writes: > Prior to this patch, a section like this: > > @name: lorem ipsum >dolor sit amet > consectetur adipiscing elit > > would be parsed as: > > "lorem ipsum\ndolor sit amet\n consectetur adipiscing elit" > > We want to preserve the indentation for even the first body

Re: [PATCH 03/20] docs/qapidoc: delint a tiny portion of the module

2024-05-15 Thread Markus Armbruster
ocReporter > > > -__version__ = '1.0' > +__version__ = "1.0" > > > +# fmt: off I figure this tells black to keep quiet for the remainder of the file. Worth a comment, I think. > # Function borrowed from pydash, which is under the MIT license > def intersperse(iterable, separator): > """Yield the members of *iterable* interspersed with *separator*.""" With my comments addressed Reviewed-by: Markus Armbruster

Re: [PATCH 02/20] qapi: linter fixups

2024-05-15 Thread Markus Armbruster
> -error_setg(errp, "Invalid parameter type for '%%s', expected: > %(name)s", > - name ? name : "null"); > +error_setg(errp, > + "Invalid parameter type for '%%s', expected: %(name)s", > + name ? name : "null"); > /* Avoid passing invalid *obj to qapi_free_%(c_name)s() */ > g_free(*obj); > *obj = NULL; This is mostly lint I neglected to pick off in my recent work. Thanks for taking care of it! Reviewed-by: Markus Armbruster

Re: [PATCH 1/2] copy-before-write: allow specifying minimum cluster size

2024-05-14 Thread Markus Armbruster
Fiona Ebner writes: > Am 26.03.24 um 10:06 schrieb Markus Armbruster: >>> @@ -365,7 +368,13 @@ BlockCopyState *block_copy_state_new(BdrvChild >>> *source, BdrvChild *target, >>> >>> GLOBAL_STATE_CODE(); >>> >>> -cluster_

Re: [PATCH 2/6] dump/win_dump: Improve error messages on write error

2024-05-13 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 13/5/24 16:16, Markus Armbruster wrote: >> create_win_dump() and write_run report qemu_write_full() failure to >> their callers as >> An IO error has occurred >> The errno set by qemu_write_full() is lost. >> Improve

Re: [PATCH 4/6] cpus: Improve error messages on memsave, pmemsave write error

2024-05-13 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 13/5/24 16:17, Markus Armbruster wrote: >> qmp_memsave() and qmp_pmemsave() report fwrite() error as >> An IO error has occurred >> Improve this to >> writing memory to '' failed >> Signed-off-by: Markus Armbrust

[PATCH 4/6] cpus: Improve error messages on memsave, pmemsave write error

2024-05-13 Thread Markus Armbruster
qmp_memsave() and qmp_pmemsave() report fwrite() error as An IO error has occurred Improve this to writing memory to '' failed Signed-off-by: Markus Armbruster --- system/cpus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/cpus.c b/system/cpus.c

[PATCH 5/6] migration: Rephrase message on failure to save / load Xen device state

2024-05-13 Thread Markus Armbruster
with it. Instead, I'm merely improving the error reported by qmp_xen_load_devices_state() and qmp_xen_load_devices_state() to the QMP core from An IO error has occurred to saving Xen device state failed and loading Xen device state failed respectively. Signed-off-by: Markus

[PATCH 1/6] block: Improve error message when external snapshot can't flush

2024-05-13 Thread Markus Armbruster
external_snapshot_action() reports bdrv_flush() failure to its caller as An IO error has occurred The errno code returned by bdrv_flush() is lost. Improve this to Write to node '' failed: Signed-off-by: Markus Armbruster --- blockdev.c | 6 -- 1 file changed, 4 insertions(+), 2

[PATCH 0/6] error: Eliminate QERR_IO_ERROR

2024-05-13 Thread Markus Armbruster
Markus Armbruster (6): block: Improve error message when external snapshot can't flush dump/win_dump: Improve error messages on write error block/vmdk: Improve error messages on extent write error cpus: Improve error messages on memsave, pmemsave write error migration: Rephrase message

[PATCH 3/6] block/vmdk: Improve error messages on extent write error

2024-05-13 Thread Markus Armbruster
vmdk_init_extent() reports blk_co_pwrite() failure to its caller as An IO error has occurred The errno code returned by blk_co_pwrite() is lost. Improve this to failed to write VMDK : Signed-off-by: Markus Armbruster --- block/vmdk.c | 10 +- 1 file changed, 5 insertions

[PATCH 6/6] qerror: QERR_IO_ERROR is no longer used, drop

2024-05-13 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 00b18e9082..bc9116f76a 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -20,9 +20,6

[PATCH 2/6] dump/win_dump: Improve error messages on write error

2024-05-13 Thread Markus Armbruster
similar errors. Signed-off-by: Markus Armbruster --- dump/win_dump.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dump/win_dump.c b/dump/win_dump.c index b7bfaff379..0e4fe692ce 100644 --- a/dump/win_dump.c +++ b/dump/win_dump.c @@ -12,7 +12,6 @@ #include "sysemu/d

Re: [PATCH] hw/nvme: Add CLI options for PCI vendor/device IDs and IEEE-OUI ID

2024-05-13 Thread Markus Armbruster
Saif Abrar writes: > Add CLI options for user specified > - PCI vendor, device, subsystem vendor and subsystem IDs > - IEEE-OUI ID > > e.g. PCI IDs to be specified as follows: > -device > nvme,id_vendor=0xABCD,id_device=0xA0B0,id_subsys_vendor=0xEF00,id_subsys=0xEF01 > > IEEE-OUI ID (Identify

Re: [PATCH v3 3/5] mirror: allow specifying working bitmap

2024-05-13 Thread Markus Armbruster
+# > +# @unstable: Member @bitmap is experimental. > +# > # Since: 2.6 > # > # Example: > @@ -2562,6 +2596,7 @@ >'data': { '*job-id': 'str', 'device': 'str', 'target': 'str', > '*replaces': 'str', > 'sync': 'MirrorSyncMode', > +'*bitmap': { 'type': 'str', 'features': [ 'unstable' ] }, > '*speed': 'int', '*granularity': 'uint32', > '*buf-size': 'int', '*on-source-error': 'BlockdevOnError', > '*on-target-error': 'BlockdevOnError', [...] With my comments addressed, Acked-by: Markus Armbruster

Re: [PATCH v4 10/12] hostmem: add a new memory backend based on POSIX shm_open()

2024-05-08 Thread Markus Armbruster
Stefano Garzarella writes: > shm_open() creates and opens a new POSIX shared memory object. > A POSIX shared memory object allows creating memory backend with an > associated file descriptor that can be shared with external processes > (e.g. vhost-user). > > The new `memory-backend-shm` can be

Re: [PATCH v4 3/3] qapi: introduce device-sync-config

2024-05-02 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 30.04.24 11:31, Vladimir Sementsov-Ogievskiy wrote: >> On 30.04.24 11:19, Markus Armbruster wrote: >>> Vladimir Sementsov-Ogievskiy writes: >>> >>>> Add command to sync config from vhost-user backend to

Re: [PATCH v4 2/3] vhost-user-blk: split vhost_user_blk_sync_config()

2024-04-30 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 30.04.24 11:15, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Split vhost_user_blk_sync_config() out from >>> vhost_user_blk_handle_config_change(), to be reused in the following >>&g

Re: [PATCH v4 3/3] qapi: introduce device-sync-config

2024-04-30 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command to sync config from vhost-user backend to the device. It > may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not > triggered interrupt to the guest or just not available (not supported > by vhost-user server). > > Command result

Re: [PATCH v4 2/3] vhost-user-blk: split vhost_user_blk_sync_config()

2024-04-30 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Split vhost_user_blk_sync_config() out from > vhost_user_blk_handle_config_change(), to be reused in the following > commit. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > hw/block/vhost-user-blk.c | 26 +++--- > 1 file

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-04-30 Thread Markus Armbruster
Peter Xu writes: > On Mon, Apr 29, 2024 at 08:08:10AM -0500, Michael Galaxy wrote: >> Hi All (and Peter), > > Hi, Michael, > >> >> My name is Michael Galaxy (formerly Hines). Yes, I changed my last name >> (highly irregular for a male) and yes, that's my real last name: >>

Re: [PATCH v3 4/5] qapi: introduce device-sync-config

2024-04-29 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 29.04.24 13:51, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> On 24.04.24 14:48, Markus Armbruster wrote: >>>> Vladimir Sementsov-Ogievskiy writes: >>>> >>>>> A

Re: [PATCH v3 4/5] qapi: introduce device-sync-config

2024-04-29 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 24.04.24 14:48, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Add command to sync config from vhost-user backend to the device. It >>> may be helpful when VHOST_USER_SLAVE_CONFIG_CHANG

Re: [PATCH v3 5/5] qapi: introduce CONFIG_READ event

2024-04-24 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Send a new event when guest reads virtio-pci config after > virtio_notify_config() call. > > That's useful to check that guest fetched modified config, for example > after resizing disk backend. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

Re: [PATCH v3 4/5] qapi: introduce device-sync-config

2024-04-24 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command to sync config from vhost-user backend to the device. It > may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not > triggered interrupt to the guest or just not available (not supported > by vhost-user server). > > Command result

Re: [PATCH v3 4/5] qapi: introduce device-sync-config

2024-04-24 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command to sync config from vhost-user backend to the device. It > may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not > triggered interrupt to the guest or just not available (not supported > by vhost-user server). > > Command result

Re: [PATCH v2 12/13] block/ssh: Use URI parsing code from glib

2024-04-12 Thread Markus Armbruster
Eric Blake writes: > On Fri, Apr 12, 2024 at 03:24:14PM +0200, Thomas Huth wrote: >> Since version 2.66, glib has useful URI parsing functions, too. >> Use those instead of the QEMU-internal ones to be finally able >> to get rid of the latter. >> >> Reviewed-by: Richard W.M. Jones >>

Re: [PATCH-for-9.1 v2 2/3] migration: Remove RDMA protocol handling

2024-04-09 Thread Markus Armbruster
Peter Xu writes: > On Mon, Apr 08, 2024 at 04:07:20PM +0200, Jinpu Wang wrote: >> Hi Peter, > > Jinpu, > > Thanks for joining the discussion. > >> >> On Tue, Apr 2, 2024 at 11:24 PM Peter Xu wrote: >> > >> > On Mon, Apr 01, 2024 at 11:26:25PM +0200, Yu Zhang wrote: >> > > Hello Peter und

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Markus Armbruster
Subject: all unions are type-based. Perhaps "support implicit union tags on the wire"? Do you need this schema language feature for folding block jobs into the jobs abstraction, or is it just for making the wire protocol nicer in places?

Re: [RFC 04/15] qapi: block-job-change: make copy-mode parameter optional

2024-03-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > We are going to add more parameters to change. We want to make possible > to change only one or any subset of available options. So all the > options should be optional. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/mirror.c | 5

Re: [RFC 01/15] scripts/qapi: support type-based unions

2024-03-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Look at block-job-change command: we have to specify both 'id' to chose > the job to operate on and 'type' for QAPI union be parsed. But for user > this looks redundant: when we specify 'id', QEMU should be able to get > corresponding job's type. > > This

Re: [PATCH 1/2] copy-before-write: allow specifying minimum cluster size

2024-03-26 Thread Markus Armbruster
Fiona Ebner writes: > Useful to make discard-source work in the context of backup fleecing > when the fleecing image has a larger granularity than the backup > target. > > Copy-before-write operations will use at least this granularity and in > particular, discard requests to the source node

Re: [PATCH] qapi/block-core: improve Qcow2OverlapCheckFlags documentation

2024-03-25 Thread Markus Armbruster
Squashing in diff --git a/qapi/pragma.json b/qapi/pragma.json index 99e4052ab3..9e28de1721 100644 --- a/qapi/pragma.json +++ b/qapi/pragma.json @@ -72,7 +72,6 @@ 'QCryptoAkCipherKeyType', 'QCryptodevBackendServiceType', 'QKeyCode', -'Qcow2OverlapCheckFlags',

Re: [PATCH] qapi/block-core: improve Qcow2OverlapCheckFlags documentation

2024-03-25 Thread Markus Armbruster
able > +# > +# @active-l2: Qcow2 active L2 table > +# > +# @refcount-table: Qcow2 refcount table > +# > +# @refcount-block: Qcow2 refcount blocks > +# > +# @snapshot-table: Qcow2 snapshot table > +# > +# @inactive-l1: Qcow2 inactive L1 tables > +# > +# @inactive-l2: Qcow2 inactive L2 tables > +# > +# @bitmap-directory: Qcow2 bitmap directory (since 3.0) > # > # Since: 2.9 > ## Acked-by: Markus Armbruster

Re: [PATCH 00/10] Reduce usage of QERR_ macros further

2024-03-18 Thread Markus Armbruster
Markus Armbruster writes: > Philippe posted "[PATCH v2 00/22] qapi: Kill 'qapi/qmp/qerror.h' for > good" a couple of months ago. I cherry-picked just its simplest parts > for now. > > Markus Armbruster (1): > error: Drop superfluous #include "qapi/qmp/qerror.h

Re: [PATCH 08/10] qapi: Correct error message for 'vcpu_dirty_limit' parameter

2024-03-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 12/3/24 16:26, Zhao Liu wrote: >> On Tue, Mar 12, 2024 at 03:13:41PM +0100, Markus Armbruster wrote: >>> Date: Tue, 12 Mar 2024 15:13:41 +0100 >>> From: Markus Armbruster >>> Subject: [PATCH 08/10] qapi: Correct

Re: [PATCH v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-15 Thread Markus Armbruster
Sorry for the late answer. Vladimir Sementsov-Ogievskiy writes: > On 07.03.24 12:46, Markus Armbruster wrote: [...] >> I appreciate the attempt to curb the spread of DeviceNotFound errors. >> Two issues: >> >> * Copy-pasting find_device_state() with a false arg

Re: [PATCH v4 4/5] qapi: blockdev-backup: add discard-source parameter

2024-03-13 Thread Markus Armbruster
': 'BlockdevOnError', > '*auto-finalize': 'bool', '*auto-dismiss': 'bool', > '*filter-node-name': 'str', > + '*discard-source': 'bool', > '*x-perf': { 'type': 'BackupPerf', > 'features': [ 'unstable' ] } } } QAPI schema Acked-by: Markus Armbruster

Re: [PATCH for 9.0] migration: Skip only empty block devices

2024-03-13 Thread Markus Armbruster
Peter Xu writes: > On Tue, Mar 12, 2024 at 05:34:26PM -0400, Stefan Hajnoczi wrote: >> I understand now. I missed that returning from init_blk_migration_it() >> did not abort iteration. Thank you! > > I queued it, thanks both! Thanks for cleaning up the mess I made!

[PATCH 07/10] qapi: Inline and remove QERR_INVALID_PARAMETER_TYPE definition

2024-03-12 Thread Markus Armbruster
Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- qom/object.c | 4 ++-- scripts/qapi/visit.py | 5 ++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerr

[PATCH 06/10] qapi: Inline QERR_INVALID_PARAMETER_TYPE definition (constant value)

2024-03-12 Thread Markus Armbruster
ALID_PARAMETER_TYPE, param, value); +error_setg(errp, fixedfmt, param); Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- qapi/qobject-input-visitor.c | 32 qapi/string-input-visitor.c | 8 qom/object.c

[PATCH 00/10] Reduce usage of QERR_ macros further

2024-03-12 Thread Markus Armbruster
Philippe posted "[PATCH v2 00/22] qapi: Kill 'qapi/qmp/qerror.h' for good" a couple of months ago. I cherry-picked just its simplest parts for now. Markus Armbruster (1): error: Drop superfluous #include "qapi/qmp/qerror.h" Philippe Mathieu-Daudé (9): qap

[PATCH 02/10] qapi: Inline and remove QERR_BUS_NO_HOTPLUG definition

2024-03-12 Thread Markus Armbruster
p. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- hw/ppc/spapr_pci.c| 5 ++--- system/qdev-monitor.c | 8 +--- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/includ

[PATCH 04/10] qapi: Inline and remove QERR_DEVICE_NO_HOTPLUG definition

2024-03-12 Thread Markus Armbruster
p. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- hw/core/qdev.c| 4 ++-- system/qdev-monitor.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerr

[PATCH 08/10] qapi: Correct error message for 'vcpu_dirty_limit' parameter

2024-03-12 Thread Markus Armbruster
ce by: "Parameter 'vcpu_dirty_limit' is invalid, it must greater than 1 MB/s" Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Markus Armbruster --- migration/options.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/migration/o

[PATCH 03/10] qapi: Inline and remove QERR_DEVICE_HAS_NO_MEDIUM definition

2024-03-12 Thread Markus Armbruster
p. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- block/snapshot.c | 7 --- blockdev.c| 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerr

[PATCH 10/10] qapi: Inline and remove QERR_PROPERTY_VALUE_BAD definition

2024-03-12 Thread Markus Armbruster
p/qerror.h. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- hw/core/qdev-properties.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 385a4876d6..

[PATCH 05/10] qapi: Inline and remove QERR_INVALID_PARAMETER definition

2024-03-12 Thread Markus Armbruster
d -i -e "s/QERR_INVALID_PARAMETER,/\"Invalid parameter '%s'\",/" \ $(git grep -lw QERR_INVALID_PARAMETER) Manually simplify qemu_opts_create(), and remove the macro definition in include/qapi/qmp/qerror.h. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster ---

[PATCH 09/10] qapi: Inline and remove QERR_MIGRATION_ACTIVE definition

2024-03-12 Thread Markus Armbruster
y removing the definition in include/qapi/qmp/qerror.h. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- migration/migration.c | 2 +- migration/options.c | 4 ++-- migration/savevm.c| 2 +- 4 files

[PATCH 01/10] error: Drop superfluous #include "qapi/qmp/qerror.h"

2024-03-12 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- backends/iommufd.c | 1 - chardev/char-fe.c | 1 - system/rtc.c | 1 - 3 files changed, 3 deletions(-) diff --git a/backends/iommufd.c b/backends/iommufd.c index 1ef683c7b0..922d75e49e 100644 --- a/backends/iommufd.c +++ b/backends/iommufd.c @@ -13,7

Re: [PATCH] hw/ide/ahci: Rename ahci_internal.h to ahci-internal.h

2024-03-11 Thread Markus Armbruster
BALATON Zoltan writes: > On Tue, 27 Feb 2024, Philippe Mathieu-Daudé wrote: >> On 27/2/24 14:13, BALATON Zoltan wrote: >>> Other headers now use dash instead of underscore. Rename >>> ahci_internal.h accordingly for consistency. >>> Signed-off-by: BALATON Zoltan >>> --- >>>

Re: [PATCH v2 2/4] mirror: allow specifying working bitmap

2024-03-07 Thread Markus Armbruster
# Example: > @@ -2562,6 +2596,7 @@ > 'data': { '*job-id': 'str', 'device': 'str', 'target': 'str', > '*replaces': 'str', > 'sync': 'MirrorSyncMode', > +'*bitmap': { 'type': 'str', 'features': [ 'unstable' ] }, > '*speed': 'int', '*granularity': 'uint32', > '*buf-size': 'int', '*on-source-error': 'BlockdevOnError', > '*on-target-error': 'BlockdevOnError', Acked-by: Markus Armbruster [...]

Re: [PATCH v2 1/4] qapi/block-core: avoid the re-use of MirrorSyncMode for backup

2024-03-07 Thread Markus Armbruster
['top', 'full', 'none'] } > + > ## > # @MirrorCopyMode: > # > @@ -1624,7 +1641,7 @@ > ## > { 'struct': 'BackupCommon', >'data': { '*job-id': 'str', 'device': 'str', > -'sync': 'MirrorSyncMode', '*speed': 'int', > + 'sync': 'BackupSyncMode', '*speed': 'int', > '*bitmap': 'str', '*bitmap-mode': 'BitmapSyncMode', > '*compress': 'bool', > '*on-source-error': 'BlockdevOnError', QAPI schema Acked-by: Markus Armbruster

Re: [PATCH v2 6/6] qapi: introduce CONFIG_READ event

2024-03-07 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Send a new event when guest reads virtio-pci config after > virtio_notify_config() call. > > That's useful to check that guest fetched modified config, for example > after resizing disk backend. > > Signed-off-by: Vladimir Sementsov-Ogievskiy [...] >

Re: [PATCH v2 5/6] qapi: device-sync-config: check runstate

2024-03-07 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Command result is racy if allow it during migration. Let's allow the > sync only in RUNNING state. > > Signed-off-by: Vladimir Sementsov-Ogievskiy If I understand this correctly, the previous commit introduces a race, and this one fixes it. We normally

Re: [PATCH v2 4/6] qapi: introduce device-sync-config

2024-03-07 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Add command to sync config from vhost-user backend to the device. It > may be helpful when VHOST_USER_SLAVE_CONFIG_CHANGE_MSG failed or not > triggered interrupt to the guest or just not available (not supported > by vhost-user server). > > Signed-off-by:

Re: [PATCH v2 3/6] qdev-monitor: add option to report GenericError from find_device_state

2024-03-07 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > system/qdev-monitor.c | 15 +++ > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c > index 9febb743f1..cf7481e416 100644 > ---

Re: [PATCH v2 2/6] qdev-monitor: fix error message in find_device_state()

2024-03-07 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > This "hotpluggable" here is misleading. Actually we check is object a > device or not. Let's drop the word. > > SUggested-by: Markus Armbruster "Suggested" > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- >

[PATCH] blockdev: Fix blockdev-snapshot-sync error reporting for no medium

2024-03-06 Thread Markus Armbruster
uot;: "GenericError", "desc": "Device '(null)' has no medium"}} Broken when commit 0901f67ecdb made @device optional. Use bdrv_get_device_or_node_name() instead. Now it fails as it should: <- {"error": {"class": "GenericError&qu

[PATCH 2/2] qerror: QERR_DEVICE_IN_USE is no longer used, drop

2024-03-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- include/qapi/qmp/qerror.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h index 8dd9fcb071..0c2689cf8a 100644 --- a/include/qapi/qmp/qerror.h +++ b/include/qapi/qmp/qerror.h @@ -23,9 +23,6

[PATCH 1/2] blockdev: Fix block_resize error reporting for op blockers

2024-03-06 Thread Markus Armbruster
rguments": {"node-name": "blk1", "size":32768}} <- {"error": {"class": "GenericError", "desc": "Device '(null)' is in use"}} Broken when commit 3b1dbd11a60 made @device optional. Fixed in commit ed3d2ec98a3 (

[PATCH 0/2] blockdev: Fix block_resize error reporting for op blockers

2024-03-06 Thread Markus Armbruster
PATCH 2 requires my "[PATCH] char: Slightly better error reporting when chardev is in use" posted earlier today, PATCH 1 does not. Based-on: <20240306081505.2258405-1-arm...@redhat.com> Markus Armbruster (2): blockdev: Fix block_resize error reporting for op b

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-03-04 Thread Markus Armbruster
Kevin Wolf writes: > Am 28.02.2024 um 19:07 hat Vladimir Sementsov-Ogievskiy geschrieben: [...] >> About the APIs, I think, of course we should deprecate block-job-* API, >> because we already have jobs which are not block-jobs, so we can't deprecate >> job-* API. >> >> So I suggest a plan:

Re: [PATCH 9/9] hostmem-file: support POSIX shm_open()

2024-02-29 Thread Markus Armbruster
Stefano Garzarella writes: > On Wed, Feb 28, 2024 at 01:32:17PM +0100, Markus Armbruster wrote: >>Stefano Garzarella writes: [...] >>> +# @shm: if true, shm_open(3) is used to create/open POSIX shared memory >>> +# object; if false, an open(2) is used.

Re: [PATCH v2 00/10] mirror: allow switching from background to active mode

2024-02-28 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > On 03.11.23 18:56, Markus Armbruster wrote: >> Is the job abstraction a failure? >> >> We have >> >> block-job- command since job- commandsince >> --

Re: [PATCH v8 14/15] hw/pci: Determine if rombar is explicitly enabled

2024-02-28 Thread Markus Armbruster
ping a > literal UINT32_MAX (0x or 4294967295) is more troublesome. > > Signed-off-by: Akihiko Odaki Remark on the previous patch applies. Reviewed-by: Markus Armbruster

Re: [PATCH v8 13/15] hw/pci: Use UINT32_MAX as a default value for rombar

2024-02-28 Thread Markus Armbruster
cannot distinguish that > from the implicit default. However, it is unlikely to be a problem as > nobody would type literal UINT32_MAX (0x or 4294967295) by > chance. > > Signed-off-by: Akihiko Odaki Not exactly elegant, but I believe we have similar "default value means not set by user (good enough because the default value is sufficiently odd)" logic elsewhere. Reviewed-by: Markus Armbruster

Re: [PATCH 9/9] hostmem-file: support POSIX shm_open()

2024-02-28 Thread Markus Armbruster
Stefano Garzarella writes: > Add a new `shm` bool option for `-object memory-backend-file`. > > When this option is set to true, the POSIX shm_open(3) is used instead > of open(2). > > So a file will not be created in the filesystem, but a "POSIX shared > memory object" will be instantiated. In

Re: [PATCH v7 15/16] vfio: Avoid inspecting option QDict for rombar

2024-02-28 Thread Markus Armbruster
Akihiko Odaki writes: > Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly > enabled. > > Signed-off-by: Akihiko Odaki > --- > hw/vfio/pci.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c > index

<    1   2   3   4   5   6   7   8   9   10   >