Re: [libvirt PATCH] conf: Fix documentation for virDomainDefGetShortName()

2022-02-03 Thread Martin Kletzander
On Thu, Feb 03, 2022 at 07:20:42PM +0100, Andrea Bolognani wrote: The @unique argument didn't exist even when the function was introduced in a042275a396e, and the @vm argument was not renamed No need to point fingers, really O:-) when the function was changed to take a virDomainDef* instead

[libvirt PATCH] conf: Fix documentation for virDomainDefGetShortName()

2022-02-03 Thread Andrea Bolognani
The @unique argument didn't exist even when the function was introduced in a042275a396e, and the @vm argument was not renamed when the function was changed to take a virDomainDef* instead of a virDomainObj* in 7ed6934f3b92. Signed-off-by: Andrea Bolognani --- src/conf/domain_conf.c | 3 +-- 1

Re: [PATCH v3 0/3] qemu_tpm: Get swtpm pid without binary validation

2022-02-03 Thread Vasily Ulyanov
Hi Michal, On 03/02/2022 18:09, Michal Prívozník wrote: > > Apart from patch 2/3 this looks good. So here's what we are going to do. > I've uploaded fixup commits onto my gitlab: > > https://gitlab.com/MichalPrivoznik/libvirt/-/commits/virpidfile/ > > Please take a look and if you agree I

Re: [PATCH 1/5] lib: Introduce 'virDomainQemuMonitorCommandWithFiles'

2022-02-03 Thread Michal Prívozník
On 2/3/22 15:51, Peter Krempa wrote: > This API has the same semantics as 'virDomainQemuMonitorCommand' but > accepts file descriptors which are then forwarded to qemu. > > Signed-off-by: Peter Krempa > --- > include/libvirt/libvirt-qemu.h | 6 +++ > src/driver-hypervisor.h |

Re: [PATCH v3 1/3] virpidfile: Add virPidFileReadPathIfLocked func

2022-02-03 Thread Michal Prívozník
On 2/2/22 17:28, Vasiliy Ulyanov wrote: > The function will attempt to read a pid from @path, and store it in > @pid. The @pid will only be set, however, if @path is locked by > virFileLock() at byte 0 and the pid in @path is running. > > Signed-off-by: Vasiliy Ulyanov > --- >

Re: [PATCH v3 2/3] qemu: tpm: Get swtpm pid without binary validation

2022-02-03 Thread Michal Prívozník
On 2/2/22 17:28, Vasiliy Ulyanov wrote: > Access to /proc/[pid]/exe may be restricted in certain environments (e.g. > in containers) and any attempt to stat(2) or readlink(2) the file will > result in 'permission denied' error if the calling process does not have > CAP_SYS_PTRACE capability.

Re: [PATCH v3 0/3] qemu_tpm: Get swtpm pid without binary validation

2022-02-03 Thread Michal Prívozník
On 2/2/22 17:28, Vasiliy Ulyanov wrote: > [v1] > https://listman.redhat.com/archives/libvir-list/2022-January/msg8.html > [v2] > https://listman.redhat.com/archives/libvir-list/2022-January/msg00582.html > > As suggesed in the review comments: > - dropped virFileGetLockOwner; > - simplified

Re: [PATCH v3 3/3] qemu: gpu: Get pid without binary validation

2022-02-03 Thread Michal Prívozník
On 2/2/22 17:28, Vasiliy Ulyanov wrote: > The binary validation in virPidFileReadPathIfAlive may fail with EACCES > if the calling process does not have CAP_SYS_PTRACE capability. > Therefore instead do only the check that the pidfile is locked by the > correct process. > > Fixes the same issue

Re: [PATCH 0/5] Introduce 'virDomainQemuMonitorCommandWithFiles'

2022-02-03 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: I needed to do some tests where I wanted to pass FDs to qemu to see how 'add-fd' and 'getfd' behave. It may be useful for others who wish for any reason to pass FDs to QMP commands. Peter Krempa (5): lib: Introduce

Re: [PATCH 2/5] cmdStartGetFDs: Modernize

2022-02-03 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: Calculate the length of the FD list beforehand to avoid multiple expansions and mainly simplify the code and use automatic freeing to remove the error code path. Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 18 +++--- 1 file

Re: [PATCH 1/5] lib: Introduce 'virDomainQemuMonitorCommandWithFiles'

