]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
2 years agocpu_map: Add missing x86 feature "serialize"
Tim Wiederhake [Wed, 19 Oct 2022 13:41:00 +0000 (15:41 +0200)]
cpu_map: Add missing x86 feature "serialize"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "avx512-fp16"
Tim Wiederhake [Wed, 19 Oct 2022 13:40:28 +0000 (15:40 +0200)]
cpu_map: Add missing x86 feature "avx512-fp16"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "avx512-vp2intersect"
Tim Wiederhake [Wed, 19 Oct 2022 13:40:11 +0000 (15:40 +0200)]
cpu_map: Add missing x86 feature "avx512-vp2intersect"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "pks"
Tim Wiederhake [Wed, 19 Oct 2022 13:39:37 +0000 (15:39 +0200)]
cpu_map: Add missing x86 feature "pks"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "bus-lock-detect"
Tim Wiederhake [Wed, 19 Oct 2022 13:39:15 +0000 (15:39 +0200)]
cpu_map: Add missing x86 feature "bus-lock-detect"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 features "sgx-..."
Tim Wiederhake [Wed, 19 Oct 2022 13:37:26 +0000 (15:37 +0200)]
cpu_map: Add missing x86 features "sgx-..."

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "sgx2"
Tim Wiederhake [Wed, 19 Oct 2022 13:37:02 +0000 (15:37 +0200)]
cpu_map: Add missing x86 feature "sgx2"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "sgx1"
Tim Wiederhake [Wed, 19 Oct 2022 13:36:37 +0000 (15:36 +0200)]
cpu_map: Add missing x86 feature "sgx1"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "sgx-exinfo"
Tim Wiederhake [Wed, 19 Oct 2022 13:36:16 +0000 (15:36 +0200)]
cpu_map: Add missing x86 feature "sgx-exinfo"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "sgxlc"
Tim Wiederhake [Wed, 19 Oct 2022 13:35:51 +0000 (15:35 +0200)]
cpu_map: Add missing x86 feature "sgxlc"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature "sgx"
Tim Wiederhake [Wed, 19 Oct 2022 13:35:24 +0000 (15:35 +0200)]
cpu_map: Add missing x86 feature "sgx"

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add missing x86 feature alias names
Tim Wiederhake [Wed, 19 Oct 2022 12:58:43 +0000 (14:58 +0200)]
cpu_map: Add missing x86 feature alias names

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Rename sync_qemu_i386.py
Tim Wiederhake [Mon, 17 Oct 2022 14:20:45 +0000 (16:20 +0200)]
cpu_map: Rename sync_qemu_i386.py

This makes the naming more consistent beween the two scripts
synching the feature list and the model list.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_map: Add script to sync from QEMU i386 cpu features
Tim Wiederhake [Fri, 14 Oct 2022 15:45:40 +0000 (17:45 +0200)]
cpu_map: Add script to sync from QEMU i386 cpu features

This script is intended to help in synchronizing i386 QEMU cpu
feature definitions with libvirt.

QEMU's attribute list for the "max-x86_64-cpu" contains non-cpu-feature
items and needs to be filtered before being useful.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu: make x86 feature alias names machine readable
Tim Wiederhake [Fri, 14 Oct 2022 14:30:47 +0000 (16:30 +0200)]
cpu: make x86 feature alias names machine readable

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu_x86: Ignore alias names
Tim Wiederhake [Mon, 17 Oct 2022 11:20:42 +0000 (13:20 +0200)]
cpu_x86: Ignore alias names

A later patch will add alias names to the feature map. They will be used
in virQEMUCapsCPUFeatureTranslate and for synchronizing the list with QEMU.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agocpu-data.py: Allow for more than child in feature nodes
Tim Wiederhake [Mon, 17 Oct 2022 09:55:08 +0000 (11:55 +0200)]
cpu-data.py: Allow for more than child in feature nodes

