Re: [PATCH v2] cpu_map: Introduce Neoverse N1/N2/V1

2022-09-26 Thread Zhenyu Zhang
Hello Martin, Yes, I'm sending this patch because I'm having the following problem on a Neoverse-N1 machine. # grep "Cannot find CPU model" /var/log/libvirt/libvirtd.log operation failed: Cannot find CPU model with PVR 0xd0c And I saw that Fujitsu sent a similar patch to support their CPU model

Re: [libvirt PATCH 0/2] add systemd-rpm-macros build dependency

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Pavel Hrdina wrote: Pavel Hrdina (2): spec: add systemd-rpm-macros build dependency ci: refresh generated files ci/containers/almalinux-8.Dockerfile | 1 + ci/containers/centos-stream-8.Dockerfile | 1 + ci/containers/centos-stream-9.Dockerfile

[libvirt PATCH 0/2] add systemd-rpm-macros build dependency

2022-09-26 Thread Pavel Hrdina
Pavel Hrdina (2): spec: add systemd-rpm-macros build dependency ci: refresh generated files ci/containers/almalinux-8.Dockerfile | 1 + ci/containers/centos-stream-8.Dockerfile | 1 + ci/containers/centos-stream-9.Dockerfile | 1 +

[libvirt PATCH 2/2] ci: refresh generated files

2022-09-26 Thread Pavel Hrdina
Signed-off-by: Pavel Hrdina --- ci/containers/almalinux-8.Dockerfile | 1 + ci/containers/centos-stream-8.Dockerfile | 1 + ci/containers/centos-stream-9.Dockerfile | 1 + ci/containers/fedora-35.Dockerfile| 1 +

[libvirt PATCH 1/2] spec: add systemd-rpm-macros build dependency

2022-09-26 Thread Pavel Hrdina
We should explicitly depend on this package as we use some macros defined by files that are installed from systemd-rpm-macros. Currently the build works only because some of our other build dependencies pull in systemd which will install systemd-rpm-macros if rpm-build is installed as well.

Re: [PATCH 37/37] virDomainNetDefParseXML: Drop prehistoric error workaround

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Apart from it being a long time ago the 'openvz' driver is also rarely used. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 20 1 file changed, 20 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 36/37] virDomainNetDefParseXML: Parse attributes of only when present

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Access the 'mac_node' variable only when it was filled. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 48 +- 1 file changed, 24 insertions(+), 24 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 35/37] virDomainNetDefParseXML: Don't overload 'node' variable when parsing

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 34/37] virDomainNetDefParseXML: Refactor parsing of

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Parse the element only when the network type requires it and assign it directly. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 45 +++--- 1 file changed, 11 insertions(+), 34 deletions(-) Reviewed-by: Ján

Re: [PATCH 33/37] virDomainNetDefParseXML: Refactor parsing of subelement

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Specifically rework of parsing of the 'managed' attribute simplifies the code greatly. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 32/37] virDomainNetDef: Use virTristateBool for 'managed_tap' instead of int

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Convert the strut member to proper type. struct Signed-off-by: Peter Krempa --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 31/37] virDomainNetDefParseXML: Refactor parsing of

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Base whether virtualport is supported for a given interface on a new variable named 'virtualport_flags' which also configures the parser for the virtualports subelement and fill it in the appropriate interface type branches. Signed-off-by: Peter Krempa

Re: [PATCH 30/37] conf: domain: Move prue validation code from virDomainNetDefParseXML to virDomainNetDefValidate

2022-09-26 Thread Ján Tomko
s/prue/pure in the commit summary On a Monday in 2022, Peter Krempa wrote: The moved code is pure validation of semantics of the definition and not actual parsed values. Move it to the validation code. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 38

Re: [PATCH 29/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_HOSTDEV

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 44 -- 1 file changed, 21 insertions(+), 23 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 28/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_UDP/MCAST/SERVER/CLIENT

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: This also removes the confusing use of variables named 'tmpNode' and 'tmp_node' right next to each other. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 101 + 1 file changed, 31 insertions(+), 70

Re: [PATCH 27/37] util: xml: Introduce VIR_XPATH_NODE_AUTORESTORE_NAME

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: VIR_XPATH_NODE_AUTORESTORE_NAME is a more generic version of the VIR_XPATH_NODE_AUTORESTORE macro used to save the 'node' inside a XPath context struct. The new macro allows specifying the name of the variable used to save the context so that it can be

Re: [PATCH 26/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_VDPA

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 25/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_VHOSTUSER

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 130 + 1 file changed, 68 insertions(+), 62 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 24/37] conf: domain: Move 'virDomainChrSourceReconnectDefParseXML'

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Move the function in place of its forward declaration. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 48 ++ 1 file changed, 21 insertions(+), 27 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 23/37] virDomainNetDefParseXML: Extract network device model earlier

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Move the code fetching the model of the net device before the main code parsing individual device types so that the data is available before the upcoming refactor. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 9 - 1 file changed, 4

