linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Joerg Roedel <Joerg.Roedel@amd.com>
Cc: iommu@lists.linux-foundation.org, dwmw2@infradead.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Include MSI susceptibility to DMA in creating iommu groups
Date: Fri, 18 Nov 2011 07:56:30 -0700	[thread overview]
Message-ID: <1321628190.26410.63.camel@bling.home> (raw)
In-Reply-To: <20111118104651.GJ5627@amd.com>

On Fri, 2011-11-18 at 11:46 +0100, Joerg Roedel wrote:
> On Thu, Nov 17, 2011 at 10:09:26AM -0700, Alex Williamson wrote:
> > IOMMU drivers should account for the platform's susceptibility to
> > DMA triggered MSI interrupts in creating IOMMU groups.  Skip
> > devices when the IOMMU can't isolate MSI from DMA, but allow
> > an iommu=group_unsafe_msi option for opt-in.  This removes the
> > leap in logic for users that IOMMU_CAP_INTR_REMAP is required for
> > interrupt security when they may be running on a non-x86 platform
> > that does not have this dependency.
> 
> I actually don't see the point in this. The iommu-group thing is to tell
> user-space what devices the IOMMU can safely distinguish between. The
> absence of interrupt-remapping changes nothing to that grouping. So why
> remove it when interrupt remapping is not enabled?

As you say, the interface is to tell userspace what devices the IOMMU
can safely distinguish between.  On x86, the IOMMU cannot distinguish
DMA to the interrupt region between devices without interrupt remapping.
Therefore, to only expose devices we can safely distinguish between, we
shouldn't expose any devices by default if we don't provide this
isolation.  The interrupt remapping capability of the IOMMU isn't
exposed to userspace, nor should userspace need to make the leap in
understanding how MSIs are generated on a specific platform and whether
interrupt remapping is required to provide isolation.  Thanks,

Alex


  reply	other threads:[~2011-11-18 14:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17 17:09 [PATCH] iommu: Include MSI susceptibility to DMA in creating iommu groups Alex Williamson
2011-11-18  4:37 ` Kai Huang
2011-11-18  5:40   ` Alex Williamson
2011-11-18  6:20     ` Kai Huang
2011-11-18 10:46 ` Joerg Roedel
2011-11-18 14:56   ` Alex Williamson [this message]
2011-11-18 15:27     ` Joerg Roedel
2011-11-18 16:32       ` Alex Williamson
2011-11-20 12:00         ` Joerg Roedel
2011-11-21  4:39           ` Kai Huang
2011-11-21 23:35           ` Chris Wright
2011-11-23 10:56             ` Joerg Roedel
2011-11-23 20:12               ` Chris Wright
2011-11-23 18:37             ` Alex Williamson

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=1321628190.26410.63.camel@bling.home \
    --to=alex.williamson@redhat.com \
    --cc=Joerg.Roedel@amd.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@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;
as well as URLs for NNTP newsgroup(s).