[Top][All Lists]
[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: |
Mark McLoughlin |
Subject: |
Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors |
Date: |
Tue, 07 Jul 2009 08:43:43 +0100 |
On Tue, 2009-07-07 at 08:28 +0300, Avi Kivity wrote:
> 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.
Nice idea, certainly.
However, since it's only currently useful for tap/socket networking, I'm
happier with not adding two new monitor commands and only supporting a
single fd for now.
Cheers,
Mark.
- [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors, Mark McLoughlin, 2009/07/06
- [Qemu-devel] [PATCH 1/3] Make tcp_chr_read() use recvmsg(), Mark McLoughlin, 2009/07/06
- Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors, Avi Kivity, 2009/07/07
- Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors,
Mark McLoughlin <=
- Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors, Avi Kivity, 2009/07/07
- Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors, Mark McLoughlin, 2009/07/07
- Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors, Avi Kivity, 2009/07/07
- Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors, Daniel P. Berrange, 2009/07/07
- Re: [Qemu-devel] [PATCH 0/3] Allow host_net_add monitor command accept file descriptors, Mark McLoughlin, 2009/07/08
- [Qemu-devel] [PATCH 1/5] Make tcp_chr_read() use recvmsg(), Mark McLoughlin, 2009/07/08
- [Qemu-devel] [PATCH 2/5] Add SCM_RIGHTS support to unix socket character devices, Mark McLoughlin, 2009/07/08
- [Qemu-devel] [PATCH 3/5] Add getfd and closefd monitor commands, Mark McLoughlin, 2009/07/08
- [Qemu-devel] [PATCH 4/5] Add monitor_get_fd() command for fetching named fds, Mark McLoughlin, 2009/07/08
- [Qemu-devel] [PATCH 5/5] Add support for fd=name to tap and socket networking, Mark McLoughlin, 2009/07/08