[libvirt PATCH 0/2] Minor fd passing fixes

2022-05-13 Thread Jonathon Jongsma
Following up Peter's series, here's a couple additional minor cleanups that simply remove some unused functions related to fd passing. Jonathon Jongsma (2): util: remove virCommandPassFDGetFDIndex() util: Remove virCommandPassFDIndex() src/libvirt_private.syms | 2 -- src/util/vircommand.c

[libvirt PATCH 2/2] util: Remove virCommandPassFDIndex()

2022-05-13 Thread Jonathon Jongsma
The last use of this function was removed in commit 6d161bcc, so the function is no longer used except as an internal implementation for virCommandPassFD(). Signed-off-by: Jonathon Jongsma --- src/libvirt_private.syms | 1 - src/util/vircommand.c| 28 ++-- 2 files

[libvirt PATCH 1/2] util: remove virCommandPassFDGetFDIndex()

2022-05-13 Thread Jonathon Jongsma
commit f9236200 removed the last use of this function, so it can be dropped. Signed-off-by: Jonathon Jongsma --- src/libvirt_private.syms | 1 - src/util/vircommand.c| 27 --- src/util/vircommand.h| 3 --- 3 files changed, 31 deletions(-) diff --git

Re: [PATCH 34/37] qemu: slirp: Pass FDs to qemu via qemuFDPass in the network private data

2022-05-13 Thread Jonathon Jongsma
On 5/13/22 6:45 AM, Peter Krempa wrote: On Thu, May 12, 2022 at 14:07:00 -0500, Jonathon Jongsma wrote: On 5/10/22 10:20 AM, Peter Krempa wrote: Populate the 'slirpfd' qemuFDPass structure inside the private data for passing the fd to qemu rather than using out-of-band variables.

[libvirt PATCH v4 04/11] qemu: add -display dbus support

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau By default, libvirt will start a private bus and tell QEMU to connect to it. Instead, a D-Bus "address" to connect to can be specified, or the p2p mode enabled. D-Bus display works best with GL & a rendernode, which can be specified with child element. Signed-off-by:

[libvirt PATCH v4 11/11] docs: document type dbus

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- NEWS.rst | 5 + docs/formatdomain.rst | 43 ++- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/NEWS.rst b/NEWS.rst index 7903449f9b..b32fd26167 100644 ---

[libvirt PATCH v4 10/11] qemu: add usbredir type 'dbus'

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau The USB device redirection works in a similar way as Spice. The underlying 'dbus' channel is set to "org.qemu.usbredir" by default for the client to identify the channel purpose (as specified in -display dbus documentation). Signed-off-by: Marc-André Lureau ---

[libvirt PATCH v4 01/11] qemu: add -display dbus capability check

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 + 4 files

[libvirt PATCH v4 09/11] qemu: add -chardev dbus support

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 4 +++ src/qemu/qemu_monitor_json.c | 9 ++ .../graphics-dbus-chardev.args| 32 +++ tests/qemuxml2argvtest.c

[libvirt PATCH v4 08/11] conf: add

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Like a Spice port, a dbus serial must specify an associated channel name. Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c| 25 +++ src/conf/domain_conf.h| 4 ++ src/conf/domain_validate.c

[libvirt PATCH v4 07/11] qemu: add audio type 'dbus'

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/qemu/qemu_command.c | 12 +-- src/qemu/qemu_validate.c | 30 - .../qemuxml2argvdata/graphics-dbus-audio.args | 33 +++ tests/qemuxml2argvtest.c

[libvirt PATCH v4 05/11] virsh: report the D-Bus bus URI for domdisplay

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau This implementation reports only Unix bus address using the URI format proposed in https://gitlab.freedesktop.org/dbus/dbus/-/issues/348. We prefer a URI form over the D-Bus address form, since all other display protocols use a URI, allowing to distinguish between

[libvirt PATCH v4 06/11] conf: add support

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/bhyve/bhyve_command.c | 1 + src/conf/domain_conf.c| 34 +++--- src/conf/domain_conf.h| 2 + src/conf/schemas/domaincommon.rng | 29

[libvirt PATCH v4 02/11] conf: add

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- src/conf/domain_conf.c| 78 ++- src/conf/domain_conf.h| 8 ++ src/conf/domain_validate.c| 9 ++- src/conf/schemas/basictypes.rng | 7

[libvirt PATCH v4 03/11] qemu: start the D-Bus daemon for the display

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Start the daemon if necessary (it is already stopped in qemuProcessStop) Signed-off-by: Marc-André Lureau --- src/qemu/qemu_extdevice.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index

