[PATCH] qemu_domain: Drop unused variables from qemuDomainChrDefDropDefaultPath()

2023-08-17 Thread Michal Privoznik
In mu previous commits I've moved internals of qemuDomainChrDefDropDefaultPath() into a separate function (qemuDomainChrMatchDefaultPath()) but forgot to remove @buf and @regexp variables which are now unused. Signed-off-by: Michal Privoznik --- Pushed under trivial rule.

Re: [PATCH RESEND 0/2] qemu: generate shorter channel target paths

2023-08-17 Thread Pavel Hrdina
On Wed, Aug 16, 2023 at 09:15:20AM +0200, Michal Privoznik wrote: > This is a resend of: > > https://listman.redhat.com/archives/libvir-list/2023-July/240904.html > > Diff to previous version: > - s/9.6.0/9.7.0/ because of missed release > > Michal Prívozník (2): > qemu: Generate shorter

Re: [PATCH 06/24] testutilsqemu: Drop fake data for VIR_ARCH_I686

2023-08-17 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: There are no more tests depending on '/usr/bin/qemu-system-i386' thus we don't have to carry the data any more. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 7 --- 1 file changed, 7 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [PATCH 05/24] qemuxml2argvdata: Convert 'cpu' test cases to use 'x86_64'

2023-08-17 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: Convert the rest of the files using 'qemu-system-i386' to 'qemu-system-x86_64'. The 'cpu*' tests are done separately to emphasisze *emphasise or *emphasize that there's no change in the output. Signed-off-by: Peter Krempa ---

[PATCH 9/9] src: Rename some members of _virDomainMemoryDef struct

2023-08-17 Thread Michal Privoznik
As advertised earlier, now that the _virDomainMemoryDef struct is cleaned up, we can shorten some names as their placement within unions define their use. Signed-off-by: Michal Privoznik --- src/conf/domain_conf.c | 62 src/conf/domain_conf.h

[PATCH 4/9] qemu_hotplug: Don't validate inaccessible fields in qemuDomainChangeMemoryLiveValidateChange()

