|
From: | Anthony Liguori |
Subject: | Re: [Qemu-devel] [patch 18/18] qemu: PCI device, disk and host network hot-add / hot-remove |
Date: | Wed, 04 Feb 2009 10:46:19 -0600 |
User-agent: | Thunderbird 2.0.0.19 (X11/20090105) |
Avi Kivity wrote:
Anthony Liguori wrote:It doesn't support this today but additional patches to enable that are certainly welcome. The best way would be a generic mechanism to send a file descriptor to QEMU that could then be used anywhere fd= is valid. For instance:(qemu) receivefd unix:foo.sock,server fd=5 (qemu) closefd 5(qemu) receivefd myfd// qemu receives an fd over the monitor, and attaches it to the tag 'myfd'
Completely reasonable, but it's going to be hard to implement in a way that doesn't suck. You'll have to extend the character driver interface to support receiving file descriptors, plumb that appropriately through the monitor.
Seems like an odd abstraction to me though as unix domain sockets are the only transport that I know of that supports sending fds.
(qemu) closefd myfd // qemu closes the fd attached to tag 'myfd' Advantages: - no runtime handshaking with a new socket - work with names, not numbers you need to read off the monitor
Names are fine. I would have requested that the numbers be validated which require them to be tracked which makes them essentially names anyway.
Regards, Anthony Liguori
[Prev in Thread] | Current Thread | [Next in Thread] |