Re: [PATCH] pci, dmar: Update dmar units devices list duringhotplug

From: Alex Williamson
Date: Tue May 24 2011 - 16:36:11 EST


On Tue, 2011-05-24 at 13:24 -0700, Yinghai Lu wrote:
> On 05/24/2011 01:07 PM, Alex Williamson wrote:
> > On Tue, 2011-05-24 at 12:34 -0700, Yinghai Lu wrote:
> >> On 05/24/2011 10:42 AM, Alex Williamson wrote:
> >>> On Tue, 2011-05-24 at 11:58 +0100, David Woodhouse wrote:
> >>>> On Thu, 2011-05-19 at 16:15 -0600, Alex Williamson wrote:
> >>>>> 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,
> >>>>
> >>>> I agree. We should just process the original ATSR information in
> >>>> dmar_find_matched_drhd_unit(), rather than comparing with a list of
> >>>> possibly stale pointers.
> >>>>
> >>>> I don't quite understand why the list of PCI devices was *ever* done
> >>>> like that.
> >>>
> >>> Yinghai,
> >>>
> >>> I thought I might be running into something similar so spent some time
> >>> taking a different slant coding up the bug you found. Turns out I
> >>> should have tested your patch first because I wasn't hitting that bug at
> >>> all. The patch below is a work-in-progress that I think fixes the bug
> >>> by providing a quick means of re-parsing the scope as needed to match
> >>> current struct pci_devs. It needs testing and cleanup, but feel free to
> >>> run with it (or ignore). Just figured its better to post than waste the
> >>> code if you end up doing something similar. Thanks,
> >>>
> >>> Alex
> >>>
> >>
> >> it does not apply to current linus tree cleanly.
> >
> > Sorry, for some reason I started hacking on this against a rhel kernel.
> > Here's the compile tested-only forward port to 2.6.39 (plus the
> > domain_exit flush patch). Thanks,
>
> can not find anywhere to call flush_unmaps_timeout(0).
>
> so what do you mean flush patch?

Take v2.6.39, add
http://git.infradead.org/iommu-2.6.git/commitdiff/7b668357810ecb5fdda4418689d50f5d95aea6a8
and the patch below should apply cleanly. IIRC, it doesn't touch
anything near domain_exit, so it should apply with some fuzz to stock
2.6.39 too. Thanks,

Alex

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/