virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Linus Walleij <linus.walleij@linaro.org>,
	"virtualization@lists.linux-foundation.org"
	<virtualization@lists.linux-foundation.org>,
	Amit Shah <amit.shah@redhat.com>
Subject: Re: Question regarding Virtio Console and Remoteproc
Date: Mon, 04 Jun 2012 16:10:05 +1000	[thread overview]
Message-ID: <1338790205.7150.66.camel@pasglop> (raw)
In-Reply-To: <87bokz1y8a.fsf@rustcorp.com.au>

On Mon, 2012-06-04 at 14:15 +0930, Rusty Russell wrote:
> > Something along those lines is also needed for remote processors
> which
> > access memory via an IOMMU (e.g. OMAP4's M3 and DSP).
> > 
> > Allocating the memory via the DMA API will seamlessly configure the
> > relevant IOMMU as needed, and will make the buffers accessible to
> the
> > remote processors.
> > 
> > Thanks,
> > Ohad.
> 
> It seems quite sensible.  The formal definition in the spec would be
> good.  In particular, defining DMA_MEM in a generic (non-Linux) way
> will be interesting.

I think we could do a bit better...

We need to dbl check if all the archs we care about use the dma_ops
abstraction, but if they do, then we can remove the conditional and just
use the dma_* functions everywhere, and have virtio-pci itself tweak the
dma_ops pointer in struct device.

The default would be to swap the normal PCI one that the arch code has
put there with some "null" ops to match existing virtio, and we could
then use a negociated capability to avoid that behaviour.

It's important to keep in mind that for KVM, in most cases we want to
keep the bypass of the iommu, simply because it's always going to be
faster than emulating one & mapping/unmapping things to/from it.


Cheers,
Ben.

  reply	other threads:[~2012-06-04  6:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-01  7:31 Question regarding Virtio Console and Remoteproc Sjur BRENDELAND
2012-06-01  7:51 ` Ohad Ben-Cohen
2012-06-04  4:45   ` Rusty Russell
2012-06-04  6:10     ` Benjamin Herrenschmidt [this message]
2012-06-05  9:43 ` Amit Shah

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=1338790205.7150.66.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=amit.shah@redhat.com \
    --cc=arnd@arndb.de \
    --cc=linus.walleij@linaro.org \
    --cc=rusty@rustcorp.com.au \
    --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).