[libvirt PATCH v4 00/11] Add QEMU "-display dbus" support

2022-05-13 Thread marcandre . lureau
From: Marc-André Lureau Hi, This series implements supports for the QEMU "-display dbus" support, available since 7.0. By default, libvirt will start a private VM bus (sharing and reusing the existing "vmstate" VM bus & code). The feature set should cover the needs to replace Spice as local

Re: [PATCH v2] virt-xml-validate: Add more XML formats support

2022-05-13 Thread Ján Tomko
On a Wednesday in 2022, Han Han wrote: Add these XML formats validation in manpage or script: cpu, domainbackup, domaincaps, domaincheckpoint, networkport, storagepoolcaps. Signed-off-by: Han Han --- Diff from v1: Add domainbackup, domaincaps, networkport, storagepoolcaps v1:

Re: [PATCH 01/29] access: Remove unused includes

2022-05-13 Thread Ján Tomko
On a Wednesday in 2022, Peng Liang wrote: From: Adam Tao Signed-off-by: Peng Liang The name in 'From' does not match the one in the signoff. The signoff needs to be from the author of the patch. https://libvirt.org/hacking.html#developer-certificate-of-origin Jano ---

Re: [libvirt PATCH 0/3] conf: Fix handling of SMM feature

2022-05-13 Thread Ján Tomko
On a Friday in 2022, Andrea Bolognani wrote: Andrea Bolognani (3): tests: Update smm=on test tests: Introduce smm=off test conf: Fix smm=off handling src/conf/domain_conf.c| 9 +--- ...rgs => machine-smm-off.x86_64-latest.args} | 16 ++

[libvirt PATCH 3/3] conf: Fix smm=off handling

2022-05-13 Thread Andrea Bolognani
We have to always store the state of the feature in the virDomainDef struct, otherwise will incorrectly be interpreted as if the element was not present. Fixes: eeb94215b074a71b3c8932d5fcaf657f269b2c82 Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c

[libvirt PATCH 0/3] conf: Fix handling of SMM feature

2022-05-13 Thread Andrea Bolognani
Andrea Bolognani (3): tests: Update smm=on test tests: Introduce smm=off test conf: Fix smm=off handling src/conf/domain_conf.c| 9 +--- ...rgs => machine-smm-off.x86_64-latest.args} | 16 ++ tests/qemuxml2argvdata/machine-smm-off.xml| 17

[libvirt PATCH 2/3] tests: Introduce smm=off test

2022-05-13 Thread Andrea Bolognani
This complements the existing smm=on tests. Looking at the output files, one can immediately see how this case is currently not being handled correctly. We're going to fix that in the next commit. Signed-off-by: Andrea Bolognani --- .../machine-smm-off.x86_64-latest.args| 32

[libvirt PATCH 1/3] tests: Update smm=on test

2022-05-13 Thread Andrea Bolognani
Use DO_TEST_CAPS_LATEST() instead of hardcoding capabilities and add the xml2xml part, which was missing; finally, rename it to accomodate the complementary smm=off test that we're about to introduce. Signed-off-by: Andrea Bolognani --- ...args => machine-smm-on.x86_64-latest.args} | 16

Re: [PATCH v2 2/3] lib: Repurpose virDomainSaveParams() with no VIR_DOMAIN_SAVE_PARAM_FILE

2022-05-13 Thread Michal Prívozník
On 5/13/22 14:57, Claudio Fontana wrote: > On 5/13/22 9:54 AM, Michal Privoznik wrote: >> When no VIR_DOMAIN_SAVE_PARAM_FILE typed param is set when >> calling virDomainSaveParams() then in turn virQEMUFileOpenAs() >> tries to open a NULL path. >> >> We have two options now: >> 1) require the

Re: [libvirt PATCH 22/80] qemu: Handle 'postcopy-paused' migration state

2022-05-13 Thread Jiri Denemark
On Wed, May 11, 2022 at 15:27:53 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:20:43 +0200, Jiri Denemark wrote: > > When connection breaks during post-copy migration, QEMU enters > > 'postcopy-paused' state. We need to handle this state and make the > > situation visible to upper

Re: [PATCH v2 3/3] virDomainRestoreFlags: Require VIR_DOMAIN_SAVE_PARAM_FILE for now

2022-05-13 Thread Claudio Fontana
On 5/13/22 9:54 AM, Michal Privoznik wrote: > Calling virDomainRestoreFlags() with no typed params results in > an error in open() because it tries to open a NULL path. > Obviously, this is wrong and path to restore from must be > provided, at least for now until other sources of restore are >

