]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: be sure we're using the updated value of backend during hotplug
authorLaine Stump <laine@laine.org>
Tue, 4 Feb 2014 11:12:47 +0000 (13:12 +0200)
committerLaine Stump <laine@laine.org>
Tue, 4 Feb 2014 12:05:09 +0000 (14:05 +0200)
commit0d0a7bf45a67139ae591e69a7b5994e14a7709b8
treeaa359a765ed7c214d0c9f8a294cbc46956ece9c4
parente45b07314e27f97730b2c6c58153de396bf4e5d3
qemu: be sure we're using the updated value of backend during hotplug

commit f094aaac changed qemuPrepareHostdevPCIDevices() such that it
may modify the "backend" (vfio vs. legacy kvm) setting in the
virHostdevDef. However, qemuDomainAttachHostPciDevice() (used by
hotplug) copies the backend setting into a local *before* calling
qemuPrepareHostdevPCIDevices(), and then later makes a decision based
on that pre-change value.

The result is that, if the backend had been set to "default" (i.e. not
specified in the config) and was later updated to "VFIO" by
qemuPrepareHostdevPCIDevices(), the qemu process' MacMemLock is not
increased (as is required for VFIO device assignment).

This patch delays making the local copy of backend until after its
potential modification.
src/qemu/qemu_hotplug.c