Re: [PATCH 22/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_DIRECT

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 40 +--- 1 file changed, 13 insertions(+), 27 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 21/37] conf: domain: Convert 'mode' field of the 'direct' type of virDomainNetDef to proper type

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Use 'virNetDevMacVLanMode'. Signed-off-by: Peter Krempa --- src/conf/domain_conf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 20/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_BRIDGE

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 19/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_INTERNAL

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 18/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_VDS

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 78 ++ 1 file changed, 18 insertions(+), 60 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 17/37] util: xml: Introduce virXMLPropLongLong

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Add a helper for parsing long long values from XML properties with semantics like virXMLPropInt. Signed-off-by: Peter Krempa --- src/libvirt_private.syms | 1 + src/util/virxml.c| 64 src/util/virxml.h

Re: [PATCH 16/37] virDomainNetDefParseXML: Refactor parsing of data for VIR_DOMAIN_NET_TYPE_NETWORK

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 68 +++--- 1 file changed, 37 insertions(+), 31 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH] qemu_monitor_json: remove unnecessary variable 'rc'

2022-09-26 Thread Ján Tomko
On a Wednesday in 2022, Kristina Hanicova wrote: Signed-off-by: Kristina Hanicova --- src/qemu/qemu_monitor_json.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Ján Tomko and pushed now. Jano

Re: [PATCH 2/2] daemon: Introduce the possibility for users to register custom XML validator

2022-09-26 Thread Peter Krempa
On Mon, Sep 26, 2022 at 12:56:44 +0100, Daniel P. Berrangé wrote: > On Fri, Sep 23, 2022 at 05:42:13PM +0200, Peter Krempa wrote: > > Introduce a new config option 'xml_validator' into the daemon config > > file which will allow users to make libvirt daemons use a custom XML > > validator. > > >

Re: [PATCH 2/2] daemon: Introduce the possibility for users to register custom XML validator

2022-09-26 Thread Daniel P . Berrangé
On Mon, Sep 26, 2022 at 02:09:23PM +0200, Ján Tomko wrote: > On a Monday in 2022, Daniel P. Berrangé wrote: > > On Fri, Sep 23, 2022 at 05:42:13PM +0200, Peter Krempa wrote: > > > Introduce a new config option 'xml_validator' into the daemon config > > > file which will allow users to make libvirt

Re: [PATCH v2] cpu_map: Introduce Neoverse N1/N2/V1

2022-09-26 Thread Martin Kletzander
On Mon, Sep 26, 2022 at 02:28:51AM -0400, Zhenyu Zhang wrote: Add Neoverse N1/N2/V1 as a supported cpu model. Sorry for misleading you earlier. Looking at it now it seems that all the Neoverse CPUs are from Arm and Ampere computing only makes the Altra which is based on Neoverse N1. I guess

Re: [PATCH 2/2] daemon: Introduce the possibility for users to register custom XML validator

2022-09-26 Thread Ján Tomko
On a Monday in 2022, Daniel P. Berrangé wrote: On Fri, Sep 23, 2022 at 05:42:13PM +0200, Peter Krempa wrote: Introduce a new config option 'xml_validator' into the daemon config file which will allow users to make libvirt daemons use a custom XML validator. The rationale is that validators

Re: [PATCH 2/2] daemon: Introduce the possibility for users to register custom XML validator

2022-09-26 Thread Daniel P . Berrangé
On Fri, Sep 23, 2022 at 05:42:13PM +0200, Peter Krempa wrote: > Introduce a new config option 'xml_validator' into the daemon config > file which will allow users to make libvirt daemons use a custom XML > validator. > > The rationale is that validators such as 'jing'[1] provide drastically >

[PATCH v2 RESEND] qemu: fix memory leak about virDomainEventTunableNew

2022-09-26 Thread luzhipeng
From: lu zhipeng For prevent memory leak and easier to use, So change virDomainEventTunableNew to get virTypedParameterPtr *params and set it = NULL. Signed-off-by: lu zhipeng --- src/conf/domain_event.c| 14 +++--- src/conf/domain_event.h| 4 ++-- src/qemu/qemu_driver.c

Re: [PATCH 7/7] qemudomainsnapshotxml2xmltest: Add test case for a snapshot with 'inactiveDomain' element

