From: Michael Ellerman <mpe@ellerman.id.au>
To: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, Alexey Kardashevskiy <aik@au1.ibm.com>
Subject: Re: [v2] pseries/iommu: remove iommu device references via bus notifier
Date: Mon, 23 Feb 2015 13:27:24 +1100 (AEDT) [thread overview]
Message-ID: <20150223022724.7884914012C@ozlabs.org> (raw)
In-Reply-To: <20150221190050.GA20184@linux.vnet.ibm.com>
On Sat, 2015-21-02 at 19:00:50 UTC, Nishanth Aravamudan wrote:
> On 20.02.2015 [15:31:29 +1100], Michael Ellerman wrote:
> > On Thu, 2015-02-19 at 10:41 -0800, Nishanth Aravamudan wrote:
> > > After d905c5df9aef ("PPC: POWERNV: move iommu_add_device earlier"), the
> > > refcnt on the kobject backing the IOMMU group for a PCI device is
> > > elevated by each call to pci_dma_dev_setup_pSeriesLP() (via
> > > set_iommu_table_base_and_group). When we go to dlpar a multi-function
> > > PCI device out:
> > >
> > > iommu_reconfig_notifier ->
> > > iommu_free_table ->
> > > iommu_group_put
> > > BUG_ON(tbl->it_group)
> > >
> > > We trip this BUG_ON, because there are still references on the table, so
> > > it is not freed. Fix this by also adding a bus notifier identical to
> > > PowerNV for pSeries.
> >
> > Please put it somewhere common, arch/powerpc/kernel/iommu.c perhaps, and just
> > add a second machine_init_call() for pseries.
>
> How does this look? Only compile-tested with CONFIG_IOMMU_API on/off so
> far, waiting for access to the test LPAR (should have it on Monday).
Yeah that looks better, thanks.
It probably doesn't build with CONFIG_PCI=n though, but I don't think
CONFIG_PCI=n builds anyway.
cheers
next prev parent reply other threads:[~2015-02-23 2:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 18:41 [PATCH] pseries/iommu: remove iommu device references via bus notifier Nishanth Aravamudan
2015-02-20 1:17 ` Alexey Kardashevskiy
2015-02-20 4:31 ` Michael Ellerman
2015-02-21 19:00 ` [PATCH v2] " Nishanth Aravamudan
2015-02-23 2:27 ` Michael Ellerman [this message]
2015-02-23 18:54 ` [v2] " Nishanth Aravamudan
2015-02-24 4:42 ` Michael Ellerman
2015-02-23 20:44 ` [PATCH v2] " Nishanth Aravamudan
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=20150223022724.7884914012C@ozlabs.org \
--to=mpe@ellerman.id.au \
--cc=aik@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nacc@linux.vnet.ibm.com \
/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).