2023-08-17 Thread Michal Privoznik
The qemuDomainChangeMemoryLiveValidateChange() function is called when a live memory device change is requested (via virDomainUpdateDeviceFlags()). Currently, the only model that is allowed to change is VIRTIO_MEM (and the only value that's allowed to change is requestedsize). The aim of the

[PATCH 0/9] Clean up _virDomainMemoryDef struct

2023-08-17 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (9): virt-aa-helper: Rework setting virDomainMemoryDef labels virt-aa-helper: Set label on VIRTIO_PMEM device too qemu_hotplug: validate address on memory device change qemu_hotplug: Don't validate inaccessible fields in

[PATCH 2/9] virt-aa-helper: Set label on VIRTIO_PMEM device too

2023-08-17 Thread Michal Privoznik
Conceptually, from host POV there's no difference between NVDIMM and VIRTIO_PMEM. Both expose a file to the guest (which is used as a permanent storage). Other secdriver treat NVDIMM and VIRTIO_PMEM the same. Thus, modify virt-aa-helper so that is appends virtio-pmem backing path into the domain

[PATCH 1/9] virt-aa-helper: Rework setting virDomainMemoryDef labels

2023-08-17 Thread Michal Privoznik
Currently, inside of virt-aa-helper code the domain definition is parsed and then all def->mems are iterated over and for NVDIMM models corresponding nvdimmPath is set label on. Conceptually, this code works (except the label should be set for VIRTIO_PMEM model too, but that is addressed in the

[PATCH 7/9] src: Move _virDomainMemoryDef source nodes into an union

2023-08-17 Thread Michal Privoznik
The _virDomainMemoryDef struct is getting a bit messy. It has various members and only some of them are valid for given model. Worse, some are re-used for different models. We tried to make this more bearable by putting a comment next to each member describing what models the member is valid for,

[PATCH 8/9] src: Move _virDomainMemoryDef target nodes into an union

2023-08-17 Thread Michal Privoznik
The _virDomainMemoryDef struct is getting a bit messy. It has various members and only some of them are valid for given model. Worse, some are re-used for different models. We tried to make this more bearable by putting a comment next to each member describing what models the member is valid for,

[PATCH 6/9] qemu_driver: validate mem->model on MEMORY_DEVICE_SIZE_CHANGE event

2023-08-17 Thread Michal Privoznik
When guest acknowledges change in size of virtio-mem (portion that's exposed to the guest), QEMU emits MEMORY_DEVICE_SIZE_CHANGE event. We process it in processMemoryDeviceSizeChange(). So far, QEMU emits the even only for virtio-mem (as that's the only memory device model that allows live changes

[PATCH 5/9] conf: Compare memory device address in virDomainMemoryFindByDefInternal()

2023-08-17 Thread Michal Privoznik
This is similar to one of my previous commits. Simply speaking, users can specify address where a memory device is mapped to. And as such, we should include it when looking up corresponding device in domain definition (e.g. on device hot unplug). Signed-off-by: Michal Privoznik ---

[PATCH 3/9] qemu_hotplug: validate address on memory device change

2023-08-17 Thread Michal Privoznik
As of v7.9.0-rc1~296 users have ability to adjust what portion of virtio-mem is exposed to the guest. Then, as of v9.4.0-rc2~5 they have ability to set address where the memory is mapped. But due to a missing check it was possible to feed virDomainUpdateDeviceFlags() API with memory device XML

Re: [PATCH 04/24] qemuxml2(argv|xml)test: Convert certain tests to DO_TEST_CAPS_LATEST

2023-08-17 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: Convert tests which use DO_TEST_NOCAPS in both tests and the qemuxml2xml variant has a symlink back to the qemuxml2argv input file. This is done to separate the conversion before a patch converts all DO_TEST_NOCAPS variants in qemuxml2xmltest to use

Re: [PATCH 03/24] qemuxml2argvdata: Replace 'qemu-system-i386' by 'qemu-system-x86_64' in most test files

2023-08-17 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: Replace the emulator and architecture to x86_64, for all non-cpu related test cases. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/440fx-ide-address-conflict.xml | 4 ++-- tests/qemuxml2argvdata/440fx-wrong-root.xml |

Re: [PATCH 02/24] qemuxml2(argv|xml)test: Modernize 'net-many-models' case

2023-08-17 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: Use real latest capabilities. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/net-many-models.args | 41 -- .../net-many-models.x86_64-latest.args| 43 +++ tests/qemuxml2argvdata/net-many-models.xml|

Re: [PATCH 01/24] qemuxml2argvtest: Drop 'master-key' test case

2023-08-17 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: At this point we setup the master key with all VMs, so this specific test case no longer makes sense. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/master-key.args | 33 -- tests/qemuxml2argvdata/master-key.xml | 30

[PATCH 15/24] qemuValidateDomainVCpuTopology: Always validate vcpu count against topology

2023-08-17 Thread Peter Krempa
Historically we've used QEMU_CAPS_QUERY_HOTPLUGGABLE_CPUS as witness that the topology must cover the maximum number ov vcpus. qemu started to enforce this in qemu-2.5, thus we can now always do the check. This change also requires aligning the topology in certain test files. Signed-off-by:

[PATCH 13/24] qemuxml2(argv|xml)test: Sanitize testing of default video type on x86_64

2023-08-17 Thread Peter Krempa
Use real capabilities and remove the redundant test case. Signed-off-by: Peter Krempa --- .../default-video-type-x86_64-caps-test-0.err | 1 - .../default-video-type-x86_64-caps-test-1.xml | 16 -- ...fault-video-type-x86_64.x86_64-latest.args | 32 +++ ...st-0.xml =>

[PATCH 10/24] qemuxml2xmltest: Use real caps for 'vxhs' disk tests

2023-08-17 Thread Peter Krempa
Version-lock the test to qemu-5.0.0 as it's the latest qemu that supports 'vxhs' and thus the test can't use 'latest'. Signed-off-by: Peter Krempa --- ...vxhs.xml => disk-network-tlsx509-vxhs.x86_64-5.0.0.xml} | 7 +-- ...network-vxhs.xml => disk-network-vxhs.x86_64-5.0.0.xml} | 7 +--

[PATCH 20/24] qemuxml2argvtest: Moderinze 'video-*' cases

2023-08-17 Thread Peter Krempa
Use latest capabilities for all tests. Signed-off-by: Peter Krempa --- .../video-device-pciaddr-default.args | 37 -- ...-device-pciaddr-default.x86_64-latest.args | 39 +++ ...nvalid-multiple-devices.x86_64-latest.err} | 0 ...ideo-multiple-primaries.x86_64-latest.err}

