]> xenbits.xensource.com Git - libvirt.git/commit
Set stubDriverName from hostdev driver model attribute during pci device setup
authorLaine Stump <laine@redhat.com>
Fri, 16 Feb 2024 17:43:59 +0000 (12:43 -0500)
committerLaine Stump <laine@redhat.com>
Tue, 20 Feb 2024 16:19:44 +0000 (11:19 -0500)
commit41fe8524870facae02be067097ea494c475d77f0
tree390614d8acc285a824ff8525578c382dfdbff3b8
parentda2483c3b3856112113359098752026639afd153
Set stubDriverName from hostdev driver model attribute during pci device setup

commit v9.10.0-129-g8b93d78c83 (first appearing in libvirt-10.0.0) was
supposed to allow forcing a PCI hostdev to be bound to a particular
driver by adding <driver model='blah'/> to the XML for the
device. Unfortunately, a single line was missed during the final
changes to the patch prior to pushing, and the result was that the
driver model could be set to *anything* and it would be accepted but
just ignored.

This patch adds the missing line, which will set the stubDriverName
field of the virPCIDevice object from the hostdev object as the
virPCIDevice is being created. This ends up being used by
virPCIDeviceBindToStub() as the driver that it binds the device to.

Fixes: 8b93d78c8325f1fba5db98848350f3db43f5e7d5
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/hypervisor/virhostdev.c