[libvirt PATCH v3 5/8] util: probe stub driver from within function that binds to stub driver

2023-08-21 Thread Laine Stump
virPCIProbeStubDriver() and virPCIDeviceBindToStub() both have very similar code that locally sets a driver name (based on stubDriverType). These two functions are each also called in just one place (virPCIDeviceDetach()), with just a small bit of validation code in between. To eliminate the

[libvirt PATCH v3 7/8] node_device: support binding other drivers with virNodeDeviceDetachFlags()

2023-08-21 Thread Laine Stump
In the past, the only allowable values for the "driver" field of virNodeDeviceDetachFlags() were "kvm" or "vfio" for the QEMU driver, and "xen" for the libxl driver. Then "kvm" was deprecated and removed, so the driver name became essentially irrelevant (because it is always called via a

[libvirt PATCH v3 6/8] util: honor stubDriverName when probing/binding stub driver for a device

2023-08-21 Thread Laine Stump
Signed-off-by: Laine Stump --- src/util/virpci.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index ac91480e0b..c721b8e533 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -1290,17 +1290,20 @@

[libvirt PATCH v3 3/8] util: rename virPCIDeviceGetDriverPathAndName

2023-08-21 Thread Laine Stump
Instead, call it virPCIDeviceGetCurrentDriverPathAndName() to avoid confusion with the device name that is stored in the virPCIDevice object - that one is not necessarily the name of the current driver for the device, but could instead be the driver that we want to be bound to the device in the

[libvirt PATCH v3 8/8] qemu: turn two multiline log messages into single line

2023-08-21 Thread Laine Stump
Normally I wouldn't bother with a change like this, but I was touching the function anyway, and wanted to leave it looking nice and tidy. Signed-off-by: Laine Stump --- src/qemu/qemu_driver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c

[libvirt PATCH v3 0/8] Support for VFIO variant drivers, Part 1

2023-08-21 Thread Laine Stump
A "VFIO variant" driver is a kernel driver for a device that supports all the APIs of the basic vfio-pci driver (which enables assigning a host PCI device to a QEMU guest) plus "some extra stuff" (e.g. to enable things like saving/restoring device state in order to support live migration.) Way

[libvirt PATCH v3 4/8] util: permit existing binding to VFIO variant driver

2023-08-21 Thread Laine Stump
Before a PCI device can be assigned to a guest with VFIO, that device must be bound to the vfio-pci driver rather than to the device's normal host driver. The vfio-pci driver provides APIs that permit QEMU to perform all the necessary operations to make the device accessible to the guest. In the

[libvirt PATCH v3 2/8] util: add stub driver name to virPCIDevice object

2023-08-21 Thread Laine Stump
There can be many different drivers that are of the type "VFIO", so add the driver name to the object and allow getting/setting it. Signed-off-by: Laine Stump --- src/libvirt_private.syms | 2 ++ src/util/virpci.c| 16 src/util/virpci.h| 3 +++ 3 files

[libvirt PATCH v3 1/8] util: use "stubDriverType" instead of just "stubDriver"

2023-08-21 Thread Laine Stump
In the past we just kept track of the type of the "stub driver" (the driver that is bound to a device in order to assign it to a guest). The next commit will add a stubDriverName to go along with type, so lets use stubDriverType for the existing enum to make it easier to keep track of whether

Re: [PATCH 14/24] qemuValidateDomainVCpuTopology: Remove misconfiguration warning

2023-08-21 Thread Daniel P . Berrangé
On Mon, Aug 21, 2023 at 02:57:09PM +0200, Ján Tomko wrote: > On a Thursday in 2023, Peter Krempa wrote: > > 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. > > Should

Re: [PATCH 0/9] Clean up _virDomainMemoryDef struct

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Michal Privoznik wrote: *** 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Michal Privoznik wrote: 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

Re: [PATCH 24/24] qemuxml2xmltest: Modernize all remaining fake capability tests

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: Convert all cases using DO_TEST() to use DO_TEST_CAPS_LATEST() and remove DO_TEST() to prevent further use. Most of the changes are related to CPU being present in the output XML. Signed-off-by: Peter Krempa ---

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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} |

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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 ++-

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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(-) Reviewed-by: Ján Tomko

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

Re: [PATCH 14/24] qemuValidateDomainVCpuTopology: Remove misconfiguration warning

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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. Should we put it under VIR_DOMAIN_START_WERROR? :) Signed-off-by: Peter Krempa

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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} |

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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 +-

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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 =>

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

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

2023-08-21 Thread Ján Tomko
On a Thursday in 2023, Peter Krempa wrote: 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

