]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
2 years agodocs: xsl: Don't format empty sections in API manual
Peter Krempa [Thu, 3 Nov 2022 09:45:56 +0000 (10:45 +0100)]
docs: xsl: Don't format empty sections in API manual

The LXC module has no exported 'Types' but the XSL template which
generates the 'libvirt-libvirt-lxc.html' page would try to format it
anyways. This would result in an empty non-pair version of the '<pre>'
tag to be used in the page, which didn't render well with modern
browsers for some reason. All following sections would become children
of the non-pair <pre>.

Fix the XSL template to not generate empty 'Types' or 'Functions'
sections similarly to how we do with 'Macros'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agodocs: xsl: newapi: Remove unused 'navbar' template
Peter Krempa [Thu, 3 Nov 2022 12:02:31 +0000 (13:02 +0100)]
docs: xsl: newapi: Remove unused 'navbar' template

The template is unused since commit 9092c3d491047539e376a496d1520249

Remove also the up|right|left|home.png files which were only used by
code generated by the unused template.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoTranslated using Weblate (Korean)
김인수 [Thu, 3 Nov 2022 04:19:52 +0000 (05:19 +0100)]
Translated using Weblate (Korean)

Currently translated at 100.0% (10386 of 10386 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
2 years agovirschematest: Add infrastructure for testing single devices
Peter Krempa [Thu, 20 Oct 2022 11:32:34 +0000 (13:32 +0200)]
virschematest: Add infrastructure for testing single devices

Introduce an internal schema for a single device and use it to test the
various files in tests/qemuhotplugtestdevices and
tests/qemublocktestdata directories.

This also requires us to implement schema for (some) privateData bits
for the disk source.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: Introduce scaffolding for schema for <privateData> elements
Peter Krempa [Thu, 8 Oct 2020 11:48:21 +0000 (13:48 +0200)]
schema: Introduce scaffolding for schema for <privateData> elements

Libvirt internally (e.g. in the status XML) stores additional data for
various objects described by the XML. The data is usually stored in
<privateData> or similar sub-elements.

This patch adds possibility for internal schema files to describe the
<privateData> elements by schema while still disallowing them for the
public schema.

This patch adds definitions for private data of <disk> and the
corresponding storage source of a disk.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirschematest: Improve testing schemas in 'tests/cputestdata'
Peter Krempa [Thu, 8 Oct 2020 10:01:29 +0000 (12:01 +0200)]
virschematest: Improve testing schemas in 'tests/cputestdata'

The 'cputestdata' directory has a collection of XML files with very
complicated naming schemes for various input and output XML files.

Rather than trying to write complex regexes for selecting specific files
which diverged already multiple times we can introduce an internal
schema file which will cover all of the 3 top level elements used in the
XML files.

Schema for <cpu> is taken from our main RNG schema, <cpuTest> is just a
collection of <cpu> elements, and finally <cpudata> is a simple enough
to describe inline.

To keep the validator happy we have to generate the schema file to
place full paths for the included documents.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Avoid memory leak in qemuMonitorJSONExtractQueryStatsSchema
Jiri Denemark [Wed, 2 Nov 2022 14:52:31 +0000 (15:52 +0100)]
qemu: Avoid memory leak in qemuMonitorJSONExtractQueryStatsSchema

In a rare case when virHashAddEntry fails we would just leak the
structure we wanted to add to the hash table.

Fixes: e89acdbc3bbada2f3c1a591278bc975ddee2d5a9
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: Avoid double free in virDomainEventTunableNew callers
Jiri Denemark [Wed, 2 Nov 2022 14:10:25 +0000 (15:10 +0100)]
conf: Avoid double free in virDomainEventTunableNew callers

virDomainEventTunableNew is supposed to consume and free @params, but it
failed to always set @params to NULL to make sure the caller doesn't try
to free the same memory again.

Fixes: d95c79fbd00dc597b607b130d95c258b6cf31690
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: Skip virDomainNetDefParseXMLDriver if driver_node is NULL
Jiri Denemark [Wed, 2 Nov 2022 13:42:51 +0000 (14:42 +0100)]
conf: Skip virDomainNetDefParseXMLDriver if driver_node is NULL

Trying to parse <driver> node which does not exist makes no sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agospec: Fix python3-libvirt requirement in client-qemu package
Jiri Denemark [Wed, 2 Nov 2022 11:42:26 +0000 (12:42 +0100)]
spec: Fix python3-libvirt requirement in client-qemu package

The %{release} part of the requirement is just wrong as python bindings
are not rebuilt anytime libvirt release is increased, which means the
client-qemu package may require nonexistent release of python bindings.

The %{version} part is not wrong, but it's too strict for no reason as
the virt-qemu-qmp-proxy script will work happily even with ancient
python bindings. And since all distros supported by libvirt.spec already
contain python3-libvirt, we can depend on the first package called this
way.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2 years agoschema: Rename definition of disk 'target' element to 'diskTarget'
Peter Krempa [Thu, 20 Oct 2022 12:18:17 +0000 (14:18 +0200)]
schema: Rename definition of disk 'target' element to 'diskTarget'

Rename 'diskTarget' to 'diskTargetDev' and then 'target' to
'diskTarget'.

This will make it less confusing when overriding the definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemublocktest: Mark 'network-ssh-qcow2' input XML as invalid
Peter Krempa [Thu, 20 Oct 2022 12:50:21 +0000 (14:50 +0200)]
qemublocktest: Mark 'network-ssh-qcow2' input XML as invalid

The XML does not conform to the RNG schema as we don't yet expose the
'ssh' protocol officially. Mark the XML as invalid by renaming it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agotests: qemublocktestdata/imagecreate: Remove bogus 'name="vda"' attribute from <disk>
Peter Krempa [Thu, 20 Oct 2022 12:42:50 +0000 (14:42 +0200)]
tests: qemublocktestdata/imagecreate: Remove bogus 'name="vda"' attribute from <disk>

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemublocktestdata: Fix 'block-raw-reservations' case
Peter Krempa [Thu, 20 Oct 2022 12:13:38 +0000 (14:13 +0200)]
qemublocktestdata: Fix 'block-raw-reservations' case

The 'reservations' element doesn't have an 'enabled' attribute according
to our schema, remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirschematest: Construct path to the schema in the SCHEMAS_PATH
Peter Krempa [Thu, 20 Oct 2022 08:30:00 +0000 (10:30 +0200)]
virschematest: Construct path to the schema in the SCHEMAS_PATH

'abs_top_srcdir' can be prepended to the schema in the macro. Apart from
removing one needless string copy it will also allow pointing to schema
files in the builddir which will come handy in upcoming patches.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Refactor cleanup in virXMLValidateAgainstSchema
Peter Krempa [Thu, 4 Aug 2022 08:39:53 +0000 (10:39 +0200)]
util: xml: Refactor cleanup in virXMLValidateAgainstSchema

Use automatic freeing of the validator context to remove
'ret'/'cleanup:'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Refactor cleanup path in virXMLValidatorInit
Peter Krempa [Thu, 4 Aug 2022 08:31:06 +0000 (10:31 +0200)]
util: xml: Refactor cleanup path in virXMLValidatorInit

Automatically free 'validator' on errors.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemustatusxml2xml: Remove obsolete 'json' attribute
Peter Krempa [Fri, 9 Oct 2020 14:33:31 +0000 (16:33 +0200)]
qemustatusxml2xml: Remove obsolete 'json' attribute

We no longer support HMP-only qemus. Remove the leftover attribute from
the test files.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirschematest: Test 'nodedevxml2xmlout' directory
Peter Krempa [Mon, 22 Aug 2022 11:39:26 +0000 (13:39 +0200)]
virschematest: Test 'nodedevxml2xmlout' directory

Test the output files against the RNG schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Remove pointless XML node name validation in virSysinfoParseXML
Peter Krempa [Thu, 6 Oct 2022 09:12:51 +0000 (11:12 +0200)]
conf: domain: Remove pointless XML node name validation in virSysinfoParseXML

The only caller passes 'node' argument originating from an XPath lookup
for the 'sysinfo' element, so there's no point in checking it once more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Refactor cleanup in virSysinfoParseXML
Peter Krempa [Thu, 6 Oct 2022 10:33:08 +0000 (12:33 +0200)]
conf: domain: Refactor cleanup in virSysinfoParseXML

Use automatic pointer freeing to remove the 'error' label.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Parse 'type' attribute via virXMLPropEnum in virSysinfoParseXML
Peter Krempa [Thu, 6 Oct 2022 10:30:26 +0000 (12:30 +0200)]
conf: domain: Parse 'type' attribute via virXMLPropEnum in virSysinfoParseXML

Rewrite the code to use the simple helper.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Remove pointless XML node name validation in virSysinfoChassisParseXML
Peter Krempa [Thu, 6 Oct 2022 09:12:51 +0000 (11:12 +0200)]
conf: domain: Remove pointless XML node name validation in virSysinfoChassisParseXML

The only caller passes 'node' argument originating from an XPath lookup
for the 'chassis' element, so there's no point in checking it once more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Refactor cleanup in virSysinfoChassisParseXML
Peter Krempa [Thu, 6 Oct 2022 09:20:27 +0000 (11:20 +0200)]
conf: domain: Refactor cleanup in virSysinfoChassisParseXML

Register automatic cleanup for virSysinfoChassisDef and use it to
refactor the cleanup code paths in virSysinfoChassisParseXML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Reformat XPath queries in virSysinfoChassisParseXML
Peter Krempa [Thu, 6 Oct 2022 09:17:17 +0000 (11:17 +0200)]
conf: domain: Reformat XPath queries in virSysinfoChassisParseXML

Remove the unneeded linebreaks after assignment operator. Only one line
exceeds 80 colums and just by 4 characters.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Remove pointless XML node name validation in virSysinfoSystemParseXML
Peter Krempa [Thu, 6 Oct 2022 09:12:51 +0000 (11:12 +0200)]
conf: domain: Remove pointless XML node name validation in virSysinfoSystemParseXML

The only caller passes 'node' argument originating from an XPath lookup
for the 'system' element, so there's no point in checking it once more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Refactor cleanup in virSysinfoSystemParseXML
Peter Krempa [Thu, 6 Oct 2022 09:20:27 +0000 (11:20 +0200)]
conf: domain: Refactor cleanup in virSysinfoSystemParseXML

Register automatic cleanup for virSysinfoSystemDef and use it to
refactor the cleanup code paths in virSysinfoSystemParseXML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Reformat XPath queries in virSysinfoSystemParseXML
Peter Krempa [Thu, 6 Oct 2022 09:17:17 +0000 (11:17 +0200)]
conf: domain: Reformat XPath queries in virSysinfoSystemParseXML

Remove the unneeded linebreaks after assignment operator. Only one line
exceeds 80 colums and just by 4 characters.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Remove pointless XML node name validation in virSysinfoBIOSParseXML
Peter Krempa [Thu, 6 Oct 2022 09:12:51 +0000 (11:12 +0200)]
conf: domain: Remove pointless XML node name validation in virSysinfoBIOSParseXML

The only caller passes 'node' argument originating from an XPath lookup
for the 'bios' element, so there's no point in checking it once more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Refactor cleanup in virSysinfoBIOSParseXML
Peter Krempa [Thu, 6 Oct 2022 09:09:23 +0000 (11:09 +0200)]
conf: domain: Refactor cleanup in virSysinfoBIOSParseXML

Register automatic cleanup for virSysinfoBIOSDef and use it to refactor
the cleanup code paths in virSysinfoBIOSParseXML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Remove unused virXPathULong*
Peter Krempa [Wed, 5 Oct 2022 15:26:51 +0000 (17:26 +0200)]
util: xml: Remove unused virXPathULong*

Remove the now-unused functions for parsing 'unsigned long' values via
XPath.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agocpu_arm: Avoid use of 'unsigned long'
Peter Krempa [Wed, 5 Oct 2022 15:20:23 +0000 (17:20 +0200)]
cpu_arm: Avoid use of 'unsigned long'

Covert all use of 'unsigned long' to 'unsigned long long'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainJobObj: Use 'unsigned int' instead of 'unsigned long' for 'apiFlags' field
Peter Krempa [Wed, 5 Oct 2022 14:54:43 +0000 (16:54 +0200)]
virDomainJobObj: Use 'unsigned int' instead of 'unsigned long' for 'apiFlags' field

The callers store only an 'unsigned int' in the field. Convert it to the
proper type including parser/formatter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemuDomainObjPrivateXMLParseBlockjobData: Use virXMLPropUInt instead of virXPathULongHex
Peter Krempa [Wed, 5 Oct 2022 14:45:42 +0000 (16:45 +0200)]
qemuDomainObjPrivateXMLParseBlockjobData: Use virXMLPropUInt instead of virXPathULongHex

Use the function for the proper type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoppc64ModelParse: Switch to virXMLPropUInt from virXPathULongHex
Peter Krempa [Wed, 5 Oct 2022 14:09:10 +0000 (16:09 +0200)]
ppc64ModelParse: Switch to virXMLPropUInt from virXPathULongHex

We don't need to do the extra XPath lookups and we can use the proper
type right away.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainSEVDefParseXML: Use virXPathUIntBase instead of virXPathULongHex
Peter Krempa [Wed, 5 Oct 2022 13:54:39 +0000 (15:54 +0200)]
virDomainSEVDefParseXML: Use virXPathUIntBase instead of virXPathULongHex

Use the proper function for an unsigned int.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainNetDef: Change type of 'tune.sndbuf'
Peter Krempa [Wed, 5 Oct 2022 13:52:59 +0000 (15:52 +0200)]
virDomainNetDef: Change type of 'tune.sndbuf'

Use 'unsigned long long' instead of 'unsigned long' and fix the parser
and formatter.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainTimerDefParseXML: Use virXMLProp instead of virXPath
Peter Krempa [Mon, 24 Oct 2022 13:24:44 +0000 (15:24 +0200)]
virDomainTimerDefParseXML: Use virXMLProp instead of virXPath

Parse the 'frequency' field without an extra XPath.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainTimerDef: Convert 'mode' field to proper enum type
Peter Krempa [Mon, 24 Oct 2022 13:20:10 +0000 (15:20 +0200)]
virDomainTimerDef: Convert 'mode' field to proper enum type

Adjust the parser and switch statements to go with it.

Note that the XEN/libxl drivers had a 'default:' case for few of the
swtich statements so this patch blindly expands it to what it would be
in those cases.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainTimerDef: Convert 'track' field to proper enum type
Peter Krempa [Mon, 24 Oct 2022 13:08:50 +0000 (15:08 +0200)]
virDomainTimerDef: Convert 'track' field to proper enum type

Adjust the parser and add missing switch cases to make the complier
happy.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainTimerDef: Convert 'tickpolicy' field to proper enum type
Peter Krempa [Mon, 24 Oct 2022 13:05:21 +0000 (15:05 +0200)]
virDomainTimerDef: Convert 'tickpolicy' field to proper enum type

Convert the field, adjust the XML parser to use virXMLPropEnum and add
the VIR_DOMAIN_TIMER_TICKPOLICY_LAST enum case to all appropriate
'switch' statements.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainTimerDef: Convert 'name' field to proper enum type
Peter Krempa [Mon, 24 Oct 2022 12:58:39 +0000 (14:58 +0200)]
virDomainTimerDef: Convert 'name' field to proper enum type

Adjust the type and the corresponding parser to use virXMLPropEnum.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainTimerDefParseXML: Refactor cleanup
Peter Krempa [Mon, 24 Oct 2022 12:55:53 +0000 (14:55 +0200)]
virDomainTimerDefParseXML: Refactor cleanup

Automatically free the 'def' variable and remove the 'cleanup' label.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirDomainTimerCatchupDef: Change members to 'unsigned long long'
Peter Krempa [Wed, 5 Oct 2022 13:47:49 +0000 (15:47 +0200)]
virDomainTimerCatchupDef: Change members to 'unsigned long long'

The struct used 'unsigned long' variables which we try to avoid due to
being different size on different architectures.

Convert the struct and use virXMLPropULongLong instead of virXPathULong
when parsing the XML.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirNetDevVlanParse: Use virXMLProp* helpers instead of XPath lookups
Peter Krempa [Wed, 5 Oct 2022 13:35:42 +0000 (15:35 +0200)]
virNetDevVlanParse: Use virXMLProp* helpers instead of XPath lookups

The loop inside virNetDevVlanParse fetches multiple attributes from the
element. Convert it to use the virXMLProp* helpers, which also
simplifies error reporting.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirInterfaceDefParseMtu: Use virXPathUInt instead of virXPathULong
Peter Krempa [Wed, 5 Oct 2022 13:08:50 +0000 (15:08 +0200)]
virInterfaceDefParseMtu: Use virXPathUInt instead of virXPathULong

Use the proper convertor function and refactor error reporting.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirNetworkIPDefParseXML: Use virXMLPropUInt instead of virXPathULong
Peter Krempa [Wed, 5 Oct 2022 12:43:44 +0000 (14:43 +0200)]
virNetworkIPDefParseXML: Use virXMLPropUInt instead of virXPathULong

Parse the 'prefix' field directly and adjust the the error message
format strings.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirNetDevIPRouteParseXML: Refactor to use 'virXMLProp*' instead of XPath
Peter Krempa [Wed, 5 Oct 2022 12:33:57 +0000 (14:33 +0200)]
virNetDevIPRouteParseXML: Refactor to use 'virXMLProp*' instead of XPath

The function extracts multiple attributes form a single element. Modify
the function to stop using multiple XPath lookups.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirQEMUCapsLoadCache: Use 'virXMLPropUInt' instead of 'virXPathULong'
Peter Krempa [Wed, 5 Oct 2022 12:16:46 +0000 (14:16 +0200)]
virQEMUCapsLoadCache: Use 'virXMLPropUInt' instead of 'virXPathULong'

The libvirt version is stored in an 'unsigned int' use the proper XPath
query function for the type and remove the temporary variable.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Remove virXPathLong
Peter Krempa [Wed, 5 Oct 2022 12:11:10 +0000 (14:11 +0200)]
util: xml: Remove virXPathLong

The function is now unused and we no longer want to promote use of the
'long' type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: domain: Convert from virXPathLong
Peter Krempa [Wed, 5 Oct 2022 11:52:07 +0000 (13:52 +0200)]
conf: domain: Convert from virXPathLong

Convert the two uses of virXPathLong to proper
virXMLPropInt/virXMLPropLongLong so that virXPathLong can be removed in
an upcoming patch.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agotestParseNodeInfo: Rewrite to virXPathU(Int|LongLong)
Peter Krempa [Wed, 5 Oct 2022 11:51:45 +0000 (13:51 +0200)]
testParseNodeInfo: Rewrite to virXPathU(Int|LongLong)

Use the function for appropriate types and simplify the error logic.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Disallow aliasing of negative numbers in virXPathUInt
Peter Krempa [Wed, 5 Oct 2022 07:56:38 +0000 (09:56 +0200)]
util: xml: Disallow aliasing of negative numbers in virXPathUInt

Passing negative number as an alias for the max value is an anti-feature
we unfortunately allowed in virsh, but luckily never encouraged in the
XML.

Refuse numbers with negative sign when parsing unsigned int from
XPaths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirNodeDevCapsDefParseHexId: Use 'virXPathUIntBase'
Peter Krempa [Wed, 5 Oct 2022 07:24:26 +0000 (09:24 +0200)]
virNodeDevCapsDefParseHexId: Use 'virXPathUIntBase'

Switch to the proper function for parsing integer variant of a hex
number via XPath and spell out properly that the argument is 'unsigned
int'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Introduce virXPathU(Int|LongLong)Base
Peter Krempa [Wed, 5 Oct 2022 07:17:29 +0000 (09:17 +0200)]
util: xml: Introduce virXPathU(Int|LongLong)Base

In an effort to remove the 'Long' variants of XPath number fetching
functions we need a way to replace the hex number parsing capability.

The new helpers are created from the originals by adding a 'base'
argument and keeping the original function as a wrapper to pass 10.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Reimplement virXPath(U)Int via virXPathEvalString
Peter Krempa [Wed, 5 Oct 2022 11:04:17 +0000 (13:04 +0200)]
util: xml: Reimplement virXPath(U)Int via virXPathEvalString

Similarly to the refactor of virXPath(U)LongLong drop the ability to
convert from the internal double value forcing the use of the 'string()'
conversion.

In case of 32 bit integers there's no problem with overflows, but we can
implement the code identically to what we have in the other helpers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: cpu: Extract and refactor parsing of cache from virCPUDefParseXML
Peter Krempa [Wed, 5 Oct 2022 10:58:30 +0000 (12:58 +0200)]
conf: cpu: Extract and refactor parsing of cache from virCPUDefParseXML

Move the parser into a helper function named 'virCPUDefParseXMLCache'
and use the virXMLProp* helpers instead of multiple XPath lookups.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: numa: Don't fetch XML node count in virDomainNumatuneParseXML
Peter Krempa [Wed, 5 Oct 2022 10:33:19 +0000 (12:33 +0200)]
conf: numa: Don't fetch XML node count in virDomainNumatuneParseXML

The code only wants to refuse cases where more than one 'numatune'
element is present which can be achieved by using 'virXPathBoolean'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: node_device: Use 'string()' in XPath expressions for virNodeDevCapsDefParseIntO...
Peter Krempa [Wed, 5 Oct 2022 08:45:04 +0000 (10:45 +0200)]
conf: node_device: Use 'string()' in XPath expressions for virNodeDevCapsDefParseIntOptional

Upcoming patches will require that the XML XPath query returns a string
for conversion in virXPathInt. Convert all the XPaths used with
virNodeDevCapsDefParseIntOptional which uses virXPathInt internally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: node_device: Convert rest of virXPathUInt XPath expressions to number
Peter Krempa [Wed, 5 Oct 2022 08:40:04 +0000 (10:40 +0200)]
conf: node_device: Convert rest of virXPathUInt XPath expressions to number

Convert the rest of the XPath expressions used with virXPathUInt
directly to convert via string(). This will become mandatory in upcoming
patches.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: node_device: Use 'string()' in XPath expressions for virNodeDevCapsDefParseUInt
Peter Krempa [Wed, 5 Oct 2022 08:37:36 +0000 (10:37 +0200)]
conf: node_device: Use 'string()' in XPath expressions for virNodeDevCapsDefParseUInt

Upcoming patches will require that the XML XPath query returns a string
for conversion in virXPathUInt. Convert all the XPaths used with
virNodeDevCapsDefParseUInt which uses virXPathUInt internally.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Disallow aliasing of negative numbers in virXPathULongLong
Peter Krempa [Wed, 5 Oct 2022 07:56:38 +0000 (09:56 +0200)]
util: xml: Disallow aliasing of negative numbers in virXPathULongLong

Passing negative number as an alias for the max value is an anti-feature
we unfortunately allowed in virsh, but luckily never encouraged in the
XML.

Refuse numbers with negative sign when parsing unsigned long long from
XPaths.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agotests: qemucapabilities: Add data for the qemu-7.2 dev cycle
Peter Krempa [Fri, 7 Oct 2022 08:14:55 +0000 (10:14 +0200)]
tests: qemucapabilities: Add data for the qemu-7.2 dev cycle

Add data based on the v7.1.0-1579-g5107fd3eff qemu commit.

Notable changes:

- New machine types and corresponding objects:
    - pc-i440fx-7.2, pc-i440fx-7.2-machine, pc-q35-7.2, pc-q35-7.2-machine
- new NETDEV_STREAM_CONNECTED/NETDEV_STREAM_DISCONNECTED events
- thread-context object and prealloc-property for memory devices added
- libblkio block driver backed support added:
    - new backend protocol drivers:
       - io_uring, nvme-io_uring, virtio-blk-vhost-user, virtio-blk-vhost-vdpa
- New CPU flags and some CPU features become migratable
  (corresponding 'cpu-host-model' test changed output)
- cpu features 'avx', 'avx2', 'f16c', 'fma', 'vaes' became available in
  TCG
- 'dumpdtb' command added
- New disk frontend properties:
    - account-failed, account-invalid
- New unstable commands for debugging virtio:
  x-query-virtio, x-query-virtio-status, x-query-virtio-queue-status,
  x-query-virtio-vhost-queue-status, x-query-virtio-queue-element

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu_namespace: Make qemuDomainGetPreservedMounts() more robust wrt running VMs
Michal Privoznik [Mon, 31 Oct 2022 15:26:17 +0000 (16:26 +0100)]
qemu_namespace: Make qemuDomainGetPreservedMounts() more robust wrt running VMs

The aim of qemuDomainGetPreservedMounts() is to get a list of
filesystems mounted under /dev and optionally generate a path for
each one where they are moved temporarily when building the
namespace. And if given domain is also running it looks into its
mount table rather than at the host one. But if it did look at
the domain's private mount table, it find /dev mounted twice: the
first time by udev, the second time the tmpfs mounted by us.

Now, later in the function there's a "sorting" algorithm that
tries to reduce number of mount points needing preservation, by
identifying nested mount points. And if we keep the second
occurrence of /dev on the list, well, after the "sorting" we are
left with nothing but "/dev" because all other mount points are
nested.

Fixes: 46b03819ae8d833b11c2aaccb2c2a0361727f51b
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu_namespace: Don't leak memory in qemuDomainGetPreservedMounts()
Michal Privoznik [Mon, 31 Oct 2022 14:38:13 +0000 (15:38 +0100)]
qemu_namespace: Don't leak memory in qemuDomainGetPreservedMounts()

The aim of qemuDomainGetPreservedMounts() is to get a list of
filesystems mounted under /dev and optionally generate a path for
each one where they are moved temporarily when building the
namespace. And the function tries to be a bit clever about it.
For instance, if /dev/shm mount point exists, there's no need to
consider /dev/shm/a nor /dev/shm/b as preserving just 'top level'
/dev/shm gives the same result. To achieve this, the function
iterates over the list of filesystem as returned by
virFileGetMountSubtree() and removes the nested ones. However, it
does so in a bit clumsy way: plain VIR_DELETE_ELEMENT() is used
without freeing the string itself. Therefore, if all three
aforementioned example paths appeared on the list, /dev/shm/a and
/dev/shm/b strings would be leaked.

And when I think about it more, there's no real need to shrink
the array down (realloc()). It's going to be free()-d when
returning from the function. Switch to
VIR_DELETE_ELEMENT_INPLACE() then.

Fixes: cdd9205dfffa3aaed935446a41f0d2dd1357c268
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemuAppendDomainMemoryMachineParams: Refactor formatting of 'dump-guest-core'
Peter Krempa [Wed, 19 Oct 2022 12:14:33 +0000 (14:14 +0200)]
qemuAppendDomainMemoryMachineParams: Refactor formatting of 'dump-guest-core'

Use virTristateSwitchFromBool to fill in the default if user didn't
request it explicitly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Remove double->(u)ll conversion in virXPath(U)LongLong
Peter Krempa [Wed, 5 Oct 2022 07:53:04 +0000 (09:53 +0200)]
util: xml: Remove double->(u)ll conversion in virXPath(U)LongLong

The conversion from double is not precise enough at the extremes so it
must not be used.

Spell out that the callers are required to use a string() conversion in
the XPath expression and remove the code path handling the direct
conversion from numbers.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Extract XPath evaluation for strings
Peter Krempa [Wed, 5 Oct 2022 07:46:11 +0000 (09:46 +0200)]
util: xml: Extract XPath evaluation for strings

Extract the internals of virXPathString which evaluate the XPath and
validate that the returned object is a string into a new helper named
'virXPathEvalString'.

The function will be later reused in the number XPath evaluation
functions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: Always use 'string()' conversion with virXPath(U)LongLong
Peter Krempa [Tue, 4 Oct 2022 15:06:14 +0000 (17:06 +0200)]
conf: Always use 'string()' conversion with virXPath(U)LongLong

When the 'string()' conversion is used the number is parsed inside
libvirt by our internal helpers which work on integers in contrast to
when 'number()' is used and libxml2 uses a 'double' variable internally.

On the upper extremes of the 64 bit variables the double precision
variable doesn't have enough precision to represent each distinct
integer and thus could cause problems.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirNodeDeviceCapPCIDefFormat: Use %u for unsigned values
Peter Krempa [Tue, 4 Oct 2022 14:47:38 +0000 (16:47 +0200)]
virNodeDeviceCapPCIDefFormat: Use %u for unsigned values

'bus', 'slot' and 'function' are unsigned int variables parsed as
unsigned int, but were formated as signed.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: node_device: Rename virNodeDevCapsDefParseULong to virNodeDevCapsDefParseUInt
Peter Krempa [Tue, 4 Oct 2022 14:39:46 +0000 (16:39 +0200)]
conf: node_device: Rename virNodeDevCapsDefParseULong to virNodeDevCapsDefParseUInt

The function parses an unsigned int so rename it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agovirNodeDevCapsDefParseULong: Use virXPathUInt instead of virXPathULong
Peter Krempa [Tue, 4 Oct 2022 14:29:33 +0000 (16:29 +0200)]
virNodeDevCapsDefParseULong: Use virXPathUInt instead of virXPathULong

Fix the function argument to properly spell out 'unsigned int' and use
virXPathUInt instead of virXPathULong and a temporary value.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Remove unused 'virXPathLongHex'
Peter Krempa [Tue, 4 Oct 2022 14:18:16 +0000 (16:18 +0200)]
util: xml: Remove unused 'virXPathLongHex'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Use consistent naming for RNG validation error handling functions
Peter Krempa [Tue, 4 Oct 2022 14:09:20 +0000 (16:09 +0200)]
util: xml: Use consistent naming for RNG validation error handling functions

Rename 'catchRNGError' to 'virXMLValidatorRNGErrorCatch' and
'ignoreRNGError' to 'virXMLValidatorRNGErrorIgnore'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Ensure proper header style in virxml.c
Peter Krempa [Tue, 4 Oct 2022 14:07:31 +0000 (16:07 +0200)]
util: xml: Ensure proper header style in virxml.c

Make the file use consistent header formatting and two line spacing
between functions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Unexport virXMLXPathContextNew
Peter Krempa [Tue, 4 Oct 2022 13:55:01 +0000 (15:55 +0200)]
util: xml: Unexport virXMLXPathContextNew

The function is now referenced only within util/virxml.c other callers
should not use it directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoutil: xml: Remove unused virXPathNumber
Peter Krempa [Tue, 4 Oct 2022 13:53:21 +0000 (15:53 +0200)]
util: xml: Remove unused virXPathNumber

'virXPathNumber' is not used currently, remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agostorage|test|vbox: Implement support for validating storage volume XMLs
Peter Krempa [Tue, 18 Oct 2022 12:07:55 +0000 (14:07 +0200)]
storage|test|vbox: Implement support for validating storage volume XMLs

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2 years agostorage: Add VIR_STORAGE_VOL_CREATE_VALIDATE flag
Peter Krempa [Tue, 18 Oct 2022 11:59:29 +0000 (13:59 +0200)]
storage: Add VIR_STORAGE_VOL_CREATE_VALIDATE flag

Allow users to request validation of the storage volume XML. Add new
flag and virsh support.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2 years agoconf: storage: Add support for validating storage vol XML to virStorageVolDefParse
Peter Krempa [Tue, 18 Oct 2022 11:47:31 +0000 (13:47 +0200)]
conf: storage: Add support for validating storage vol XML to virStorageVolDefParse

Introduce the VIR_VOL_XML_PARSE_VALIDATE parser flag and wire it up into
the validator.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2 years agonodedev|test: Implement support for validating node device XMLs
Peter Krempa [Tue, 18 Oct 2022 11:41:04 +0000 (13:41 +0200)]
nodedev|test: Implement support for validating node device XMLs

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2 years agonodedev: Add VIR_NODE_DEVICE_(CREATE|DEFINE)_XML_VALIDATE flags
Peter Krempa [Tue, 18 Oct 2022 11:19:05 +0000 (13:19 +0200)]
nodedev: Add VIR_NODE_DEVICE_(CREATE|DEFINE)_XML_VALIDATE flags

The node device APIs which get XML from the user don't yet support XML
validation flags. Introduce virNodeDeviceCreateXMLFlags and
virNodeDeviceDefineXMLFlags with the appropriate flags and add virsh
support for the new flags.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2 years agoconf: node_device: Add 'validate' argument to virNodeDeviceDefParse
Peter Krempa [Tue, 18 Oct 2022 10:34:07 +0000 (12:34 +0200)]
conf: node_device: Add 'validate' argument to virNodeDeviceDefParse

Allow callers to request XML validation against the schema. All callers
for now pass 'false'.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
2 years agoschema: cpu: include 'arch' subelement in interleave definition of 'hostcpu'
Peter Krempa [Thu, 13 Oct 2022 16:49:19 +0000 (18:49 +0200)]
schema: cpu: include 'arch' subelement in interleave definition of 'hostcpu'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: storagepool: Allow interleaving of per-pool custom namespace elements
Peter Krempa [Thu, 13 Oct 2022 16:44:46 +0000 (18:44 +0200)]
schema: storagepool: Allow interleaving of per-pool custom namespace elements

The custom namespace parameters for 'rbd' and 'netfs' pool types were
not included in the interleave statement.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: nwfilterbinding: Allow interleaving of subelements of 'owner' element
Peter Krempa [Thu, 13 Oct 2022 16:41:44 +0000 (18:41 +0200)]
schema: nwfilterbinding: Allow interleaving of subelements of 'owner' element

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: nwfilter: Allow interleaving subelements of the top level 'filter' element
Peter Krempa [Thu, 13 Oct 2022 16:40:15 +0000 (18:40 +0200)]
schema: nwfilter: Allow interleaving subelements of the top level 'filter' element

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: networkport: Allow interleaving of subelements of 'driver' subelement of...
Peter Krempa [Thu, 13 Oct 2022 16:21:30 +0000 (18:21 +0200)]
schema: networkport: Allow interleaving of subelements of 'driver' subelement of hostdev-pci

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: networkport: Allow interleaving of subelements of 'owner'
Peter Krempa [Thu, 13 Oct 2022 16:20:17 +0000 (18:20 +0200)]
schema: networkport: Allow interleaving of subelements of 'owner'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving of 'watchdog' subelements
Peter Krempa [Thu, 13 Oct 2022 16:18:03 +0000 (18:18 +0200)]
schema: domain: Allow interleaving of 'watchdog' subelements

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving of <bootloader> and <os>
Peter Krempa [Thu, 13 Oct 2022 15:45:29 +0000 (17:45 +0200)]
schema: domain: Allow interleaving of <bootloader> and <os>

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Add the 'type' subelement of the osexe case of 'os' element to interleave
Peter Krempa [Thu, 13 Oct 2022 15:35:30 +0000 (17:35 +0200)]
schema: domain: Add the 'type' subelement of the osexe case of 'os' element to interleave

The 'type' element was outside of the 'interleave' definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving 'ip' and 'route' sub-elements of interface
Peter Krempa [Thu, 13 Oct 2022 14:38:52 +0000 (16:38 +0200)]
schema: domain: Allow interleaving 'ip' and 'route' sub-elements of interface

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving of subelements of disk's 'mirror'
Peter Krempa [Thu, 13 Oct 2022 14:38:23 +0000 (16:38 +0200)]
schema: domain: Allow interleaving of subelements of disk's 'mirror'

While for now the 'mirror' element is output only, the idea was to allow
it to be used for input too to restore the mirror job if that becomes
the necessity. Allowing interleaving of the subelements can be done
regardless.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving of subelements of 'memtune'
Peter Krempa [Thu, 13 Oct 2022 14:33:11 +0000 (16:33 +0200)]
schema: domain: Allow interleaving of subelements of 'memtune'

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving of 'tpm' config elements
Peter Krempa [Thu, 13 Oct 2022 14:32:13 +0000 (16:32 +0200)]
schema: domain: Allow interleaving of 'tpm' config elements

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving of PCI controller config elements
Peter Krempa [Thu, 13 Oct 2022 14:13:47 +0000 (16:13 +0200)]
schema: domain: Allow interleaving of PCI controller config elements

The 'model' and 'target' element can be freely moved around.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoschema: domain: Allow interleaving of character device config elements
Peter Krempa [Thu, 13 Oct 2022 14:03:00 +0000 (16:03 +0200)]
schema: domain: Allow interleaving of character device config elements

Allow interleaving in the 'qemucdevSrcDef' definition which is shared
by all places using character device as backend.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoPost-release version bump to 8.10.0
Jiri Denemark [Tue, 1 Nov 2022 11:36:50 +0000 (12:36 +0100)]
Post-release version bump to 8.10.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2 years agoRelease of libvirt-8.9.0
Jiri Denemark [Tue, 1 Nov 2022 11:17:01 +0000 (12:17 +0100)]
Release of libvirt-8.9.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>