From: Stefano Garzarella <sgarzare@redhat.com>
To: qemu-devel@nongnu.org
Cc: Julio Montes <julio.montes@intel.com>,
Sebastien Boeuf <sebastien.boeuf@intel.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: [PATCH 0/3] virtio: add vhost-user-vsock device
Date: Fri, 15 May 2020 17:21:07 +0200 [thread overview]
Message-ID: <20200515152110.202917-1-sgarzare@redhat.com> (raw)
This series add vhost-user-vsock base device and its PCI version
(vhost-user-vsock-pci).
The vhost-user-vsock device can be used to implement the virtio-vsock
device emulation in user-space.
An use case might be Kata, where they prefer to emulate devices
in user-space.
The first patch creates a new vhost-vsock-common parent class
with the common code usable for both vhost-vsock and vhost-user-vsock
devices.
The other patches add the vhost-user-vsock base device and its PCI
version.
I also implemented a vhost-user-vsock [1] (still WiP) application written in
Rust using crates from Cloud Hypervisor.
The application implements the Firecracker hybrid vsock (vsock over
unix domain socket) [2]
The vhost-user-vsock-pci device can be tested following these steps:
# build vhost-user-vsock application
git clone https://github.com/stefano-garzarella/cloud-hypervisor.git
git checkout vhost-user-vsock
cargo build
# start vhost-user-vsock
./target/debug/vhost_user_vsock \
--vsock-backend guest_cid=4,uds_path=/tmp/vm4.vsock,sock=/tmp/vhost4.socket
# start QEMU
qemu-system-x86_64 -m 1G -smp 2 -cpu host -M q35,accel=kvm \
... \
-chardev socket,id=char0,reconnect=0,path=/tmp/vhost4.socket \
-device vhost-user-vsock-pci,chardev=char0 -monitor stdio
# Guest listening
guest$ nc --vsock -l 1234
host$ nc -U /tmp/vm4.vsock
CONNECT 1234
# Host listening
host$ nc -l -U /tmp/vm4.vsock_1234
guest$ nc --vsock 2 1234
[1] https://github.com/stefano-garzarella/cloud-hypervisor.git
(vhost-user-vsock branch)
[2] https://github.com/firecracker-microvm/firecracker/blob/master/docs/vsock.md
Stefano Garzarella (3):
vhost-vsock: add vhost-vsock-common abstraction
virtio: add vhost-user-vsock base device
virtio: add vhost-user-vsock-pci device
configure | 3 +
include/hw/virtio/vhost-user-vsock.h | 36 ++++
include/hw/virtio/vhost-vsock-common.h | 47 ++++
include/hw/virtio/vhost-vsock.h | 11 +-
hw/virtio/vhost-user-vsock-pci.c | 84 ++++++++
hw/virtio/vhost-user-vsock.c | 188 ++++++++++++++++
hw/virtio/vhost-vsock-common.c | 258 ++++++++++++++++++++++
hw/virtio/vhost-vsock.c | 283 ++++---------------------
hw/virtio/Makefile.objs | 4 +-
9 files changed, 663 insertions(+), 251 deletions(-)
create mode 100644 include/hw/virtio/vhost-user-vsock.h
create mode 100644 include/hw/virtio/vhost-vsock-common.h
create mode 100644 hw/virtio/vhost-user-vsock-pci.c
create mode 100644 hw/virtio/vhost-user-vsock.c
create mode 100644 hw/virtio/vhost-vsock-common.c
--
2.25.4
next reply other threads:[~2020-05-15 15:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 15:21 Stefano Garzarella [this message]
2020-05-15 15:21 ` [PATCH 1/3] vhost-vsock: add vhost-vsock-common abstraction Stefano Garzarella
2020-05-15 15:21 ` [PATCH 2/3] virtio: add vhost-user-vsock base device Stefano Garzarella
2020-05-15 15:21 ` [PATCH 3/3] virtio: add vhost-user-vsock-pci device Stefano Garzarella
2020-05-21 14:35 ` [PATCH 0/3] virtio: add vhost-user-vsock device Stefan Hajnoczi
2020-05-21 15:07 ` Stefano Garzarella
2020-05-22 10:06 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200515152110.202917-1-sgarzare@redhat.com \
--to=sgarzare@redhat.com \
--cc=julio.montes@intel.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sebastien.boeuf@intel.com \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.