linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	David Woodhouse <dwmw2@infradead.org>,
	Vinod Koul <vinod.koul@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-pci@vger.kernel.org, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pci, dmar: Update dmar units devices list during hotplug
Date: Thu, 19 May 2011 16:15:08 -0600	[thread overview]
Message-ID: <1305843308.3100.10.camel@x201> (raw)
In-Reply-To: <4DC6E569.1060808@kernel.org>

On Sun, 2011-05-08 at 11:48 -0700, Yinghai Lu wrote:
> When do pci remove/rescan on system that have more iommus, got
> 
> [  894.089745] Set context mapping for c4:00.0
> [  894.110890] mpt2sas3: Allocated physical memory: size(4293 kB)
> [  894.112556] mpt2sas3: Current Controller Queue Depth(1883), Max Controller Queue Depth(2144)
> [  894.127278] mpt2sas3: Scatter Gather Elements per IO(128)
> [  894.361295] DRHD: handling fault status reg 2
> [  894.364053] DMAR:[DMA Read] Request device [c4:00.0] fault addr fffbe000
> [  894.364056] DMAR:[fault reason 02] Present bit in context entry is cl
> 
> it turns out when remove/rescan, pci dev will be freed and will get another new dev.
> but drhd units still keep old one... so dmar_find_matched_drhd_unit will
> return wrong drhd and iommu for the device that is not on first iommu.
> 
> So need to update devices in drhd_units during pci remove/rescan.
> 
> Could save domain/bus/device/function aside in the list and according that info
> restore new dev to drhd_units later.
> Then dmar_find_matched_drdh_unit and device_to_iommu could return right drhd and iommu.

I think I'd vote for saving some kind of representation of the bus
hierarchy, we probably don't need to list every possible individual
device.  Leaving a broken pointer around to be matched up and restored
later just seems like a continuation of an idea that was bad to begin
with.  Thanks,

Alex


  reply	other threads:[~2011-05-19 22:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-08 18:48 [PATCH] pci, dmar: Update dmar units devices list during hotplug Yinghai Lu
2011-05-19 22:15 ` Alex Williamson [this message]
2011-05-24 10:58   ` David Woodhouse
2011-05-24 17:42     ` Alex Williamson
2011-05-24 18:11       ` Yinghai Lu
2011-05-24 19:34       ` Yinghai Lu
2011-05-24 20:07         ` Alex Williamson
2011-05-24 20:24           ` Yinghai Lu
2011-05-24 20:34             ` Alex Williamson
2011-05-24 21:45           ` Yinghai Lu
2011-05-24 22:38             ` Alex Williamson
2011-05-24 23:02               ` Yinghai Lu
2011-05-25  5:42                 ` Yinghai Lu
2011-05-25  5:45                 ` Yinghai Lu
2011-05-25 12:43                   ` Alex Williamson
2011-05-28 22:11                     ` David Woodhouse

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=1305843308.3100.10.camel@x201 \
    --to=alex.williamson@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    --cc=yinghai@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).