backend: multi-client-socket
PATCH 1/1 backend: multi-client-socket
This patch introduces a new socket for QEMU, called multi-client-socket. This socket allows multiple QEMU instances to communicate by sharing messages and file descriptors.
A socket can be instantiated with the following parameters:
-object multi-socket-backend,id=<id>,path=<socket_path>,listen=<on/off>
If listen is set, the socket will act as a listener and register new clients.
This patch is a follow-up to "[RFC PATCH 0/8] Towards an Heterogeneous QEMU":
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg00171.html
This work has been sponsored by Huawei Technologies Duesseldorf GmbH.
--- backends/Makefile.objs | 2 + backends/multi-socket.c | 355 ++++++++++++++++++++++++++++++++++++++++++++ include/qemu/multi-socket.h | 124 ++++++++++++++++ 3 files changed, 481 insertions(+) create mode 100644 backends/multi-socket.c create mode 100644 include/qemu/multi-socket.h
backends/Makefile.objs +2 -0
@@ -9,3 +9,5 @@ common-obj-$(CONFIG_TPM) += tpm.o common-obj-y += hostmem.o hostmem-ram.o common-obj-$(CONFIG_LINUX) += hostmem-file.o + +common-obj-y += multi-socket.o
backends/multi-socket.c new file +355 -0
355 lines not on this page · raw message
include/qemu/multi-socket.h new file +124 -0
124 lines not on this page · raw message
Signature · 1 line
2.7.3
Quoted 15 lines · Baptiste Reynal
This patch introduces a new socket for QEMU, called multi-client-socket. This socket allows multiple QEMU instances to communicate by sharing messages and file descriptors.
A socket can be instantiated with the following parameters:
-object multi-socket-backend,id=<id>,path=<socket_path>,listen=<on/off>If listen is set, the socket will act as a listener and register new clients.
This patch is a follow-up to "[RFC PATCH 0/8] Towards an Heterogeneous QEMU":
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg00171.htmlThis work has been sponsored by Huawei Technologies Duesseldorf GmbH.
Quoted 8 lines
Signed-off-by Baptiste Reynal <[email protected]>--- backends/Makefile.objs | 2 + backends/multi-socket.c | 355 ++++++++++++++++++++++++++++++++++++++++++++ include/qemu/multi-socket.h | 124 ++++++++++++++++ 3 files changed, 481 insertions(+) create mode 100644 backends/multi-socket.c create mode 100644 include/qemu/multi-socket.h
Is it possible to reuse QEMU's UNIX domain socket and fd passing code? For example, take a look at io/channel-socket.c.
I wasn't aware of this new framework when I started the development of this socket. For sure I'll have a deeper look and see what can be shared for the next version.
Quoted 27 lines · Stefan Hajnoczi
Quoted 15 lines · Baptiste Reynal
This patch introduces a new socket for QEMU, called multi-client-socket. This socket allows multiple QEMU instances to communicate by sharing messages and file descriptors.
A socket can be instantiated with the following parameters:
-object multi-socket-backend,id=<id>,path=<socket_path>,listen=<on/off>If listen is set, the socket will act as a listener and register new clients.
This patch is a follow-up to "[RFC PATCH 0/8] Towards an Heterogeneous QEMU":
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg00171.htmlThis work has been sponsored by Huawei Technologies Duesseldorf GmbH.
Quoted 8 lines
Signed-off-by Baptiste Reynal <[email protected]>--- backends/Makefile.objs | 2 + backends/multi-socket.c | 355 ++++++++++++++++++++++++++++++++++++++++++++ include/qemu/multi-socket.h | 124 ++++++++++++++++ 3 files changed, 481 insertions(+) create mode 100644 backends/multi-socket.c create mode 100644 include/qemu/multi-socket.hIs it possible to reuse QEMU's UNIX domain socket and fd passing code? For example, take a look at
io/channel-socket.c.