2022-02-03 Thread Ján Tomko
On a Thursday in 2022, Peter Krempa wrote: This API has the same semantics as 'virDomainQemuMonitorCommand' but accepts file descriptors which are then forwarded to qemu. Signed-off-by: Peter Krempa --- include/libvirt/libvirt-qemu.h | 6 +++ src/driver-hypervisor.h | 8

Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-03 Thread Laine Stump
On 2/3/22 10:52 AM, Michal Prívozník wrote: On 2/3/22 15:45, Laine Stump wrote: On 2/2/22 1:04 PM, Michal Prívozník wrote: Laine, any thoughts? I somehow thought this had already been pushed, so I was surprised when it showed up again :-/ I think the only issue I had before was that I

Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-03 Thread Dmitrii Shcherbakov
Thanks again for the feedback - much appreciated! Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitriis On Thu, Feb 3, 2022 at 6:52 PM Michal Prívozník wrote: > > On 2/3/22 15:45, Laine Stump wrote: > > On 2/2/22 1:04 PM, Michal Prívozník wrote: > >> > >> Laine, any thoughts? > > > > I somehow

Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-03 Thread Michal Prívozník
On 2/3/22 15:45, Laine Stump wrote: > On 2/2/22 1:04 PM, Michal Prívozník wrote: >> >> Laine, any thoughts? > > I somehow thought this had already been pushed, so I was surprised when > it showed up again :-/ > > I think the only issue I had before was that I thought the new unit > tests were

[PATCH 2/5] cmdStartGetFDs: Modernize

2022-02-03 Thread Peter Krempa
Calculate the length of the FD list beforehand to avoid multiple expansions and mainly simplify the code and use automatic freeing to remove the error code path. Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff

[PATCH 3/5] virsh-domain: Move and rename cmdStartGetFDs to virshFetchPassFdsList

2022-02-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 86 +++- 1 file changed, 46 insertions(+), 40 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index b4cb7193a7..0bf4bb8dad 100644 --- a/tools/virsh-domain.c +++

[PATCH 4/5] virsh: Implement support for virDomainQemuMonitorCommandWithFiles

2022-02-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- docs/manpages/virsh.rst | 6 +- tools/virsh-domain.c| 18 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index e28927ed6c..82a759a636 100644 ---

[PATCH 5/5] qemu: Implement qemuDomainQemuMonitorCommandWithFiles

2022-02-03 Thread Peter Krempa
Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 34 ++ src/qemu/qemu_monitor.c | 7 --- src/qemu/qemu_monitor.h | 1 + src/qemu/qemu_monitor_json.c | 6 -- src/qemu/qemu_monitor_json.h | 2 ++ src/qemu/qemu_monitor_text.c | 8

[PATCH 0/5] Introduce 'virDomainQemuMonitorCommandWithFiles'

2022-02-03 Thread Peter Krempa
I needed to do some tests where I wanted to pass FDs to qemu to see how 'add-fd' and 'getfd' behave. It may be useful for others who wish for any reason to pass FDs to QMP commands. Peter Krempa (5): lib: Introduce 'virDomainQemuMonitorCommandWithFiles' cmdStartGetFDs: Modernize

[PATCH 1/5] lib: Introduce 'virDomainQemuMonitorCommandWithFiles'

2022-02-03 Thread Peter Krempa
This API has the same semantics as 'virDomainQemuMonitorCommand' but accepts file descriptors which are then forwarded to qemu. Signed-off-by: Peter Krempa --- include/libvirt/libvirt-qemu.h | 6 +++ src/driver-hypervisor.h | 8 src/libvirt-qemu.c | 71

Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-03 Thread Laine Stump
On 2/2/22 1:04 PM, Michal Prívozník wrote: Laine, any thoughts? I somehow thought this had already been pushed, so I was surprised when it showed up again :-/ I think the only issue I had before was that I thought the new unit tests were more testing the test setup than the actual code,

Re: [libvirt PATCH] docs: Add example for isa-debugcon

2022-02-03 Thread Daniel P . Berrangé
On Thu, Feb 03, 2022 at 03:14:22PM +0100, Andrea Bolognani wrote: > Most people will want to use isa-debugcon to obtain debug output > for SeaBIOS / EDK II, so let's include a ready-made example for > that scenario in our documentation. > > Signed-off-by: Andrea Bolognani > --- >

Re: [libvirt PATCH] syntax-check: Suggest correct replacement for str(n)dup()

2022-02-03 Thread Ján Tomko
On a Thursday in 2022, Andrea Bolognani wrote: As of 610963cd0411 VIR_STRDUP() no longer exists. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature

Re: [libvirt PATCH] util: Reorder virStringParseVersion() arguments

