[PATCH] Account for fact that virDomainDeviceDefCopy() does an inactive copy

2022-01-04 Thread Michal Privoznik
In a few places (e.g. device attach/detach/update) we are given a device XML, parse it but then need a copy of parsed data so that the original can be passed to function handling the request over inactive XML and the copy is then passed to function handling the operation over live XML. Note, both

[PATCH] ci: Refresh configuration

2022-01-04 Thread Andrea Bolognani
Notable changes: * drop parted and XFS headers. Signed-off-by: Andrea Bolognani --- Pushed under the CI refresh rule. Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/441266800 Full patch: https://gitlab.com/libvirt/libvirt/-/commit/4c7316b2f00c847bc5dc9c8218c2585d2d04636a

[libvirt PATCH 00/17] qemu: Introduce hvf domain type for Hypervisor.framework

2022-01-04 Thread Andrea Bolognani
In order to hopefully address [libvirt#147] at long last, I've picked up Roman's patches from 2018 and attempted to forward-port them. More specifically, I've used the [roolebo/hvf-domain] branch as a starting point, since it seems to contain a few improvements over [v2] and was just easier to

[libvirt PATCH 01/17] conf: Add hvf domain type

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov QEMU supports Hypervisor.framework since 2.12 as hvf accel. Hypervisor.framework provides a lightweight interface to run a virtual cpu on macOS without the need to install third-party kernel extensions (KEXTs). It's supported since macOS 10.10 on machines with Intel VT-x

[libvirt PATCH 13/17] docs: Add hvf on QEMU driver page

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov It's worth to make the domain type a little bit more visible than a row in news. An example of hvf domain is available on QEMU driver page. While at it, mention Hypervisor.framework on index page. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani ---

[libvirt PATCH 14/17] docs: Note hvf support for domain elements

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov Many domain elements have "QEMU and KVM only" or "QEMU/KVM since x.y.z" remarks. Most of the elements work for HVF domain, so it makes sense to add respective notices for HVF domain. All the elements have been manually tested. Signed-off-by: Roman Bolshakov

[libvirt PATCH 09/17] qemu: Correct CPU capabilities probing for hvf

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov With this change virsh domcapabilites shows: https://gitlab.com/libvirt/libvirt/-/issues/147 Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 25 ++--- src/qemu/qemu_process.c | 2 +- 2 files

[libvirt PATCH 12/17] tests: Add HVF test cases

2022-01-04 Thread Andrea Bolognani
We need to use a hardcoded list of capabilities because we don't yet have proper replies files obtained from QEMU running on actual macOS machines. Signed-off-by: Andrea Bolognani --- .../hvf-aarch64-virt-headless.args| 48 + .../hvf-aarch64-virt-headless.xml |

[libvirt PATCH 04/17] qemu: Expose hvf domain type if hvf is supported

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Reviewed-by: Daniel P. Berrangé Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 4 1 file changed, 4 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt PATCH 05/17] qemu: Introduce virQEMUCapsTypeIsAccelerated

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov It replaces hardcoded checks that select accelCPU/accelCPUModels (formerly known as kvmCPU/kvmCPUModels) for KVM. It'll be cleaner to use the function when multiple accelerators are supported in qemu driver. Explicit KVM domain checks should be done only when a feature is

[libvirt PATCH 06/17] qemu: Introduce virQEMUCapsHaveAccel

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov The function should be used to check if qemu capabilities include a hardware acceleration, i.e. accel is not TCG. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 16 +--- 1 file changed, 13 insertions(+), 3

[libvirt PATCH 07/17] qemu: Introduce virQEMUCapsAccelStr

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov This makes possible to add more accelerators by touching less code and reduces code duplication. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff

[libvirt PATCH 02/17] qemu: Define hvf capability

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 1 + src/qemu/qemu_capabilities.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index

[libvirt PATCH 16/17] news: Mention hvf domain type

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- NEWS.rst | 8 1 file changed, 8 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 313b4f52b6..29a39da9dd 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -47,6 +47,14 @@ v8.0.0 (unreleased)

[libvirt PATCH 17/17] fixup! NEWS: Mention Apple Silicon support for HVF

2022-01-04 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- NEWS.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.rst b/NEWS.rst index 29a39da9dd..2e1b576979 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -53,7 +53,8 @@ v8.0.0 (unreleased) since 2.12. It's supported on machines with

[libvirt PATCH 10/17] fixup! qemu: Fix HVF architecture check

2022-01-04 Thread Andrea Bolognani
Apple Silicon (aarch64) has HVF support, but there is no 32-bit Intel hardware that is HVF-capable. Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c

[libvirt PATCH 11/17] tests: Add HVF support to testutilsqemu

