linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Raj, Ashok" <ashok.raj@intel.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
	iommu@lists.linux-foundation.org, Mario.Limonciello@dell.com,
	Michael Jamet <michael.jamet@intel.com>,
	Christian Kellner <ckellner@redhat.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Anthony Wong <anthony.wong@canonical.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	Lukas Wunner <lukas@wunner.de>,
	Jacob jun Pan <jacob.jun.pan@intel.com>,
	linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	linux-acpi@vger.kernel.org, David Woodhouse <dwmw2@infradead.org>,
	linux-kernel@vger.kernel.org, Ashok Raj <ashok.raj@intel.com>
Subject: Re: [PATCH 2/4] iommu/vt-d: Force IOMMU on for platform opt in hint
Date: Mon, 12 Nov 2018 11:51:21 -0800	[thread overview]
Message-ID: <20181112195121.GC5367@araj-mobl1.jf.intel.com> (raw)
In-Reply-To: <20181112110900.16cfee48@t450s.home>

On Mon, Nov 12, 2018 at 11:09:00AM -0700, Alex Williamson wrote:
> On Mon, 12 Nov 2018 19:06:26 +0300
> Mika Westerberg <mika.westerberg@linux.intel.com> wrote:
> 
> > From: Lu Baolu <baolu.lu@linux.intel.com>
> > 
> > Intel VT-d spec added a new DMA_CTRL_PLATFORM_OPT_IN_FLAG flag
> > in DMAR ACPI table for BIOS to report compliance about platform
> > initiated DMA restricted to RMRR ranges when transferring control
> > to the OS. The OS treats this as a hint that the IOMMU should be
> > enabled to prevent DMA attacks from possible malicious devices.
> 
> Does this in any way suggest that there are additional recommended uses
> cases from Intel for RMRRs?  My concern here is the incompatibility we
> have with RMRRs and device assignment as we currently cannot assign
> devices where the IOVA address space is encumbered by RMRR
> requirements.  Unfortunately RMRRs do not indicate any sort or
> lifespan, so firmware enabling an RMRR simply to support some boot-time
> DMA encumbers the device with that RMRR for the life of that boot,
> unless we have VT-d code that decides it knows better.  Thanks,

IMO any new platform that requires RMRR should be a bug. It was designed 
originally for some legacy keyboard emulation etc.

The best behavior is to continue to not allow devices with RMRR be direct assigned.

Technically ignoring RMRR's and continuing to assign those devices is risky.
The problem is IF BIOS/SMM initiates some IO in the RMRR range and it happens to be
mapped by the direct assigned GPA its going to be ugly failure.

  reply	other threads:[~2018-11-12 19:51 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 16:06 [PATCH 0/4] PCI / iommu / thunderbolt: IOMMU based DMA protection Mika Westerberg
2018-11-12 16:06 ` [PATCH 1/4] PCI / ACPI: Identify external PCI devices Mika Westerberg
2018-11-12 18:02   ` Lukas Wunner
2018-11-13 10:56     ` Lorenzo Pieralisi
2018-11-13 11:27       ` Mika Westerberg
2018-11-13 11:45         ` Lorenzo Pieralisi
2018-11-15 10:22           ` Mika Westerberg
2018-11-15 11:13             ` Lorenzo Pieralisi
2018-11-15 11:37               ` Mika Westerberg
2018-11-15 12:07                 ` Lukas Wunner
2018-11-15 12:16                   ` Mika Westerberg
2018-11-15 17:46                     ` Lorenzo Pieralisi
2018-11-15 17:58                       ` Yehezkel Bernat
2018-11-15 19:10                         ` Mika Westerberg
2018-11-15 19:27                           ` Lukas Wunner
2018-11-15 19:32                             ` Mika Westerberg
2018-11-16  9:18                           ` Christoph Hellwig
2018-11-16  9:32                             ` Mika Westerberg
2018-11-22 10:48                               ` Mika Westerberg
2018-11-22 10:59                                 ` Christoph Hellwig
2018-11-15 19:00                       ` Mika Westerberg
2018-11-15 19:33                         ` Mario.Limonciello
2018-11-16 10:57                           ` Lorenzo Pieralisi
2018-11-20 21:43                             ` Rafael J. Wysocki
2018-11-21 12:40                               ` Lorenzo Pieralisi
2018-11-16  7:01                         ` Mika Westerberg
2018-11-12 16:06 ` [PATCH 2/4] iommu/vt-d: Force IOMMU on for platform opt in hint Mika Westerberg
2018-11-12 17:49   ` Raj, Ashok
2018-11-12 18:09   ` Alex Williamson
2018-11-12 19:51     ` Raj, Ashok [this message]
2018-11-12 16:06 ` [PATCH 3/4] iommu/vt-d: Do not enable ATS for external devices Mika Westerberg
2018-11-12 17:53   ` Raj, Ashok
2018-11-12 16:06 ` [PATCH 4/4] thunderbolt: Export IOMMU based DMA protection support to userspace Mika Westerberg
2018-11-12 16:22   ` Mario.Limonciello
2018-11-13 10:36     ` Mika Westerberg
2018-11-12 16:59   ` Yehezkel Bernat
2018-11-13 10:55     ` Mika Westerberg
2018-11-13 11:13       ` Yehezkel Bernat
2018-11-13 11:40         ` Mika Westerberg
2018-11-13 14:42           ` Yehezkel Bernat
     [not found]             ` <20181113152038.GD2500@lahna.fi.intel.com>
2018-11-13 15:38               ` Yehezkel Bernat
2018-11-13 16:12                 ` Mika Westerberg
2018-11-12 18:12 ` [PATCH 0/4] PCI / iommu / thunderbolt: IOMMU based DMA protection Lukas Wunner
2018-11-12 19:04   ` Yehezkel Bernat
2018-11-13 11:13   ` Mika Westerberg
2018-11-13  8:54 ` Joerg Roedel
2018-11-13 11:32   ` Mika Westerberg

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=20181112195121.GC5367@araj-mobl1.jf.intel.com \
    --to=ashok.raj@intel.com \
    --cc=Mario.Limonciello@dell.com \
    --cc=YehezkelShB@gmail.com \
    --cc=alex.williamson@redhat.com \
    --cc=andreas.noever@gmail.com \
    --cc=anthony.wong@canonical.com \
    --cc=bhelgaas@google.com \
    --cc=ckellner@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=michael.jamet@intel.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /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).