Re: [libvirt PATCH v6 34/36] qemu: implement ssh-agent auth for ssh disks with nbdkit

2023-08-21 Thread Peter Krempa
On Thu, Jul 20, 2023 at 17:20:01 -0500, Jonathon Jongsma wrote: > It's not possible to use password-protected ssh keys directly with > libvirt because libvirt doesn't have any way to prompt a user for the > password. To accomodate password-protected key files, an administrator > can add these keys

Re: [libvirt PATCH v6 33/36] schema: add ssh-agent configuration for ssh disks

2023-08-21 Thread Peter Krempa
On Thu, Jul 20, 2023 at 17:20:00 -0500, Jonathon Jongsma wrote: > Add the ability to specify a path to a ssh-agent socket in order to use > the ssh-agent to authenticate to remote ssh disks. Example > configuration: > > > > > ... > > ... >

Re: [libvirt PATCH v6 32/36] qemu: implement keyfile auth for ssh disks with nbdkit

2023-08-21 Thread Peter Krempa
On Thu, Jul 20, 2023 at 17:19:59 -0500, Jonathon Jongsma wrote: > For ssh disks that are served by nbdkit, we can support logging in with > an ssh key file. Pass the path to the configured key file and the > username to the nbdkit process. > > Signed-off-by: Jonathon Jongsma > --- >

Re: [libvirt PATCH v6 30/36] qemu: implement knownHosts for ssh disks with nbdkit

2023-08-21 Thread Peter Krempa
On Thu, Jul 20, 2023 at 17:19:57 -0500, Jonathon Jongsma wrote: > For ssh disks that are served by nbdkit, use the configured value for > knownHosts and pass it to the nbdkit process. > > Signed-off-by: Jonathon Jongsma > --- > src/conf/domain_conf.c| 8 ++ >

Re: [libvirt PATCH v6 28/36] qemu: implement password auth for ssh disks with nbdkit

2023-08-21 Thread Peter Krempa
On Thu, Jul 20, 2023 at 17:19:55 -0500, Jonathon Jongsma wrote: > For ssh disks that are served by nbdkit, lookup the password from the > configured secret and securely pass it to the nbdkit process using fd > passing. > > Signed-off-by: Jonathon Jongsma > --- > src/qemu/qemu_nbdkit.c

Re: [libvirt PATCH v6 25/36] qemu: Monitor nbdkit process for exit

2023-08-21 Thread Peter Krempa
On Thu, Jul 20, 2023 at 17:19:52 -0500, Jonathon Jongsma wrote: > Adds the ability to monitor the nbdkit process so that we can take > action in case the child exits unexpectedly. > > When the nbdkit process exits, we pause the vm, restart nbdkit, and then > resume the vm. This allows the vm to

Re: [libvirt PATCH 09/20] ci: build.sh: Join MESON_ARGS and MESON_OPTS

2023-08-21 Thread Andrea Bolognani
Resurrecting this thread now what you've pushed some of the patches. On Mon, Feb 06, 2023 at 02:53:06PM +0100, Erik Skultety wrote: > +# $MESON_ARGS correspond to meson's setup args, i.e. configure args. It's > +# populated either from a GitLab's job configuration or from command line as > +# `$

Re: [libvirt PATCH] qemu: remove pointless qemuDomainLogContextMode

2023-08-21 Thread Michal Prívozník
On 8/16/23 14:24, Ján Tomko wrote: > Since its introduction in 4d1b771fbb610537b7425e649a490143588b8ed3 > it has only been used to differentiate between START and non-START. > > Last use of QEMU_DOMAIN_LOG_CONTEXT_MODE_ATTACH was removed by: > > commit f709377301b919a9fcbfc366e33057f7848bee28

Re: [PATCH] test: qemu: Update qemu-8.1 test data on x86_64

2023-08-21 Thread Peter Krempa
On Thu, Aug 10, 2023 at 15:01:24 +0200, Ján Tomko wrote: > On a Thursday in 2023, Peter Krempa wrote: > > Update to v8.1.0-rc2-114-g64d3be986f > > > > Notable changes: > > - 'dirty-limit' migration feature added > >- 'vcpu-dirty-limit', 'x-vcpu-dirty-limit-period' parameters added > >-

Sunset libvirt-snmp?

2023-08-21 Thread Michal Prívozník
It's been a while since libvirt-snmp was actively developed. Now it receives only libvirt-ci related commits. The code compiles with net-snmp-5.9.3 but the freshly released net-snmp-5.9.4 [1] breaks compilation [2]. Now, libvirt-snmp has this crazy architecture, where some sources are manually