qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/4] Add feature to start QEMU without vhost-user backend
@ 2015-05-25  7:28 Tetsuya Mukawa
  2015-05-25  7:28 ` [Qemu-devel] [RFC PATCH 1/4] vhost-user: Add ability to know vhost-user backend disconnection Tetsuya Mukawa
                   ` (3 more replies)
  0 siblings, 4 replies; 32+ messages in thread
From: Tetsuya Mukawa @ 2015-05-25  7:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Tetsuya Mukawa, jasowang, stefanha, n.nikolaev

Hi guys,

Here is RFC patch to add feature to start QEMU without vhost-user backend.
Currently, if we want to use vhost-user backend, the backend must start before
QEMU. Also, if QEMU or the backend is closed unexpectedly, there is no way to
recover without restarting both applications. Practically, it's not useful.

This patch series adds following features.
 - QEMU can start before the backend.
 - QEMU or the backend can restart anytime.
   connectivity will be recovered automatically, when app starts again.
   (if QEMU is server, QEMU just wait reconnection)
   while lost connection, link status of virtio-net device is down,
   so virtio-net driver on the guest can know it

To work like above, the patch introduces backend_features flag.
Here are examples.

 -chardev socket,id=chr0,path=/tmp/sock0,reconnect=3 \
 -netdev vhost-user,id=net0,chardev=chr0,vhostforce,backend_features=0x68000 \
 -device virtio-net-pci,netdev=net0 \
 \
 -chardev socket,id=chr1,path=/tmp/sock1,server,nowait \
 -netdev vhost-user,id=net1,chardev=chr1,vhostforce,backend_features=0x68000 \
 -device virtio-net-pci,netdev=net1 \

When virtio-net device is configured by virtio-net driver, QEMU should know
vhost-user backend features. But if QEMU starts without the backend, QEMU cannot
know it. So above the feature values specified by user will be used as features
the backend will support.

When connection between QEMU and the backend is established, QEMU checkes feature
values of the backend to make sure the expected features are provided.
If it doesn't, the connection will be closed by QEMU.

Regards,
Tetsuya


Tetsuya Mukawa (4):
  vhost-user: Add ability to know vhost-user backend disconnection
  vhost-user: Shutdown vhost-user connection when wrong messages are
    passed
  vhost-user: Enable 'nowait' and 'reconnect' option
  vhost-user: Add new option to specify vhost-user backend supports

 hw/net/vhost_net.c             |  9 +++++-
 hw/net/virtio-net.c            | 24 ++++++++++++++++
 hw/scsi/vhost-scsi.c           |  2 +-
 hw/virtio/vhost-user.c         | 26 +++++++++++++-----
 hw/virtio/vhost.c              |  8 ++++--
 include/hw/virtio/vhost.h      |  5 +++-
 include/hw/virtio/virtio-net.h |  2 ++
 include/net/net.h              |  6 ++++
 include/net/vhost_net.h        |  2 ++
 include/sysemu/char.h          |  7 +++++
 net/net.c                      | 18 ++++++++++++
 net/tap.c                      |  5 +++-
 net/vhost-user.c               | 62 ++++++++++++++++++++++++++++++++++++++++--
 qapi-schema.json               | 10 +++++--
 qemu-char.c                    | 15 ++++++++++
 qemu-options.hx                |  3 +-
 16 files changed, 186 insertions(+), 18 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2015-06-17  9:29 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25  7:28 [Qemu-devel] [RFC PATCH 0/4] Add feature to start QEMU without vhost-user backend Tetsuya Mukawa
2015-05-25  7:28 ` [Qemu-devel] [RFC PATCH 1/4] vhost-user: Add ability to know vhost-user backend disconnection Tetsuya Mukawa
2015-05-25  7:28 ` [Qemu-devel] [RFC PATCH 2/4] vhost-user: Shutdown vhost-user connection when wrong messages are passed Tetsuya Mukawa
2015-05-25  7:28 ` [Qemu-devel] [RFC PATCH 3/4] vhost-user: Enable 'nowait' and 'reconnect' option Tetsuya Mukawa
2015-05-25  7:28 ` [Qemu-devel] [RFC PATCH 4/4] vhost-user: Add new option to specify vhost-user backend supports Tetsuya Mukawa
2015-05-25 22:11   ` Eric Blake
2015-05-26  2:46     ` Tetsuya Mukawa
2015-05-26  4:29       ` Tetsuya Mukawa
2015-05-26 12:52         ` Eric Blake
2015-05-28  1:25           ` Tetsuya Mukawa
2015-05-29  4:42             ` Tetsuya Mukawa
2015-05-29  4:42   ` [Qemu-devel] [PATCH v1 0/4] Add feature to start QEMU without vhost-user backend Tetsuya Mukawa
2015-05-29  4:42     ` [Qemu-devel] [PATCH v1 1/4] vhost-user: Add ability to know vhost-user backend disconnection Tetsuya Mukawa
2015-06-15 13:32       ` Stefan Hajnoczi
2015-06-16  5:07         ` Tetsuya Mukawa
2015-05-29  4:42     ` [Qemu-devel] [PATCH v1 2/4] vhost-user: Shutdown vhost-user connection when wrong messages are passed Tetsuya Mukawa
2015-06-15 13:40       ` Stefan Hajnoczi
2015-06-16  5:08         ` Tetsuya Mukawa
2015-05-29  4:42     ` [Qemu-devel] [PATCH v1 3/4] vhost-user: Enable 'nowait' and 'reconnect' option Tetsuya Mukawa
2015-06-15 13:41       ` Stefan Hajnoczi
2015-06-15 13:58       ` Stefan Hajnoczi
2015-06-16  5:08         ` Tetsuya Mukawa
2015-05-29  4:42     ` [Qemu-devel] [PATCH v1 4/4] vhost-user: Add new option to specify vhost-user backend features Tetsuya Mukawa
2015-06-15 13:58       ` Stefan Hajnoczi
2015-06-16  5:08         ` Tetsuya Mukawa
2015-06-16 12:27       ` Eric Blake
2015-06-17  9:29         ` Tetsuya Mukawa
2015-06-11  1:56     ` [Qemu-devel] [PATCH v1 0/4] Add feature to start QEMU without vhost-user backend Tetsuya Mukawa
2015-06-15 14:12       ` Stefan Hajnoczi
2015-06-15 14:21         ` Michael S. Tsirkin
2015-06-15 14:08     ` Stefan Hajnoczi
2015-06-16  5:09       ` Tetsuya Mukawa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).