The first part of the series refactors the existing code for reuse and
then uses the new helpers to implement the feature.
Note that this series is in RFC state as the qemu patches are still
being discussed. Thus also the capability bump is not final.
Also note that we should discuss the libvirt interface perhaps as it
turns out that 'virtio-scsi' has two internal queues that need to be
mapped as well.
For now I've solved this administratively by instructing users to also
add mapping for queue '0' and '1' which are the special ones in case of
virtio-scsi.
qemu-patches:
https://mail.gnu.org/archive/html/qemu-devel/2025-02/msg02810.html
Peter Krempa (13):
conf: Rename 'virDomainDiskIothreadDef' to
'virDomainIothreadMappingDef'
conf: domain: Extract code for parsing and formatting iotrhead mapping
definition
hypervisor: domain: Extract code for checking iothread usage
qemu: command: Rename 'qemuBuildDiskDeviceIothreadMappingProps' to
'qemuBuildIothreadMappingProps'
qemu: validate: Extract iothread mapping validation code
qemuValidateCheckSCSIControllerIOThreads: Return '0' and '-1' instead
of bools
conf: schemas: Rename 'diskDriverIothreads' to 'iothreadMapping'
conf: Validate that iohtreads are used only with 'virtio-scsi'
controllers
qemucapabilitiestest: Update 'caps_10.0.0_x86_64' to XXXXXX
qemu: capabilities: Introduce QEMU_CAPS_VIRTIO_SCSI_IOTHREAD_MAPPING
conf: Add support for iothread to queue mapping config for
'virtio-scsi'
qemu: Implement support for iothread <-> virtqueue mapping for
'virtio-scsi' controllers
qemuxmlconftest: Add 'iothreads-virtio-scsi-mapping' case
docs/formatdomain.rst | 33 +++
src/conf/domain_conf.c | 157 +++++++-----
src/conf/domain_conf.h | 11 +-
src/conf/domain_validate.c | 19 ++
src/conf/schemas/domaincommon.rng | 7 +-
src/hypervisor/domain_driver.c | 34 +--
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 12 +-
src/qemu/qemu_domain.c | 4 +-
src/qemu/qemu_validate.c | 234 ++++++++++--------
.../caps_10.0.0_x86_64.replies | 12 +-
.../caps_10.0.0_x86_64.xml | 3 +-
...r-virtio-serial-iothread.x86_64-latest.err | 1 +
.../controller-virtio-serial-iothread.xml | 27 ++
...ads-virtio-scsi-mapping.x86_64-latest.args | 39 +++
...eads-virtio-scsi-mapping.x86_64-latest.xml | 54 ++++
.../iothreads-virtio-scsi-mapping.xml | 46 ++++
tests/qemuxmlconftest.c | 3 +
19 files changed, 506 insertions(+), 193 deletions(-)
create mode 100644
tests/qemuxmlconfdata/controller-virtio-serial-iothread.x86_64-latest.err
create mode 100644 tests/qemuxmlconfdata/controller-virtio-serial-iothread.xml
create mode 100644
tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-latest.args
create mode 100644 tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.x86_64-latest.xml
create mode 100644 tests/qemuxmlconfdata/iothreads-virtio-scsi-mapping.xml
--
2.48.1