]> xenbits.xensource.com Git - libvirt.git/commit
conf: support manually specifying VFIO variant driver in <hostdev> XML
authorLaine Stump <laine@redhat.com>
Fri, 5 Jan 2024 01:12:51 +0000 (20:12 -0500)
committerLaine Stump <laine@redhat.com>
Mon, 8 Jan 2024 06:00:08 +0000 (01:00 -0500)
commit8b93d78c8325f1fba5db98848350f3db43f5e7d5
tree48f69511e1c7159ab864ab8b7e458125157ff6a6
parent956e1ca6aa9be4ef382360603e55cda1a900bb09
conf: support manually specifying VFIO variant driver in <hostdev> XML

This patch makes it possible to manually specify which VFIO variant
driver to use for PCI hostdev device assignment, so that, e.g. you
could force use of a VFIO "variant" driver, with e.g.

  <driver model='mlx5_vfio_pci'/>

or alternately to force use of the generic vfio-pci driver with

  <driver model='vfio-pci'/>

when libvirt would have normally (after applying a subsequent patch)
found a "better match" for a device in the active kernel's
modules.alias file. (The main potential use of this manual override
would probably be to work around a bug in a new VFIO variant driver by
temporarily not using that driver).

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
17 files changed:
docs/formatdomain.rst
docs/formatnetwork.rst
src/conf/device_conf.c
src/conf/device_conf.h
src/conf/domain_conf.c
src/conf/network_conf.c
src/conf/schemas/basictypes.rng
src/conf/virnetworkportdef.c
src/network/bridge_driver.c
tests/networkxml2xmlin/hostdev-pf-driver-model.xml [new file with mode: 0644]
tests/networkxml2xmlout/hostdev-pf-driver-model.xml [new file with mode: 0644]
tests/networkxml2xmltest.c
tests/qemuxml2argvdata/hostdev-vfio.x86_64-latest.args
tests/qemuxml2argvdata/hostdev-vfio.xml
tests/qemuxml2xmloutdata/hostdev-vfio.x86_64-latest.xml
tests/virnetworkportxml2xmldata/plug-hostdev-pci-unmanaged.xml
tests/virnetworkportxml2xmldata/plug-hostdev-pci.xml