[PATCH 00/15] qemu: Retire QEMU_CAPS_OBJECT_MEMORY_{RAM, FILE} and friends
by Michal Privoznik
Pipeline:
https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/684845875
Given our minimal QEMU version 4.2.0, memory-backend-ram,
memory-backend-file and some of its attributes are going to be always
present. Retire corresponding capabilities then.
Michal Prívozník (15):
qemuxml2argvtest: Convert hugepages related tests to _CAPS_LATEST
qemuxml2xmltest: Convert hugepages related tests to _CAPS_LATEST
qemuxml2argvtest: Drop cpu-numa-memshared-1 test case
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_RAM
qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_RAM
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_RAM
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE
qemu_capabilities: Stop detectin QEMU_CAPS_OBJECT_MEMORY_FILE
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD
qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN
qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN
src/qemu/qemu_capabilities.c | 21 ++--
src/qemu/qemu_capabilities.h | 8 +-
src/qemu/qemu_command.c | 67 +++--------
src/qemu/qemu_validate.c | 44 -------
.../caps_4.2.0.aarch64.xml | 4 -
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 4 -
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 4 -
.../caps_4.2.0.x86_64.xml | 4 -
.../caps_5.0.0.aarch64.xml | 4 -
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 4 -
.../caps_5.0.0.riscv64.xml | 4 -
.../caps_5.0.0.x86_64.xml | 4 -
.../qemucapabilitiesdata/caps_5.1.0.sparc.xml | 4 -
.../caps_5.1.0.x86_64.xml | 4 -
.../caps_5.2.0.aarch64.xml | 4 -
.../qemucapabilitiesdata/caps_5.2.0.ppc64.xml | 4 -
.../caps_5.2.0.riscv64.xml | 4 -
.../qemucapabilitiesdata/caps_5.2.0.s390x.xml | 4 -
.../caps_5.2.0.x86_64.xml | 4 -
.../caps_6.0.0.aarch64.xml | 4 -
.../qemucapabilitiesdata/caps_6.0.0.s390x.xml | 4 -
.../caps_6.0.0.x86_64.xml | 4 -
.../caps_6.1.0.x86_64.xml | 4 -
.../caps_6.2.0.aarch64.xml | 4 -
.../qemucapabilitiesdata/caps_6.2.0.ppc64.xml | 4 -
.../caps_6.2.0.x86_64.xml | 4 -
.../caps_7.0.0.aarch64.xml | 4 -
.../qemucapabilitiesdata/caps_7.0.0.ppc64.xml | 4 -
.../caps_7.0.0.x86_64.xml | 4 -
.../qemucapabilitiesdata/caps_7.1.0.ppc64.xml | 4 -
.../caps_7.1.0.x86_64.xml | 4 -
.../caps_7.2.0.x86_64.xml | 4 -
.../qemuxml2argvdata/cpu-numa-memshared-1.err | 1 -
.../qemuxml2argvdata/cpu-numa-memshared-1.xml | 1 -
.../hugepages-default-1G-nodeset-2M.err | 2 +-
...> hugepages-default-2M.x86_64-latest.args} | 13 ++-
.../qemuxml2argvdata/hugepages-default-2M.xml | 9 +-
...es-default-system-size.x86_64-latest.args} | 15 ++-
.../hugepages-default-system-size.xml | 9 +-
...s => hugepages-default.x86_64-latest.args} | 15 +--
tests/qemuxml2argvdata/hugepages-default.xml | 20 +++-
.../qemuxml2argvdata/hugepages-memaccess.args | 44 -------
.../hugepages-memaccess.x86_64-latest.args | 46 ++++++++
.../qemuxml2argvdata/hugepages-memaccess.xml | 9 +-
.../hugepages-memaccess2.args | 44 -------
.../hugepages-memaccess2.x86_64-latest.args | 46 ++++++++
.../qemuxml2argvdata/hugepages-memaccess2.xml | 9 +-
.../qemuxml2argvdata/hugepages-memaccess3.xml | 10 +-
...epages-nodeset-nonexist.x86_64-latest.err} | 0
.../hugepages-nodeset-nonexist.xml | 4 +-
...s => hugepages-nodeset.x86_64-latest.args} | 13 ++-
tests/qemuxml2argvdata/hugepages-nodeset.xml | 12 +-
...epages-numa-default-2M.x86_64-latest.args} | 12 +-
.../hugepages-numa-default-2M.xml | 12 +-
...ages-numa-default-dimm.x86_64-latest.args} | 15 +--
.../hugepages-numa-default-dimm.xml | 5 +-
...hugepages-numa-default.x86_64-latest.args} | 11 +-
...s-numa-nodeset-nonexist.x86_64-latest.err} | 0
.../hugepages-numa-nodeset-nonexist.xml | 4 +-
...ages-numa-nodeset-part.x86_64-latest.args} | 12 +-
.../hugepages-numa-nodeset-part.xml | 12 +-
.../hugepages-numa-nodeset.x86_64-latest.args | 40 +++++++
.../hugepages-numa-nodeset.xml | 12 +-
tests/qemuxml2argvdata/hugepages-nvdimm.xml | 5 +-
tests/qemuxml2argvdata/hugepages-shared.args | 42 -------
.../hugepages-shared.x86_64-latest.args | 44 +++++++
tests/qemuxml2argvdata/hugepages-shared.xml | 21 +++-
tests/qemuxml2argvdata/numatune-memnode.err | 2 +-
.../qemuxml2argvdata/pages-dimm-discard.args | 35 ------
.../pages-dimm-discard.x86_64-latest.args | 38 ++++++
tests/qemuxml2argvdata/pages-dimm-discard.xml | 5 +-
.../pages-discard-hugepages.args | 34 ------
...pages-discard-hugepages.x86_64-latest.args | 36 ++++++
.../pages-discard-hugepages.xml | 9 +-
tests/qemuxml2argvdata/pages-discard.args | 34 ------
....args => pages-discard.x86_64-latest.args} | 16 +--
tests/qemuxml2argvdata/pages-discard.xml | 4 +-
tests/qemuxml2argvtest.c | 110 +++++-------------
...=> hugepages-default-2M.x86_64-latest.xml} | 0
...ges-default-system-size.x86_64-latest.xml} | 0
.../hugepages-default.x86_64-latest.xml | 1 +
.../qemuxml2xmloutdata/hugepages-default.xml | 34 ------
... => hugepages-memaccess.x86_64-latest.xml} | 0
...=> hugepages-memaccess2.x86_64-latest.xml} | 0
.../hugepages-memaccess3.x86_64-latest.xml | 1 +
.../hugepages-nodeset.x86_64-latest.xml | 1 +
.../qemuxml2xmloutdata/hugepages-nodeset.xml | 31 -----
...ugepages-numa-default-2M.x86_64-latest.xml | 1 +
.../hugepages-numa-default-2M.xml | 37 ------
...pages-numa-default-dimm.x86_64-latest.xml} | 0
...epages-numa-nodeset-part.x86_64-latest.xml | 1 +
.../hugepages-numa-nodeset-part.xml | 37 ------
.../hugepages-numa-nodeset.x86_64-latest.xml | 1 +
.../hugepages-numa-nodeset.xml | 40 -------
...xml => hugepages-nvdimm.x86_64-latest.xml} | 0
.../hugepages-shared.x86_64-latest.xml | 1 +
tests/qemuxml2xmloutdata/hugepages-shared.xml | 55 ---------
...l => pages-dimm-discard.x86_64-latest.xml} | 0
...pages-discard-hugepages.x86_64-latest.xml} | 0
tests/qemuxml2xmltest.c | 62 ++++------
100 files changed, 522 insertions(+), 925 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/cpu-numa-memshared-1.err
delete mode 120000 tests/qemuxml2argvdata/cpu-numa-memshared-1.xml
rename tests/qemuxml2argvdata/{hugepages-nodeset.args => hugepages-default-2M.x86_64-latest.args} (55%)
rename tests/qemuxml2argvdata/{hugepages-numa-default-2M.args => hugepages-default-system-size.x86_64-latest.args} (61%)
rename tests/qemuxml2argvdata/{hugepages-default.args => hugepages-default.x86_64-latest.args} (51%)
delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.args
create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/hugepages-memaccess2.args
create mode 100644 tests/qemuxml2argvdata/hugepages-memaccess2.x86_64-latest.args
rename tests/qemuxml2argvdata/{hugepages-nodeset-nonexist.err => hugepages-nodeset-nonexist.x86_64-latest.err} (100%)
rename tests/qemuxml2argvdata/{hugepages-default-2M.args => hugepages-nodeset.x86_64-latest.args} (55%)
rename tests/qemuxml2argvdata/{hugepages-default-system-size.args => hugepages-numa-default-2M.x86_64-latest.args} (51%)
rename tests/qemuxml2argvdata/{hugepages-numa-default-dimm.args => hugepages-numa-default-dimm.x86_64-latest.args} (51%)
rename tests/qemuxml2argvdata/{hugepages-numa-default.args => hugepages-numa-default.x86_64-latest.args} (60%)
rename tests/qemuxml2argvdata/{hugepages-numa-nodeset-nonexist.err => hugepages-numa-nodeset-nonexist.x86_64-latest.err} (100%)
rename tests/qemuxml2argvdata/{hugepages-numa-nodeset-part.args => hugepages-numa-nodeset-part.x86_64-latest.args} (60%)
create mode 100644 tests/qemuxml2argvdata/hugepages-numa-nodeset.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/hugepages-shared.args
create mode 100644 tests/qemuxml2argvdata/hugepages-shared.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pages-dimm-discard.args
create mode 100644 tests/qemuxml2argvdata/pages-dimm-discard.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.args
create mode 100644 tests/qemuxml2argvdata/pages-discard-hugepages.x86_64-latest.args
delete mode 100644 tests/qemuxml2argvdata/pages-discard.args
rename tests/qemuxml2argvdata/{hugepages-numa-nodeset.args => pages-discard.x86_64-latest.args} (59%)
rename tests/qemuxml2xmloutdata/{hugepages-default-2M.xml => hugepages-default-2M.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{hugepages-default-system-size.xml => hugepages-default-system-size.x86_64-latest.xml} (100%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-default.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-default.xml
rename tests/qemuxml2xmloutdata/{hugepages-memaccess.xml => hugepages-memaccess.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{hugepages-memaccess2.xml => hugepages-memaccess2.x86_64-latest.xml} (100%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-memaccess3.x86_64-latest.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-nodeset.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-nodeset.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-default-2M.xml
rename tests/qemuxml2xmloutdata/{hugepages-numa-default-dimm.xml => hugepages-numa-default-dimm.x86_64-latest.xml} (100%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset-part.xml
create mode 120000 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-numa-nodeset.xml
rename tests/qemuxml2xmloutdata/{hugepages-nvdimm.xml => hugepages-nvdimm.x86_64-latest.xml} (100%)
create mode 120000 tests/qemuxml2xmloutdata/hugepages-shared.x86_64-latest.xml
delete mode 100644 tests/qemuxml2xmloutdata/hugepages-shared.xml
rename tests/qemuxml2xmloutdata/{pages-dimm-discard.xml => pages-dimm-discard.x86_64-latest.xml} (100%)
rename tests/qemuxml2xmloutdata/{pages-discard-hugepages.xml => pages-discard-hugepages.x86_64-latest.xml} (100%)
--
2.37.4
2 years
[PATCH] qemu: validate: Validate maximum start time for <clock offset='absolute'>
by Peter Krempa
Glib can internally convert only unix timestamps up to
9999-12-31T23:59:59 (253402300799). Validate that the user doesn't use
more than that as otherwise we cause an assertion failure:
(process:1183396): GLib-CRITICAL **: 14:25:00.906: g_date_time_format: assertion 'datetime != NULL' failed
Additionally adjust the schema to allow bigger values as we use
'unsigned long long' to parse the value.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2128993
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/schemas/domaincommon.rng | 2 +-
src/qemu/qemu_validate.c | 17 +++++++++++++++++
.../clock-absolute.x86_64-latest.args | 2 +-
tests/qemuxml2argvdata/clock-absolute.xml | 2 +-
.../clock-absolute.x86_64-latest.xml | 2 +-
5 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index ebb39de3ef..cefe818044 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -1312,7 +1312,7 @@
<value>absolute</value>
</attribute>
<attribute name="start">
- <ref name="unsignedInt"/>
+ <ref name="unsignedLong"/>
</attribute>
</group>
</choice>
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index 1456a69351..1d4081e47e 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -663,6 +663,23 @@ qemuValidateDomainDefClockTimers(const virDomainDef *def,
}
}
+ switch ((virDomainClockOffsetType) def->clock.offset) {
+ case VIR_DOMAIN_CLOCK_OFFSET_ABSOLUTE:
+ /* maximum timestamp glib can convert is 9999-12-31T23:59:59 */
+ if (def->clock.data.starttime > 253402300799) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("The maximum 'start' value for <clock offset='absolute'> is 253402300799"));
+ return -1;
+ }
+
+ case VIR_DOMAIN_CLOCK_OFFSET_UTC:
+ case VIR_DOMAIN_CLOCK_OFFSET_LOCALTIME:
+ case VIR_DOMAIN_CLOCK_OFFSET_TIMEZONE:
+ case VIR_DOMAIN_CLOCK_OFFSET_VARIABLE:
+ case VIR_DOMAIN_CLOCK_OFFSET_LAST:
+ break;
+ }
+
return 0;
}
diff --git a/tests/qemuxml2argvdata/clock-absolute.x86_64-latest.args b/tests/qemuxml2argvdata/clock-absolute.x86_64-latest.args
index 75fc162cee..af64bc0f1a 100644
--- a/tests/qemuxml2argvdata/clock-absolute.x86_64-latest.args
+++ b/tests/qemuxml2argvdata/clock-absolute.x86_64-latest.args
@@ -23,7 +23,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
-nodefaults \
-chardev socket,id=charmonitor,fd=1729,server=on,wait=off \
-mon chardev=charmonitor,id=monitor,mode=control \
--rtc base=1970-01-01T00:20:34 \
+-rtc base=9999-12-31T23:59:59 \
-no-shutdown \
-no-acpi \
-boot strict=on \
diff --git a/tests/qemuxml2argvdata/clock-absolute.xml b/tests/qemuxml2argvdata/clock-absolute.xml
index e79f53ed3c..63ef7f6f33 100644
--- a/tests/qemuxml2argvdata/clock-absolute.xml
+++ b/tests/qemuxml2argvdata/clock-absolute.xml
@@ -8,7 +8,7 @@
<type arch='x86_64' machine='pc'>hvm</type>
<boot dev='hd'/>
</os>
- <clock offset='absolute' start='1234'/>
+ <clock offset='absolute' start='253402300799'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
diff --git a/tests/qemuxml2xmloutdata/clock-absolute.x86_64-latest.xml b/tests/qemuxml2xmloutdata/clock-absolute.x86_64-latest.xml
index b313a74039..eea68677d5 100644
--- a/tests/qemuxml2xmloutdata/clock-absolute.x86_64-latest.xml
+++ b/tests/qemuxml2xmloutdata/clock-absolute.x86_64-latest.xml
@@ -11,7 +11,7 @@
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
- <clock offset='absolute' start='1234'/>
+ <clock offset='absolute' start='253402300799'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
--
2.37.3
2 years
[libvirt PATCH v2 00/24] Synchronize x86 cpu features from qemu
by Tim Wiederhake
V1: https://listman.redhat.com/archives/libvir-list/2022-October/235007.html
Changes since V1:
* Fixed register for features "sgx1" and "sgx2". Double checked all other
features, just to be sure.
* Addes missing help message in sync_qemu_i386_features.py.
* Merged all eax=0x12 ecx=0x01 features (sgx-...).
Thanks Jiri for the review.
> I'm not sure about the "for now" part here [patch #2, "cpu_x86: Ignore
> alias names"]. Do you think we can do something clever with them while
> still not accepting them in domain XML (accepting aliases in the XML
> would just make such XMLs unnecessarily incompatible with older libvirt
> releases)?
I am planning on using this information in virQEMUCapsCPUFeatureTranslate.
Would be nice if we could deduplicate the information of how to translate
qemu feature names into libvirt names. I agree that we should not accept
the alias names in XML.
Tim Wiederhake (24):
cpu-data.py: Allow for more than child in feature nodes
cpu_x86: Ignore alias names
cpu: make x86 feature alias names machine readable
cpu_map: Add script to sync from QEMU i386 cpu features
cpu_map: Rename sync_qemu_i386.py
cpu_map: Add missing x86 feature alias names
cpu_map: Add missing x86 feature "sgx"
cpu_map: Add missing x86 feature "sgxlc"
cpu_map: Add missing x86 feature "sgx-exinfo"
cpu_map: Add missing x86 feature "sgx1"
cpu_map: Add missing x86 feature "sgx2"
cpu_map: Add missing x86 features "sgx-..."
cpu_map: Add missing x86 feature "bus-lock-detect"
cpu_map: Add missing x86 feature "pks"
cpu_map: Add missing x86 feature "avx512-vp2intersect"
cpu_map: Add missing x86 feature "avx512-fp16"
cpu_map: Add missing x86 feature "serialize"
cpu_map: Add missing x86 feature "tsx-ldtrk"
cpu_map: Add missing x86 feature "arch-lbr"
cpu_map: Add missing x86 feature "xfd"
cpu_map: Add missing x86 feature "intel-pt-lip"
cpu_map: Add missing x86 feature "avic"
cpu_map: Add missing x86 feature "v-vmsave-vmload"
cpu_map: Add missing x86 feature "vgif"
src/cpu/cpu_x86.c | 10 +-
src/cpu_map/sync_qemu_features_i386.py | 278 ++++++++++++++++++
..._qemu_i386.py => sync_qemu_models_i386.py} | 0
src/cpu_map/x86_features.xml | 133 +++++++--
tests/cputestdata/cpu-data.py | 11 +-
.../x86_64-cpuid-Atom-P5362-disabled.xml | 1 +
.../x86_64-cpuid-Atom-P5362-guest.xml | 1 +
.../x86_64-cpuid-Atom-P5362-host.xml | 1 +
.../x86_64-cpuid-Core-i7-7600U-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-7600U-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-7600U-host.xml | 1 +
.../x86_64-cpuid-Core-i7-7700-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-7700-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-7700-host.xml | 1 +
.../x86_64-cpuid-Core-i7-8550U-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-8550U-guest.xml | 1 +
.../x86_64-cpuid-Core-i7-8550U-host.xml | 1 +
.../x86_64-cpuid-Core-i7-8700-disabled.xml | 2 +-
.../x86_64-cpuid-Core-i7-8700-guest.xml | 2 +
.../x86_64-cpuid-Core-i7-8700-host.xml | 2 +
...86_64-cpuid-EPYC-7502-32-Core-disabled.xml | 2 +-
.../x86_64-cpuid-EPYC-7502-32-Core-guest.xml | 3 +
.../x86_64-cpuid-EPYC-7502-32-Core-host.xml | 3 +
...86_64-cpuid-EPYC-7601-32-Core-disabled.xml | 2 +-
.../x86_64-cpuid-EPYC-7601-32-Core-guest.xml | 3 +
.../x86_64-cpuid-EPYC-7601-32-Core-host.xml | 3 +
...-cpuid-EPYC-7601-32-Core-ibpb-disabled.xml | 2 +-
..._64-cpuid-EPYC-7601-32-Core-ibpb-guest.xml | 3 +
...6_64-cpuid-EPYC-7601-32-Core-ibpb-host.xml | 3 +
...-cpuid-Hygon-C86-7185-32-core-disabled.xml | 2 +-
..._64-cpuid-Hygon-C86-7185-32-core-guest.xml | 3 +
...6_64-cpuid-Hygon-C86-7185-32-core-host.xml | 3 +
.../x86_64-cpuid-Ice-Lake-Server-disabled.xml | 2 +-
.../x86_64-cpuid-Ice-Lake-Server-guest.xml | 2 +
.../x86_64-cpuid-Ice-Lake-Server-host.xml | 2 +
...puid-Ryzen-7-1800X-Eight-Core-disabled.xml | 2 +-
...4-cpuid-Ryzen-7-1800X-Eight-Core-guest.xml | 3 +
...64-cpuid-Ryzen-7-1800X-Eight-Core-host.xml | 3 +
...4-cpuid-Ryzen-9-3900X-12-Core-disabled.xml | 2 +-
...6_64-cpuid-Ryzen-9-3900X-12-Core-guest.xml | 3 +
...86_64-cpuid-Ryzen-9-3900X-12-Core-host.xml | 3 +
.../x86_64-cpuid-Xeon-E3-1225-v5-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E3-1225-v5-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E3-1225-v5-host.xml | 1 +
.../x86_64-cpuid-Xeon-E3-1245-v5-disabled.xml | 2 +-
.../x86_64-cpuid-Xeon-E3-1245-v5-guest.xml | 1 +
.../x86_64-cpuid-Xeon-E3-1245-v5-host.xml | 1 +
.../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 1 +
.../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 2 +
.../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 2 +
.../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 2 +
52 files changed, 487 insertions(+), 36 deletions(-)
create mode 100755 src/cpu_map/sync_qemu_features_i386.py
rename src/cpu_map/{sync_qemu_i386.py => sync_qemu_models_i386.py} (100%)
--
2.36.1
2 years
[PATCH 0/5] Fix and improve API page generation
by Peter Krempa
This series cleans up some cruft unused for very long time, fixes the
reference page for LXC API:
Broken (until this patchset is merged):
https://www.libvirt.org/html/libvirt-libvirt-lxc.html
Fixed:
https://pipo.sk.gitlab.io/-/libvirt/-/jobs/3268983196/artifacts/website/h...
Removes pointless copy of the LGPL license at the top of the API
refernece files such as:
https://www.libvirt.org/html/libvirt-libvirt-qemu.html
and removes the pointless specific index files such as:
https://www.libvirt.org/html/index-qemu.html
Peter Krempa (5):
docs: xsl: newapi: Remove unused 'navbar' template
docs: xsl: Don't format empty sections in API manual
apibuild: Don't include the Copyright in the <description> of a module
docs: Link directly to admin|qemu|lxc API reference pages
docs: xsl: Don't generate pointless index pages for qemu/admin/lxc API
docs/docs.rst | 6 +--
docs/html/home.png | Bin 654 -> 0 bytes
docs/html/left.png | Bin 459 -> 0 bytes
docs/html/meson.build | 16 +------
docs/html/right.png | Bin 472 -> 0 bytes
docs/html/up.png | Bin 406 -> 0 bytes
docs/newapi.xsl | 98 ++++++++++++++++++------------------------
scripts/apibuild.py | 8 ++++
8 files changed, 55 insertions(+), 73 deletions(-)
delete mode 100644 docs/html/home.png
delete mode 100644 docs/html/left.png
delete mode 100644 docs/html/right.png
delete mode 100644 docs/html/up.png
--
2.37.3
2 years
[libvirt PATCH] qemu: Avoid memory leak in qemuMonitorJSONExtractQueryStatsSchema
by Jiri Denemark
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(a)redhat.com>
---
src/qemu/qemu_monitor_json.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 2bd159bc98..8a3421a6fc 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -8596,7 +8596,7 @@ qemuMonitorJSONExtractQueryStatsSchema(virJSONValue *json)
virJSONValue *stat = virJSONValueArrayGet(stats, j);
const char *name = NULL;
const char *tmp = NULL;
- qemuMonitorQueryStatsSchemaData *data = NULL;
+ g_autofree qemuMonitorQueryStatsSchemaData *data = NULL;
int type = -1;
int unit = -1;
@@ -8632,7 +8632,9 @@ qemuMonitorJSONExtractQueryStatsSchema(virJSONValue *json)
virJSONValueObjectGetNumberUint(stat, "bucket-size", &data->bucket_size) < 0)
data->bucket_size = 0;
- virHashAddEntry(schema, name, data);
+ if (virHashAddEntry(schema, name, data) < 0)
+ return NULL;
+ data = NULL;
}
}
--
2.38.1
2 years
[libvirt PATCH] conf: Skip virDomainNetDefParseXMLDriver if driver_node is NULL
by Jiri Denemark
Trying to parse <driver> node which does not exist makes no sense.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/conf/domain_conf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4cd9ffc194..fda1c6caa6 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8831,8 +8831,10 @@ virDomainNetDefParseXMLDriver(virDomainNetDef *def,
{
xmlNodePtr driver_node;
- if ((driver_node = virXPathNode("./driver", ctxt)) &&
- (virDomainVirtioOptionsParseXML(driver_node, &def->virtio) < 0))
+ if (!(driver_node = virXPathNode("./driver", ctxt)))
+ return 0;
+
+ if (virDomainVirtioOptionsParseXML(driver_node, &def->virtio) < 0)
return -1;
if (def->type != VIR_DOMAIN_NET_TYPE_HOSTDEV &&
--
2.38.1
2 years
[libvirt PATCH] conf: Avoid double free in virDomainEventTunableNew callers
by Jiri Denemark
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(a)redhat.com>
---
src/conf/domain_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 97d58c2521..7e9bd08381 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -1515,6 +1515,7 @@ virDomainEventTunableNew(int id,
error:
virTypedParamsFree(*params, nparams);
+ *params = NULL;
return NULL;
}
--
2.38.1
2 years
[libvirt PATCH] spec: Fix python3-libvirt requirement in client-qemu package
by Jiri Denemark
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.
tigned-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in
index d946a8da48..0bbcdb8956 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -906,7 +906,7 @@ capabilities of recent versions of Linux (and other OSes).
%package client-qemu
Summary: Additional client side utilities for QEMU
Requires: %{name}-libs = %{version}-%{release}
-Requires: python3-libvirt >= %{version}-%{release}
+Requires: python3-libvirt >= 3.7.0
%description client-qemu
The additional client binaries are used to interact
--
2.38.1
2 years
[PATCH 00/11] conf: Refactor virSysinfoParseXML and remove pointless XML node validation
by Peter Krempa
Peter Krempa (11):
conf: domain: Refactor cleanup in virSysinfoBIOSParseXML
conf: domain: Remove pointless XML node name validation in
virSysinfoBIOSParseXML
conf: domain: Reformat XPath queries in virSysinfoSystemParseXML
conf: domain: Refactor cleanup in virSysinfoSystemParseXML
conf: domain: Remove pointless XML node name validation in
virSysinfoSystemParseXML
conf: domain: Reformat XPath queries in virSysinfoChassisParseXML
conf: domain: Refactor cleanup in virSysinfoChassisParseXML
conf: domain: Remove pointless XML node name validation in
virSysinfoChassisParseXML
conf: domain: Parse 'type' attribute via virXMLPropEnum in
virSysinfoParseXML
conf: domain: Refactor cleanup in virSysinfoParseXML
conf: domain: Remove pointless XML node name validation in
virSysinfoParseXML
src/conf/domain_conf.c | 139 ++++++++++-------------------------------
src/util/virsysinfo.h | 3 +
2 files changed, 36 insertions(+), 106 deletions(-)
--
2.37.3
2 years
[PATCH 00/43] Remove XPath parser functions using 'long' type
by Peter Krempa
Clean up the XML parser functions to avoid use of the long type.
Peter Krempa (43):
util: xml: Remove unused virXPathNumber
util: xml: Unexport virXMLXPathContextNew
util: xml: Ensure proper header style in virxml.c
util: xml: Use consistent naming for RNG validation error handling
functions
util: xml: Remove unused 'virXPathLongHex'
virNodeDevCapsDefParseULong: Use virXPathUInt instead of virXPathULong
conf: node_device: Rename virNodeDevCapsDefParseULong to
virNodeDevCapsDefParseUInt
virNodeDeviceCapPCIDefFormat: Use %u for unsigned values
conf: Always use 'string()' conversion with virXPath(U)LongLong
util: xml: Extract XPath evaluation for strings
util: xml: Remove double->(u)ll conversion in virXPath(U)LongLong
util: xml: Disallow aliasing of negative numbers in virXPathULongLong
conf: node_device: Use 'string()' in XPath expressions for
virNodeDevCapsDefParseUInt
conf: node_device: Convert rest of virXPathUInt XPath expressions to
number
conf: node_device: Use 'string()' in XPath expressions for
virNodeDevCapsDefParseIntOptional
conf: numa: Don't fetch XML node count in virDomainNumatuneParseXML
conf: cpu: Extract and refactor parsing of cache from
virCPUDefParseXML
util: xml: Reimplement virXPath(U)Int via virXPathEvalString
util: xml: Introduce virXPathU(Int|LongLong)Base
virNodeDevCapsDefParseHexId: Use 'virXPathUIntBase'
util: xml: Disallow aliasing of negative numbers in virXPathUInt
testParseNodeInfo: Rewrite to virXPathU(Int|LongLong)
conf: domain: Convert from virXPathLong
util: xml: Remove virXPathLong
virQEMUCapsLoadCache: Use 'virXMLPropUInt' instead of 'virXPathULong'
virNetDevIPRouteParseXML: Refactor to use 'virXMLProp*' instead of
XPath
virNetworkIPDefParseXML: Use virXMLPropUInt instead of virXPathULong
virInterfaceDefParseMtu: Use virXPathUInt instead of virXPathULong
virNetDevVlanParse: Use virXMLProp* helpers instead of XPath lookups
virDomainTimerCatchupDef: Change members to 'unsigned long long'
virDomainTimerDefParseXML: Refactor cleanup
virDomainTimerDef: Convert 'name' field to proper enum type
virDomainTimerDef: Convert 'tickpolicy' field to proper enum type
virDomainTimerDef: Convert 'track' field to proper enum type
virDomainTimerDef: Convert 'mode' field to proper enum type
virDomainTimerDefParseXML: Use virXMLProp instead of virXPath
virDomainNetDef: Change type of 'tune.sndbuf'
virDomainSEVDefParseXML: Use virXPathUIntBase instead of
virXPathULongHex
ppc64ModelParse: Switch to virXMLPropUInt from virXPathULongHex
qemuDomainObjPrivateXMLParseBlockjobData: Use virXMLPropUInt instead
of virXPathULongHex
virDomainJobObj: Use 'unsigned int' instead of 'unsigned long' for
'apiFlags' field
cpu_arm: Avoid use of 'unsigned long'
util: xml: Remove unused virXPathULong*
src/conf/cpu_conf.c | 58 +--
src/conf/domain_conf.c | 153 +++-----
src/conf/domain_conf.h | 16 +-
src/conf/interface_conf.c | 14 +-
src/conf/netdev_vlan_conf.c | 39 +-
src/conf/network_conf.c | 25 +-
src/conf/networkcommon_conf.c | 61 +--
src/conf/networkcommon_conf.h | 3 +-
src/conf/node_device_conf.c | 160 ++++----
src/conf/numa_conf.c | 7 +-
src/conf/storage_conf.c | 4 +-
src/conf/virdomainjob.c | 4 +-
src/conf/virdomainjob.h | 4 +-
src/cpu/cpu_arm.c | 37 +-
src/cpu/cpu_arm_data.h | 4 +-
src/cpu/cpu_ppc64.c | 19 +-
src/libvirt_private.syms | 8 +-
src/libxl/libxl_conf.c | 6 +-
src/libxl/xen_common.c | 6 +-
src/qemu/qemu_capabilities.c | 7 +-
src/qemu/qemu_command.c | 7 +
src/qemu/qemu_domain.c | 5 +-
src/qemu/qemu_domainjob.c | 7 +-
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_migration_params.c | 8 +-
src/qemu/qemu_migration_params.h | 4 +-
src/qemu/qemu_process.c | 2 +-
src/qemu/qemu_process.h | 2 +-
src/qemu/qemu_validate.c | 8 +
src/test/test_driver.c | 51 +--
src/util/virxml.c | 370 ++++++------------
src/util/virxml.h | 32 +-
.../pci_0000_00_02_0_header_type.xml | 2 +-
33 files changed, 432 insertions(+), 703 deletions(-)
--
2.37.3
2 years