Linux IOMMU Development
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: David Woodhouse <dwmw2@infradead.org>
Cc: Daniel Vetter <daniel@ffwll.ch>,
	Alex Williamson <alex.williamson@redhat.com>,
	iommu@lists.linux-foundation.org, chegu_vinod@hp.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v2] iommu/intel: Exclude devices using RMRRs from IOMMU API domains
Date: Tue, 17 Jun 2014 10:14:13 +0200	[thread overview]
Message-ID: <20140617081413.GC5821@phenom.ffwll.local> (raw)
In-Reply-To: <1402989691.7595.110.camel@i7.infradead.org>

On Tue, Jun 17, 2014 at 08:21:31AM +0100, David Woodhouse wrote:
> On Tue, 2014-06-17 at 09:15 +0200, Daniel Vetter wrote:
> > We've always been struggling with stolen handling, and we've' always
> > been struggling with vt-d stuff. Also pass-through seems to be a major
> > pain (I've never tried myself). Given all that I'm voting for keeping
> > the RMRR and everything else as much like for the normal case since I
> > have no idea what exactly must be remapped and what's optional. The
> > gpu is definitely keeping a lot of it's own private stuff in various
> > chunks of stolen memory.
> 
> Keeping it like the normal case is distinctly non-trivial. I raised that
> possibility, and it's hard. You have to make the guests' address maps
> match the host, in that the E820-reserved regions used for DMA and
> listed in RMRRs must also appear as reserved for the guests.
> 
> That was bad enough when it was just 'BIOS might be doing something evil
> behind our back' and we didn't need to let the guest *access* those
> pages. But in the i915 case we do actually map and access the stolen
> region too, so the task is even harder. We'd need to be able to decide
> when those regions should actually be mapped into the guest.

Hm, we check some registers (which iirc are set up by the bios) for stolen
to detect the address and size. And if that's there we use it. So not sure
what to do really.

For my understanding: The tricky part with RMRR isn't the mapping, but
making sure that the gues memory layout has the corresponding range
properly marked as reserved in the e820 map (i.e. like on real machines)?
I guess we wouldn't need to care about the actual memory since the host
linux can't access it either (without i915.ko).
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-06-17  8:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 16:30 [PATCH v2] iommu/intel: Exclude devices using RMRRs from IOMMU API domains Alex Williamson
     [not found] ` <20140613162901.4550.94476.stgit-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2014-06-17  5:35   ` Alex Williamson
2014-06-17  7:04     ` David Woodhouse
2014-06-17  7:15       ` Daniel Vetter
2014-06-17  7:21         ` David Woodhouse
2014-06-17  8:14           ` Daniel Vetter [this message]
2014-06-17 12:22       ` Alex Williamson
2014-06-17 12:41         ` David Woodhouse
2014-06-17 13:16           ` Alex Williamson
2014-06-17 13:44             ` Daniel Vetter
2014-06-17 14:15               ` Alex Williamson
2014-06-17 16:45                 ` Daniel Vetter
2014-06-17 16:59                   ` Alex Williamson
2014-06-17 17:53                     ` Daniel Vetter
2014-06-18 21:48               ` Alex Williamson
2014-06-19  1:47                 ` Alex Williamson
2014-06-19  6:10                   ` Daniel Vetter
2014-06-19 14:29                     ` Alex Williamson
2014-06-19 14:41                       ` Daniel Vetter

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=20140617081413.GC5821@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alex.williamson@redhat.com \
    --cc=chegu_vinod@hp.com \
    --cc=dwmw2@infradead.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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