Re: [PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object

2021-03-12 Thread Paolo Bonzini
On 13/03/21 08:40, Markus Armbruster wrote: +if (!user_creatable_add_from_str(optarg, _err)) { +if (local_err) { +error_report_err(local_err); +exit(2); +} else { +/*

Re: [PATCH v3 26/30] qemu-img: Use user_creatable_process_cmdline() for --object

2021-03-12 Thread Markus Armbruster
Kevin Wolf writes: > This switches qemu-img from a QemuOpts-based parser for --object to > user_creatable_process_cmdline() which uses a keyval parser and enforces > the QAPI schema. > > Apart from being a cleanup, this makes non-scalar properties accessible. > > Signed-off-by: Kevin Wolf >

Re: [PATCH 2/2] virtlo(g|ck)d: Fix exec-restart

2021-03-12 Thread Jim Fehlig
On 3/12/21 1:44 AM, Peter Krempa wrote: On Thu, Mar 11, 2021 at 16:47:54 -0700, Jim Fehlig wrote: On 3/10/21 9:37 AM, Peter Krempa wrote: Commit 94e45d1042e broke exec-restart of virtlogd and virtlockd as the code waiting for the daemon shutdown closed the daemons before exec-restarting.

Re: [libvirt PATCH v2 1/1] ci: Add helper script

2021-03-12 Thread Andrea Bolognani
On Tue, 2021-02-23 at 16:17 +0100, Erik Skultety wrote: > On Wed, Feb 17, 2021 at 10:24:51AM +0100, Andrea Bolognani wrote: > > This is intended to be the perform a number of CI-related > > operations that currently are implemented in various different > > scripts written in various different

[libvirt PATCH v3 10/10] ci: Discourage users from using the Makefile directly

2021-03-12 Thread Andrea Bolognani
We now wrap all its important functionality with the much more user-friendly ci/helper script, and the long term plan is for the Makefile to disappear completely. Signed-off-by: Andrea Bolognani --- ci/Makefile | 11 +++ 1 file changed, 11 insertions(+) diff --git a/ci/Makefile

[libvirt PATCH v3 06/10] ci: Implement 'shell' helper action

2021-03-12 Thread Andrea Bolognani
This simply calls the underlying Makefile target, but allows additional arguments to be specified in a more convenient and discoverable way. Signed-off-by: Andrea Bolognani --- ci/helper | 48 1 file changed, 48 insertions(+) diff --git

[libvirt PATCH v3 09/10] ci: Delete refresh scripts

2021-03-12 Thread Andrea Bolognani
The functionality is now available in the ci/helper script. Signed-off-by: Andrea Bolognani --- ci/cirrus/refresh | 22 -- ci/containers/refresh | 41 - 2 files changed, 63 deletions(-) delete mode 100755 ci/cirrus/refresh delete

[libvirt PATCH v3 08/10] ci: Implement 'test' helper action

2021-03-12 Thread Andrea Bolognani
This simply calls the underlying Makefile target, but allows additional arguments to be specified in a more convenient and discoverable way. Signed-off-by: Andrea Bolognani --- ci/helper | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ci/helper b/ci/helper

[libvirt PATCH v3 05/10] ci: Implement 'list-images' helper action

2021-03-12 Thread Andrea Bolognani
This simply calls the underlying Makefile target. Signed-off-by: Andrea Bolognani --- ci/helper | 21 + 1 file changed, 21 insertions(+) diff --git a/ci/helper b/ci/helper index 05ecdcb426..420e9b73c2 100755 --- a/ci/helper +++ b/ci/helper @@ -18,6 +18,7 @@ import

[libvirt PATCH v3 04/10] ci: Implement 'refresh' helper action

2021-03-12 Thread Andrea Bolognani
This provides the same functionality as the two refresh scripts that are currently in the repository, with the following advantages: * all files are refreshed with a single command; * if lcitool is present in the user's $PATH, it will be discovered and used automatically; * some

[libvirt PATCH v3 03/10] ci: Add helper script

2021-03-12 Thread Andrea Bolognani
This is intended to be perform a number of CI-related operations that are currently implemented in various different scripts written in various different programming languages. Eventually, all existing functionality will be reimplemented in Python and made available through this single entry

[libvirt PATCH v3 07/10] ci: Implement 'build' helper action

2021-03-12 Thread Andrea Bolognani
This simply calls the underlying Makefile target, but allows additional arguments to be specified in a more convenient and discoverable way. Signed-off-by: Andrea Bolognani --- ci/helper | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git

[libvirt PATCH v3 02/10] ci: Fix name for ci-test target in help output

2021-03-12 Thread Andrea Bolognani
The target was renamed when moving to Meson, but the help text was not updated accordingly. Fixes: 1a0af38ae75262390061b8d07681b50f82e500fc Signed-off-by: Andrea Bolognani --- ci/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/Makefile b/ci/Makefile index

[libvirt PATCH v3 01/10] syntax-check: Allow exceptions for sc_prohibit_nonreentrant

2021-03-12 Thread Andrea Bolognani
We're going to need it in a bit. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 794ec326e4..c5a1b05f60 100644 --- a/build-aux/syntax-check.mk +++

[libvirt PATCH v3 00/10] ci: Add helper script

2021-03-12 Thread Andrea Bolognani
Changes from [v2]: * address review feedback; * wrap more Makefile functionality; * split into smaller, easier to review patches. Changes from [v1]: * implement (partial) support for running builds and spawning shells inside the container; * make the code more maintainable by

[PATCH v3 12/13] qemuxml2argvtest: Pin examples of -object usage to qemu-5.2 caps

2021-03-12 Thread Peter Krempa
Add a selection of tests making exapmple use of -object prior to change to the JSON format for -object. Signed-off-by: Peter Krempa --- ...disk-network-tlsx509-nbd.x86_64-5.2.0.args | 50 ...virtio-scsi-reservations.x86_64-5.2.0.args | 55 +

[PATCH v3 07/13] qemu: command: Use JSON for QAPIfied -object directly

2021-03-12 Thread Peter Krempa
Skip the lossy conversion to legacy commandline arguments by using the JSON props directly when -object is QAPIfied. This avoids issues with conversion of bitmaps and also allows validation of the generated JSON against the QMP schema in the tests. Since the new approach is triggered by a qemu

[PATCH v3 11/13] qemuxml2argvtest: Add DO_CAPS_LATEST variant of 'numatune-memnode'

2021-03-12 Thread Peter Krempa
The test has interesting config of the memory backend object. Preserve the 5.2 output too since it's prior to JSONification. Signed-off-by: Peter Krempa --- .../numatune-memnode.x86_64-5.2.0.args| 43 +++ .../numatune-memnode.x86_64-latest.args | 43

[PATCH v3 10/13] tests: qemucapabilities: Update qemu caps for object-add qapification

2021-03-12 Thread Peter Krempa
qemu qapified object-add, which means that it's introspectable via query-qmp-schema. Update the qemu-6.0 capabilities to commit XX TODO: update to pushed version --- .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml |1 + .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml |1 +

[PATCH v3 05/13] qemuMonitorCreateObjectPropsWrap: Open-code in qemuBuildMemoryBackendProps

2021-03-12 Thread Peter Krempa
There's just one caller left. Since qemuBuildMemoryBackendProps is too complex to be modified for now, just move the adding of 'id' and 'qom' type directly into the function. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 6 -- src/qemu/qemu_monitor.c | 15 ---

[PATCH v3 08/13] tests: qemuxml2argv: Validate generation of JSON props for object-add

2021-03-12 Thread Peter Krempa
Similarly to the validation for blockdev-add and netdev_add, use the qemuxml2argv test repository to drive validation of props for object-add. Signed-off-by: Peter Krempa --- tests/qemuxml2argvtest.c | 18 ++ 1 file changed, 18 insertions(+) diff --git

[PATCH v3 09/13] qemumonitorjsontest: Remove tripwire guarding object-add QAPIfication

2021-03-12 Thread Peter Krempa
Libvirt is now prepared for QAPIfied object-add. Signed-off-by: Peter Krempa --- tests/qemumonitorjsontest.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 82c74e2ef9..48b41c908a 100644 ---

[PATCH v3 03/13] qemu: capabilities: Introduce QEMU_CAPS_OBJECT_QAPIFIED

2021-03-12 Thread Peter Krempa
Starting from qemu-6.0 the parameters of -object/object-add are formally described by the QAPI schema. Additionally this changes the nesting of the properties as the 'props' nested object will be flattened to the parent. We'll need to detect whether qemu switched to this new approach to generate

[PATCH v3 01/13] qemuxml2argvdata: Remove unused output file 'disk-network-tlsx509.x86_64-latest.args'

2021-03-12 Thread Peter Krempa
Signed-off-by: Peter Krempa --- .../disk-network-tlsx509.x86_64-latest.args | 90 --- 1 file changed, 90 deletions(-) delete mode 100644 tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/disk-network-tlsx509.x86_64-latest.args

[PATCH v3 06/13] qemu: monitor: Don't add 'props' wrapper if qemu has QEMU_CAPS_OBJECT_QAPIFIED

2021-03-12 Thread Peter Krempa
Set 'objectAddNoWrap' when the capability is present. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 31c6f2f66a..0da74d8dff 100644 --- a/src/qemu/qemu_monitor.c +++

[PATCH v3 04/13] qemu: monitor: Make wrapping of 'props' of 'object-add' optional

2021-03-12 Thread Peter Krempa
Construct the JSON object which is used for object-add without the 'props' wrapper and add the wrapper only in the monitor code. This simplifies the JSON->commandline generator in the first place and also prepares for upcoming qemu where 'props' will be removed. Signed-off-by: Peter Krempa ---

[PATCH v3 02/13] virQEMUQAPISchemaTraverse: Fix quoting in comment

2021-03-12 Thread Peter Krempa
It tripped up highlighter in my editor. Signed-off-by: Peter Krempa --- src/qemu/qemu_qapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_qapi.c b/src/qemu/qemu_qapi.c index f7e4ca9324..f4047f507a 100644 --- a/src/qemu/qemu_qapi.c +++ b/src/qemu/qemu_qapi.c

[PATCH v3 00/13] Prepare for -object QAPIfication

2021-03-12 Thread Peter Krempa
v3 now uses JSON to configure objects which is possible with the following qemu patch: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg04436.html The use of JSON completely avoids problems with conversion of the JSON definition which we create regardless (especially bitmaps/arrays for

Re: [PATCH 1/4] qemu_shim: Don't hang if failed to start domain

2021-03-12 Thread Andrea Bolognani
On Fri, 2021-03-12 at 15:24 +0100, Michal Privoznik wrote: > On 3/12/21 11:42 AM, Andrea Bolognani wrote: > > On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > > > +++ b/src/qemu/qemu_shim.c > > > @@ -45,9 +45,12 @@ qemuShimEventLoop(void *opaque G_GNUC_UNUSED) > > > while (!quit)

Re: [PATCH 5/6] lib: Put some variable declarations on individual lines

2021-03-12 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: In short, virXXXPtr type is going away. With bing bang. And to s/bing/altavista/ help us rewrite the code with a sed script, it's better if each variable is declared on its own line. Signed-off-by: Michal Privoznik ---

Re: [PATCH 4/6] virconftypes: Fix name of virCapsGuestArchPtr

2021-03-12 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: The name is supposed to be virCapsGuestArchPtr not ..ptr. Signed-off-by: Michal Privoznik --- src/conf/virconftypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [PATCH 3/6] syntax-check: Fix and rename virSecurity rule

2021-03-12 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: The aim of virSecurity rule is to discourage from using plain virSecurityManager*() APIs within QEMU driver in favor of their qemuSecurity*() counterparts. The reason is simple: namespaces; virSecurityManager*() needs additional

Re: [PATCH 2/6] gendispatch: Don't use virXXXPtr for internal types

2021-03-12 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: The use of virXXXPtr is going away soon, therefore use 'virXXX *' instead. Signed-off-by: Michal Privoznik --- src/rpc/gendispatch.pl | 66 +- 1 file changed, 33 insertions(+), 33 deletions(-) Reviewed-by:

Re: [PATCH 4/4] qemu_shim: Always pre-create root dir

2021-03-12 Thread Michal Privoznik
On 3/12/21 11:51 AM, Andrea Bolognani wrote: On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: This problem is reproducible only with secret driver. When starting a domain via virt-qemu-run and both secret and (nonexistent) root directory specified this is what happens: 1)

Re: [PATCH 4/4] qemu_shim: Always pre-create root dir

2021-03-12 Thread Andrea Bolognani
On Fri, 2021-03-12 at 15:38 +0100, Michal Privoznik wrote: > On 3/12/21 11:51 AM, Andrea Bolognani wrote: > > On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > > > @@ -213,11 +213,16 @@ int main(int argc, char **argv) > > > } > > > tmproot = true; > > > > > > -

[PATCH v6 00/10] Configurable policy for handling deprecated interfaces

2021-03-12 Thread Markus Armbruster
New option -compat lets you configure what to do when deprecated interfaces get used. This is intended for testing users of the management interfaces. It is experimental. -compat deprecated-input= configures what to do when deprecated input is received. Available policies: * accept: Accept

[PATCH v2] qemu_shim: Don't hang if failed to start domain

2021-03-12 Thread Michal Privoznik
The qemu shim spawns a separate thread in which the event loop is ran. The virEventRunDefaultImpl() call is wrapped in a while() loop, just like it should. There are few lines of code around which try to ensure that domain is destroyed (when quitting) and that the last round of event loop is ran

Re: [PATCH 1/6] virsysinfo: Define and use auto cleanup func for virSysinfoDef properly

2021-03-12 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: What we are using really is heap allocated structure rather than stack allocated. And for that it's better to use g_autoptr() + G_DEFINE_AUTOPTR_CLEANUP_FUNC() combo, as Glib documentation for g_auto() reads: This is meant to be used with

Re: [PATCH 1/2] virnetdaemon: Introduce virNetDaemonQuitExecRestart

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 13:13:15 +0100, Michal Privoznik wrote: > On 3/10/21 5:37 PM, Peter Krempa wrote: > > Recent changes which meant to fix daemon shutdown broke the exec-restart > > capability of virtlogd and virtlockd, since the code actually closed all > > the sockets and shut down all the

Re: [PATCH 1/4] qemu_shim: Don't hang if failed to start domain

2021-03-12 Thread Michal Privoznik
On 3/12/21 11:42 AM, Andrea Bolognani wrote: On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: +++ b/src/qemu/qemu_shim.c @@ -45,9 +45,12 @@ qemuShimEventLoop(void *opaque G_GNUC_UNUSED) while (!quit) { g_mutex_lock(); if (eventQuitFlag &&

Re: [PATCH 3/3] selinux: Remove 'make' dependency

2021-03-12 Thread Vit Mojzis
On 3/11/21 1:29 PM, Neal Gompa wrote: On Thu, Mar 11, 2021 at 6:35 AM Daniel P. Berrangé wrote: On Wed, Mar 10, 2021 at 01:50:43PM -0500, Neal Gompa wrote: On Wed, Mar 10, 2021 at 7:43 AM Nikola Knazekova wrote: From: Vit Mojzis Compile the policy using a shell script executed by meson.

Re: [libvirt PATCH 0/9] docs: Convert html.in to rst (volume 1)

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 12:43:03 +0100, Erik Skultety wrote: > '#itsfriday' For docs changes a good help for reviewers is to push to your private gitlab clone and provide a link to the artifacts of the 'webpage' job so that the output can be viewed easily.

Re: [libvirt PATCH 5/9] docs: html.in: Convert architecture to rst

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 12:43:08 +0100, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > docs/architecture.html.in | 82 -- > docs/architecture.rst | 83 +++ > docs/meson.build | 2 +- > 3 files

Re: [libvirt PATCH 7/9] docs: html.in: Convert auth to rst

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 12:43:10 +0100, Erik Skultety wrote: > Signed-off-by: Erik Skultety > --- > docs/auth.html.in | 368 -- > docs/auth.rst | 343 ++ > docs/meson.build | 2 +- > 3 files changed, 344

[PATCH 2/2] refactoring virDomainDeviceInfoParseXML to use XPath

2021-03-12 Thread Kristina Hanicova
Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 50 ++ 1 file changed, 12 insertions(+), 38 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a3153dec45..843cbe6e84 100644 --- a/src/conf/domain_conf.c +++

[PATCH 1/2] conf: Propagate xmlXPathContextPtr into virDomainDeviceInfoParseXML()

2021-03-12 Thread Kristina Hanicova
Function virDomainDeviceInfoParseXML() will soon need it, because it will be doing XPath. Signed-off-by: Kristina Hanicova --- src/conf/domain_conf.c | 68 +++--- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/src/conf/domain_conf.c

[PATCH 0/2] refactoring conf for virDomainDeviceInfoParseXML to use XPath

2021-03-12 Thread Kristina Hanicova
Kristina Hanicova (2): conf: Propagate xmlXPathContextPtr into virDomainDeviceInfoParseXML() refactoring virDomainDeviceInfoParseXML to use XPath src/conf/domain_conf.c | 116 + 1 file changed, 49 insertions(+), 67 deletions(-) -- 2.29.2

Re: [PATCH 1/2] virnetdaemon: Introduce virNetDaemonQuitExecRestart

2021-03-12 Thread Michal Privoznik
On 3/10/21 5:37 PM, Peter Krempa wrote: Recent changes which meant to fix daemon shutdown broke the exec-restart capability of virtlogd and virtlockd, since the code actually closed all the sockets and shut down all the internals. Add virNetDaemonQuitExecRestart, which requests a shutdown of

Re: [PATCH 0/2] Fix exec-restart of virtlogd and virtlockd

2021-03-12 Thread Michal Privoznik
On 3/10/21 5:37 PM, Peter Krempa wrote: Peter Krempa (2): virnetdaemon: Introduce virNetDaemonQuitExecRestart virtlo(g|ck)d: Fix exec-restart src/libvirt_remote.syms | 1 + src/locking/lock_daemon.c | 2 +- src/logging/log_daemon.c | 2 +- src/rpc/virnetdaemon.c| 19

Re: [PATCH] virconf.c: Refactor cleanup and remove VIR_FREE

2021-03-12 Thread Michal Privoznik
On 3/12/21 10:51 AM, Yi Li wrote: Switch to using the 'g_auto*' helpers. Signed-off-by: Yi Li --- src/util/virconf.c | 47 +++--- 1 file changed, 15 insertions(+), 32 deletions(-) Almost :-) diff --git a/src/util/virconf.c b/src/util/virconf.c

[libvirt PATCH 8/9] docs: html.in: Convert bindings to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/bindings.html.in | 101 -- docs/bindings.rst | 62 ++ docs/meson.build | 2 +- 3 files changed, 63 insertions(+), 102 deletions(-) delete mode 100644 docs/bindings.html.in create

[libvirt PATCH 7/9] docs: html.in: Convert auth to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/auth.html.in | 368 -- docs/auth.rst | 343 ++ docs/meson.build | 2 +- 3 files changed, 344 insertions(+), 369 deletions(-) delete mode 100644 docs/auth.html.in

[libvirt PATCH 4/9] docs: html.in: Convert apps to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/apps.html.in | 488 -- docs/apps.rst | 348 + docs/meson.build | 2 +- 3 files changed, 349 insertions(+), 489 deletions(-) delete mode 100644 docs/apps.html.in create mode

[libvirt PATCH 6/9] docs: html.in: Convert auditlog to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/auditlog.html.in | 375 -- docs/auditlog.rst | 321 docs/meson.build | 2 +- 3 files changed, 322 insertions(+), 376 deletions(-) delete mode 100644

[libvirt PATCH 5/9] docs: html.in: Convert architecture to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/architecture.html.in | 82 -- docs/architecture.rst | 83 +++ docs/meson.build | 2 +- 3 files changed, 84 insertions(+), 83 deletions(-) delete mode 100644

[libvirt PATCH 0/9] docs: Convert html.in to rst (volume 1)

2021-03-12 Thread Erik Skultety
'#itsfriday' Erik Skultety (9): docs: html.in: Convert aclpolkit to rst docs: html.in: Convert api_extension to rst docs: html.in: Convert api to rst docs: html.in: Convert apps to rst docs: html.in: Convert architecture to rst docs: html.in: Convert auditlog to rst docs: html.in:

[libvirt PATCH 9/9] docs: html.in: Convert 'compiling' to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/compiling.html.in | 115 - docs/compiling.rst | 95 ++ docs/meson.build | 2 +- 3 files changed, 96 insertions(+), 116 deletions(-) delete mode 100644

[libvirt PATCH 3/9] docs: html.in: Convert api to rst

2021-03-12 Thread Erik Skultety
There were a number of occurrences where we used nested inline markup (verbatim + refs) which is currently not possible with RST syntax [1]. There is a possible workaround involving substitution definitions like .. |virConnectPtr| replace:: ``virConnectPtr`` .. _virConnectPtr:

[libvirt PATCH 1/9] docs: html.in: Convert aclpolkit to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/aclpolkit.html.in | 523 - docs/aclpolkit.rst | 310 docs/meson.build | 2 +- 3 files changed, 311 insertions(+), 524 deletions(-) delete mode 100644 docs/aclpolkit.html.in create

[libvirt PATCH 2/9] docs: html.in: Convert api_extension to rst

2021-03-12 Thread Erik Skultety
Signed-off-by: Erik Skultety --- docs/api_extension.html.in | 376 - docs/api_extension.rst | 291 docs/meson.build | 2 +- 3 files changed, 292 insertions(+), 377 deletions(-) delete mode 100644

Re: [PATCH 4/4] qemu_shim: Always pre-create root dir

2021-03-12 Thread Andrea Bolognani
On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > This problem is reproducible only with secret driver. When > starting a domain via virt-qemu-run and both secret and > (nonexistent) root directory specified this is what happens: > > 1) virt-qemu-run opens

Re: [PATCH 3/4] virConnectOpen: Require root dir to be absolute path

2021-03-12 Thread Andrea Bolognani
On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > In theory, users might want to use a relative path as a root > directory for embed drivers. But in practice, nothing in driver > initialization (specifically QEMU driver since it's the only one > that supports embedding now), is prepared

Re: [PATCH 2/4] docs: Lift restriction on running API from the event loop thread

2021-03-12 Thread Andrea Bolognani
On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > +++ b/docs/drvqemu.html.in > @@ -158,8 +158,10 @@ qemu+ssh://r...@example.com/system (remote access, SSH > tunnelled) >in mind, applications must NEVER invoke API >calls from the event loop thread itself, only other

Re: [PATCH 1/4] qemu_shim: Don't hang if failed to start domain

2021-03-12 Thread Andrea Bolognani
On Mon, 2021-03-01 at 12:49 +0100, Michal Privoznik wrote: > +++ b/src/qemu/qemu_shim.c > @@ -45,9 +45,12 @@ qemuShimEventLoop(void *opaque G_GNUC_UNUSED) > while (!quit) { > g_mutex_lock(); > if (eventQuitFlag && !eventPreventQuitFlag) { > +quit = true; >

[PATCH] virconf.c: Refactor cleanup and remove VIR_FREE

2021-03-12 Thread Yi Li
Switch to using the 'g_auto*' helpers. Signed-off-by: Yi Li --- src/util/virconf.c | 47 +++--- 1 file changed, 15 insertions(+), 32 deletions(-) diff --git a/src/util/virconf.c b/src/util/virconf.c index 16107bce96..17fbea2397 100644 ---

Re: [PATCH 0/2] virlockspace: Fix two more crashes of virtlockd on the exec-restart code path

2021-03-12 Thread Michal Privoznik
On 3/12/21 10:23 AM, Peter Krempa wrote: Peter Krempa (2): virLockSpacePreExecRestart: Avoid use-after-free virLockSpaceNewPostExecRestart: Fix out-of-bounds array access src/util/virlockspace.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Michal

Re: [PATCH] target/mips: Deprecate Trap-and-Emul KVM support

2021-03-12 Thread Philippe Mathieu-Daudé
+Paolo/Thomas/KVM On 3/12/21 2:03 AM, Jiaxun Yang wrote: > Upstream kernel had removed both host[1] and guest[2] support. > > [1]: > https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?id=45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 > [2]: >

Re: [PATCH v2] xenParseVif: Refactor parser

2021-03-12 Thread Michal Privoznik
On 3/11/21 5:23 PM, Peter Krempa wrote: Use g_strsplit to split the string and avoid use of stack'd strings. Signed-off-by: Peter Krempa --- src/libxl/xen_common.c | 130 + 1 file changed, 39 insertions(+), 91 deletions(-) Reviewed-by: Michal

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Paolo Bonzini
On 12/03/21 10:17, Andrew Jones wrote: On Fri, Mar 12, 2021 at 10:01:43AM +0100, Paolo Bonzini wrote: On 12/03/21 09:48, Andrew Jones wrote: I think we definitely need the additional data section here: For KVM on POWER, it would be good to know whether it's KVM-HV or KVM-PR, for KVM on MIPS it

Re: [PATCH] virConfLoadConfig: Refactor cleanup

2021-03-12 Thread Michal Privoznik
On 3/11/21 10:46 AM, Yi Li wrote: Switch to using the 'g_auto*' helpers. Signed-off-by: Yi Li --- src/util/virconf.c | 19 ++- 1 file changed, 6 insertions(+), 13 deletions(-) The patch itself is okay. But can you please to the same change for the whole file and resend?

Re: [PATCH 0/5] Document lxc.conf and libxl.conf locations

2021-03-12 Thread Andrea Bolognani
On Fri, 2021-03-12 at 09:24 +0100, Michal Privoznik wrote: > This is a continuation of effort started here, where I documented > qemu.conf location: > > https://listman.redhat.com/archives/libvir-list/2021-March/msg00276.html > > Michal Prívozník (5): > docs: Capitalize QEMU driver reference >

Re: [PATCH 2/2] virtlo(g|ck)d: Fix exec-restart

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 09:44:09 +0100, Peter Krempa wrote: > On Thu, Mar 11, 2021 at 16:47:54 -0700, Jim Fehlig wrote: > > On 3/10/21 9:37 AM, Peter Krempa wrote: > > > Commit 94e45d1042e broke exec-restart of virtlogd and virtlockd as the > > > code waiting for the daemon shutdown closed the

[PATCH 1/2] virLockSpacePreExecRestart: Avoid use-after-free

2021-03-12 Thread Peter Krempa
Recent refactor marked 'object' which is returned from the function as autofree but forgot to use g_steal_pointer in the return statement to prevent freeing it. Fixes: 9a1651f64d7 Signed-off-by: Peter Krempa --- src/util/virlockspace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 0/2] virlockspace: Fix two more crashes of virtlockd on the exec-restart code path

2021-03-12 Thread Peter Krempa
Peter Krempa (2): virLockSpacePreExecRestart: Avoid use-after-free virLockSpaceNewPostExecRestart: Fix out-of-bounds array access src/util/virlockspace.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.29.2

[PATCH 2/2] virLockSpaceNewPostExecRestart: Fix out-of-bounds array access

2021-03-12 Thread Peter Krempa
'res->owners' is allocated to 'res->nOwners' elements, but unfortunately 'res->nOwners' doesn't contain the proper value until after the allocation so 0 elements are allocated. The following loop which assumes that the array has the right number of elements then accesses the pointer out of bounds.

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Andrew Jones
On Fri, Mar 12, 2021 at 10:01:43AM +0100, Paolo Bonzini wrote: > On 12/03/21 09:48, Andrew Jones wrote: > > > I think we definitely need the additional data section here: For KVM on > > > POWER, it would be good to know whether it's KVM-HV or KVM-PR, for KVM on > > > MIPS it would be good to know

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Andrew Jones
On Fri, Mar 12, 2021 at 09:52:33AM +0100, Claudio Fontana wrote: > On 3/12/21 9:48 AM, Andrew Jones wrote: > > On Fri, Mar 12, 2021 at 09:11:45AM +0100, Thomas Huth wrote: > >> On 12/03/2021 08.42, Marc-André Lureau wrote: > >>> > >>> > >>> On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé >

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Claudio Fontana
On 3/12/21 9:48 AM, Andrew Jones wrote: > On Fri, Mar 12, 2021 at 09:11:45AM +0100, Thomas Huth wrote: >> On 12/03/2021 08.42, Marc-André Lureau wrote: >>> >>> >>> On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé >>> mailto:phi...@redhat.com>> wrote: >>> >> [...] >>> +## >>> +#

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Paolo Bonzini
On 12/03/21 09:48, Andrew Jones wrote: I think we definitely need the additional data section here: For KVM on POWER, it would be good to know whether it's KVM-HV or KVM-PR, for KVM on MIPS it would be good to know whether it's KVM_VM_MIPS_VZ or KVM_VM_MIPS_TE, for KVM on x86 whether it's the

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Peter Krempa
On Fri, Mar 12, 2021 at 09:46:54 +0100, Paolo Bonzini wrote: > On 12/03/21 09:14, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > > > On 11/03/21 15:08, Markus Armbruster wrote: > > > > > I would rather keep the OptsVisitor here. Do the same check for JSON > > > > > syntax that you

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Andrew Jones
On Fri, Mar 12, 2021 at 09:11:45AM +0100, Thomas Huth wrote: > On 12/03/2021 08.42, Marc-André Lureau wrote: > > > > > > On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé > > mailto:phi...@redhat.com>> wrote: > > > [...] > > +## > > +# @AcceleratorInfo: > > +# > > +#

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Paolo Bonzini
On 12/03/21 09:14, Markus Armbruster wrote: Paolo Bonzini writes: On 11/03/21 15:08, Markus Armbruster wrote: I would rather keep the OptsVisitor here. Do the same check for JSON syntax that you have in qobject_input_visitor_new_str, and whenever you need to walk all -object arguments, use

Re: [PATCH 2/2] virtlo(g|ck)d: Fix exec-restart

2021-03-12 Thread Peter Krempa
On Thu, Mar 11, 2021 at 16:47:54 -0700, Jim Fehlig wrote: > On 3/10/21 9:37 AM, Peter Krempa wrote: > > Commit 94e45d1042e broke exec-restart of virtlogd and virtlockd as the > > code waiting for the daemon shutdown closed the daemons before > > exec-restarting. > > This reminds me of an odd

[PATCH 5/5] docs: Document libxl.conf location

2021-03-12 Thread Michal Privoznik
This is similar to my earlier commit which documented lxc.conf location. Just like LXC, the libxl driver has only the system connection and thus only few places need changing. Signed-off-by: Michal Privoznik --- docs/drvxen.html.in| 11 +++ docs/manpages/libvirtd.rst | 1 +

[PATCH 2/5] manpages: Remove reference to a session daemon for LXC

2021-03-12 Thread Michal Privoznik
The LXC driver has no session daemon therefore its split daemon (virtlxcd) has to be ran as root. Any attempt to start it with euid != 0 fails. This is why the daemon does not look under any of XDG_* paths either. Signed-off-by: Michal Privoznik --- docs/manpages/virtlxcd.rst | 29

[PATCH 1/5] docs: Capitalize QEMU driver reference

2021-03-12 Thread Michal Privoznik
In official docs we refer to it as "QEMU driver", not "qemu driver". Signed-off-by: Michal Privoznik --- docs/manpages/virtqemud.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/manpages/virtqemud.rst b/docs/manpages/virtqemud.rst index d82d09ee61..ea8d6e3105 100644

[PATCH 4/5] manpages: Remove reference to a session daemon for libxl

2021-03-12 Thread Michal Privoznik
The libxl driver has no session daemon therefore its split daemon (virtxend) has to be ran as root. Any attempt to start it with euid != 0 fails. This is why the daemon does not look under any of XDG_* paths either. Signed-off-by: Michal Privoznik --- docs/manpages/virtxend.rst | 29

[PATCH 3/5] docs: Document lxc.conf location

2021-03-12 Thread Michal Privoznik
This is similar to my earlier commit which documented qemu.conf locations. Luckily, the LXC driver has only the system connection and not session or embed one. Signed-off-by: Michal Privoznik --- docs/drvlxc.html.in| 10 ++ docs/manpages/libvirtd.rst | 16 +---

[PATCH 0/5] Document lxc.conf and libxl.conf locations

2021-03-12 Thread Michal Privoznik
This is a continuation of effort started here, where I documented qemu.conf location: https://listman.redhat.com/archives/libvir-list/2021-March/msg00276.html Michal Prívozník (5): docs: Capitalize QEMU driver reference manpages: Remove reference to a session daemon for LXC docs: Document

Re: [PATCH v3 00/30] qapi/qom: QAPIfy --object and object-add

2021-03-12 Thread Markus Armbruster
Paolo Bonzini writes: > On 11/03/21 15:08, Markus Armbruster wrote: >>> I would rather keep the OptsVisitor here. Do the same check for JSON >>> syntax that you have in qobject_input_visitor_new_str, and whenever >>> you need to walk all -object arguments, use something like this: >>> >>>

Re: [PATCH 1/6] accel: Introduce 'query-accels' QMP command

2021-03-12 Thread Thomas Huth
On 12/03/2021 08.42, Marc-André Lureau wrote: On Fri, Mar 12, 2021 at 3:14 AM Philippe Mathieu-Daudé > wrote: [...] +## +# @AcceleratorInfo: +# +# Accelerator information. +# +# @name: The accelerator name. +# +# Since: 6.0 +##

Re: [PATCH 6/6] lib: Drop internal virXXXPtr typedefs

2021-03-12 Thread Jiri Denemark
On Thu, Mar 11, 2021 at 18:47:37 +, Daniel P. Berrangé wrote: > On Thu, Mar 11, 2021 at 06:54:20PM +0100, Michal Privoznik wrote: > > Historically, we declared pointer type to our types: > > > > typedef struct _virXXX virXXX; > > typedef virXXX *virXXXPtr; > > > > But usefulness of such

Re: [PATCH 6/6] lib: Drop internal virXXXPtr typedefs

2021-03-12 Thread Michal Privoznik
On 3/11/21 7:47 PM, Daniel P. Berrangé wrote: On Thu, Mar 11, 2021 at 06:54:20PM +0100, Michal Privoznik wrote: Historically, we declared pointer type to our types: typedef struct _virXXX virXXX; typedef virXXX *virXXXPtr; But usefulness of such declaration is questionable, at best.