From: "Michael S. Tsirkin" <mst@redhat.com>
To: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Cc: kvm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
virtualization@lists.linux-foundation.org,
sound-open-firmware@alsa-project.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Jason Wang <jasowang@redhat.com>,
Ohad Ben-Cohen <ohad@wizery.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Vincent Whitchurch <vincent.whitchurch@axis.com>
Subject: Re: [PATCH v4 4/4] vhost: add an RPMsg API
Date: Tue, 25 Aug 2020 09:53:24 -0400 [thread overview]
Message-ID: <20200825095148-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200825134109.GA9822@ubuntu>
On Tue, Aug 25, 2020 at 03:41:10PM +0200, Guennadi Liakhovetski wrote:
> Hi Michael,
>
> ...back from holidays and still unsure what your preferred solution
> for the message layout would be:
>
> On Wed, Aug 12, 2020 at 02:32:43PM +0200, Guennadi Liakhovetski wrote:
> > Hi Michael,
> >
> > Thanks for a review.
> >
> > On Mon, Aug 10, 2020 at 09:44:15AM -0400, Michael S. Tsirkin wrote:
> > > On Tue, Aug 04, 2020 at 05:19:17PM +0200, Guennadi Liakhovetski wrote:
>
> [snip]
>
> > > > > > +static int vhost_rpmsg_get_single(struct vhost_virtqueue *vq)
> > > > > > +{
> > > > > > + struct vhost_rpmsg *vr = container_of(vq->dev, struct vhost_rpmsg, dev);
> > > > > > + unsigned int out, in;
> > > > > > + int head = vhost_get_vq_desc(vq, vq->iov, ARRAY_SIZE(vq->iov), &out, &in,
> > > > > > + NULL, NULL);
> > > > > > + if (head < 0) {
> > > > > > + vq_err(vq, "%s(): error %d getting buffer\n",
> > > > > > + __func__, head);
> > > > > > + return head;
> > > > > > + }
> > > > > > +
> > > > > > + /* Nothing new? */
> > > > > > + if (head == vq->num)
> > > > > > + return head;
> > > > > > +
> > > > > > + if (vq == &vr->vq[VIRTIO_RPMSG_RESPONSE] && (out || in != 1)) {
> > > > >
> > > > > This in != 1 looks like a dependency on a specific message layout.
> > > > > virtio spec says to avoid these. Using iov iters it's not too hard to do
> > > > > ...
> > > >
> > > > This is an RPMsg VirtIO implementation, and it has to match the virtio_rpmsg_bus.c
> > > > driver, and that one has specific VirtIO queue and message usage patterns.
> > >
> > > That could be fine for legacy virtio, but now you are claiming support
> > > for virtio 1, so need to fix these assumptions in the device.
> >
> > I can just deop these checks without changing anything else, that still would work.
> > I could also make this work with "any" layout - either ignoring any left-over
> > buffers or maybe even getting them one by one. But I wouldn't even be able to test
> > those modes without modifying / breaking the current virtio-rpmsg driver. What's
> > the preferred solution?
>
> Could you elaborate a bit please?
>
> Thanks
> Guennadi
I'd prefer it that we make it work with any layout.
For testing, there was a hack for virtio ring which
split up descriptors at a random boundary.
I'll try to locate it and post, sounds like something
we might want upstream for debugging.
--
MST
next prev parent reply other threads:[~2020-08-25 13:53 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-22 15:09 [PATCH v4 0/4] Add a vhost RPMsg API Guennadi Liakhovetski
2020-07-22 15:09 ` [PATCH v4 1/4] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl Guennadi Liakhovetski
2020-07-23 8:34 ` Stefano Garzarella
2020-07-22 15:09 ` [PATCH v4 2/4] rpmsg: move common structures and defines to headers Guennadi Liakhovetski
2020-08-11 17:51 ` Mathieu Poirier
2020-07-22 15:09 ` [PATCH v4 3/4] rpmsg: update documentation Guennadi Liakhovetski
2020-07-22 15:09 ` [PATCH v4 4/4] vhost: add an RPMsg API Guennadi Liakhovetski
2020-08-04 14:27 ` Michael S. Tsirkin
2020-08-04 15:19 ` Guennadi Liakhovetski
2020-08-10 13:44 ` Michael S. Tsirkin
2020-08-12 12:32 ` Guennadi Liakhovetski
2020-08-25 13:41 ` Guennadi Liakhovetski
2020-08-25 13:53 ` Michael S. Tsirkin [this message]
2020-07-30 16:08 ` [PATCH v4 0/4] Add a vhost " Michael S. Tsirkin
2020-07-31 5:47 ` Guennadi Liakhovetski
2020-08-03 13:25 ` Mathieu Poirier
2020-08-03 20:46 ` Michael S. Tsirkin
2020-08-04 13:37 ` Mathieu Poirier
2020-08-04 14:07 ` Michael S. Tsirkin
2020-08-04 19:30 ` Mathieu Poirier
2020-08-05 11:34 ` Michael S. Tsirkin
2020-08-04 12:26 ` Michael S. Tsirkin
2020-08-04 13:19 ` Guennadi Liakhovetski
2020-08-04 14:10 ` Michael S. Tsirkin
2020-08-04 14:46 ` Guennadi Liakhovetski
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=20200825095148-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=bjorn.andersson@linaro.org \
--cc=guennadi.liakhovetski@linux.intel.com \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=ohad@wizery.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sound-open-firmware@alsa-project.org \
--cc=vincent.whitchurch@axis.com \
--cc=virtualization@lists.linux-foundation.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).