[libvirt] [PATCH] qemu: be sure we're using the updated value of backend during hotplug

Ján Tomko jtomko at redhat.com
Tue Feb 4 11:36:30 UTC 2014


On 02/04/2014 12:24 PM, Laine Stump wrote:
> Probable fix for
> 
>   https://bugzilla.redhat.com/show_bug.cgi?id=1056360
> 
> 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 | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

ACK

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140204/ede2931a/attachment-0001.sig>


More information about the libvir-list mailing list