[libvirt] [PATCH V1 3/4] Add a file descriptor set to QEMU private domain struct
Eric Blake
eblake at redhat.com
Wed Jan 30 17:13:46 UTC 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130130/a3a9cbe5/attachment-0001.sig>
More information about the libvir-list
mailing list