2022-09-26 Thread Peter Krempa
On Mon, Sep 26, 2022 at 12:07:07 +0100, Daniel P. Berrangé wrote: > On Thu, Aug 25, 2022 at 11:46:10AM +0200, Peter Krempa wrote: > > Signed-off-by: Peter Krempa > > --- > > .../memory-snapshot-inactivedomain.xml| 148 ++ > > tests/qemudomainsnapshotxml2xmltest.c

Re: [PATCH 1/2] util: xml: Introduce infrastructure to support custom XML validators

2022-09-26 Thread Michal Prívozník
On 9/23/22 17:42, Peter Krempa wrote: > The XML from libxml2 we use in libvirt has in many cases very bad error > messages, which make it very difficult to point to the specific problem > with the validated XML. > > This patch adds infrastructure which will allow users to specify a > custom XML

Re: [PATCH 0/2] RFC: Allow using custom XML validator

2022-09-26 Thread Michal Prívozník
On 9/23/22 17:42, Peter Krempa wrote: > Benefits described in patch 2/2 with an example of using 'jing' as > validator. > > Peter Krempa (2): > util: xml: Introduce infrastructure to support custom XML validators > daemon: Introduce the possibility for users to register custom XML >

Re: [PATCH 7/7] qemudomainsnapshotxml2xmltest: Add test case for a snapshot with 'inactiveDomain' element

2022-09-26 Thread Daniel P . Berrangé
On Thu, Aug 25, 2022 at 11:46:10AM +0200, Peter Krempa wrote: > Signed-off-by: Peter Krempa > --- > .../memory-snapshot-inactivedomain.xml| 148 ++ > tests/qemudomainsnapshotxml2xmltest.c | 2 + > 2 files changed, 150 insertions(+) > create mode 100644 >

Re: [PATCH] libvirt-guests: Fix dependency ordering in service file

2022-09-26 Thread Michal Prívozník
On 8/30/22 08:43, Martin Kletzander wrote: > After some debugging and discussion with systemd team it turns out we > are misusing the ordering in libvirt-guests.service. That happened > because we want to support both monolithic and modular daemon setups and > on top of that we also want to

Re: [PATCH v2 RESEND] qemu: fix memory leak about virDomainEventTunableNew

2022-09-26 Thread Jiri Denemark
On Fri, Sep 23, 2022 at 22:08:42 +0800, luzhipeng wrote: > From: lu zhipeng > > For prevent memory leak and easier to use, So change > virDomainEventTunableNew to get virTypedParameterPtr *params > and set it = NULL. > > Signed-off-by: lu zhipeng > --- > v1:

[PATCH v2] Log alarms should be generated even if the QEMU process is not stopped

2022-09-26 Thread 丁丽敏
If the qemu process is shutdown and flag is set to VIR_QEMU_PROCESS_KILL_NOWAIT, a log alarm is generated even if the qemu process is not stopped. Signed-off-by: dinglimin --- v1:https://www.mail-archive.com/libvir-list@redhat.com/msg232232.html diff to v1: - Add the patch 's

[PATCH v2] Two branches in a conditional structure should not have exactly the same implementation

2022-09-26 Thread 丁丽敏
Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error.If the same logic is truly needed for both instances, then they should be combined. Signed-off-by: dinglimin --- v1 of:

[PATCH v2] Log alarms should be generated even if the QEMU process is not stopped

2022-09-26 Thread 丁丽敏
If the qemu process is shutdown and flag is set to VIR_QEMU_PROCESS_KILL_NOWAIT, a log alarm is generated even if the qemu process is not stopped. Signed-off-by: dinglimin --- v1:https://www.mail-archive.com/libvir-list@redhat.com/msg232232.html diff to v1: - Add the patch 's

Re: [PATCH RFC v2 00/13] IOMMUFD Generic interface

2022-09-26 Thread David Gibson
On Fri, Sep 23, 2022 at 08:03:07AM -0600, Alex Williamson wrote: > On Fri, 23 Sep 2022 10:29:41 -0300 > Jason Gunthorpe wrote: > > > On Fri, Sep 23, 2022 at 09:54:48AM +0100, Daniel P. Berrangé wrote: > > > > > Yes, we use cgroups extensively already. > > > > Ok, I will try to see about this

[PATCH v2] cpu_map: Introduce Neoverse N1/N2/V1

2022-09-26 Thread Zhenyu Zhang
Add Neoverse N1/N2/V1 as a supported cpu model. Signed-off-by: Zhenyu Zhang v1: https://listman.redhat.com/archives/libvir-list/2022-September/234294.html Changelog = v2: * Introduce Neoverse N1/N2/V1 (Martin) * Corrected ampere vendor value