[libvirt] [PATCH 2/8] qemuBuildVsockDevStr: allow passing a fdprefix
John Ferlan
jferlan at redhat.com
Mon Jun 4 16:01:32 UTC 2018
$subj:
qemu: Add prefix for vsock vhostfd
On 05/30/2018 10:57 AM, Ján Tomko wrote:
> A string prefix for the file descriptor name. Domain startup
consider:
Alter qemuBuildVsockDevStr to allow passing a prefix for the vhostfd
file descriptor name.
> uses the numeric value of fd without a prefix, but hotplug
> will need to use a prefix because file descriptor names
> passed via add-fd cannot start with a number.
This doesn't use add-fd, it uses qemuMonitorAddDeviceWithFd - similar
reasoning, just different command.
As an aside, qemuMonitorAddDeviceWithFd has a NULLSTR(fdname), but
passes fdname to qemuMonitorSendFileHandle which just assumes it's there
as does qemuMonitorJSONSendFileHandle ("s:fdname", fdname).
>
> https://bugzilla.redhat.com/show_bug.cgi?id=1291851
>
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
> src/qemu/qemu_command.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
Slightly different algorithm than VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO
and SCSIVHost) but who's to say the other 2 are more correct (at least
w/r/t passing the "%d" or "vsockfd%d" string to qemuBuildVsockDevStr
instead of building it in the method). Your call on how to handle.
w/ commit message cleanup...
Reviewed-by: John Ferlan <jferlan at redhat.com>
John
More information about the libvir-list
mailing list