From: Tiwei Bie <tiwei.bie@intel.com>
To: mst@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org
Cc: dan.daly@intel.com, cunming.liang@intel.com,
zhihong.wang@intel.com, tiwei.bie@intel.com
Subject: [Qemu-devel] [PATCH 0/2] Support host notifier in libvhost-user and vhost-user-bridge
Date: Thu, 26 Apr 2018 18:45:51 +0800 [thread overview]
Message-ID: <20180426104553.31034-1-tiwei.bie@intel.com> (raw)
This patch set extends libvhost-user and vhost-user-bridge
to support the host notifier [1] feature in vhost user.
A new API is added for libvhost-user to support setting
host notifier for each queue:
/**
* vu_set_queue_host_notifier:
* @dev: a VuDev context
* @vq: a VuVirtq queue
* @fd: a file descriptor
* @size: host page size
* @offset: notifier offset in @fd file
*
* Set queue's host notifier. This function may be called several
* times for the same queue. If called with -1 @fd, the notifier
* is removed.
*/
bool vu_set_queue_host_notifier(VuDev *dev, VuVirtq *vq, int fd,
int size, int offset);
A new option (-H) is added for vhost-user-bridge to enable
the host notifier. It's pretty simple to test:
# Launch vhost-user-bridge with host notifier enabled
$ make tests/vhost-user-bridge
$ ./tests/vhost-user-bridge -H
# Launch QEMU on another terminal
$ ./x86_64-softmmu/qemu-system-x86_64 \
-smp 4 -m 1024M -cpu host -enable-kvm \
-hda "$DISK" \
-object memory-backend-file,id=mem,size=1024M,mem-path=/dev/shm,share=on \
-numa node,memdev=mem -mem-prealloc \
-chardev socket,id=char0,path=/tmp/vubr.sock \
-netdev type=vhost-user,id=net0,chardev=char0 \
-device virtio-net-pci,netdev=net0,page-per-vq=on
More details can be found from the patches.
Thanks!
[1] http://lists.nongnu.org/archive/html/qemu-devel/2018-04/msg01779.html
Tiwei Bie (2):
libvhost-user: support host notifier
vhost-user-bridge: support host notifier
contrib/libvhost-user/libvhost-user.c | 76 ++++++++++++++++++++++++---
contrib/libvhost-user/libvhost-user.h | 31 +++++++++++
tests/vhost-user-bridge.c | 98 +++++++++++++++++++++++++++++++++--
3 files changed, 194 insertions(+), 11 deletions(-)
--
2.11.0
next reply other threads:[~2018-04-26 10:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-26 10:45 Tiwei Bie [this message]
2018-04-26 10:45 ` [Qemu-devel] [PATCH 1/2] libvhost-user: support host notifier Tiwei Bie
2018-04-26 10:45 ` [Qemu-devel] [PATCH 2/2] vhost-user-bridge: " Tiwei Bie
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=20180426104553.31034-1-tiwei.bie@intel.com \
--to=tiwei.bie@intel.com \
--cc=cunming.liang@intel.com \
--cc=dan.daly@intel.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhihong.wang@intel.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 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).