On 05/07/2013 09:12 AM, Laine Stump wrote:
> However, if we are gonna move all the allocation code out of
> the qemuBuildCommandLine we should remember now, that there are gonna be
> several FDs being passed (multiple for /dev/net/tun and for /dev/vhost-net).
Yep. That's the thing (along with fear of an undetected regression) that
prevented me from just doing that in this patch. There isn't really a
convenient place for passing all of those back from some future
qemuNetworkPrepareDevices() to qemuProcessStart(), and from there to
qemuBuildCommandLine() (unless we overload the use of virDomainNetDef or
maybe virDomainActualNetDef, and I'm trying to look for other solutions
before falling back to that).
I don't know if Stefan's work on fdsets would help. We kind of tabled
that series a while ago (until qemu exposes fd passing for disk backing
files during hotplug, we didn't have a use for the command line side of
things, and without a use, we didn't want to check in dead code); but
for the purposes of testing command line building, fdsets provide a nice
way to build a command line that can be legible again (the -add-fd
command line option would tie together an fd with a comment describing
what file was opened to get the fd, then all other uses of the fd are
through the named fdset, so that it is no longer an undecipherable mess
figuring out which fd corresponds to which file when given a single qemu
command line that processed multiple fds).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org