Re: [PATCH V1 3/4] Add a file descriptor set to QEMU private domain struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/29/2013 04:41 PM, Eric Blake wrote:
> On 01/29/2013 09:52 AM, Stefan Berger wrote:
>> Add a file descriptor set to the QEMU private domain structure.
>>
>> ---
>>  src/qemu/qemu_domain.c |    4 ++++
>>  src/qemu/qemu_domain.h |    3 +++
>>  2 files changed, 7 insertions(+)
> 
> In isolation, this patch looks okay.  But the real question is what it
> will be used for.  I'm worried that we don't have quite the right
> implementation design in place yet.
> 
> Unfortunately, I think we need much more than storing just a set of
> integers - we need a full blown hash table, where the key is the fd we
> passed through, and the value is more details (the file name or other
> details describing the fd that we are passing, and the resulting qemu
> fdset number that the fd will belong to).  Furthermore, we need to make
> this storage persist across libvirt reboots, which means it needs to be
> part of the (internal-only) XML that we save in
> /var/run/libvirt/qemu/$dom.xml, so we must also modify
> qemuDomainObjPrivateXMLFormat() to output the contents of this set (or
> hash table) in a reusable manner.

For that matter, I just realized that we already have an <alias> XMl
element in the internal-only XML of each /var/run/libvirt/qemu/dom.xml;
which is part of the virDomainDeviceInfo.  It seems like this struct
would be a useful place for us to add another XML attribute stating what
qemu fdset is associated with any given device.  That also means that in
patch 4/4, we don't have to pass a virIntSet around; any code like
qemuBuildChrChardevStr that is already looking up an 'alias' associated
with a device can also look up an fdset from the same struct.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]