From: Tiwei Bie <tiwei.bie@intel.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
peterx@redhat.com, qemu-devel@nongnu.org, dan.daly@intel.com,
cunming.liang@intel.com, zhihong.wang@intel.com
Subject: Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature
Date: Thu, 12 Apr 2018 09:44:39 +0800 [thread overview]
Message-ID: <20180412014439.d7uzqukwdejtmofh@debian> (raw)
In-Reply-To: <20180411200127-mutt-send-email-mst@kernel.org>
On Wed, Apr 11, 2018 at 08:37:17PM +0300, Michael S. Tsirkin wrote:
> On Wed, Apr 11, 2018 at 04:38:53PM +0800, Tiwei Bie wrote:
> > On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote:
> > > On 2018年04月11日 15:20, Tiwei Bie wrote:
> > > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB
> > > > feature for vhost-user. By default, vhost-user backend needs
> > > > to query the IOTLBs from QEMU after meeting unknown IOVAs.
> > > > With this protocol feature negotiated, QEMU will provide all
> > > > the IOTLBs to vhost-user backend without waiting for the
> > > > queries from backend. This is helpful when using a hardware
> > > > accelerator which is not able to handle unknown IOVAs at the
> > > > vhost-user backend.
> > > >
> > > > Signed-off-by: Tiwei Bie<tiwei.bie@intel.com>
> > > > ---
> > > > The idea of this patch is to let QEMU push all the IOTLBs
> > > > to vhost-user backend without waiting for the queries from
> > > > the backend. Because hardware accelerator at the vhost-user
> > > > backend may not be able to handle unknown IOVAs.
> > > >
> > > > This is just a RFC for now. It seems that, it doesn't work
> > > > as expected when guest is using kernel driver (To handle
> > > > this case, it seems that some RAM regions' events also need
> > > > to be listened). Any comments would be appreciated! Thanks!
> > >
> > > Interesting, a quick question is why this is needed? Can we just use exist
> > > IOTLB update message?
> >
> > Yeah, we are still using the existing IOTLB update messages
> > to send the IOTLB messages to backend. The only difference
> > is that, QEMU won't wait for the queries before sending the
> > IOTLB update messages.
>
> So I have a concern with that, in that without any flow
> control the socket buffer used by vhost-user might become
> full.
Each IOTLB update message needs a reply. So I think it
won't happen.
Best regards,
Tiwei Bie
>
> We don't currently expect that.
>
>
> Again, my understanding is that the biggest benefit from use of a
> hardware accelerator is when notifications can be passed-through to the
> guest.
>
> And since that involves VFIO, and since VFIO already needs to support
> all kinds of IOMMUs, one wonders whether one can just pass that directly
> to the VFIO instead of shipping it to vhost-user.
>
>
> > >
> > > It looks to me at least kernel does not need this.
> >
> > Something similar in kernel vhost is that, for kernel vhost,
> > QEMU needs to push the IOTLBs of some ring addrs to kernel
> > vhost backend without waiting for the queries.
> >
> > Best regards,
> > Tiwei Bie
>
> That's really to work around a bug in kernel, we keep this around since
> we want to support old kernels.
>
> > >
> > > Thanks
next prev parent reply other threads:[~2018-04-12 1:46 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 7:20 [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature Tiwei Bie
2018-04-11 8:00 ` Peter Xu
2018-04-11 8:25 ` Tiwei Bie
2018-04-11 8:37 ` Peter Xu
2018-04-11 8:55 ` Tiwei Bie
2018-04-11 9:16 ` Peter Xu
2018-04-11 9:25 ` Tiwei Bie
2018-04-11 8:01 ` Jason Wang
2018-04-11 8:38 ` Tiwei Bie
2018-04-11 13:41 ` Jason Wang
2018-04-11 17:00 ` Michael S. Tsirkin
2018-04-12 3:23 ` Jason Wang
2018-04-12 3:37 ` Michael S. Tsirkin
2018-04-12 3:56 ` Jason Wang
2018-04-11 17:37 ` Michael S. Tsirkin
2018-04-12 1:44 ` Tiwei Bie [this message]
2018-04-12 7:38 ` Jason Wang
2018-04-12 8:10 ` Tiwei Bie
2018-04-12 9:40 ` Jason Wang
2018-04-11 13:22 ` Michael S. Tsirkin
2018-04-11 13:42 ` Jason Wang
2018-04-12 1:10 ` Tiwei Bie
2018-04-12 1:29 ` Michael S. Tsirkin
2018-04-12 1:39 ` Tiwei Bie
2018-04-12 1:57 ` Michael S. Tsirkin
2018-04-12 2:35 ` Tiwei Bie
2018-04-12 3:20 ` Michael S. Tsirkin
2018-04-12 3:35 ` Michael S. Tsirkin
2018-04-12 3:43 ` Jason Wang
2018-04-12 4:19 ` Michael S. Tsirkin
2018-04-12 3:37 ` Jason Wang
2018-04-12 3:41 ` Michael S. Tsirkin
2018-04-12 7:24 ` Jason Wang
2018-04-16 7:47 ` Stefan Hajnoczi
2018-04-17 2:14 ` Jason Wang
2018-04-17 2:35 ` 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=20180412014439.d7uzqukwdejtmofh@debian \
--to=tiwei.bie@intel.com \
--cc=cunming.liang@intel.com \
--cc=dan.daly@intel.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=peterx@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).