From: "Woodhouse, David" <david.woodhouse@intel.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: Patch "iommu/vt-d: Allow RMRR on graphics devices too" has been added to the 3.19-stable tree
Date: Sat, 2 May 2015 18:24:22 +0000 [thread overview]
Message-ID: <1430591059.14112.2.camel@intel.com> (raw)
In-Reply-To: <1430589554180140@kroah.com>
[-- Attachment #1.1: Type: text/plain, Size: 916 bytes --]
On Sat, 2015-05-02 at 19:59 +0200, gregkh@linuxfoundation.org wrote:
> This is a note to let you know that I've just added the patch titled
>
> iommu/vt-d: Allow RMRR on graphics devices too
>
> to the 3.19-stable tree which can be found at:
> http://www.kernel.org/git/?p=linux/kernel/git/stable/stable
> -queue.git;a=summary
>
> The filename of the patch is:
> iommu-vt-d-allow-rmrr-on-graphics-devices-too.patch
> and it can be found in the queue-3.19 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable
> tree,
> please let <stable@vger.kernel.org> know about it.
Actually, please wait. You're going to want this too...
--
Sent with Evolution's ActiveSync support.
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
[-- Attachment #1.2: Attached message - Re: Intel-iommu panic on kernel v4.1-rc1 --]
[-- Type: message/rfc822, Size: 8320 bytes --]
[-- Attachment #1.2.1.1: Type: text/plain, Size: 2214 bytes --]
On Mon, 2015-04-27 at 15:27 +0800, sl4ever@gmail.com wrote:
> commit 18436afdc11a00ac881990b454cfb2eae81d6003 iommu/vt-d: Allow
> RMRR on graphics devices too
>
> cause kernel panic with Z77+vt-d and kernel parameters:
> intel_iommu=igfx_off iommu=pt
> the panic path is:
> dev_prepare_static_identity_mapping()
> domain_add_dev_info()
> dmar_insert_dev_info()
> find_domain()
> info = dev->archdata.iommu;
> if (info)
> -> return info->domain;
>
> igfx_off cause <igfx@0:2.0>.archdata.iommu assigned to
> DUMMY_DEVICE_DOMAIN_INFO.
> Above patch cause iommu_should_identity_map() return 1, and attempt
> to setup identity mapping for igfx.
Can you try this please?
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 68d43be..2ffe589 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -696,6 +696,11 @@ static inline struct context_entry *iommu_context_addr(struct intel_iommu *iommu
return &context[devfn];
}
+static int iommu_dummy(struct device *dev)
+{
+ return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
+}
+
static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn)
{
struct dmar_drhd_unit *drhd = NULL;
@@ -705,6 +710,9 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf
u16 segment = 0;
int i;
+ if (iommu_dummy(dev))
+ return NULL;
+
if (dev_is_pci(dev)) {
pdev = to_pci_dev(dev);
segment = pci_domain_nr(pdev->bus);
@@ -2969,11 +2977,6 @@ static inline struct dmar_domain *get_valid_domain_for_dev(struct device *dev)
return __get_valid_domain_for_dev(dev);
}
-static int iommu_dummy(struct device *dev)
-{
- return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
-}
-
/* Check if the dev needs to go through non-identity map and unmap process.*/
static int iommu_no_mapping(struct device *dev)
{
--
David Woodhouse Open Source Technology Centre
David.Woodhouse@intel.com Intel Corporation
[-- Attachment #1.2.1.2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3437 bytes --]
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3437 bytes --]
next prev parent reply other threads:[~2015-05-02 18:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 17:59 Patch "iommu/vt-d: Allow RMRR on graphics devices too" has been added to the 3.19-stable tree gregkh
2015-05-02 18:24 ` Woodhouse, David [this message]
2015-05-02 18:46 ` gregkh
2015-06-02 6:31 ` gregkh
2015-06-02 7:08 ` Woodhouse, David
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=1430591059.14112.2.camel@intel.com \
--to=david.woodhouse@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=stable@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 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.