qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Tiwei Bie <tiwei.bie@intel.com>
Cc: jasowang@redhat.com, qemu-devel@nongnu.org,
	virtio-dev@lists.oasis-open.org
Subject: Re: [Qemu-devel] [PATCH 4/6] vhost-user: support registering external host notifiers
Date: Thu, 24 May 2018 19:15:24 +0300	[thread overview]
Message-ID: <20180524191330-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20180524160549.GA15321@debian>

On Fri, May 25, 2018 at 12:05:50AM +0800, Tiwei Bie wrote:
> On Thu, May 24, 2018 at 06:49:47PM +0300, Michael S. Tsirkin wrote:
> > On Thu, May 24, 2018 at 06:33:34PM +0800, Tiwei Bie wrote:
> > > This patch introduces VHOST_USER_PROTOCOL_F_HOST_NOTIFIER.
> > > With this feature negotiated, vhost-user backend can register
> > > memory region based host notifiers. And it will allow the guest
> > > driver in the VM to notify the hardware accelerator at the
> > > vhost-user backend directly.
> > > 
> > > Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
> > 
> > So maybe we don't need a new VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD?
> > Let's check VHOST_USER_PROTOCOL_F_HOST_NOTIFIER instead?
> 
> Yeah. I think it would be the best choice!
> 
> If this feature (HOST NOTIFIER) is negotiated, it means
> the QEMU is able to safely receive (the expected number
> of) file descriptors.
> 
> > 
> > > ---
> [...]
> > > +typedef struct VhostUserHostNotifier {
> > > +    MemoryRegion mr;
> > > +    void *addr;
> > > +    bool set;
> > > +} VhostUserHostNotifier;
> > >  
> > >  typedef struct VhostUserState {
> > >      CharBackend *chr;
> > > +    VhostUserHostNotifier notifier[VIRTIO_QUEUE_MAX];
> > >  } VhostUserState;
> > 
> > So this notifier is per-queue. Can't we maintain it in
> > NetVhostUserState then?
> 
> This notifier is per virtio-queue. But NetVhostUserState
> is per net-queue-pair.
> 
> And ideally, I think this structure shouldn't be visible
> to net/vhost-user, vhost-user-scsi, vhost-user-crypto, etc.
> 
> Best regards,
> Tiwei Bie

I wonder whether we can create a new per vq structure.

-- 
MST

  reply	other threads:[~2018-05-24 16:15 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-24 10:33 [Qemu-devel] [PATCH 0/6] Support host notifiers in vhost-user Tiwei Bie
2018-05-24 10:33 ` [Qemu-devel] [PATCH 1/6] vhost: allow backends to filter memory sections Tiwei Bie
2018-05-24 10:33 ` [Qemu-devel] [PATCH 2/6] vhost-user: allow slave to send fds via slave channel Tiwei Bie
2018-05-24 10:33 ` [Qemu-devel] [PATCH 3/6] vhost-user: introduce shared vhost-user state Tiwei Bie
2018-05-24 10:33 ` [Qemu-devel] [PATCH 4/6] vhost-user: support registering external host notifiers Tiwei Bie
2018-05-24 15:49   ` Michael S. Tsirkin
2018-05-24 16:05     ` Tiwei Bie
2018-05-24 16:15       ` Michael S. Tsirkin [this message]
2018-05-24 16:25         ` Tiwei Bie
2018-05-24 10:33 ` [Qemu-devel] [PATCH 5/6] libvhost-user: support host notifier Tiwei Bie
2018-05-24 10:33 ` [Qemu-devel] [PATCH 6/6] 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=20180524191330-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tiwei.bie@intel.com \
    --cc=virtio-dev@lists.oasis-open.org \
    /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).