Re: [libvirt PATCH v2 15/15] qemu: automatically bind to a vfio variant driver, if available

2024-01-04 Thread Laine Stump
On 11/28/23 10:39 AM, Peter Krempa wrote: On Mon, Nov 06, 2023 at 02:39:00 -0500, Laine Stump wrote: Rather than always binding to the vfio-pci driver, use the new function virPCIDeviceFindBestVFIOVariant() to see if the running kernel has a VFIO variant driver available that is a better match f

Re: [PATCH v4] qemu: add runtime config option for nbdkit

2024-01-04 Thread Peter Krempa
On Thu, Jan 04, 2024 at 12:24:38 -0600, Jonathon Jongsma wrote: > Currently when we build with nbdkit support, libvirt will always try to > use nbdkit to access remote disk sources when it is available. But > without an up-to-date selinux policy allowing this, it will fail. > because the required s

Re: [PATCH v4] qemu: add runtime config option for nbdkit

2024-01-04 Thread Jonathon Jongsma
On 1/4/24 1:14 PM, Andrea Bolognani wrote: On Thu, Jan 04, 2024 at 12:24:38PM -0600, Jonathon Jongsma wrote: Currently when we build with nbdkit support, libvirt will always try to use nbdkit to access remote disk sources when it is available. But without an up-to-date selinux policy allowing th

Re: [ PATCH vf-token 0/8] Introduce vf-token when using userspace PF

2024-01-04 Thread Peter Krempa
On Wed, Jan 03, 2024 at 22:42:41 +0530, Vivek Kashyap wrote: > > > On Tue, 2 Jan 2024, Alex Williamson wrote: > > > On Tue, 2 Jan 2024 18:55:10 +0530 > > Vivek Kashyap wrote: > > > > > The VFIO PCI ABI has been extended to require userspace PF driver to set > > > a VF token to a known value.

Re: [libvirt PATCH 3/5] util: Add util methods required by ch networking

2024-01-04 Thread Praveen K Paladugu
On 1/4/2024 9:04 AM, Michal Prívozník wrote: On 11/30/23 00:11, Praveen K Paladugu wrote: virSocketSendMsgWithFDs method send fds along with payload using SCM_RIGHTS. virSocketRecvHttpResponse method polls, receives http response on the input socket and returns the http response code. These m

Re: [PATCH v4] qemu: add runtime config option for nbdkit

2024-01-04 Thread Andrea Bolognani
On Thu, Jan 04, 2024 at 12:24:38PM -0600, Jonathon Jongsma wrote: > Currently when we build with nbdkit support, libvirt will always try to > use nbdkit to access remote disk sources when it is available. But > without an up-to-date selinux policy allowing this, it will fail. > because the required

[PATCH v4] qemu: add runtime config option for nbdkit

2024-01-04 Thread Jonathon Jongsma
Currently when we build with nbdkit support, libvirt will always try to use nbdkit to access remote disk sources when it is available. But without an up-to-date selinux policy allowing this, it will fail. because the required selinux policies are not yet widely available, we have disabled nbdkit su

Re: [PATCH 0/7] Code cleanup 2

2024-01-04 Thread Artem Chernyshev
Thank you and sorry for those miss-alignments with coding style. Could you check my first submission as well? https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/DCOUUBC2V7WR2HXDBKYQ4E3JOJP7E2MC/ Artem ___ Devel mailing list -- devel

Re: [PATCH] qemu: tighten semantics of 'size' when resizing block devices

2024-01-04 Thread Peter Krempa
On Wed, Jan 03, 2024 at 16:39:26 +, Daniel P. Berrangé wrote: > When VIR_DOMAIN_BLOCK_RESIZE_CAPACITY is set, the 'size' parameter > is currently ignored. Since applications must none the less pass a > value for this parameter, it is preferrable to declare some explicit > semantics for it. > >

[PATCH 6/6] tests: Add xml->argv and xml->xml tests for the new iothread mapping feature

2024-01-04 Thread Peter Krempa
Signed-off-by: Peter Krempa --- .../iothreads-disk.x86_64-latest.args | 13 +++--- tests/qemuxml2argvdata/iothreads-disk.xml | 25 -- .../iothreads-disk.x86_64-latest.xml | 26 +-- 3 files changed, 56 insertions(+), 8 deletions(-) diff --g