[PATCH 04/24] qemuxml2(argv|xml)test: Convert certain tests to DO_TEST_CAPS_LATEST

2023-08-17 Thread Peter Krempa
Convert tests which use DO_TEST_NOCAPS in both tests and the qemuxml2xml variant has a symlink back to the qemuxml2argv input file. This is done to separate the conversion before a patch converts all DO_TEST_NOCAPS variants in qemuxml2xmltest to use real capabilities. Signed-off-by: Peter Krempa

[PATCH 12/24] qemuxml2(argv|xml)test: Modernize 'graphics-dbus*' tests

2023-08-17 Thread Peter Krempa
Use latest caps for this rather recent graphics protocol. Signed-off-by: Peter Krempa --- ... graphics-dbus-address.x86_64-latest.args} | 12 --- .../graphics-dbus-address.xml | 5 ++- ...=> graphics-dbus-audio.x86_64-latest.args} | 14

[PATCH 06/24] testutilsqemu: Drop fake data for VIR_ARCH_I686

2023-08-17 Thread Peter Krempa
There are no more tests depending on '/usr/bin/qemu-system-i386' thus we don't have to carry the data any more. Signed-off-by: Peter Krempa --- tests/testutilsqemu.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/tests/testutilsqemu.c b/tests/testutilsqemu.c index

[PATCH 23/24] qemuxml2xmltest: Modernize all 'net-' tests

2023-08-17 Thread Peter Krempa
Signed-off-by: Peter Krempa --- .../net-virtio-teaming-hostdev.xml| 5 - ...th.xml => net-bandwidth.x86_64-latest.xml} | 5 - ...2.xml => net-bandwidth2.x86_64-latest.xml} | 5 - ...xml => net-hostdev-vfio.x86_64-latest.xml} | 5 -

[PATCH 21/24] qemuxml2xmltest: Modernize all 'video-*' cases

2023-08-17 Thread Peter Krempa
Signed-off-by: Peter Krempa --- .../qemuxml2argvdata/video-qxl-resolution.xml | 5 ++- ...-device-pciaddr-default.x86_64-latest.xml} | 5 ++- ...ml => video-none-device.x86_64-latest.xml} | 5 ++- xml => video-qxl-heads.x86_64-latest.xml} | 5 ++- ...ml =>

[PATCH 22/24] qemuxml2argvtest: Modernize 'net-*'

2023-08-17 Thread Peter Krempa
Convert all tests using fake capabilities to use DO_TEST_CAPS_LATEST. Note that rename detection in git didn't work too well here and the files may not correspond. Signed-off-by: Peter Krempa --- .../net-client.x86_64-latest.args | 38 ...args =>

[PATCH 17/24] qemuxml2(argv|xml)test: Modernize 'shmem' test cases

2023-08-17 Thread Peter Krempa
Upgrade the relevant test cases to use latest capabilities. Note that the 'shmem' (ivshmem) device is no longer supported and will be dropped later. Signed-off-by: Peter Krempa --- ...> shmem-invalid-address.x86_64-latest.err} | 0 .../shmem-invalid-address.xml | 1 + ...r =>

[PATCH 19/24] qemu: capabilities: Retire unused QEMU_CAPS_DEVICE_IVSHMEM

2023-08-17 Thread Peter Krempa
qemu removed the support for the old 'ivshmem' device in 4.0 release. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 3 +-- src/qemu/qemu_capabilities.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c

[PATCH 18/24] qemu: Retire 'ivshmem' device

2023-08-17 Thread Peter Krempa
The device was removed in qemu-4.0 and is superseded by 'ivshmem-plain' and 'ivshmem-doorbell'. Always report error when the old version is used and drop the irrelevant tests. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c| 40 +--- src/qemu/qemu_hotplug.c

[PATCH 16/24] qemuxml2(argv|xml)test: Modernize 'fd-memory*' test cases

2023-08-17 Thread Peter Krempa
Use latest real capabilities. Signed-off-by: Peter Krempa --- ...emory-no-numa-topology.x86_64-latest.args} | 16 .../fd-memory-no-numa-topology.xml| 5 ++- ...d-memory-numa-topology.x86_64-latest.args} | 15 .../fd-memory-numa-topology.xml | 5 ++-

[PATCH 11/24] qemuxml2xmltest: Convert rest of 'DO_TEST_NOCAPS' cases to 'DO_TEST_CAPS_LATEST'