2022-02-03 Thread Andrea Bolognani
On Thu, Feb 03, 2022 at 02:59:33PM +0100, Ján Tomko wrote: > On a Thursday in 2022, Andrea Bolognani wrote: > > In order to match the existing virStringParse*() and virStrTo*() > > functions, input arguments should come before output arguments. > > Or, even better, the virStr* functions should be

[libvirt PATCH] syntax-check: Suggest correct replacement for str(n)dup()

2022-02-03 Thread Andrea Bolognani
As of 610963cd0411 VIR_STRDUP() no longer exists. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index d5cdb3c70e..b96d126bdc 100644 ---

[libvirt PATCH] docs: Add example for isa-debugcon

2022-02-03 Thread Andrea Bolognani
Most people will want to use isa-debugcon to obtain debug output for SeaBIOS / EDK II, so let's include a ready-made example for that scenario in our documentation. Signed-off-by: Andrea Bolognani --- docs/formatdomain.rst | 8 1 file changed, 8 insertions(+) diff --git

Re: [libvirt PATCH] util: Reorder virStringParseVersion() arguments

2022-02-03 Thread Ján Tomko
On a Thursday in 2022, Andrea Bolognani wrote: In order to match the existing virStringParse*() and virStrTo*() functions, input arguments should come before output arguments. Or, even better, the virStr* functions should be inverted to match the approach we do elsewhere (VIR_STRDUP,

Re: [libvirt PATCH] util: Reorder virStringParseVersion() arguments

2022-02-03 Thread Peter Krempa
On Thu, Feb 03, 2022 at 14:38:49 +0100, Andrea Bolognani wrote: > In order to match the existing virStringParse*() and virStrTo*() > functions, input arguments should come before output arguments. > > Signed-off-by: Andrea Bolognani > --- IMO the utility to churn ratio of this patch isn't very

[libvirt PATCH] util: Reorder virStringParseVersion() arguments

2022-02-03 Thread Andrea Bolognani
In order to match the existing virStringParse*() and virStrTo*() functions, input arguments should come before output arguments. Signed-off-by: Andrea Bolognani --- src/bhyve/bhyve_driver.c | 2 +- src/ch/ch_conf.c | 2 +- src/esx/esx_vi.c

Re: [libvirt PATCH v3] NEWS: add note about the ISA debug console

2022-02-03 Thread Andrea Bolognani
On Thu, Feb 03, 2022 at 11:07:09AM +, Daniel P. Berrangé wrote: > + * qemu: the isa-debugcon device is now supported > + > +The element accepts a ``isa-debug`` as a target type s/accepts a/accepts/ Reviewed-by: Andrea Bolognani -- Andrea Bolognani / Red Hat / Virtualization

Re: [PATCH 0/3] network: Generate TFTP config regardless of DHCP

2022-02-03 Thread Michal Prívozník
On 12/9/21 17:17, Michal Privoznik wrote: > See 3/3 for explanation. > > Michal Prívozník (3): > network: Initialize variables in networkDnsmasqConfContents() > network: Separate DHCP config generator into a function > network: Generate TFTP config regardless of DHCP > >

[libvirt PATCH v3] NEWS: add note about the ISA debug console

2022-02-03 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 666a593b58..d00bda5d50 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -22,6 +22,12 @@ v8.1.0 (unreleased) It works on Intel machines as well as recent machines powered

Re: [libvirt PATCH v8 0/3] Ignore EPERM on implicit clearing of VF VLAN ID

2022-02-03 Thread Dmitrii Shcherbakov
Squashed & auto-tested here: https://gitlab.com/dmitriis/libvirt/-/commits/2021-ignore-eperm-for-vid0 https://gitlab.com/dmitriis/libvirt/-/pipelines/462532823 Best Regards, Dmitrii Shcherbakov LP/MM/oftc: dmitriis On Wed, Feb 2, 2022 at 11:10 PM Dmitrii Shcherbakov wrote: > > Hi Michal, > >

Re: [libvirt PATCH] meson: Don't overwrite includedir

2022-02-03 Thread Daniel P . Berrangé
On Tue, Feb 01, 2022 at 07:14:11PM +0100, Andrea Bolognani wrote: > The current implementation of the workaround for yajl's broken > pkg-config file accidentally overwrites the value of includedir > that is later used by the installation process. Rename the > local variable to avoid this issue. >

Re: [libvirt PATCH v2 2/3] conf: support firmware ISA debug console

2022-02-03 Thread Michal Prívozník
On 2/2/22 13:44, Daniel P. Berrangé wrote: > Introduce support for > > > > > > > > > which is used as a way to receive debug messages from the > firmware on x86 platforms. > > Note that the default port is 0x0xe9 since that's the original nipick: s/0x// > Bochs