2022-01-04 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- tests/testutilsqemu.c | 40 1 file changed, 40 insertions(+) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index 7fdb82daec..a75995c77a 100644 --- a/tests/testutilsqemu.c +++ b/tests/testutilsqemu.c @@

[libvirt PATCH 03/17] qemu: Query hvf capability on macOS

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov There's no QMP command for querying if hvf is supported, therefore we use sysctl interface that tells if Hypervisor.framework works/available on the host. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 33

Re: [PATCH v3] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Rohit Kumar
On 04/01/22 6:27 pm, Ani Sinha wrote: On Tue, 4 Jan 2022, Rohit Kumar wrote: This change adds the domain name in the error and debug logs during monitor IO processing so that we may infer which VM experienced errors such as IO or socket hangup. This may help in debugging monitor IO errors.

Re: [PATCH v6 3/4] remove sysconfig files

2022-01-04 Thread Olaf Hering
Mon, 3 Jan 2022 03:18:11 -0800 Andrea Bolognani : > The fact that we still QEMU_AUDIO_DRV and SDL_AUDIODRIVER in the > service file even after your changes goes against this principle. These variables are probably stale. But, I just looked briefly at the code and could not figure out within

[libvirt PATCH 15/17] docs: Add support page for libvirt on macOS

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- docs/docs.html.in | 3 + docs/index.html.in | 3 +- docs/macos.html.in | 229 + 3 files changed, 234 insertions(+), 1 deletion(-) create mode 100644

[libvirt PATCH 08/17] qemu: Make error message accel-agnostic

2022-01-04 Thread Andrea Bolognani
From: Roman Bolshakov With more acceleration types, KVM should be used only in error messages related to KVM. Signed-off-by: Roman Bolshakov Signed-off-by: Andrea Bolognani --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [RFC v2 1/1] qemu: add index for isa-serial device using target.port