Re: [PATCH v2 2/3] lib: Repurpose virDomainSaveParams() with no VIR_DOMAIN_SAVE_PARAM_FILE

2022-05-13 Thread Claudio Fontana
On 5/13/22 9:54 AM, Michal Privoznik wrote: > When no VIR_DOMAIN_SAVE_PARAM_FILE typed param is set when > calling virDomainSaveParams() then in turn virQEMUFileOpenAs() > tries to open a NULL path. > > We have two options now: > 1) require the typed param, which in turn may be promoted to a >

Re: [libvirt PATCH 17/80] qemu: Restore async job start timestamp on reconnect

2022-05-13 Thread Jiri Denemark
On Wed, May 11, 2022 at 15:04:53 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:20:38 +0200, Jiri Denemark wrote: > > Jobs that are supposed to remain active even when libvirt daemon > > restarts were reported as started at the time the daemon was restarted. > > This is not very helpful,

Re: [PATCH 00/37] qemu: Improve 'qemuFDPass' usability and refactor interface code to use it

2022-05-13 Thread Ján Tomko
On a Tuesday in 2022, Peter Krempa wrote: This series modifies qemuFDPass to be a bit more convenient to use by e.g. remembering the maximum fd set index currently used across libvirtd restarts so that we can avoid having to pass the FDs before actually constructing the device properties. Along

Re: [PATCH 16/37] qemuBuildHostNetProps: Refactor construction of tapfd/vhostfd arguments

2022-05-13 Thread Ján Tomko
On a Tuesday in 2022, Peter Krempa wrote: Pre-construct the array the same way for the case when there's only one FD and when there are multiple. We just change the argument name depending on the count. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 66

Re: [libvirt PATCH 14/80] qemu: Keep migration job active after failed post-copy

2022-05-13 Thread Jiri Denemark
On Wed, May 11, 2022 at 14:35:22 +0200, Peter Krempa wrote: > On Tue, May 10, 2022 at 17:20:35 +0200, Jiri Denemark wrote: > > When post-copy migration fails, we can't just abort the migration and > > resume the domain on the source host as it is already running on the > > destination host and no

Re: [PATCH 34/37] qemu: slirp: Pass FDs to qemu via qemuFDPass in the network private data

2022-05-13 Thread Peter Krempa
On Thu, May 12, 2022 at 14:07:00 -0500, Jonathon Jongsma wrote: > On 5/10/22 10:20 AM, Peter Krempa wrote: > > Populate the 'slirpfd' qemuFDPass structure inside the private data for > > passing the fd to qemu rather than using out-of-band variables. > > > > Signed-off-by: Peter Krempa > > --- >

Re: [PATCH 32/37] qemuSlirpStart: Simplify parameters

2022-05-13 Thread Peter Krempa
On Thu, May 12, 2022 at 13:37:45 -0500, Jonathon Jongsma wrote: > On 5/10/22 10:20 AM, Peter Krempa wrote: > > The 'driver' can be taken from the private data of 'vm' and 'slirp' can > > be taken from private data of 'net', both of which we need anyways. > > > > Additionally by checking whether

Re: [PATCH v2 0/3] virDomain{Save,Restore}Params: More fixes

2022-05-13 Thread Martin Kletzander
On Fri, May 13, 2022 at 09:54:25AM +0200, Michal Privoznik wrote: v2 of: https://listman.redhat.com/archives/libvir-list/2022-May/231307.html diff to v1: - Reworked 3/3, instead of promoting restore path to a regular argument, let's keep it in typed params as this is more future proof. But

[PATCH 17/17] nodedev: add tests for optional device address to css device

2022-05-13 Thread Boris Fiuczynski
Add nodedev schema parsing and format tests for the optional new device address on the css devices. Signed-off-by: Boris Fiuczynski --- .../css_0_0_1-invalid.xml | 10 + ...s_0_0_fffe_mdev_types_channel_dev_addr.xml | 22 +++

[PATCH 14/17] nodedev: refactor css XML parsing from ccw XML parsing

2022-05-13 Thread Boris Fiuczynski
In preparation for easier extension later. Signed-off-by: Boris Fiuczynski --- src/conf/node_device_conf.c | 40 +++-- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index

[PATCH 07/17] util: refactor virDomainDeviceCCWAddressIsValid into virccw

2022-05-13 Thread Boris Fiuczynski
Refactor virDomainDeviceCCWAddressIsValid into virccw and rename method as virCCWDeviceAddressIsValid. Signed-off-by: Boris Fiuczynski --- src/conf/device_conf.c | 12 ++-- src/conf/device_conf.h | 1 - src/libvirt_private.syms | 2 +- src/util/virccw.c| 8