cpu-data.py assumes that all "feature" nodes have exactly one child.
This assumption will no longer be true when the cpumap includes alias-
names for features.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2 years agoqemu: Retire QEMU_CAPS_DISK_WRITE_CACHE
Michal Privoznik [Tue, 8 Nov 2022 07:20:59 +0000 (08:20 +0100)]
qemu: Retire QEMU_CAPS_DISK_WRITE_CACHE

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_DISK_WRITE_CACHE
Michal Privoznik [Tue, 8 Nov 2022 07:41:06 +0000 (08:41 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_DISK_WRITE_CACHE

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_DISK_WRITE_CACHE
Michal Privoznik [Tue, 8 Nov 2022 07:40:07 +0000 (08:40 +0100)]
qemu: Assume QEMU_CAPS_DISK_WRITE_CACHE

Introduced in QEMU's commit of v2.7.0-rc0~32^2~5 the .write-cache
attribute of virtio-blk dvice is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

The change in some .args is justified, because the qemuxml2argvdatatest
runs these test caseses with very minimalistic set of capabilities,
that's nowhere near real life scenario.

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: Retire QEMU_CAPS_DISK_SHARE_RW
Michal Privoznik [Tue, 8 Nov 2022 07:20:56 +0000 (08:20 +0100)]
qemu: Retire QEMU_CAPS_DISK_SHARE_RW

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_DISK_SHARE_RW
Michal Privoznik [Tue, 8 Nov 2022 07:38:06 +0000 (08:38 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_DISK_SHARE_RW

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_DISK_SHARE_RW
Michal Privoznik [Tue, 8 Nov 2022 07:36:08 +0000 (08:36 +0100)]
qemu: Assume QEMU_CAPS_DISK_SHARE_RW

Introduced in QEMU's commit of v2.9.0-rc0~48^2~25 the .share-rw
attribute of virtio-blk device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

The change in controller-order.args is justified, because the
qemuxml2argvdatatest runs the test case with very minimalistic
set of capabilities, that's nowhere near real life scenario.

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: Retire QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES
Michal Privoznik [Tue, 8 Nov 2022 07:20:41 +0000 (08:20 +0100)]
qemu: Retire QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE
Michal Privoznik [Tue, 8 Nov 2022 07:24:04 +0000 (08:24 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES
Michal Privoznik [Tue, 8 Nov 2022 07:22:16 +0000 (08:22 +0100)]
qemu: Assume QEMU_CAPS_VIRTIO_BLK_NUM_QUEUES

Introduced in QEMU's commit of v2.7.0-rc0~83^2 the .num-queues
attribute of virtio-blk device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

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: Retire QEMU_CAPS_BLOCKIO
Michal Privoznik [Tue, 8 Nov 2022 07:13:00 +0000 (08:13 +0100)]
qemu: Retire QEMU_CAPS_BLOCKIO

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_BLOCKIO
Michal Privoznik [Tue, 8 Nov 2022 07:12:43 +0000 (08:12 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_BLOCKIO

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_BLOCKIO
Michal Privoznik [Tue, 8 Nov 2022 07:08:16 +0000 (08:08 +0100)]
qemu: Assume QEMU_CAPS_BLOCKIO

Introduced in QEMU's commit of v0.13.0-rc0~1072 the
.logical_block_size attribute of virtio-blk device is always
available for all QEMU versions we support (4.2.0, currently).
Therefore, we can assume the capability is always set and thus
doesn't need to be checked for.

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: Retire QEMU_CAPS_VIRTIO_NET_FAILOVER
Michal Privoznik [Mon, 7 Nov 2022 14:14:16 +0000 (15:14 +0100)]
qemu: Retire QEMU_CAPS_VIRTIO_NET_FAILOVER

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_FAILOVER
Michal Privoznik [Mon, 7 Nov 2022 14:14:06 +0000 (15:14 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_FAILOVER

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER
Michal Privoznik [Mon, 7 Nov 2022 14:13:44 +0000 (15:13 +0100)]
qemu: Assume QEMU_CAPS_VIRTIO_NET_FAILOVER

Introduced in QEMU's commit of v4.2.0-rc0~23^2~4 the .failover
attribute of virtio-net device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

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: Retire QEMU_CAPS_VIRTIO_NET_HOST_MTU
Michal Privoznik [Mon, 7 Nov 2022 14:12:37 +0000 (15:12 +0100)]
qemu: Retire QEMU_CAPS_VIRTIO_NET_HOST_MTU

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_HOST_MTU
Michal Privoznik [Mon, 7 Nov 2022 14:12:21 +0000 (15:12 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_HOST_MTU

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_VIRTIO_NET_HOST_MTU
Michal Privoznik [Mon, 7 Nov 2022 14:12:09 +0000 (15:12 +0100)]
qemu: Assume QEMU_CAPS_VIRTIO_NET_HOST_MTU

Introduced in QEMU's commit of v2.9.0-rc0~162^2~10 the .host_mtu
attribute of virtio-net device is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

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: Retire QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE
Michal Privoznik [Mon, 7 Nov 2022 14:09:09 +0000 (15:09 +0100)]
qemu: Retire QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE
Michal Privoznik [Mon, 7 Nov 2022 14:08:55 +0000 (15:08 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE
Michal Privoznik [Mon, 7 Nov 2022 14:08:25 +0000 (15:08 +0100)]
qemu: Assume QEMU_CAPS_VIRTIO_NET_TX_QUEUE_SIZE

Introduced in QEMU's commit of v2.10.0-rc0~95^2~20 the
.tx_queue_size attribute of virtio-net device is always available
for all QEMU versions we support (4.2.0, currently). Therefore,
we can assume the capability is always set and thus doesn't need
to be checked for.

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: Retire QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE
Michal Privoznik [Mon, 7 Nov 2022 14:07:18 +0000 (15:07 +0100)]
qemu: Retire QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE
Michal Privoznik [Mon, 7 Nov 2022 14:07:02 +0000 (15:07 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE
Michal Privoznik [Mon, 7 Nov 2022 14:06:49 +0000 (15:06 +0100)]
qemu: Assume QEMU_CAPS_VIRTIO_NET_RX_QUEUE_SIZE

Introduced in QEMU's commit of v2.8.0-rc0~116^2~26 the
.rx_queue_size attribute of virtio-net device is always available
for all QEMU versions we support (4.2.0, currently). Therefore,
we can assume the capability is always set and thus doesn't need
to be checked for.

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: Retire QEMU_CAPS_QUERY_DISPLAY_OPTIONS
Michal Privoznik [Mon, 7 Nov 2022 11:52:18 +0000 (12:52 +0100)]
qemu: Retire QEMU_CAPS_QUERY_DISPLAY_OPTIONS

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_QUERY_DISPLAY_OPTIONS
Michal Privoznik [Mon, 7 Nov 2022 14:02:05 +0000 (15:02 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_DISPLAY_OPTIONS

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_QUERY_DISPLAY_OPTIONS
Michal Privoznik [Mon, 7 Nov 2022 14:01:35 +0000 (15:01 +0100)]
qemu: Assume QEMU_CAPS_QUERY_DISPLAY_OPTIONS

Introduced in QEMU's commit of v3.1.0-rc3~8^2 the
query-display-options command is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

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: Retire QEMU_CAPS_BITMAP_MERGE
Michal Privoznik [Mon, 7 Nov 2022 11:52:11 +0000 (12:52 +0100)]
qemu: Retire QEMU_CAPS_BITMAP_MERGE

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_BITMAP_MERGE
Michal Privoznik [Mon, 7 Nov 2022 13:57:54 +0000 (14:57 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_BITMAP_MERGE

All supported QEMUs have this capability. Stop detecting it.

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: Retire QEMU_CAPS_QUERY_CURRENT_MACHINE
Michal Privoznik [Mon, 7 Nov 2022 11:52:02 +0000 (12:52 +0100)]
qemu: Retire QEMU_CAPS_QUERY_CURRENT_MACHINE

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_QUERY_CURRENT_MACHINE
Michal Privoznik [Mon, 7 Nov 2022 13:55:24 +0000 (14:55 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_QUERY_CURRENT_MACHINE

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_QUERY_CURRENT_MACHINE
Michal Privoznik [Mon, 7 Nov 2022 13:55:04 +0000 (14:55 +0100)]
qemu: Assume QEMU_CAPS_QUERY_CURRENT_MACHINE

Introduced in QEMU's commit of v4.0.0-rc0~202^2~3 the
query-current-machine command is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

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: Retire QEMU_CAPS_QOM_LIST_PROPERTIES
Michal Privoznik [Mon, 7 Nov 2022 11:51:51 +0000 (12:51 +0100)]
qemu: Retire QEMU_CAPS_QOM_LIST_PROPERTIES

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_QOM_LIST_PROPERTIES
Michal Privoznik [Mon, 7 Nov 2022 13:48:12 +0000 (14:48 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_QOM_LIST_PROPERTIES

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_QOM_LIST_PROPERTIES
Michal Privoznik [Mon, 7 Nov 2022 13:47:19 +0000 (14:47 +0100)]
qemu: Assume QEMU_CAPS_QOM_LIST_PROPERTIES

Introduced in QEMU's commit of v2.12.0-rc0~48^2~25 the
qom-list-properties command is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

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: Retire QEMU_CAPS_DUMP_COMPLETED
Michal Privoznik [Mon, 7 Nov 2022 13:46:10 +0000 (14:46 +0100)]
qemu: Retire QEMU_CAPS_DUMP_COMPLETED

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_DUMP_COMPLETED
Michal Privoznik [Mon, 7 Nov 2022 13:45:31 +0000 (14:45 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_DUMP_COMPLETED

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_DUMP_COMPLETED
Michal Privoznik [Mon, 7 Nov 2022 13:43:02 +0000 (14:43 +0100)]
qemu: Assume QEMU_CAPS_DUMP_COMPLETED

Introduced in QEMU's commit of v2.6.0-rc0~74^2~6 the
DUMP_COMPLETED event is always available for all QEMU versions we
support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

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: Retire QEMU_CAPS_VSERPORT_CHANGE
Michal Privoznik [Mon, 7 Nov 2022 11:51:23 +0000 (12:51 +0100)]
qemu: Retire QEMU_CAPS_VSERPORT_CHANGE

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_VSERPORT_CHANGE
Michal Privoznik [Mon, 7 Nov 2022 12:16:47 +0000 (13:16 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_VSERPORT_CHANGE

All supported QEMUs have this capability. Stop detecting it.

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_agent: Drop @singleSync from _qemuAgent
Michal Privoznik [Mon, 7 Nov 2022 12:16:04 +0000 (13:16 +0100)]
qemu_agent: Drop @singleSync from _qemuAgent

Historically, before sending any guest agent command we would
send 'guest-sync' command to make guest agent reset its internal
state and flush any partially read command (json). This was
because there was no event emitted when the agent
(dis-)connected.

But now that we have the event we can execute the sync command
just once - the first time after we've connected. Should agent
disconnect in the middle of reading a command, and then connect
back again we would get the event and disconnect and connect back
again, resulting in the sync command being executed again.

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: Assume QEMU_CAPS_VSERPORT_CHANGE
Michal Privoznik [Mon, 7 Nov 2022 12:13:57 +0000 (13:13 +0100)]
qemu: Assume QEMU_CAPS_VSERPORT_CHANGE

Introduced in QEMU's commit of v2.1.0-rc0~18^2~2 the
VSERPORT_CHANGE event is always available for all QEMU versions
we support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

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: Retire QEMU_CAPS_NUMA
Michal Privoznik [Mon, 7 Nov 2022 09:59:22 +0000 (10:59 +0100)]
qemu: Retire QEMU_CAPS_NUMA

Now that nothing uses this capability, it can be retired.

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_capabilities: Stop detecting QEMU_CAPS_NUMA
Michal Privoznik [Mon, 7 Nov 2022 09:59:13 +0000 (10:59 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_NUMA

All supported QEMUs have this capability. Stop detecting it.

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: Assume QEMU_CAPS_NUMA
Michal Privoznik [Mon, 7 Nov 2022 09:58:59 +0000 (10:58 +0100)]
qemu: Assume QEMU_CAPS_NUMA

Introduced in QEMU's commit of v3.0.0-rc0~124^2~1 the
set-numa-node command is always available for all QEMU versions
we support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

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 agotests: Make qemuAgent single sync
Michal Privoznik [Mon, 7 Nov 2022 17:42:32 +0000 (18:42 +0100)]
tests: Make qemuAgent single sync

The qemuAgent has option to issue guest-sync command before each
intended command or issue the sync commend just once, right after
the socket is opened and before the first intended command is
issued. The latter is referred to as single sync agent and is
enabled by VSERPORT_CHANGED event which allows us to detect
when the agent (dis-)connects in the guest.

Now, every QEMU that we support (4.2.0 or newer) has the event
and thus will use single sync agent. Therefore, adjust
qemuagenttest to make it test what's used in the real world,
rather than old approach.

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: Acquire QUERY job in qemuDomainQueryWakeupSuspendSupport()
Michal Privoznik [Mon, 7 Nov 2022 13:54:33 +0000 (14:54 +0100)]
qemu: Acquire QUERY job in qemuDomainQueryWakeupSuspendSupport()

The qemuDomainQueryWakeupSuspendSupport() does not change state
of the domain as it just runs 'query-current-machine' QMP
command. Therefore, there's no need for it to acquire MODIFY job,
QUERY job is perfectly okay.

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: Drop misleading comment for qemuDomainQueryWakeupSuspendSupport()
Michal Privoznik [Mon, 7 Nov 2022 13:53:59 +0000 (14:53 +0100)]
qemu: Drop misleading comment for qemuDomainQueryWakeupSuspendSupport()

The was an attempt to document the retvals for
qemuDomainQueryWakeupSuspendSupport(). However, it's misleading
because in reality, the function can return nothing but 0 or -1,
but the comment implies retval of 1 too.

Since the set of possible return values complies with our
unwritten rule (0 for success, -1 for error), there's no real
value in having the comment and as such can be dropped.

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 agospec: libvirt-daemon: Add optional dependency on *-client
Jiri Denemark [Thu, 3 Nov 2022 16:11:19 +0000 (17:11 +0100)]
spec: libvirt-daemon: Add optional dependency on *-client

The libvirt-daemon subpackage contains libvirt-guests.sh script (used by
libvirt-guests service), which requires virsh to actually work. But
since dynamic libraries were separated from libvirt-client to
libvirt-libs more than 6 years ago, libvirt-daemon no longer requires
virsh to be installed. So unless libvirt-client is explicitly installed
(either manually or by installing the libvirt meta package),
libvirt-guests will not work.

Just adding libvirt-client as a dependency of libvirt-daemon would go
against the original idea behind splitting libvirt-client: users may not
want to install or use any client binaries on the host where the daemon
runs (either they just use various language bindings or access the
daemon remotely). To solve this we could possibly turn libvirt-daemon
into an empty package and separate the daemons and libvirt-guests into
subpackages to make sure we support both use cases, but marking
libvirt-client as Recommended for libvirt-daemon does the same job in a
much simpler way.

https://bugzilla.redhat.com/show_bug.cgi?id=2136591

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2 years agoconf: Allow > UINT_MAX of cache for NUMA nodes
Lin Yang [Sat, 5 Nov 2022 00:20:20 +0000 (17:20 -0700)]
conf: Allow > UINT_MAX of cache for NUMA nodes

The high-bandwidth memory (HBM) in cache mode might be greater than
UINT_MAX of cache per NUMA node, so change to unsigned long long.

Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2 years agoqemu_agent: Bring back single sync
Michal Privoznik [Mon, 7 Nov 2022 17:17:12 +0000 (18:17 +0100)]
qemu_agent: Bring back single sync

Historically, we had no idea whether the qemu-ga running inside
the guest was running or not. Or whether it crashed in the middle
of reading of a command. That's why we issued guest-sync prior
any intended command, to make the agent flush any partially read
JSON and reset its state machine.

But with VSERPORT_CHANGE event we know when the guest agent
(dis-)connects and thus can issue the sync command just once for
each 'connection'. Whether the agent is synced is tracked in
agent->inSync member, which used to be set to true upon
successful sync. But after rework in v8.0.0-rc1~361 that line is
gone, leaving us with using the historic approach basically.

Fixes: cad84fd51eaac5e3bfdf441f9986e1f2639a0828
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agotests: Drop needless .err files from qemuxml2argvdata/
Michal Privoznik [Mon, 7 Nov 2022 16:03:45 +0000 (17:03 +0100)]
tests: Drop needless .err files from qemuxml2argvdata/

As some qemxml2argvtest cases were removed, we forgot to remove
their expected output counterparts.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoconf: schemas: Include 'privatedata.rng' in installed schema files
Peter Krempa [Mon, 7 Nov 2022 10:56:18 +0000 (11:56 +0100)]
conf: schemas: Include 'privatedata.rng' in installed schema files

The privatedata.rng file was accidentally left uninstalled, but it's
referenced by other schema files effectively breaking validation of XMLs
in new installations.

Change to libvirt.spec is not needed as we include all installed schemas
via a wildcard.

Fixes: d8ceacdc87907a3c8656f7ee815ed32f06fe5c7f
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2 years agodocs: fix location of :since: 8.1.0 to apply to `isa-debugcon`
Jakub Kuczys [Sun, 6 Nov 2022 05:15:20 +0000 (05:15 +0000)]
docs: fix location of :since: 8.1.0 to apply to `isa-debugcon`

Signed-off-by: Jakub Kuczys <me@jacken.men>
2 years agonetwork: allow incoming connections to guests on routed networks w/firewalld
Eric Garver [Thu, 22 Sep 2022 15:13:24 +0000 (11:13 -0400)]
network: allow incoming connections to guests on routed networks w/firewalld

Prior to firewalld version 1.0.0, the default action of ACCEPT in the
"libvirt" zone (subsequently overridden with a lower priority "REJECT"
action) would result in an implicit rule that allowed incoming sessions
through the zone; libvirt relied on this implicit rule to permit
incoming connections to guests that were connected via a libvirt
"routed" network.

Starting in firewalld 1.0.0, the rules generated for this same
zonefile changed such that incoming sessions through the libvirt zone
were no longer allowed, breaking the longstanding convention that they
should be allowed (only for routed networks).

However, beginning with firewalld 0.9.0, a zone can explicitly
allow/block forwarded traffic (by adding a "policy" to the zone that
specifies what happens to packets that are going in one zone and out
another zone).

This patch changes the zone for routed networks from "libvirt" to the
newly-added "libvirt-routed" zone that uses the new policy
functionality to once again allow incoming sessions to guests on
routed networks.

(If firewalld is < 0.9.0, then the policy file won't be read at all,
so firewalld won't log any error, and libvirt will just use the old
setup that takes advantage of the implicit forwarding rules).

Resolves: https://bugzilla.redhat.com/2055706
Signed-off-by: Eric Garver <eric@garver.life>
Reviewed-by: Laine Stump <laine@redhat.com>
2 years agonetwork: firewalld: add policies for routed networks
Eric Garver [Thu, 22 Sep 2022 15:13:23 +0000 (11:13 -0400)]
network: firewalld: add policies for routed networks

Signed-off-by: Eric Garver <eric@garver.life>
Reviewed-by: Laine Stump <laine@redhat.com>
2 years agonetwork: firewalld: add zone for routed networks
Eric Garver [Thu, 22 Sep 2022 15:13:22 +0000 (11:13 -0400)]
network: firewalld: add zone for routed networks

This zone will be used for the routed network by default.

Note that this zone definition omits "forward" aka intra-zone
forwarding, because it requires firewalld >= 0.9.0.

Signed-off-by: Eric Garver <eric@garver.life>
Reviewed-by: Laine Stump <laine@redhat.com>
2 years agoutil: add virFirewallDPolicyExists()
Eric Garver [Thu, 22 Sep 2022 15:13:21 +0000 (11:13 -0400)]
util: add virFirewallDPolicyExists()

Signed-off-by: Eric Garver <eric@garver.life>
Reviewed-by: Laine Stump <laine@redhat.com>
2 years agoutil: add virFirewallDGetPolicies()
Eric Garver [Thu, 22 Sep 2022 15:13:20 +0000 (11:13 -0400)]
util: add virFirewallDGetPolicies()

Signed-off-by: Eric Garver <eric@garver.life>
Reviewed-by: Laine Stump <laine@redhat.com>
2 years agoqemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN
Michal Privoznik [Thu, 3 Nov 2022 15:26:35 +0000 (16:26 +0100)]
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN
Michal Privoznik [Thu, 3 Nov 2022 15:26:16 +0000 (16:26 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN
Michal Privoznik [Thu, 3 Nov 2022 15:24:49 +0000 (16:24 +0100)]
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_ALIGN

Introduced in QEMU's commit of v2.12.0-rc0~148^2~4 the .align
attribute of memory-backend-file is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD
Michal Privoznik [Thu, 3 Nov 2022 15:22:20 +0000 (16:22 +0100)]
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD
Michal Privoznik [Thu, 3 Nov 2022 15:21:54 +0000 (16:21 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD
Michal Privoznik [Thu, 3 Nov 2022 15:19:27 +0000 (16:19 +0100)]
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD

Introduced in QEMU's commit of v2.11.0-rc0~95^2~9 the .discard
attribute of memory-backend-file is always available for all QEMU
versions we support (4.2.0, currently). Therefore, we can assume
the capability is always set and thus doesn't need to be checked
for.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE
Michal Privoznik [Thu, 3 Nov 2022 15:12:58 +0000 (16:12 +0100)]
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_FILE

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE
Michal Privoznik [Thu, 3 Nov 2022 15:11:24 +0000 (16:11 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_FILE

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE
Michal Privoznik [Thu, 3 Nov 2022 15:01:02 +0000 (16:01 +0100)]
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_FILE

Introduced in QEMU's commit of v2.1.0-rc0~41^2~26 only for Linux,
and later in v3.1.0-rc0~71^2~10 for all POSIX, the
memory-backend-file is going to be present for all QEMU versions
we support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Retire QEMU_CAPS_OBJECT_MEMORY_RAM
Michal Privoznik [Thu, 3 Nov 2022 08:53:20 +0000 (09:53 +0100)]
qemu: Retire QEMU_CAPS_OBJECT_MEMORY_RAM

Now that nothing uses this capability, it can be retired.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_RAM
Michal Privoznik [Thu, 3 Nov 2022 14:07:28 +0000 (15:07 +0100)]
qemu_capabilities: Stop detecting QEMU_CAPS_OBJECT_MEMORY_RAM

All supported QEMUs have this capability. Stop detecting it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: Assume QEMU_CAPS_OBJECT_MEMORY_RAM
Michal Privoznik [Thu, 3 Nov 2022 09:52:40 +0000 (10:52 +0100)]
qemu: Assume QEMU_CAPS_OBJECT_MEMORY_RAM

Introduced in QEMU's commit of v2.1.0-rc0~41^2~104 the
memory-backend-ram is going to be present for all QEMU versions
we support (4.2.0, currently). Therefore, we can assume the
capability is always set and thus doesn't need to be checked for.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemuxml2argvtest: Drop cpu-numa-memshared-1 test case
Michal Privoznik [Thu, 3 Nov 2022 14:14:17 +0000 (15:14 +0100)]
qemuxml2argvtest: Drop cpu-numa-memshared-1 test case

The aim of this test case it to make sure we error out when
QEMU_CAPS_OBJECT_MEMORY_RAM is missing. Well, it's never going to
be missing. Drop the test case.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemuxml2xmltest: Convert hugepages related tests to _CAPS_LATEST
Michal Privoznik [Thu, 3 Nov 2022 09:28:40 +0000 (10:28 +0100)]
qemuxml2xmltest: Convert hugepages related tests to _CAPS_LATEST

Currently, we have maybe a dozen tests for hugepages related stuff in
qemuxml2xmltest. In all cases DO_TEST() is used, which means we have to
enumerate all capabilities needed (though, it's usually just
QEMU_CAPS_OBJECT_MEMORY_RAM and QEMU_CAPS_OBJECT_MEMORY_FILE,
exceptionally QEMU_CAPS_DEVICE_PC_DIMM too).

Instead of deleting the caps flags one-by-one, just switch the
tests to use DO_CAPS_LATEST().

Since some of our expected output files are just a symlink to their
respective input files, these are changed too. But from QEMU's
POV nothing changes as no .args file is changed.

Oh, and I'm also adding a 'hugepages-memaccess3' test case, which
was missing, surprisingly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemuxml2argvtest: Convert hugepages related tests to _CAPS_LATEST
Michal Privoznik [Wed, 2 Nov 2022 13:10:41 +0000 (14:10 +0100)]
qemuxml2argvtest: Convert hugepages related tests to _CAPS_LATEST

Currently, we have maybe a dozen tests for hugepages related
stuff in qemuxml2argvtest. In all cases DO_TEST() is used, which
means we have to enumerate all capabilities needed (though, it's
usually just QEMU_CAPS_OBJECT_MEMORY_RAM and
QEMU_CAPS_OBJECT_MEMORY_FILE, exceptionally
QEMU_CAPS_OBJECT_MEMORY_FILE_DISCARD too).

Instead of deleting the caps flags one-by-one, just switch the
tests to use DO_CAPS_LATEST().

The qemuxml2xmltest will undergo similar treatment in next
commit.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agocpu_map: Add cpu feature amx
Lin Yang [Tue, 13 Sep 2022 19:30:31 +0000 (12:30 -0700)]
cpu_map: Add cpu feature amx

AMX was introduced in QEMU commit 1f16764f7d4515bfd5e4ae0aae814fa280a7d0c8.

Signed-off-by: Lin Yang <lin.a.yang@intel.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2 years agoqemu: Drop NULL checks guarding g_slist_free_full()
Michal Privoznik [Fri, 4 Nov 2022 09:11:46 +0000 (10:11 +0100)]
qemu: Drop NULL checks guarding g_slist_free_full()

The g_slist_free_full() function is perfectly capable of handling
NULL (in which case it's NOP), therefore there's no need to check
passed pointers for NULL. We have them though in couple of
places. Drop them.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoqemu: validate: Validate maximum start time for <clock offset='absolute'>
Peter Krempa [Thu, 3 Nov 2022 15:04:17 +0000 (16:04 +0100)]
qemu: validate: Validate maximum start time for <clock offset='absolute'>

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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agodocs: xsl: Don't generate pointless index pages for qemu/admin/lxc API
Peter Krempa [Thu, 3 Nov 2022 12:16:31 +0000 (13:16 +0100)]
docs: xsl: Don't generate pointless index pages for qemu/admin/lxc API

The index page only really makes sense for the top level directory. The
specific index files are unreferenced since last commit. Drop them.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agodocs: Link directly to admin|qemu|lxc API reference pages
Peter Krempa [Thu, 3 Nov 2022 09:35:13 +0000 (10:35 +0100)]
docs: Link directly to admin|qemu|lxc API reference pages

Fix the main links in docs.rst main page to go to the full docs rather
than prompting one more click to the index page.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2 years agoapibuild: Don't include the Copyright in the <description> of a module
Peter Krempa [Thu, 3 Nov 2022 10:07:12 +0000 (11:07 +0100)]
apibuild: Don't include the Copyright in the <description> of a module

When building the top level description from a header file the
'parseTopComment' method of the 'CParser' would include all trailing
lines into the <description> field. This was designed to concatenate
multi-line descriptions, but unfortunately in all cases also included
the Copyright statement which followed.

Explicitly end the scanning of the header on a line which starts with
'Copyright (C)' and truncate the spaces from the end of the last item.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
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>