All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Arnaud POULIQUEN <arnaud.pouliquen@st.com>,
	Alexander Lobakin <alobakin@pm.me>, Amit Shah <amit@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Suman Anna <s-anna@ti.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Ohad Ben-Cohen <ohad@wizery.com>,
	Jason Wang <jasowang@redhat.com>,
	"virtualization@lists.linux-foundation.org" 
	<virtualization@lists.linux-foundation.org>,
	"linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial
Date: Wed, 18 Nov 2020 05:16:15 -0500	[thread overview]
Message-ID: <20201118042039-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20201117140230.GA30567@infradead.org>

On Tue, Nov 17, 2020 at 02:02:30PM +0000, Christoph Hellwig wrote:
> On Tue, Nov 17, 2020 at 03:00:32PM +0100, Arnaud POULIQUEN wrote:
> > The dma_declare_coherent_memory allows to associate vdev0buffer memory region
> > to the remoteproc virtio device (vdev parent). This region is used to allocated
> > the rpmsg buffers.
> > The memory for the rpmsg buffer is allocated by the rpmsg_virtio device in
> > rpmsg_virtio_bus[1]. The size depends on the total size needed for the rpmsg
> > buffers.
> > 
> > The vrings are allocated directly by the remoteproc device.
> 
> Weird.  I thought virtio was pretty strict in not allowing diret DMA
> API usage in drivers to support the legacy no-mapping case.

Well remoteproc is weird in that it's use of DMA API precedes
standartization efforts, and it was never standardized in the virtio
spec ..

> Either way, the point stands:  if you want these magic buffers handed
> out to specific rpmsg instances I think not having to detour through the
> DMA API is going to make everyones life easier.


WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>, Amit Shah <amit@kernel.org>,
	Alexander Lobakin <alobakin@pm.me>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Arnaud POULIQUEN <arnaud.pouliquen@st.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	"linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>, Suman Anna <s-anna@ti.com>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial
Date: Wed, 18 Nov 2020 05:16:15 -0500	[thread overview]
Message-ID: <20201118042039-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20201117140230.GA30567@infradead.org>

On Tue, Nov 17, 2020 at 02:02:30PM +0000, Christoph Hellwig wrote:
> On Tue, Nov 17, 2020 at 03:00:32PM +0100, Arnaud POULIQUEN wrote:
> > The dma_declare_coherent_memory allows to associate vdev0buffer memory region
> > to the remoteproc virtio device (vdev parent). This region is used to allocated
> > the rpmsg buffers.
> > The memory for the rpmsg buffer is allocated by the rpmsg_virtio device in
> > rpmsg_virtio_bus[1]. The size depends on the total size needed for the rpmsg
> > buffers.
> > 
> > The vrings are allocated directly by the remoteproc device.
> 
> Weird.  I thought virtio was pretty strict in not allowing diret DMA
> API usage in drivers to support the legacy no-mapping case.

Well remoteproc is weird in that it's use of DMA API precedes
standartization efforts, and it was never standardized in the virtio
spec ..

> Either way, the point stands:  if you want these magic buffers handed
> out to specific rpmsg instances I think not having to detour through the
> DMA API is going to make everyones life easier.

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2020-11-18 10:16 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 15:31 [PATCH virtio] virtio: virtio_console: fix DMA memory allocation for rproc serial Alexander Lobakin
2020-11-04 18:21 ` Mathieu Poirier
2020-11-05  3:10 ` Jason Wang
2020-11-05  3:10   ` Jason Wang
2020-11-05 12:22   ` Alexander Lobakin
2020-11-09  6:04     ` Jason Wang
2020-11-09  6:04       ` Jason Wang
2020-11-16  9:19 ` Christoph Hellwig
2020-11-16  9:19   ` Christoph Hellwig
2020-11-16  9:51   ` Michael S. Tsirkin
2020-11-16  9:51     ` Michael S. Tsirkin
2020-11-16 16:27     ` Christoph Hellwig
2020-11-16 16:27       ` Christoph Hellwig
2020-11-16 16:43       ` Alexander Lobakin
2020-11-16 10:46   ` Arnaud POULIQUEN
2020-11-16 10:46     ` Arnaud POULIQUEN
2020-11-16 16:28     ` Christoph Hellwig
2020-11-16 16:28       ` Christoph Hellwig
2020-11-16 16:39       ` Christoph Hellwig
2020-11-16 16:39         ` Christoph Hellwig
2020-11-17 14:00         ` Arnaud POULIQUEN
2020-11-17 14:00           ` Arnaud POULIQUEN
2020-11-17 14:02           ` Christoph Hellwig
2020-11-17 14:02             ` Christoph Hellwig
2020-11-18 10:16             ` Michael S. Tsirkin [this message]
2020-11-18 10:16               ` Michael S. Tsirkin
2020-11-16 12:25   ` Michael S. Tsirkin
2020-11-16 12:25     ` Michael S. Tsirkin
2020-11-16 13:07     ` Alexander Lobakin
2020-11-16 13:12       ` Michael S. Tsirkin
2020-11-16 13:12         ` Michael S. Tsirkin
2020-11-16 16:30       ` Christoph Hellwig
2020-11-16 16:30         ` Christoph Hellwig
2020-12-28 18:54 ` patchwork-bot+linux-remoteproc

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=20201118042039-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alobakin@pm.me \
    --cc=amit@kernel.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=ohad@wizery.com \
    --cc=s-anna@ti.com \
    --cc=stable@vger.kernel.org \
    --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 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.