[PATCH 04/17] util: make reuse of ccw device address format constant

2022-05-13 Thread Boris Fiuczynski
Signed-off-by: Boris Fiuczynski --- src/conf/device_conf.h | 1 - src/qemu/qemu_command.c | 2 +- src/util/virccw.c | 2 +- src/util/virccw.h | 2 ++ 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/conf/device_conf.h b/src/conf/device_conf.h index

[PATCH 06/17] util: refactor virDomainCCWAddressIncrement into virccw

2022-05-13 Thread Boris Fiuczynski
Refactor virDomainCCWAddressIncrement into virccw and rename method as virCCWDeviceAddressIncrement. Signed-off-by: Boris Fiuczynski --- src/conf/domain_addr.c | 16 +--- src/libvirt_private.syms | 1 + src/util/virccw.c| 13 + src/util/virccw.h| 1 +

[PATCH 05/17] util: refactor ccw address constants into virccw

2022-05-13 Thread Boris Fiuczynski
Signed-off-by: Boris Fiuczynski --- src/conf/device_conf.c | 6 +++--- src/conf/device_conf.h | 4 src/conf/domain_addr.c | 2 +- src/util/virccw.h | 3 +++ 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/conf/device_conf.c b/src/conf/device_conf.c index

[PATCH 16/17] nodedev: add optional device address of channel device to css device

2022-05-13 Thread Boris Fiuczynski
Add the new introduced sysfs attribute dev_busid which provides the address of the device in the subchannel independent from the bound device driver. It is added if available in the sysfs as optional channel_dev_addr element into the css device capabilty providing the ccw deivce address attributes

[PATCH 12/17] nodedev: refactor css format from ccw format method

2022-05-13 Thread Boris Fiuczynski
In preparation for easier extension later. Signed-off-by: Boris Fiuczynski --- src/conf/node_device_conf.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 67c8c4a3fd..97779078e8 100644 ---

[PATCH 11/17] util: add virCCWDeviceAddressFromString to virccw

2022-05-13 Thread Boris Fiuczynski
Add a method to parse a ccw device address from a string. Signed-off-by: Boris Fiuczynski --- po/POTFILES.in | 1 + src/libvirt_private.syms | 1 + src/util/virccw.c| 23 +++ src/util/virccw.h| 3 +++ 4 files changed, 28 insertions(+) diff --git

[PATCH 09/17] conf: adjust method name virDomainDeviceCCWAddressParseXML

2022-05-13 Thread Boris Fiuczynski
Adjust method name virDomainDeviceCCWAddressParseXML to virCCWDeviceAddressParseXML. Signed-off-by: Boris Fiuczynski --- src/conf/device_conf.c | 4 ++-- src/conf/device_conf.h | 4 ++-- src/conf/domain_conf.c | 3 +-- src/libvirt_private.syms | 2 +- 4 files changed, 6 insertions(+), 7

[PATCH 00/17] nodedev: add optional device address of channel device to css device

2022-05-13 Thread Boris Fiuczynski
While this series started with the intend to add the optional device address of a subchannel device to the nodedev css device the outcome now also includes a small fix in the error reporting of css cap XML parsing as well as a refactoring of generic ccw code into virccw in utils. Boris Fiuczynski

[PATCH 15/17] schemas: refactor out nodedev ccw address schema

2022-05-13 Thread Boris Fiuczynski
Refactor out nodedev ccw address schema for easy reuse later. Signed-off-by: Boris Fiuczynski --- src/conf/schemas/nodedev.rng | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/conf/schemas/nodedev.rng b/src/conf/schemas/nodedev.rng index

[PATCH 10/17] util: add ccw device address parsing into virccw

2022-05-13 Thread Boris Fiuczynski
Add virCCWDeviceAddressParseFromString and use it in nodedev udev. Signed-off-by: Boris Fiuczynski --- src/libvirt_private.syms | 1 + src/node_device/node_device_udev.c | 8 +--- src/util/virccw.c | 18 ++ src/util/virccw.h | 5

[PATCH 08/17] util: refactor virDomainDeviceCCWAddressEqual into virccw

2022-05-13 Thread Boris Fiuczynski
Refactor virDomainDeviceCCWAddressEqual into virccw and rename method as virCCWDeviceAddressEqual. Signed-off-by: Boris Fiuczynski --- src/conf/device_conf.c | 12 src/conf/device_conf.h | 2 -- src/conf/domain_conf.c | 8 src/libvirt_private.syms | 2 +-