2023-08-17 Thread Peter Krempa
Finish the conversion of cases which didn't need any special capabilities to use real capabilities. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/net-mtu.xml| 5 +- tests/qemuxml2argvdata/pages-discard.xml | 5 +- ...table.xml => acpi-table.x86_64-latest.xml} | 5

[PATCH 14/24] qemuValidateDomainVCpuTopology: Remove misconfiguration warning

2023-08-17 Thread Peter Krempa
VIR_WARN of a misconfiguration of a VM is not really going to be seen in most cases as it's simply logged, and if the VM works users are not likely to dig through logs. Signed-off-by: Peter Krempa --- src/qemu/qemu_validate.c | 8 1 file changed, 8 deletions(-) diff --git

[PATCH 09/24] virschematest: Improve detection of 'invalid' XMLs

2023-08-17 Thread Peter Krempa
The output files from 'qemuxml2argvtest' may have the real capability suffix e.g. 'pci-rom-disabled-invalid.x86_64-latest.xml' which would not be detected as being invalid and thus causing a test failure. Change the logic to find '-invalid.' so that we can properly use 'virschematest' with test

[PATCH 08/24] qemuxml2xmloutdata: Workaround wrong detection of 'disk-cdrom-empty-network-invalid' in virschematest

2023-08-17 Thread Peter Krempa
The 'disk-cdrom-empty-network-invalid' is a special case were the input XML is invalid according to the schema, but after processing a valid XML is produced. This corner case doesn't play well with 'virschematest' which uses the file suffix to determine whether the file is invalid. Upcoming

[PATCH 07/24] qemuxml2xmltest: Modernize all 'DO_TEST_NOCAPS' tests

2023-08-17 Thread Peter Krempa
Convert all tests using the 'DO_TEST_NOCAPS' "fake" capability invocation to use DO_TEST_CAPS_LATEST and remove the DO_TEST_NOCAPS macro to prevent further use. Most of the output file changes are related to default USB controller type and the CPU becoming defined in the XML. Signed-off-by:

[PATCH 01/24] qemuxml2argvtest: Drop 'master-key' test case

2023-08-17 Thread Peter Krempa
At this point we setup the master key with all VMs, so this specific test case no longer makes sense. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/master-key.args | 33 -- tests/qemuxml2argvdata/master-key.xml | 30 ---

[PATCH 05/24] qemuxml2argvdata: Convert 'cpu' test cases to use 'x86_64'

2023-08-17 Thread Peter Krempa
Convert the rest of the files using 'qemu-system-i386' to 'qemu-system-x86_64'. The 'cpu*' tests are done separately to emphasisze that there's no change in the output. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/cpu-host-model-features.xml | 4 ++--

[PATCH 02/24] qemuxml2(argv|xml)test: Modernize 'net-many-models' case

2023-08-17 Thread Peter Krempa
Use real latest capabilities. Signed-off-by: Peter Krempa --- tests/qemuxml2argvdata/net-many-models.args | 41 -- .../net-many-models.x86_64-latest.args| 43 +++ tests/qemuxml2argvdata/net-many-models.xml| 2 +- tests/qemuxml2argvtest.c

[PATCH 00/24] qemuxml2xmltest: Stop testing with fake capabilities

2023-08-17 Thread Peter Krempa
The series prepares and then converts all tests in qemuxml2xmltest to real capabilities. Along some tests are converted even in qemuxml2argvtest as the xml2xmltest output files were symlinks into the qemuxml2argvdata directory. Peter Krempa (24): qemuxml2argvtest: Drop 'master-key' test case

Plans for 9.7.0 release (freeze on Monday 28 Aug)

2023-08-17 Thread Jiri Denemark
We are getting close to 9.7.0 release of libvirt. To aim for the release on Friday 01 Sep I suggest entering the freeze on Monday 28 Aug and tagging RC2 on Wednesday 30 Aug. I hope this works for everyone. Jirka

Re: [PATCH 0/5] Allow 'optional' on async-teardown

2023-08-17 Thread Daniel P . Berrangé
On Wed, Aug 09, 2023 at 10:49:42AM +0200, Boris Fiuczynski wrote: > Adding the value 'optional' to attribute 'enabled' on the element > async-teardown to provide the optional use of the feature if it is > provided by QEMU. This is not something we would typically do. IIUC, this is already exposed