[PATCH 5/6] qemu: Implement support for configuring iothread to virtqueue mapping for disks

2024-01-04 Thread Peter Krempa
Add validation and formatting of the commandline arguments for 'iothread-vq-mapping' parameter. The validation logic mirrors waht qemu allows. Signed-off-by: Peter Krempa --- src/hypervisor/domain_driver.c | 15 - src/qemu/qemu_command.c| 45 + src/qemu/qemu_validate.c

[PATCH 4/6] conf: Add possibility to configure multiple iothreads per disk

2024-01-04 Thread Peter Krempa
Introduce a new sub-element of disk's which will allow configuring multiple iothreads and also map them to specific virt-queues of virtio devices. Signed-off-by: Peter Krempa --- docs/formatdomain.rst | 23 +- src/conf/domain_conf.c| 76 +

[PATCH 2/6] util: xml: Return GPtrArray from virXMLNodeGetSubelement

2024-01-04 Thread Peter Krempa
Rework the helper to use a GPtrArray structure to simplify callers. Signed-off-by: Peter Krempa --- src/conf/domain_conf.c | 40 src/conf/network_conf.c | 33 + src/conf/nwfilter_conf.c | 20 +++- src/uti

[PATCH 3/6] qemu: capabilities: Introduce QEMU_CAPS_VIRTIO_BLK_IOTHREAD_MAPPING

2024-01-04 Thread Peter Krempa
The capability represents the support for mapping virtqueues to iothreads for the 'virtio-blk' device. Signed-off-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml

[PATCH 0/6] qemu: Update capabilities and add support for assigning multiple iothreads to a virtio-blk device

2024-01-04 Thread Peter Krempa
See 4/6 for docs, 6/6 for examples Peter Krempa (6): qemucapabilitiesdata: Add data for the qemu-9.0 development cycle util: xml: Return GPtrArray from virXMLNodeGetSubelement qemu: capabilities: Introduce QEMU_CAPS_VIRTIO_BLK_IOTHREAD_MAPPING conf: Add possibility to configure multiple io

Re: [PATCH 1/7] cpu: : virCPUx86DataAddItem() to void

