From: Mike Travis <travis@sgi.com>
To: David Woodhouse <dwmw2@infradead.org>,
Chris Wright <chrisw@sous-sol.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>
Cc: Mike Habeck <habeck@sgi.com>, Dimitri Sivanich <sivanich@sgi.com>,
Derek Fults <dfults@sgi.com>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
stable@kernel.org, iommu@lists.linux-foundation.org,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/7] Intel pci: Add domain check in domain_remove_one_dev_info
Date: Sat, 28 May 2011 13:15:07 -0500 [thread overview]
Message-ID: <20110528181502.763327319@gulag1.americas.sgi.com> (raw)
In-Reply-To: <20110528181501.896092225@gulag1.americas.sgi.com>
[-- Attachment #1: fix-domain_remove_one_dev_info.patch --]
[-- Type: text/plain, Size: 1158 bytes --]
The comment in domain_remove_one_dev_info() states "No need
to compare PCI domain; it has to be the same". But for the
si_domain that isn't going to be true, as it consists of all the
PCI devices that are identity mapped thus multiple PCI domains can
be in si_domain. The code needs to validate the PCI domain too.
From: Mike Habeck <habeck@sgi.com>
Signed-off-by: Mike Habeck <habeck@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: stable@kernel.org
---
drivers/pci/intel-iommu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux.orig/drivers/pci/intel-iommu.c
+++ linux/drivers/pci/intel-iommu.c
@@ -3395,8 +3395,8 @@ static void domain_remove_one_dev_info(s
spin_lock_irqsave(&device_domain_lock, flags);
list_for_each_safe(entry, tmp, &domain->devices) {
info = list_entry(entry, struct device_domain_info, link);
- /* No need to compare PCI domain; it has to be the same */
- if (info->bus == pdev->bus->number &&
+ if (info->segment == pci_domain_nr(pdev->bus) &&
+ info->bus == pdev->bus->number &&
info->devfn == pdev->devfn) {
list_del(&info->link);
list_del(&info->global);
--
next prev parent reply other threads:[~2011-05-28 18:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 18:15 [PATCH 0/7] Intel pci: Fix various problems with Intel IOMMU code Mike Travis
2011-05-28 18:15 ` [PATCH 1/7] Intel pci: Check for identity mapping candidate using system dma mask Mike Travis
2011-05-28 18:15 ` [PATCH 2/7] Intel pci: Speed up processing of the identity_mapping function Mike Travis
2011-05-28 18:15 ` [PATCH 3/7] Intel pci: Dont cache iova above 32bit Mike Travis
2011-05-28 18:15 ` [PATCH 4/7] Intel pci: Use coherent DMA mask when requested Mike Travis
2011-05-28 18:15 ` [PATCH 5/7] Intel pci: Remove Host Bridge devices from identity mapping Mike Travis
2011-05-28 18:15 ` Mike Travis [this message]
2011-05-28 18:15 ` [PATCH 7/7] Intel pci: Provide option to enable 64-bit IOMMU pass through mode Mike Travis
2011-05-29 0:12 ` [PATCH 0/7] Intel pci: Fix various problems with Intel IOMMU code David Woodhouse
2011-05-30 20:57 ` Mike Travis
2011-06-03 14:03 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2011-05-27 1:32 Mike Travis
2011-05-27 1:32 ` [PATCH 6/7] Intel pci: Add domain check in domain_remove_one_dev_info Mike Travis
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=20110528181502.763327319@gulag1.americas.sgi.com \
--to=travis@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=chrisw@sous-sol.org \
--cc=dfults@sgi.com \
--cc=dwmw2@infradead.org \
--cc=habeck@sgi.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=sivanich@sgi.com \
--cc=stable@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
all inboxes | Powered by JetHome®