Re: [PATCH 17/17] virDomainTimerDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainTimerDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. virXMLPropEnum, virXMLPropULongLong and virXMLPropUInt ... Signed-off-by:

Re: [PATCH 17/17] virDomainTimerDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 52a34cd131..27fe6c9fbf 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -11962,98 +11962,61 @@ virDomainTimerDefParseXML(xmlNodePtr node, virDomainTimerDef

Re: [PATCH 2/3] cpu_ppc64: add support for host-model on POWER10

2022-05-24 Thread Daniel Henrique Barboza
On 5/24/22 10:47, Andrea Bolognani wrote: On Tue, May 24, 2022 at 10:02:41AM -0300, Daniel Henrique Barboza wrote: +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml + + /usr/bin/qemu-system-ppc64 + + + spapr-vio is the default for pseries VMs, so you

Re: [PATCH 16/17] virDomainHubDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainHubDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. virXMLPropEnum Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c

Re: [PATCH 15/17] virDomainInputDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainInputDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. virXMLPropEnum and virXMLPropEnumDefault Signed-off-by: Michal Privoznik

Re: [PATCH 15/17] virDomainInputDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 85aae73873..44ab79c1f0 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1942,7 +1942,7 @@ void virDomainGraphicsDefFree(virDomainGraphicsDef *def) const char

Re: [PATCH 14/17] virDomainPanicDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainPanicDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. virXMLPropEnum (also subject) Signed-off-by: Michal Privoznik ---

Re: [PATCH 13/17] virDomainTPMDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainTPMDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. virXMLPropEnum and virXMLPropEnumDefault Signed-off-by: Michal Privoznik ---

Re: [PATCH 12/17] virDomainChrDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainChrDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. virXMLPropEnumDefault and virXMLPropEnum (above and in subject)

Re: [PATCH 12/17] virDomainChrDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 30ef5b7550..3432c83153 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2310,10 +2310,28 @@ qemuDomainObjPrivateXMLFormat(virBuffer *buf, case

Re: [PATCH 11/17] virDomainDiskDefParseSourceXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainDiskDefParseSourceXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. strtoul and virXMLPropUInt (also subject) Signed-off-by: Michal

Re: [PATCH 10/17] virDomainDiskSourcePoolDefParse: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainDiskSourcePoolDefParse() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. virXMLPropEnum (above and in subject) Signed-off-by: Michal

Re: [PATCH RFC 10/10] qemu: Place helper processes into the same trusted group

2022-05-24 Thread Daniel P . Berrangé
On Tue, May 24, 2022 at 05:35:03PM +0200, Michal Prívozník wrote: > On 5/24/22 12:33, Daniel P. Berrangé wrote: > > On Tue, May 24, 2022 at 11:50:50AM +0200, Michal Prívozník wrote: > >> On 5/23/22 18:30, Daniel P. Berrangé wrote: > >>> On Mon, May 09, 2022 at 05:02:17PM +0200, Michal Privoznik

Re: [PATCH 09/17] virDomainDiskDefMirrorParse: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainDiskDefMirrorParse() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. ... and virXMLPropEnum() Signed-off-by: Michal Privoznik ---

Re: [PATCH 08/17] virDomainDiskSourceNVMeParse: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/24/22 6:02 PM, Boris Fiuczynski wrote: On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainDiskSourceNVMeParse() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. ups, above should be

Re: [PATCH 08/17] virDomainDiskSourceNVMeParse: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainDiskSourceNVMeParse() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 15

Re: [PATCH 07/17] virDomainHostdevSubsysSCSIVHostDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainHostdevSubsysSCSIVHostDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c

Re: [PATCH 06/17] virDomainHostdevSubsysSCSIDefParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainHostdevSubsysSCSIDefParseXML() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c |

Re: [PATCH RFC 10/10] qemu: Place helper processes into the same trusted group

2022-05-24 Thread Michal Prívozník
On 5/24/22 12:33, Daniel P. Berrangé wrote: > On Tue, May 24, 2022 at 11:50:50AM +0200, Michal Prívozník wrote: >> On 5/23/22 18:30, Daniel P. Berrangé wrote: >>> On Mon, May 09, 2022 at 05:02:17PM +0200, Michal Privoznik wrote: Since the level of trust that QEMU has is the same level of

Re: [PATCH 05/17] virDomainStorageNetworkParseHost: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainStorageNetworkParseHost() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c

Re: [PATCH RFC 01/10] qemu_tpm: Make APIs work over a single virDomainTPMDef

2022-05-24 Thread Michal Prívozník
On 5/23/22 18:49, Daniel P. Berrangé wrote: > On Mon, May 09, 2022 at 05:02:08PM +0200, Michal Privoznik wrote: >> In qemu_extdevice.c lives code that handles helper daemons that >> are required for some types of devices (e.g. virtiofsd, >> vhost-user-gpu, swtpm, etc.). These devices have their

Re: [libvirt PATCH 0/6] Fix and refactor QMP event processing

2022-05-24 Thread Michal Prívozník
On 5/24/22 15:35, Jiri Denemark wrote: > Jiri Denemark (6): > qemu: Avoid unlocked access to vm object in monitor callbacks > qemu: Pass arguments to qemuProcessEventSubmit directly > qemu: Make vm parameter of qemuProcessEventSubmit mandatory > qemu: Drop driver parameter from

Re: [libvirt PATCH 2/2] syntax-check: Pull updates from gnulib

2022-05-24 Thread Daniel P . Berrangé
On Tue, May 24, 2022 at 03:41:47PM +0200, Michal Prívozník wrote: > On 5/24/22 15:31, Andrea Bolognani wrote: > > Signed-off-by: Andrea Bolognani > > --- > > build-aux/syntax-check.mk | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/build-aux/syntax-check.mk

Re: [libvirt PATCH 2/2] syntax-check: Pull updates from gnulib

2022-05-24 Thread Andrea Bolognani
On Tue, May 24, 2022 at 03:41:47PM +0200, Michal Prívozník wrote: > On 5/24/22 15:31, Andrea Bolognani wrote: > > prohibit_doubled_words_ = \ > > -the then in an on if is it but for or at and do to > > +the then in an on if is it but for or at and do to can > > Can can opener open this

Re: [PATCH 3/3] NEWS.rst: document Power10 support

2022-05-24 Thread Andrea Bolognani
On Tue, May 24, 2022 at 10:02:42AM -0300, Daniel Henrique Barboza wrote: > Update NEWS.rst with the now added Power10 processor support. > > Signed-off-by: Daniel Henrique Barboza > --- > NEWS.rst | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Andrea Bolognani -- Andrea Bolognani /

Re: [PATCH 2/3] cpu_ppc64: add support for host-model on POWER10

2022-05-24 Thread Andrea Bolognani
On Tue, May 24, 2022 at 10:02:41AM -0300, Daniel Henrique Barboza wrote: > +++ b/tests/qemuxml2argvdata/pseries-cpu-compat-power10.xml > + > + /usr/bin/qemu-system-ppc64 > + > + > + spapr-vio is the default for pseries VMs, so you could have just here. Or remove

Re: [PATCH] build-aux: remove syntax checks for ATTRIBUTE_* and ARRAY_CARDINALITY

2022-05-24 Thread Michal Prívozník
On 5/24/22 14:32, Daniel P. Berrangé wrote: > These checks made sense when we were in process of converting code. > Since the definition of the macros has been entirely removed now, > the compiler will already thrown an error. There aren't likely to > be any in-flight patches that would hit this

Re: [libvirt PATCH 0/2] syntax-check: Add versioning information and update

2022-05-24 Thread Michal Prívozník
On 5/24/22 15:31, Andrea Bolognani wrote: > > > Andrea Bolognani (2): > syntax-check: Add versioning information > syntax-check: Pull updates from gnulib > > build-aux/syntax-check.mk | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Reviewed-by: Michal Privoznik Michal

Re: [libvirt PATCH 2/2] syntax-check: Pull updates from gnulib

2022-05-24 Thread Michal Prívozník
On 5/24/22 15:31, Andrea Bolognani wrote: > Signed-off-by: Andrea Bolognani > --- > build-aux/syntax-check.mk | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk > index 3ae5abd11a..73f8a21c1b 100644 > ---

[libvirt PATCH 2/6] qemu: Pass arguments to qemuProcessEventSubmit directly

2022-05-24 Thread Jiri Denemark
Allocating and filling qemuProcessEvent structure is a repeated pattern before all calls to qemuProcessEventSubmit. We can move the allocation inside this function and let callers pass all arguments directly. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 188

[libvirt PATCH 6/6] qemu: Do not pass unused opaque pointer to monitor callbacks

2022-05-24 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_monitor.c | 16 ++--- src/qemu/qemu_monitor.h | 108 -- src/qemu/qemu_monitor_priv.h | 1 - src/qemu/qemu_process.c | 110 --- src/qemu/qemu_processpriv.h | 3 +-

[libvirt PATCH 5/6] qemu: Do not use opaque pointer in QEMU monitor callbacks

2022-05-24 Thread Jiri Denemark
It always points to QEMU driver, which is quite redundant as all callbacks also get a pointer to a vm object. Let's get the driver pointer from there instead. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 119 +++- 1 file changed, 70

[libvirt PATCH 3/6] qemu: Make vm parameter of qemuProcessEventSubmit mandatory

2022-05-24 Thread Jiri Denemark
All callers (QMP event handlers) always pass non-NULL vm pointer. Let's make the parameter mandatory. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index

[libvirt PATCH 4/6] qemu: Drop driver parameter from qemuProcessEventSubmit

2022-05-24 Thread Jiri Denemark
We can easily get it from the vm object. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 49 - 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e492f6961d..d837fb22c9 100644

[libvirt PATCH 0/6] Fix and refactor QMP event processing

2022-05-24 Thread Jiri Denemark
Jiri Denemark (6): qemu: Avoid unlocked access to vm object in monitor callbacks qemu: Pass arguments to qemuProcessEventSubmit directly qemu: Make vm parameter of qemuProcessEventSubmit mandatory qemu: Drop driver parameter from qemuProcessEventSubmit qemu: Do not use opaque pointer in

[libvirt PATCH 1/6] qemu: Avoid unlocked access to vm object in monitor callbacks

2022-05-24 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 033d3d5bc6..33c3edb9cc 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -145,9

[libvirt PATCH 2/2] syntax-check: Pull updates from gnulib

2022-05-24 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 3ae5abd11a..73f8a21c1b 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@

[libvirt PATCH 1/2] syntax-check: Add versioning information

2022-05-24 Thread Andrea Bolognani
Our copy of syntax-check has diverged quite a bit from the gnulib original, but a lot of the core logic has remained identical and it would be nice if we could periodically pull improvements. To make this manageable, record the gnulib commit our copy is derived from: this way, the person updating

[libvirt PATCH 0/2] syntax-check: Add versioning information and update

2022-05-24 Thread Andrea Bolognani
Andrea Bolognani (2): syntax-check: Add versioning information syntax-check: Pull updates from gnulib build-aux/syntax-check.mk | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.35.3

Re: [libvirt PATCH] qemu: Lock vm object in qemuProcessHandleMemoryFailure

2022-05-24 Thread Jiri Denemark
On Tue, May 24, 2022 at 14:42:43 +0200, Jiri Denemark wrote: > This event handler was accessing a vm object without locking it first. Actually this is not the only case. I'll send them all in a single patch. Please, ignore this one. Jirka

[PATCH 1/3] cpu_map: add POWER10 cpu model

2022-05-24 Thread Daniel Henrique Barboza
Add POWER10 as a supported cpu model. Reviewed-by: Andrea Bolognani Signed-off-by: Daniel Henrique Barboza --- src/cpu_map/index.xml | 1 + src/cpu_map/meson.build | 1 + src/cpu_map/ppc64_POWER10.xml | 6 ++

[PATCH 3/3] NEWS.rst: document Power10 support

2022-05-24 Thread Daniel Henrique Barboza
Update NEWS.rst with the now added Power10 processor support. Signed-off-by: Daniel Henrique Barboza --- NEWS.rst | 4 1 file changed, 4 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index de1b9ca407..b0d4297d53 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -22,6 +22,10 @@ v8.4.0 (unreleased)

[PATCH 2/3] cpu_ppc64: add support for host-model on POWER10

2022-05-24 Thread Daniel Henrique Barboza
Signed-off-by: Daniel Henrique Barboza --- src/cpu/cpu_ppc64.c | 8 ++-- ...eries-cpu-compat-power10.ppc64-latest.args | 34 +++ ...series-cpu-compat-power10.ppc64-latest.err | 1 + .../pseries-cpu-compat-power10.xml| 21 ++

[PATCH 0/3] ppc64: POWER10 support

2022-05-24 Thread Daniel Henrique Barboza
Changes from v2: - rebased with current master - patch 2: - added qemuxml2xmltest - all tests are now using DO_TEST_CAPS_ARCH_LATEST() - new patch 3: added NEWS.rst update - v2 link: https://listman.redhat.com/archives/libvir-list/2022-May/230746.html Daniel Henrique Barboza (3): cpu_map:

[libvirt PATCH] qemu: Lock vm object in qemuProcessHandleMemoryFailure

2022-05-24 Thread Jiri Denemark
This event handler was accessing a vm object without locking it first. Signed-off-by: Jiri Denemark --- src/qemu/qemu_process.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 033d3d5bc6..6f70d5d065 100644 ---

[PATCH] build-aux: remove syntax checks for ATTRIBUTE_* and ARRAY_CARDINALITY

2022-05-24 Thread Daniel P . Berrangé
These checks made sense when we were in process of converting code. Since the definition of the macros has been entirely removed now, the compiler will already thrown an error. There aren't likely to be any in-flight patches that would hit this anyone either. Signed-off-by: Daniel P. Berrangé

Re: [PATCH 03/17] virDomainBackupDefParse: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virDomainBackupDefParse() function uses old style of parsing XML (virXMLPropString + str2enum conversion). Use virXMLPropEnumDefault() which encapsulates those steps. Signed-off-by: Michal Privoznik --- src/conf/backup_conf.c | 16

Re: [PATCH v2] virprocess: Drop workaround for setns() wrt old glibc

2022-05-24 Thread Daniel P . Berrangé
On Tue, May 24, 2022 at 02:21:01PM +0200, Michal Privoznik wrote: > We have our own implementation of setns() which was introduced in > v1.2.9-rc1~190 and extended afterwards. The reason was that back > in 2014 we were dealing with glibc that in some of its older > versions did not provide the

[PATCH v2] virprocess: Drop workaround for setns() wrt old glibc

2022-05-24 Thread Michal Privoznik
We have our own implementation of setns() which was introduced in v1.2.9-rc1~190 and extended afterwards. The reason was that back in 2014 we were dealing with glibc that in some of its older versions did not provide the function. Mostly for non-intel arches. Nevertheless, glibc now offers the

Re: [PATCH] virprocess: Drop workaround for setns() wrt old glibc

2022-05-24 Thread Daniel P . Berrangé
On Tue, May 24, 2022 at 01:40:54PM +0200, Michal Privoznik wrote: > We have our own implementation of setns() which was introduced in > v1.2.9-rc1~190 and extended afterwards. The reason was that back > in 2014 we were dealing with glibc that in some of its older > versions did not provide the

Re: [PATCH 04/17] virDomainDeviceAddressParseXML: Switch to virXMLPropEnumDefault()

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: @@ -6709,21 +6709,13 @@ static int virDomainDeviceAddressParseXML(xmlNodePtr address, virDomainDeviceInfo *info) { -g_autofree char *type = virXMLPropString(address, "type"); - -if (type) { -if

Re: [PATCH 01/17] Drop needless typecast to virStorageType enum

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: There are three places (two in domain_conf.c and one in qemu_migration.c) where a virStorageSource->type is typecasted to virStorageType (for the purpose of catching missing enum member in a switch() statement at compile time). This is needless,

Re: [PATCH 02/17] virStorageSourceGetActualType: Change type of retval

2022-05-24 Thread Boris Fiuczynski
On 5/23/22 3:08 PM, Michal Privoznik wrote: The virStorageSourceGetActualType() function returns either virStorageSource->type (which is of type virStorageType), or virStorageSourcePoolDef->type, which really stores a value of the same enum. Thus, the latter struct can be changed so that the

[PATCH] virprocess: Drop workaround for setns() wrt old glibc

2022-05-24 Thread Michal Privoznik
We have our own implementation of setns() which was introduced in v1.2.9-rc1~190 and extended afterwards. The reason was that back in 2014 we were dealing with glibc that in some of its older versions did not provide the function. Mostly for non-intel arches. Nevertheless, glibc now offers the

[libvirt RFC 1/5] virfile: introduce virFileDirect APIs

2022-05-24 Thread Claudio Fontana
these functions help with allocating buffers, aligning, reading and writing files opened with O_DIRECT. Signed-off-by: Claudio Fontana --- src/libvirt_private.syms | 8 ++ src/util/virfile.c | 249 +++ src/util/virfile.h | 11 ++ 3 files

[libvirt RFC 5/5] virfile: virFileDiskCopy: prepare for O_DIRECT files without wrapper

2022-05-24 Thread Claudio Fontana
we will allow to use already open fds that are not empty for both read and write, as long as they are properly aligned. Adapt the truncation to take into account the initial offset. Signed-off-by: Claudio Fontana --- src/util/virfile.c | 39 +-- 1 file

[libvirt RFC 2/5] virfile: use virFileDirect API in runIOCopy

2022-05-24 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- src/util/virfile.c | 28 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 03a7cdc9bf..c529598595 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -4851,20

[libvirt RFC 3/5] qemu: saveimage: rework image read/write to be O_DIRECT friendly

2022-05-24 Thread Claudio Fontana
maintain a compatible image format (still QEMU_SAVE_VERSION 2), but change the on-disk representation to be more O_DIRECT friendly: 1) ensure that the header struct fields are packed, so we can be sure no padding will ever ruin the day in the future 2) finish the libvirt header (header + xml

[libvirt RFC 4/5] qemu: saveimage: assume future formats will also support compression

2022-05-24 Thread Claudio Fontana
change the version check to assume even future versions of the format will continue to support compression. Signed-off-by: Claudio Fontana --- src/qemu/qemu_saveimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c

[libvirt RFC 0/5] introduce virFileDirect API for block-friendly read/write

2022-05-24 Thread Claudio Fontana
As a spin-off from the previous multifd series, this series offers a basic API for virfile.c to deal with reading and writing files opened with O_DIRECT. It applies this new API in the virFileDiskCopy code currently used for iohelper, and reworks the saveimage code and on-disk lengths to be

Re: [PATCH RFC 10/10] qemu: Place helper processes into the same trusted group

2022-05-24 Thread Daniel P . Berrangé
On Tue, May 24, 2022 at 11:50:50AM +0200, Michal Prívozník wrote: > On 5/23/22 18:30, Daniel P. Berrangé wrote: > > On Mon, May 09, 2022 at 05:02:17PM +0200, Michal Privoznik wrote: > >> Since the level of trust that QEMU has is the same level of trust > >> that helper processes have there's no

Re: [libvirt PATCH 00/11] syntax-check: Minimize http_sites

2022-05-24 Thread Michal Prívozník
On 5/24/22 10:45, Andrea Bolognani wrote: > Reduce the number of exceptions we keep around by various > means. > > Andrea Bolognani (11): > syntax-check: Drop unused http_sites > docs: apps: Drop Tivoli Provisioning Manager > docs: apps: Drop Cracow Cloud One > docs: apps: Drop Snooze >

Re: [PATCH v2 2/2] cpu_ppc64: add support for host-model on POWER10

2022-05-24 Thread Daniel Henrique Barboza
On 5/24/22 06:21, Andrea Bolognani wrote: On Fri, May 20, 2022 at 05:49:53PM -0300, Daniel Henrique Barboza wrote: On 5/19/22 04:44, Andrea Bolognani wrote: On Tue, May 17, 2022 at 05:32:56PM -0300, Daniel Henrique Barboza wrote: On 5/12/22 04:52, Andrea Bolognani wrote: Don't forget to

Re: [PATCH RFC 00/10] qemu: Enable SCHED_CORE for domains and helper processes

2022-05-24 Thread Michal Prívozník
On 5/23/22 18:13, Daniel P. Berrangé wrote: > On Mon, May 09, 2022 at 05:02:07PM +0200, Michal Privoznik wrote: >> The Linux kernel offers a way to mitigate side channel attacks on Hyper >> Threads (e.g. MDS and L1TF). Long story short, userspace can define >> groups of processes (aka trusted

Re: [PATCH RFC 10/10] qemu: Place helper processes into the same trusted group

2022-05-24 Thread Michal Prívozník
On 5/23/22 18:30, Daniel P. Berrangé wrote: > On Mon, May 09, 2022 at 05:02:17PM +0200, Michal Privoznik wrote: >> Since the level of trust that QEMU has is the same level of trust >> that helper processes have there's no harm in placing all of them >> into the same group. > > This assumption

Re: [PATCH RFC 06/10] virprocess: Core Scheduling support

2022-05-24 Thread Michal Prívozník
On 5/23/22 19:00, Daniel P. Berrangé wrote: > On Mon, May 09, 2022 at 05:02:13PM +0200, Michal Privoznik wrote: >> Since its 5.14 release the Linux kernel allows userspace to >> define trusted groups of processes/threads that can run on >> sibling Hyper Threads (HT) at the same time. This is to

Re: [PATCH v2 2/2] cpu_ppc64: add support for host-model on POWER10

2022-05-24 Thread Andrea Bolognani
On Fri, May 20, 2022 at 05:49:53PM -0300, Daniel Henrique Barboza wrote: > On 5/19/22 04:44, Andrea Bolognani wrote: > > On Tue, May 17, 2022 at 05:32:56PM -0300, Daniel Henrique Barboza wrote: > > > On 5/12/22 04:52, Andrea Bolognani wrote: > > > > Don't forget to add the new test case to

[libvirt PATCH 05/11] util: Drop references to netlink.pdf

2022-05-24 Thread Andrea Bolognani
The website no longer exists and the PDF file can't even be retrieved via archive.org. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - src/util/virnetdevmacvlan.c | 5 + src/util/virnetlink.c | 4 +--- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git

[libvirt PATCH 11/11] src: Use archive.org for dead URLs

2022-05-24 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 4 +--- src/conf/nwfilter_conf.c| 4 ++-- src/conf/schemas/basictypes.rng | 2 +- tests/openvzutilstest.conf | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/build-aux/syntax-check.mk

[libvirt PATCH 09/11] docs: Update various URLs

2022-05-24 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 4 docs/apps.rst | 6 +++--- docs/drvhyperv.rst| 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index e0012ae82f..e0d2a7fe6c 100644

[libvirt PATCH 08/11] docs: Update URL for MinGW

2022-05-24 Thread Andrea Bolognani
The MinGW-w64 project has effectively replaced the original MinGW project, and distributions such as Fedora have been shipping packages based on the former for years now. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - ci/README.rst | 6 +++--- docs/windows.rst

[libvirt PATCH 10/11] docs: Use HTTPS where possible

2022-05-24 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - docs/drvlxc.rst | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index e0d2a7fe6c..762b2e5ccc 100644 --- a/build-aux/syntax-check.mk +++

[libvirt PATCH 02/11] docs: apps: Drop Tivoli Provisioning Manager

2022-05-24 Thread Andrea Bolognani
It doesn't seem to be a current product: there is no proper website for it, and the most recent installation instructions I've been able to locate are targeted at RHEL 6. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - docs/apps.rst | 6 -- 2 files changed,

[libvirt PATCH 04/11] docs: apps: Drop Snooze

2022-05-24 Thread Andrea Bolognani
The website is still up, but the software itself was last updated in 2014. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - docs/apps.rst | 5 - 2 files changed, 6 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index

[libvirt PATCH 03/11] docs: apps: Drop Cracow Cloud One

2022-05-24 Thread Andrea Bolognani
The website is still up, although the latency is so high that it could hardly considered usable; the software itself was last updated in 2015. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - docs/apps.rst | 5 - 2 files changed, 6 deletions(-) diff --git

[libvirt PATCH 07/11] docs: Update URL for libxml2

2022-05-24 Thread Andrea Bolognani
The project is developed as part of GNOME these days, and the old URL redirects to GNOME's GitLab instance. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - docs/uri.rst | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[libvirt PATCH 06/11] docs: Use more generic URL for netcat

2022-05-24 Thread Andrea Bolognani
GNU netcat was last updated in 2004. These days, most operating systems will include either the nmap or OpenBSD variant of the tool. Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 1 - docs/remote.rst | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git

[libvirt PATCH 01/11] syntax-check: Drop unused http_sites

2022-05-24 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- build-aux/syntax-check.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 6b54f830f1..64babd402c 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -907,7 +907,6 @@

[libvirt PATCH 00/11] syntax-check: Minimize http_sites

2022-05-24 Thread Andrea Bolognani
Reduce the number of exceptions we keep around by various means. Andrea Bolognani (11): syntax-check: Drop unused http_sites docs: apps: Drop Tivoli Provisioning Manager docs: apps: Drop Cracow Cloud One docs: apps: Drop Snooze util: Drop references to netlink.pdf docs: Use more

Re: [libvirt PATCH 00/13] syntax-check: Cleanups and improvements

2022-05-24 Thread Michal Prívozník
On 5/23/22 19:37, Andrea Bolognani wrote: > $ meson test --suite blurb > > Andrea Bolognani (13): > syntax-check: Drop sc_bindtextdomain check > syntax-check: Remove sc_gettext_init exception > syntax-check: Remove sc_copyright_usage exception > syntax-check: Improve

Re: [PATCH] qemu_hotplug: Deny changing @rss and @rss_hash_report attributes of virtio vNICs

2022-05-24 Thread Michal Prívozník
On 5/23/22 18:29, Laine Stump wrote: > On 5/23/22 11:22 AM, Michal Privoznik wrote: >> We have virDomainUpdateDeviceFlags() API that allows changing of >> some attributes of a device whilst domain is still running (e.g. >> setting different QoS, link state change on vNICs). But only very >>

Re: [PATCH] nodedev: prevent internal error on dev_busid parse

2022-05-24 Thread Michal Prívozník
On 5/23/22 17:56, Boris Fiuczynski wrote: > As "none" is a legal value represented in the sysfs attribute dev_busid > this patch prevents libvirt from incorrectly reporting an internal error. > > Signed-off-by: Boris Fiuczynski > Suggested-by: Michal Privoznik > --- >