2024-01-04 Thread Michal Prívozník
On 1/4/24 01:16, Artem Chernyshev wrote: > virCPUx86DataAddItem() return value > is invariant, so change it type and remove all dependent > checks. > > Functions changed to void: > > virCPUx86DataAddItem() > > x86DataAdd() > virCPUx86DataAdd() > x86DataAddSignature() > virCPUx86DataSetSignature(

Re: [PATCH 2/7] rpc: virnetserver: virNetServerAddService() to void

2024-01-04 Thread Michal Prívozník
On 1/4/24 01:16, Artem Chernyshev wrote: > virNetServerAddService() return value > is invariant, so change it type and remove all dependent > checks. > > Fixes: 7d2fd6ef01 ("Do not check return value of VIR_EXPAND_N") > > Signed-off-by: Artem Chernyshev > --- > src/lxc/lxc_controller.c | 3 +--

Re: [PATCH 7/7] node_device: udevGetStringSysfsAttr() to void

2024-01-04 Thread Michal Prívozník
On 1/4/24 01:17, Artem Chernyshev wrote: > udevGetStringSysfsAttr() return value > is invariant, so change it type and remove all dependent > checks. > > Fixes: 7f1f0453fc ("node_device: use g_strdup instead of VIR_STRDUP") > > Signed-off-by: Artem Chernyshev > --- > src/node_device/node_device

Re: [PATCH 0/7] Code cleanup 2

2024-01-04 Thread Michal Prívozník
On 1/4/24 01:16, Artem Chernyshev wrote: > Several functions was modified to become invariant. Change > their type to void and remove unnecessary checks of their > return values. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Artem Chernyshev (7): > cpu: : virCPUx86Da

Re: [libvirt PATCH 3/5] util: Add util methods required by ch networking

2024-01-04 Thread Michal Prívozník
On 11/30/23 00:11, Praveen K Paladugu wrote: > virSocketSendMsgWithFDs method send fds along with payload using > SCM_RIGHTS. virSocketRecvHttpResponse method polls, receives http response > on the input socket and returns the http response code. > > These methods are required to add network suppp

Re: [libvirt PATCH 5/5] ch: Enable ETHERNET Network mode support

2024-01-04 Thread Michal Prívozník
On 11/30/23 00:11, Praveen K Paladugu wrote: > enable VIR_DOMAIN_NET_TYPE_ETHERNET network support for ch guests. > > Tested with following interface config: > > > > > > > > Signed-off-by: Praveen K Paladugu > --- > po/POTFILES | 1 + > src/ch/ch_conf

Re: [PATCH 18.5/19] qemuxml2argvtest: Mark 'nbdkit' tests as skipped if nbdkit is not compiled in

2024-01-04 Thread Michal Prívozník
On 1/4/24 13:47, Peter Krempa wrote: > Rather than completely compiling out the tests mark them as skipped. > This will allow us to add a checker that all input files are accounted > for. > > Signed-off-by: Peter Krempa > --- > Sending addendum to the series to avoid resending the whole series. >

[PATCH 18.5/19] qemuxml2argvtest: Mark 'nbdkit' tests as skipped if nbdkit is not compiled in

2024-01-04 Thread Peter Krempa
Rather than completely compiling out the tests mark them as skipped. This will allow us to add a checker that all input files are accounted for. Signed-off-by: Peter Krempa --- Sending addendum to the series to avoid resending the whole series. tests/qemuxml2argvtest.c | 15 ++- 1 f

[PATCH 4/4] qemu_command: Generate cmd line for virtio-mem dynamicMemslots

2024-01-04 Thread Michal Privoznik
This is straightforward, pretty much. The only odd thing is: .dynamic-memslots=true requires .unplugged-inaccessible="on". While the latter is currently the default, it's not guaranteed to stay that way. Play it safe and explicitly set both. Resolves: https://issues.redhat.com/browse/RHEL-15316 Si

[PATCH 3/4] qemu_validate: Check capability for virtio-mem dynamicMemslots

2024-01-04 Thread Michal Privoznik
The QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_DYNAMIC_MEMSLOTS reflects whether QEMU is capable of .dynamic-memslots for virtio-mem. Use it when validating domain configuration. Signed-off-by: Michal Privoznik --- src/qemu/qemu_validate.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/qemu

[PATCH 2/4] qemu_capabilities: Add QEMU_CAPS_DEVICE_VIRTIO_MEM_PCI_DYNAMIC_MEMSLOTS capability

2024-01-04 Thread Michal Privoznik
Starting from v8.2.0-rc0~74^2~2 QEMU has .dynamic-memslots attribute for virtio-mem-pci device. Introduce a capability which reflects that. Signed-off-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/q

[PATCH 1/4] conf: Introduce dynamicMemslots attribute for virtio-mem

2024-01-04 Thread Michal Privoznik
Introduced in v8.2.0-rc0~74^2~2, QEMU now allows setting .dynamic-memslots attribute for virtio-mem-pci devices. When turned on, it allows memory exposed to guest to be split into multiple memslots and thus smaller memory footprint (see the original commit for detailed explanation). Therefore, int

[PATCH 0/4] Introduce dynamicMemslots attribute for virtio-mem

2024-01-04 Thread Michal Privoznik
I couldn't decide whether the new attribute should be in or element. I went with the former, but if anybody feels I should have went with the latter then I can change it. Michal Prívozník (4): conf: Introduce dynamicMemslots attribute for virtio-mem qemu_capabilities: Add QEMU_CAPS_DEVIC

Re: Re: [libvirt PATCH v3] qemu: add runtime config option for nbdkit

2024-01-04 Thread Andrea Bolognani
On Wed, Jan 03, 2024 at 04:52:00PM -0600, Jonathon Jongsma wrote: > On 1/3/24 12:37 PM, Andrea Bolognani wrote: > > When parsing the configuration file, we shouldn't make this part > > conditional. If the user tries to enable nbdkit usage with a build of > > libvirt that doesn't include support, it