[PATCH 01/17] nodedev: fix reported error msg in css cap XML parsing

2022-05-13 Thread Boris Fiuczynski
Signed-off-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer --- src/conf/node_device_conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 8b20a7bee9..67c8c4a3fd 100644 --- a/src/conf/node_device_conf.c +++

[PATCH 02/17] util: refactor virDomainDeviceCCWAddress into virccw.h

2022-05-13 Thread Boris Fiuczynski
Refactor ccw data structure virDomainDeviceCCWAddress into util virccw.h and rename it as virCCWDeviceAddress. Signed-off-by: Boris Fiuczynski --- src/conf/device_conf.c | 8 +++ src/conf/device_conf.h | 19 ++--- src/conf/domain_addr.c

[PATCH 13/17] nodedev: refactor ccw device address parsing from XML

2022-05-13 Thread Boris Fiuczynski
Move ccw device address XML parsing into new method for later reuse. Signed-off-by: Boris Fiuczynski --- src/conf/node_device_conf.c | 96 ++--- 1 file changed, 58 insertions(+), 38 deletions(-) diff --git a/src/conf/node_device_conf.c

[PATCH 03/17] util: refactor virDomainCCWAddressAsString into virccw

2022-05-13 Thread Boris Fiuczynski
Move virDomainCCWAddressAsString into virccw and rename method as virCCWDeviceAddressAsString. Signed-off-by: Boris Fiuczynski --- src/conf/domain_addr.c | 12 +++- src/conf/domain_addr.h | 3 --- src/conf/domain_conf.c | 2 +-

Re: [libvirt RFCv8 00/27] multifd save restore prototype

2022-05-13 Thread Claudio Fontana
On 5/12/22 3:38 PM, Claudio Fontana wrote: > On 5/11/22 7:46 PM, Daniel P. Berrangé wrote: >> On Wed, May 11, 2022 at 07:31:45PM +0200, Claudio Fontana wrote: >>> That's great, I love when things are simple. >>> >>> If indeed we want to remove the copy in libvirt (which will also mean >>>

[PATCH v2 0/3] virDomain{Save,Restore}Params: More fixes

2022-05-13 Thread Michal Privoznik
v2 of: https://listman.redhat.com/archives/libvir-list/2022-May/231307.html diff to v1: - Reworked 3/3, instead of promoting restore path to a regular argument, let's keep it in typed params as this is more future proof. But require it for now. Michal Prívozník (3): qemu: Separate out

[PATCH v2 3/3] virDomainRestoreFlags: Require VIR_DOMAIN_SAVE_PARAM_FILE for now

2022-05-13 Thread Michal Privoznik
Calling virDomainRestoreFlags() with no typed params results in an error in open() because it tries to open a NULL path. Obviously, this is wrong and path to restore from must be provided, at least for now until other sources of restore are introduced. Then this limitation can be relaxed.

[PATCH v2 2/3] lib: Repurpose virDomainSaveParams() with no VIR_DOMAIN_SAVE_PARAM_FILE

2022-05-13 Thread Michal Privoznik
When no VIR_DOMAIN_SAVE_PARAM_FILE typed param is set when calling virDomainSaveParams() then in turn virQEMUFileOpenAs() tries to open a NULL path. We have two options now: 1) require the typed param, which in turn may be promoted to a regular argument, or 2) use this opportunity to make the

[PATCH v2 1/3] qemu: Separate out save code from qemuDomainManagedSave()

2022-05-13 Thread Michal Privoznik
The code that actually does managed save within qemuDomainManagedSave() is going to be reused shortly. Move it out into a separate helper. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 82 -- 1 file changed, 48 insertions(+), 34

Re: [PATCH 3/3] lib: Require path in virDomainRestoreParams()

2022-05-13 Thread Claudio Fontana
On 5/13/22 9:28 AM, Michal Prívozník wrote: > On 5/12/22 19:09, Claudio Fontana wrote: >> Hello Michal, >> >> this seems to be going backwards to special case arguments instead of >> putting them into typed parameters. >> I do not understand where this need comes from, but it does not seem a good

Re: [PATCH 3/3] lib: Require path in virDomainRestoreParams()

2022-05-13 Thread Michal Prívozník
On 5/12/22 19:09, Claudio Fontana wrote: > Hello Michal, > > this seems to be going backwards to special case arguments instead of putting > them into typed parameters. > I do not understand where this need comes from, but it does not seem a good > direction to me. The need stems from my