qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept f


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors
Date: Tue, 07 Jul 2009 08:28:37 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2

On 07/06/2009 08:30 PM, Mark McLoughlin wrote:
Hi,
        You can pass file descriptors to qemu via the command line using '-net
tap,fd=' or '-net socket,tap='. However, you cannot currently do this
via the monitor.

        libvirt always configures tap interfaces before passing them to qemu.
One reason for this is to allow libvirtd to have privileges
to /dev/net/tun without allowing qemu those privileges. Because of this,
libvirt currently does not support NIC hotplug for qemu.

        The following three patches add support for passing a file descriptor
to the monitor command by allowing file descriptors to be received over
monitor commands on a unix socket.


I'm a great fan of SCM_RIGHTS. To make it easier to use in more commands, I think it makes sense to have a separate command to pass the fd:

  (qemu) getfd foo
  (qemu) getfd bar
  (qemu) getfd baz
  (qemu) pci_add ...,fd=foo
  (qemu) pci_add ...,fd=bar ...,fd=baz

A closefd command would be needed to deal with errors.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]