2022-01-04 Thread Divya Garg
On 04/01/22 7:27 pm, Daniel P. Berrangé wrote: On Tue, Jan 04, 2022 at 11:47:39AM +, John Levon wrote: On Sat, Dec 11, 2021 at 07:57:47PM -0800, “Divya wrote: From: Divya Garg VM XML accepts target.port but this does not get passed while building the qemu command line for this VM.

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Ani Sinha
On Tue, 4 Jan 2022, Rohit Kumar wrote: > > On 03/01/22 7:12 pm, Ani Sinha wrote: > > > > On Wed, 22 Dec 2021, Rohit Kumar wrote: > > > > > This patch is to determine the VM which had IO or socket hangup error. > > > Accessing directly vm->def->name inside qemuMonitorIO() or > > >

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 15:30:00 +0530, Ani Sinha wrote: > On Tue, 4 Jan 2022, Rohit Kumar wrote: > > On 03/01/22 7:12 pm, Ani Sinha wrote: > > > On Wed, 22 Dec 2021, Rohit Kumar wrote: [...] > > > > @@ -694,6 +702,7 @@ qemuMonitorOpenInternal(virDomainObj *vm, > > > > mon->fd = fd; > > >

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Ani Sinha
On Tue, 4 Jan 2022, Peter Krempa wrote: > On Tue, Jan 04, 2022 at 15:30:00 +0530, Ani Sinha wrote: > > On Tue, 4 Jan 2022, Rohit Kumar wrote: > > > On 03/01/22 7:12 pm, Ani Sinha wrote: > > > > On Wed, 22 Dec 2021, Rohit Kumar wrote: > > [...] > > > > > > @@ -694,6 +702,7 @@

[PATCH 4/4] conf: Make virDomainTPMDefFormat() return void

2022-01-04 Thread Michal Privoznik
The virDomainTPMDefFormat() function can't fail really. There's no point in it returning an integer then. Make it return void and fix both places which check for its retval. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 12 +--- 1 file changed, 5 insertions(+), 7

Re: [PATCH 2/4] qemuxml2xmloutdata: Turn tpm-*.xml files into symlinks

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 09:14:28 +0100, Michal Privoznik wrote: > Make the tpm-*.xml files symlinks to their respective input XMLs > from qemuxml2argvdata/ directory. This uncovers a bug in our > formatter which formats an invalid XML if both > and elements are present for > . This is going to

Re: [PATCH 2/4] qemuxml2xmloutdata: Turn tpm-*.xml files into symlinks

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 09:31:39 +0100, Michal Prívozník wrote: > On 1/4/22 09:30, Peter Krempa wrote: > > On Tue, Jan 04, 2022 at 09:14:28 +0100, Michal Privoznik wrote: > >> Make the tpm-*.xml files symlinks to their respective input XMLs > >> from qemuxml2argvdata/ directory. This uncovers a

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Rohit Kumar
On 03/01/22 10:12 pm, Peter Krempa wrote: On Wed, Dec 22, 2021 at 22:39:21 -0800, Rohit Kumar wrote: This patch is to determine the VM which had IO or socket hangup error. Accessing directly vm->def->name inside qemuMonitorIO() or qemuMonitorSend() might leads to illegal access as we are out

Re: [PATCH 1/4] qemuxml2xmltest: Introduce tpm-emulator-spapr test

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 09:14:27 +0100, Michal Privoznik wrote: > We already have the input xml because of xml2arg test. However, > the corresponding xml2xml test case is missing. Make the expected > XML a symlink to the input XML and clean the latter up a bit. > > Signed-off-by: Michal Privoznik

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 09:45:30 +0100, Peter Krempa wrote: > On Tue, Jan 04, 2022 at 14:10:49 +0530, Rohit Kumar wrote: > > > > On 03/01/22 10:12 pm, Peter Krempa wrote: > > > On Wed, Dec 22, 2021 at 22:39:21 -0800, Rohit Kumar wrote: > > > > This patch is to determine the VM which had IO or

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Rohit Kumar
On 04/01/22 2:17 pm, Peter Krempa wrote: On Tue, Jan 04, 2022 at 09:45:30 +0100, Peter Krempa wrote: On Tue, Jan 04, 2022 at 14:10:49 +0530, Rohit Kumar wrote: On 03/01/22 10:12 pm, Peter Krempa wrote: On Wed, Dec 22, 2021 at 22:39:21 -0800, Rohit Kumar wrote: This patch is to determine

Re: [PATCH] NEWS: Add entries for libxl changes during 8.0.0 development

2022-01-04 Thread Andrea Bolognani
On Mon, Jan 03, 2022 at 03:59:42PM -0700, Jim Fehlig wrote: > + * libxl: Fix potential deadlock and crash (CVE-2021-4147) > + > +A rouge guest could continuously reboot itself and cause libvirtd on the *rogue although introducing a virDomainSetColor() or virDomainApplyMakeup() API could be

[PATCH 3/4] conf: Rework formatting

2022-01-04 Thread Michal Privoznik
The element formatting is handled in virDomainTPMDefFormat() which uses the "old style" - appending strings directly into the output buffer. With this, it's easy to get conditions that tell when an element has ended wrong. In this particular case, if both and are to be formatted the current

[PATCH 0/4] Rework formatting

2022-01-04 Thread Michal Privoznik
Please note that the test suite is temporarily broken after 2/4 but fixed in 3/4. This could be resolved be swapping those two patches, but I figured I keep the order to demonstrate the bug. However, I can do the swap if desired. Michal Prívozník (4): qemuxml2xmltest: Introduce

[PATCH 2/4] qemuxml2xmloutdata: Turn tpm-*.xml files into symlinks

2022-01-04 Thread Michal Privoznik
Make the tpm-*.xml files symlinks to their respective input XMLs from qemuxml2argvdata/ directory. This uncovers a bug in our formatter which formats an invalid XML if both and elements are present for . This is going to be addressed in the next commit. Signed-off-by: Michal Privoznik ---

[PATCH 1/4] qemuxml2xmltest: Introduce tpm-emulator-spapr test

2022-01-04 Thread Michal Privoznik
We already have the input xml because of xml2arg test. However, the corresponding xml2xml test case is missing. Make the expected XML a symlink to the input XML and clean the latter up a bit. Signed-off-by: Michal Privoznik --- tests/qemuxml2argvdata/tpm-emulator-spapr.xml | 74

[PATCH] conf: Extend TPM ABI stability check for

2022-01-04 Thread Michal Privoznik
Changing means changing the guest ABI and as such must be prevented on both restoring from a file or migration. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2035888 Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 14 ++ 1 file changed, 14 insertions(+) diff

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Rohit Kumar
On 03/01/22 7:12 pm, Ani Sinha wrote: On Wed, 22 Dec 2021, Rohit Kumar wrote: This patch is to determine the VM which had IO or socket hangup error. Accessing directly vm->def->name inside qemuMonitorIO() or qemuMonitorSend() might leads to illegal access as we are out of 'vm' context and

Re: [PATCH 2/4] qemuxml2xmloutdata: Turn tpm-*.xml files into symlinks

2022-01-04 Thread Michal Prívozník
On 1/4/22 09:30, Peter Krempa wrote: > On Tue, Jan 04, 2022 at 09:14:28 +0100, Michal Privoznik wrote: >> Make the tpm-*.xml files symlinks to their respective input XMLs >> from qemuxml2argvdata/ directory. This uncovers a bug in our >> formatter which formats an invalid XML if both >> and

Re: [PATCH 2/4] qemuxml2xmloutdata: Turn tpm-*.xml files into symlinks

2022-01-04 Thread Michal Prívozník
On 1/4/22 09:33, Peter Krempa wrote: > https://www.libvirt.org/hacking.html#preparing-patches > > "If you're going to submit multiple patches, the automated tests must > pass after each patch, not just after the last one." > Alright then. Let me swap those two patches and post v2. Michal

Re: [PATCH] conf: Extend TPM ABI stability check for

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 09:29:15 +0100, Michal Privoznik wrote: > Changing means changing the guest ABI and as > such must be prevented on both restoring from a file or > migration. > > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2035888 > Signed-off-by: Michal Privoznik > --- >

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 14:10:49 +0530, Rohit Kumar wrote: > > On 03/01/22 10:12 pm, Peter Krempa wrote: > > On Wed, Dec 22, 2021 at 22:39:21 -0800, Rohit Kumar wrote: > > > This patch is to determine the VM which had IO or socket hangup error. > > > Accessing directly vm->def->name inside

Re: [PATCH 3/4] conf: Rework formatting

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 09:14:29 +0100, Michal Privoznik wrote: > The element formatting is handled in > virDomainTPMDefFormat() which uses the "old style" - appending > strings directly into the output buffer. With this, it's easy to > get conditions that tell when an element has ended wrong. In

Re: [PATCH 4/4] conf: Make virDomainTPMDefFormat() return void

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 09:14:30 +0100, Michal Privoznik wrote: > The virDomainTPMDefFormat() function can't fail really. There's > no point in it returning an integer then. Make it return void and > fix both places which check for its retval. > > Signed-off-by: Michal Privoznik > --- >

[PATCH v2 0/3] Rework formatting

2022-01-04 Thread Michal Privoznik
v2 of: https://listman.redhat.com/archives/libvir-list/2022-January/msg00047.html diff to v1: - Pushed 1/4 from the original series, because it was acked and independent of the rest. - Swapped two patches to make the test suite pass after each single patch. - Renamed variable in 1/3 (3/4 in the

[PATCH v2 1/3] conf: Rework formatting

2022-01-04 Thread Michal Privoznik
The element formatting is handled in virDomainTPMDefFormat() which uses the "old style" - appending strings directly into the output buffer. With this, it's easy to get conditions that tell when an element has ended wrong. In this particular case, if both and are to be formatted the current

[PATCH v2 2/3] qemuxml2xmloutdata: Turn tpm-*.xml files into symlinks

2022-01-04 Thread Michal Privoznik
Make the tpm-*.xml files symlinks to their respective input XMLs from qemuxml2argvdata/ directory. Neither of the XMLs relies on autofill of any TPM data. Signed-off-by: Michal Privoznik --- .../tpm-emulator-tpm2-enc.xml | 12 - .../tpm-emulator-tpm2-pstate.xml

[PATCH v2 3/3] conf: Make virDomainTPMDefFormat() return void

2022-01-04 Thread Michal Privoznik
The virDomainTPMDefFormat() function can't fail really. There's no point in it returning an integer then. Make it return void and fix both places which check for its retval. And while at it, turn @def into a const pointer to make it obvious the function does not modify passed struct.

Re: [PATCH v2 2/3] qemuxml2xmloutdata: Turn tpm-*.xml files into symlinks

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 10:04:59 +0100, Michal Privoznik wrote: > Make the tpm-*.xml files symlinks to their respective input XMLs > from qemuxml2argvdata/ directory. Neither of the XMLs relies on > autofill of any TPM data. > > Signed-off-by: Michal Privoznik > --- Reviewed-by: Peter Krempa

Re: [PATCH v2] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Rohit Kumar
On 04/01/22 3:56 pm, Ani Sinha wrote: On Tue, 4 Jan 2022, Peter Krempa wrote: On Tue, Jan 04, 2022 at 15:30:00 +0530, Ani Sinha wrote: On Tue, 4 Jan 2022, Rohit Kumar wrote: On 03/01/22 7:12 pm, Ani Sinha wrote: On Wed, 22 Dec 2021, Rohit Kumar wrote: [...] @@ -694,6 +702,7 @@

Re: [PATCH] rpc: Require dtrace sources to be generated first

2022-01-04 Thread Daniel P . Berrangé
On Mon, Dec 20, 2021 at 12:02:41PM +0100, Michal Privoznik wrote: > The virt_socket_lib is built from virnetsocket.c (among others). > But this file includes virprobe.h which includes libvirt_probes.h > which is a generated file. But this dependency is not recorded in > meson which may lead to a

Re: [PATCH 2/2] virnettlscontext: Don't pass static key length to gnutls_dh_params_generate2()

2022-01-04 Thread Daniel P . Berrangé
On Tue, Dec 21, 2021 at 03:22:59PM +0100, Michal Privoznik wrote: > As encryption norms get more strict it's easy to fall on the > insecure side. For instance, so far we are generating 2048 bits > long prime for Diffie-Hellman keys. Some systems consider this > not long enough. While we may just

Re: [PATCH V4 4/6] qemu: Implement the virDomainSetLaunchSecurityState API

2022-01-04 Thread Daniel P . Berrangé
On Mon, Dec 20, 2021 at 08:23:18PM -0700, Jim Fehlig wrote: > Set a launch secret in guest memory using the sev-inject-launch-secret > QMP API. Only supported with qemu >= 6.0.0 and SEV-enabled guests in a > paused state. > > Signed-off-by: Jim Fehlig > --- > > Daniel already r-b V3 of this

Re: [PATCH V4 3/6] qemu_capabilities: Introduce QEMU_CAPS_SEV_INJECT_LAUNCH_SECRET

2022-01-04 Thread Daniel P . Berrangé
On Mon, Dec 20, 2021 at 08:23:17PM -0700, Jim Fehlig wrote: > The 'sev-inject-launch-secret' qmp command is only available with > qemu >= 6.0.0. Introduce a capability for sev-inject-launch-secret. > > Signed-off-by: Jim Fehlig > --- > src/qemu/qemu_capabilities.c | 2 ++ >

[PATCH 5/8] Exit on errors from virDaemonSetupLogging

2022-01-04 Thread Martin Kletzander
This prevents starting any daemons with improper logging settings. This is desirable on its own, but will be even more beneficial when more functions start reporting errors and failing on them, coming up in following patches Signed-off-by: Martin Kletzander --- src/locking/lock_daemon.c | 15

[PATCH 3/8] util: Report error in virLogSetDefaultOutputToFile

2022-01-04 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/util/virlog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/virlog.c b/src/util/virlog.c index bf791d901a24..e368cada6024 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -178,6 +178,7 @@ virLogSetDefaultOutputToFile(const char

[PATCH 2/8] util: Do not hide errors in virLogSetDefaultOutput

2022-01-04 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/util/virlog.c | 8 +--- src/util/virlog.h | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/virlog.c b/src/util/virlog.c index 90d3d7c5cb53..bf791d901a24 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -201,7

[PATCH 4/8] util: Initialize virLogMutex statically

2022-01-04 Thread Martin Kletzander
The only difference is that we are not going to be guaranteed that the mutex is normal (as opposed to recursive, although there is no system known to me that would default to recursive mutexes), but that was done only to find occasional errors (during runtime, back in 2010, commit 336fd879c00b).

[libvirt PATCH v3 2/4] docs: Move all images to a subdirectory

2022-01-04 Thread Andrea Bolognani
This unclutters the top-level docs directory. Signed-off-by: Andrea Bolognani Reviewed-by: Ani Sinha --- docs/api.rst | 6 ++--- docs/goals.html.in| 2 +- docs/{ => images}/event_loop_simple.png | Bin docs/{ =>

[libvirt PATCH v3 4/4] docs: Move font definitions with other CSS files

2022-01-04 Thread Andrea Bolognani
We have a subdirectory specifically for CSS files now, so it makes sense to have the stylesheet that defines fonts to be there too. Signed-off-by: Andrea Bolognani --- docs/{fonts/stylesheet.css => css/fonts.css} | 18 +- docs/css/main.css| 2 +-

[libvirt PATCH v3 3/4] docs: Move all CSS files to a subdirectory

2022-01-04 Thread Andrea Bolognani
This unclutters the top-level docs directory. Signed-off-by: Andrea Bolognani --- docs/{ => css}/generic.css | 0 docs/{ => css}/libvirt.css | 4 ++-- docs/{ => css}/main.css| 2 +- docs/css/meson.build | 16 docs/{ => css}/mobile.css | 2 +- docs/meson.build

[libvirt PATCH v3 0/4] docs: Unclutter top-level directory

2022-01-04 Thread Andrea Bolognani
Changes from [v2]: * drop all changes related to icons. Changes from [v1]: * extend scope to include icons and CSS files. [v2] https://listman.redhat.com/archives/libvir-list/2021-December/msg00828.html [v1] https://listman.redhat.com/archives/libvir-list/2021-December/msg00818.html

[libvirt PATCH v3 1/4] docs: Drop structures.svg

2022-01-04 Thread Andrea Bolognani
It was introduced in ff4ede005567 but it doesn't seem to have ever actually been used anywhere. Signed-off-by: Andrea Bolognani Reviewed-by: Ani Sinha --- docs/structures.svg | 187 1 file changed, 187 deletions(-) delete mode 100644

Re: [PATCH V4 6/6] NEWS: Mention new virDomainSetLaunchSecurityState API

2022-01-04 Thread Daniel P . Berrangé
On Mon, Dec 20, 2021 at 08:23:20PM -0700, Jim Fehlig wrote: > Signed-off-by: Jim Fehlig > --- > NEWS.rst | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: Daniel P. Berrangé Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |:

Re: [PATCH 1/3] qemu: Revert to using non-JSON commandline for -device

2022-01-04 Thread Peter Krempa
On Tue, Jan 04, 2022 at 12:24:25 +, Daniel P. Berrangé wrote: > On Mon, Jan 03, 2022 at 04:25:54PM +0100, Peter Krempa wrote: > > When -device is configured via JSON a bug is triggered in qemu were the > > DEVICE_DELETED event for the removal of the device frontend is no longer > > delivered

Re: [libvirt PATCH v3 2/4] docs: Move all images to a subdirectory

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 02:56:00PM +0100, Andrea Bolognani wrote: > This unclutters the top-level docs directory. > > Signed-off-by: Andrea Bolognani > Reviewed-by: Ani Sinha > --- > docs/api.rst | 6 ++--- > docs/goals.html.in|

Re: [libvirt PATCH v3 4/4] docs: Move font definitions with other CSS files

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 02:56:02PM +0100, Andrea Bolognani wrote: > We have a subdirectory specifically for CSS files now, so it makes > sense to have the stylesheet that defines fonts to be there too. > > Signed-off-by: Andrea Bolognani > --- > docs/{fonts/stylesheet.css => css/fonts.css} | 18

Re: [libvirt PATCH v3 3/4] docs: Move all CSS files to a subdirectory

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 02:56:01PM +0100, Andrea Bolognani wrote: > This unclutters the top-level docs directory. > > Signed-off-by: Andrea Bolognani > --- > docs/{ => css}/generic.css | 0 > docs/{ => css}/libvirt.css | 4 ++-- > docs/{ => css}/main.css| 2 +- > docs/css/meson.build

Re: [RFC v2 1/1] qemu: add index for isa-serial device using target.port

2022-01-04 Thread Ani Sinha
On Tue, 4 Jan 2022, Divya Garg wrote: > On 04/01/22 5:47 pm, Ani Sinha wrote: > > > > On Mon, 3 Jan 2022, Divya Garg wrote: > > > > > Thankyou Ani for the review. I will be taking up the comments > > > in next patchset along with other comments. > > > > > > On 03/01/22 1:44 pm, Ani Sinha

Re: [PATCH 0/4] Rework formatting

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 09:14:26AM +0100, Michal Privoznik wrote: > Please note that the test suite is temporarily broken after 2/4 but > fixed in 3/4. This could be resolved be swapping those two patches, but > I figured I keep the order to demonstrate the bug. However, I can do the > swap if

Re: [PATCH 1/2] docs: Clarify 'burst' units for QoS

2022-01-04 Thread Martin Kletzander
On Tue, Jan 04, 2022 at 01:53:05PM +0100, Michal Privoznik wrote: The burst attribute for bandwidth specifies how much bytes can be transmitted in a single burst. Therefore, the unit is in multiples of 1024 (thus kibibytes) not SI-like 1000. It always has been like that. s/always has/has

Re: [PATCH 1/2] qemuxml2xmloutdata: Turn kvm-features.xml and kvm-features-off.xml into symlinks

2022-01-04 Thread Andrea Bolognani
On Tue, Dec 14, 2021 at 03:01:18PM +0100, Michal Privoznik wrote: > qemuxml2xmloutdata: Turn kvm-features.xml and kvm-features-off.xml into > symlinks Maybe change this to qemuxml2xmloutdata: Turn kvm-features*.xml into symlinks for brevity's sake. Either way, Reviewed-by: Andrea

Re: [RFC v2 1/1] qemu: add index for isa-serial device using target.port

2022-01-04 Thread Ani Sinha
On Mon, 3 Jan 2022, Divya Garg wrote: > Thankyou Ani for the review. I will be taking up the comments > in next patchset along with other comments. > > On 03/01/22 1:44 pm, Ani Sinha wrote: > > > > > On Mon, 3 Jan 2022, Divya Garg wrote: > > > > > Hi all ! > > > > > > Looking forward for the

[PATCH 1/8] util: Report error in virLogParseDefaultPriority

2022-01-04 Thread Martin Kletzander
Signed-off-by: Martin Kletzander --- src/util/virlog.c | 4 1 file changed, 4 insertions(+) diff --git a/src/util/virlog.c b/src/util/virlog.c index ac35e36148c6..90d3d7c5cb53 100644 --- a/src/util/virlog.c +++ b/src/util/virlog.c @@ -1187,6 +1187,10 @@ virLogParseDefaultPriority(const

[PATCH 6/8] util: Check for errors in virLogSetFromEnv

2022-01-04 Thread Martin Kletzander
And make callers check the return value as well. This helps error out early for invalid environment variables. That is desirable because it could lead to deadlocks. This can happen when resetting logging after fork() reports translated errors because gettext functions are not reentrant. Well,

[PATCH 8/8] Do not print error in remote_daemon.c:main

2022-01-04 Thread Martin Kletzander
There is no need to do that since both fallible functions do that already. Signed-off-by: Martin Kletzander --- src/remote/remote_daemon.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index

[PATCH 0/8] Fix an unfortunate deadlock

2022-01-04 Thread Martin Kletzander
Before this series: # LIBVIRT_LOG_OUTPUTS=1:asdf:fdsa:meh libvirtd After this series: # LIBVIRT_LOG_OUTPUTS=1:asdf:fdsa:meh libvirtd libvirt: error : invalid argument: Invalid destination 'asdf' for output '1:asdf:fdsa:meh' Martin Kletzander (8): util: Report error in

[PATCH 7/8] Dispatch error in virInitialize

2022-01-04 Thread Martin Kletzander
Callers that already do this anyway can be cleaned up thanks to this and the one that does not (daemon startup) gains the benefit of the error being printed to standard error output changing: LIBVIRT_LOG_OUTPUTS=1:invalid libvirtd /home/nert/dev/libvirt/upstream/build/src/libvirtd: initialisation

Re: [RFC v2 1/1] qemu: add index for isa-serial device using target.port

2022-01-04 Thread John Levon
On Sat, Dec 11, 2021 at 07:57:47PM -0800, “Divya wrote: > From: Divya Garg > > VM XML accepts target.port but this does not get passed while building the > qemu > command line for this VM. Apologies, I failed to notice this had been sent out to the list; Re-posting my comments from an

Re: [PATCH 1/3] domain_conf: Added configs for RSS and Hash report.

2022-01-04 Thread Daniel P . Berrangé
On Thu, Dec 30, 2021 at 08:01:43AM +0200, Andrew Melnychenko wrote: > Added "rss" and "rss_hash_report" configuration that should be used with > qemu virtio RSS. > Both options are triswitches. Used as "driver" options and affects only NIC > with model type "virtio". > In other patches - options

[PATCH 0/2] virnetdevopenvswitch: Fix 'burst' value passed to ovs-vsctl

2022-01-04 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): docs: Clarify 'burst' units for QoS virnetdevopenvswitch: Fix 'burst' value passed to ovs-vsctl docs/formatnetwork.html.in | 2 +- src/util/virnetdevbandwidth.h | 8 src/util/virnetdevopenvswitch.c | 16 +--- 3 files

[PATCH 2/2] virnetdevopenvswitch: Fix 'burst' value passed to ovs-vsctl

2022-01-04 Thread Michal Privoznik
As described in the previous commit, the units for 'burst' are kibibytes and not kilobytes, i.e. multiples of 1024 not 1000. Therefore, when constructing ovs-vsctl command the burst value must be multiplied by 1024 and not just 1000. And because ovs expects this size in bits the value has to be

[PATCH 1/2] docs: Clarify 'burst' units for QoS

2022-01-04 Thread Michal Privoznik
The burst attribute for bandwidth specifies how much bytes can be transmitted in a single burst. Therefore, the unit is in multiples of 1024 (thus kibibytes) not SI-like 1000. It always has been like that. The 'tc' output is still confusing though, for instance: # tc class add dev $DEV parent

Re: [libvirt PATCH v2 4/6] docs: Move all icons to a subdirectory

2022-01-04 Thread Andrea Bolognani
On Tue, Jan 04, 2022 at 12:07:59PM +, Daniel P. Berrangé wrote: > On Tue, Dec 21, 2021 at 04:30:31PM +0100, Andrea Bolognani wrote: > > This unclutters the top-level docs directory. > > > > Signed-off-by: Andrea Bolognani > > --- > > docs/browserconfig.xml | 2 +- > >

Re: [RFC v2 1/1] qemu: add index for isa-serial device using target.port

2022-01-04 Thread Divya Garg
On 04/01/22 5:47 pm, Ani Sinha wrote: On Mon, 3 Jan 2022, Divya Garg wrote: Thankyou Ani for the review. I will be taking up the comments in next patchset along with other comments. On 03/01/22 1:44 pm, Ani Sinha wrote: On Mon, 3 Jan 2022, Divya Garg wrote: Hi all ! Looking forward for

Re: [libvirt PATCH v3 1/4] docs: Drop structures.svg

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 02:55:59PM +0100, Andrea Bolognani wrote: > It was introduced in ff4ede005567 but it doesn't seem to have > ever actually been used anywhere. > > Signed-off-by: Andrea Bolognani > Reviewed-by: Ani Sinha > --- > docs/structures.svg | 187

Re: [libvirt PATCH 0/3] storage: Use the FICLONE ioctl unconditionally on Linux

2022-01-04 Thread Michal Prívozník
On 12/28/21 19:40, Andrea Bolognani wrote: > Test pipeline: https://gitlab.com/abologna/libvirt/-/pipelines/438075320 > > Andrea Bolognani (3): > storage: Use the FICLONE ioctl unconditionally on Linux > meson: Don't look for btrfs and xfs headers > spec: Drop BuildRequires on

Re: [PATCH 2/2] virnetdevopenvswitch: Fix 'burst' value passed to ovs-vsctl

2022-01-04 Thread Martin Kletzander
On Tue, Jan 04, 2022 at 01:53:06PM +0100, Michal Privoznik wrote: As described in the previous commit, the units for 'burst' are kibibytes and not kilobytes, i.e. multiples of 1024 not 1000. Therefore, when constructing ovs-vsctl command the burst value must be multiplied by 1024 and not just

Re: [PATCH 2/2] domain_conf: Use virXMLFormatElement*() more in virDomainDefFormatFeatures()

2022-01-04 Thread Andrea Bolognani
On Tue, Dec 14, 2021 at 03:01:19PM +0100, Michal Privoznik wrote: > case VIR_TRISTATE_SWITCH_ON: > - virBufferAsprintf(, "<%s state='on'/>\n", name); > - break; > - > case VIR_TRISTATE_SWITCH_OFF: > - virBufferAsprintf(, "<%s

Re: [libvirt PATCH v2 2/6] docs: Add pointing to favicon.ico

2022-01-04 Thread Daniel P . Berrangé
On Tue, Dec 21, 2021 at 04:30:29PM +0100, Andrea Bolognani wrote: > It's not strictly necessary when the icon lives in the top-level > directory of the website, as browsers will fall back to that > path when the element is absent, but it's still considered > good practice to spell out the path

Re: [RFC v2 1/1] qemu: add index for isa-serial device using target.port

2022-01-04 Thread Divya Garg
On 04/01/22 5:17 pm, John Levon wrote: On Sat, Dec 11, 2021 at 07:57:47PM -0800, “Divya wrote: From: Divya Garg VM XML accepts target.port but this does not get passed while building the qemu command line for this VM. Apologies, I failed to notice this had been sent out to the list;

[PATCH] qemu: agent: remove all code around disabled DEBUG_IO/DEBUG_RAW_IO definitions

2022-01-04 Thread Ani Sinha
DEBUG_IO and DEBUG_RAW_IO are disabled and hence the code #defined under them are useless. Remove them. Also remove similar useless code from qemu_monitor_json. See also 4aae00bf1287f ("qemu: monitor: Remove disabled debug infrastructure") Signed-off-by: Ani Sinha --- src/qemu/qemu_agent.c

Re: [RFC v2 1/1] qemu: add index for isa-serial device using target.port

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 11:47:39AM +, John Levon wrote: > On Sat, Dec 11, 2021 at 07:57:47PM -0800, “Divya wrote: > > > From: Divya Garg > > > > VM XML accepts target.port but this does not get passed while building the > > qemu > > command line for this VM. > > Apologies, I failed to

Re: [libvirt PATCH v3 0/4] docs: Unclutter top-level directory

2022-01-04 Thread Daniel P . Berrangé
On Tue, Jan 04, 2022 at 02:55:58PM +0100, Andrea Bolognani wrote: > Changes from [v2]: > > * drop all changes related to icons. > > Changes from [v1]: > > * extend scope to include icons and CSS files. > > [v2] > https://listman.redhat.com/archives/libvir-list/2021-December/msg00828.html

[PATCH v3] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Rohit Kumar
This change adds the domain name in the error and debug logs during monitor IO processing so that we may infer which VM experienced errors such as IO or socket hangup. This may help in debugging monitor IO errors. Signed-off-by: Rohit Kumar --- src/qemu/qemu_monitor.c | 36

Re: .conf file setting(s) for packet filtering backend(s)

2022-01-04 Thread Daniel P . Berrangé
On Sun, Jan 02, 2022 at 09:41:37PM -0500, Laine Stump wrote: > I'm currently working on switching the backend of the network driver from > using iptables to using nftables. Due to some functionality that is not > available with nftables (the rule that fixes up the checksum of DHCP packets > which,

Re: [PATCH v3] Add VM info to improve error log message for qemu monitor

2022-01-04 Thread Ani Sinha
On Tue, 4 Jan 2022, Rohit Kumar wrote: > This change adds the domain name in the error and debug logs during > monitor IO processing so that we may infer which VM experienced > errors such as IO or socket hangup. This may help in debugging > monitor IO errors. LGTM. If you wish you can add a

Re: [PATCH 2/2] virnettlscontext: Don't pass static key length to gnutls_dh_params_generate2()

2022-01-04 Thread Michal Prívozník
On 1/4/22 12:59, Daniel P. Berrangé wrote: > We shouldn't be introducing use of gnutls_sec_param_to_pk_bits at > all IMHO, rather we should be removing use of gnutls_dh_params_generate2 > instead. > > The recommendation is to use pre-generated DH parameters from the > the FFDHE set of RFC7919. >

  1   2   >