linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
       [not found]                             ` <51F85BCC.2070103@jp.fujitsu.com>
@ 2013-07-31 21:08                               ` Bjorn Helgaas
       [not found]                                 ` <CAErSpo4yJ2yqCWv7GT7jWSVd_8SktU=xJXT78m8Vxp_wLA4Fow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2013-07-31 21:08 UTC (permalink / raw)
  To: Takao Indoh
  Cc: Vivek Goyal, linux-kernel@vger.kernel.org,
	linux-pci@vger.kernel.org, open list:INTEL IOMMU (VT-d),
	kexec@lists.infradead.org, ishii.hironobu@jp.fujitsu.com,
	Don Dutile, Sumner, William, alex.williamson@redhat.com,
	Haren Myneni, Rafael J. Wysocki, linux-acpi@vger.kernel.org

[+cc Rafael, linux-acpi]

On Tue, Jul 30, 2013 at 6:35 PM, Takao Indoh <indou.takao@jp.fujitsu.com> wrote:

> On x86, currently IOMMU initialization run *after* PCI enumeration, but
> what you are talking about is that it should be changed so that x86
> IOMMU initialization is done *before* PCI enumeration like sparc, right?

Yes.  I don't know whether or when that initialization order will ever
be changed, but I do think we should avoid building more
infrastructure that depends on the current order.

Changing the order is a pretty big deal because it's a lot more than
just the IOMMU.  Basically I think we should be enumerating ACPI
devices, including the IOMMU, before PCI devices, but there's a lot of
legacy involved in that area.  Added Rafael in case he has any
thoughts.

> Hmm, ok, I think I need to post attached patch to iommu list and
> discuss it including current order of x86 IOMMU initialization.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
       [not found]                                 ` <CAErSpo4yJ2yqCWv7GT7jWSVd_8SktU=xJXT78m8Vxp_wLA4Fow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2013-07-31 21:23                                   ` Rafael J. Wysocki
  2013-08-01  6:34                                     ` Takao Indoh
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2013-07-31 21:23 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Haren Myneni, open list:INTEL IOMMU (VT-d), Sumner, William,
	ishii.hironobu-+CUm20s59erQFUHtdCDX3A@public.gmane.org,
	Vivek Goyal

On Wednesday, July 31, 2013 03:08:03 PM Bjorn Helgaas wrote:
> [+cc Rafael, linux-acpi]
> 
> On Tue, Jul 30, 2013 at 6:35 PM, Takao Indoh <indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org> wrote:
> 
> > On x86, currently IOMMU initialization run *after* PCI enumeration, but
> > what you are talking about is that it should be changed so that x86
> > IOMMU initialization is done *before* PCI enumeration like sparc, right?
> 
> Yes.  I don't know whether or when that initialization order will ever
> be changed, but I do think we should avoid building more
> infrastructure that depends on the current order.
> 
> Changing the order is a pretty big deal because it's a lot more than
> just the IOMMU.  Basically I think we should be enumerating ACPI
> devices, including the IOMMU, before PCI devices, but there's a lot of
> legacy involved in that area.  Added Rafael in case he has any
> thoughts.

Well, actually, I'm not really familiar with IOMMUs, sorry.

I do think that initializing IOMMU before PCI enumeration would be better,
however.  At least if the ordering should be the same on all architectures,
which I suppose is the case, that's the one I'd choose.

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
  2013-07-31 21:23                                   ` Rafael J. Wysocki
@ 2013-08-01  6:34                                     ` Takao Indoh
       [not found]                                       ` <51FA015E.10901-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Takao Indoh @ 2013-08-01  6:34 UTC (permalink / raw)
  To: bhelgaas
  Cc: rjw, vgoyal, linux-kernel, linux-pci, iommu, kexec,
	ishii.hironobu, ddutile, bill.sumner, alex.williamson, hbabu,
	linux-acpi

(2013/08/01 6:23), Rafael J. Wysocki wrote:
> On Wednesday, July 31, 2013 03:08:03 PM Bjorn Helgaas wrote:
>> [+cc Rafael, linux-acpi]
>>
>> On Tue, Jul 30, 2013 at 6:35 PM, Takao Indoh <indou.takao@jp.fujitsu.com> wrote:
>>
>>> On x86, currently IOMMU initialization run *after* PCI enumeration, but
>>> what you are talking about is that it should be changed so that x86
>>> IOMMU initialization is done *before* PCI enumeration like sparc, right?
>>
>> Yes.  I don't know whether or when that initialization order will ever
>> be changed, but I do think we should avoid building more
>> infrastructure that depends on the current order.
>>
>> Changing the order is a pretty big deal because it's a lot more than
>> just the IOMMU.  Basically I think we should be enumerating ACPI
>> devices, including the IOMMU, before PCI devices, but there's a lot of
>> legacy involved in that area.  Added Rafael in case he has any
>> thoughts.
> 
> Well, actually, I'm not really familiar with IOMMUs, sorry.
> 
> I do think that initializing IOMMU before PCI enumeration would be better,
> however.  At least if the ordering should be the same on all architectures,
> which I suppose is the case, that's the one I'd choose.

Ok guys. If x86 IOMMU maintainer also thinks changing order is
necessary, maybe I need to give up device reset in kdump kernel and
consider doing it in panic kernel.

Either way, I need bus reset interface to reset devices. Bjorn, could
you review the bus reset patches Alex posted yesterday?

Thanks,
Takao Indoh

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
       [not found]                                       ` <51FA015E.10901-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
@ 2013-08-01 12:42                                         ` Alex Williamson
  2013-08-01 13:20                                         ` Vivek Goyal
  1 sibling, 0 replies; 5+ messages in thread
From: Alex Williamson @ 2013-08-01 12:42 UTC (permalink / raw)
  To: Takao Indoh
  Cc: linux-acpi-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, rjw-KKrjLPT3xs0,
	hbabu-r/Jw6+rmf7HQT0dZR+AlfA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	bill.sumner-VXdhtT5mjnY, ishii.hironobu-+CUm20s59erQFUHtdCDX3A,
	bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, vgoyal-H+wXaHxf7aLQT0dZR+AlfA

On Thu, 2013-08-01 at 15:34 +0900, Takao Indoh wrote:
> (2013/08/01 6:23), Rafael J. Wysocki wrote:
> > On Wednesday, July 31, 2013 03:08:03 PM Bjorn Helgaas wrote:
> >> [+cc Rafael, linux-acpi]
> >>
> >> On Tue, Jul 30, 2013 at 6:35 PM, Takao Indoh <indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org> wrote:
> >>
> >>> On x86, currently IOMMU initialization run *after* PCI enumeration, but
> >>> what you are talking about is that it should be changed so that x86
> >>> IOMMU initialization is done *before* PCI enumeration like sparc, right?
> >>
> >> Yes.  I don't know whether or when that initialization order will ever
> >> be changed, but I do think we should avoid building more
> >> infrastructure that depends on the current order.
> >>
> >> Changing the order is a pretty big deal because it's a lot more than
> >> just the IOMMU.  Basically I think we should be enumerating ACPI
> >> devices, including the IOMMU, before PCI devices, but there's a lot of
> >> legacy involved in that area.  Added Rafael in case he has any
> >> thoughts.
> > 
> > Well, actually, I'm not really familiar with IOMMUs, sorry.
> > 
> > I do think that initializing IOMMU before PCI enumeration would be better,
> > however.  At least if the ordering should be the same on all architectures,
> > which I suppose is the case, that's the one I'd choose.
> 
> Ok guys. If x86 IOMMU maintainer also thinks changing order is
> necessary, maybe I need to give up device reset in kdump kernel and
> consider doing it in panic kernel.
> 
> Either way, I need bus reset interface to reset devices. Bjorn, could
> you review the bus reset patches Alex posted yesterday?

I'll post a non-RFC version today, I've made a couple cleanups, tuned
the delays and rolled in the AER version of secondary bus reset.
Thanks,

Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
       [not found]                                       ` <51FA015E.10901-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
  2013-08-01 12:42                                         ` Alex Williamson
@ 2013-08-01 13:20                                         ` Vivek Goyal
  1 sibling, 0 replies; 5+ messages in thread
From: Vivek Goyal @ 2013-08-01 13:20 UTC (permalink / raw)
  To: Takao Indoh
  Cc: alex.williamson-H+wXaHxf7aLQT0dZR+AlfA,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA,
	linux-pci-u79uwXL29TY76Z2rM5mHXA,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, rjw-KKrjLPT3xs0,
	hbabu-r/Jw6+rmf7HQT0dZR+AlfA,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	ddutile-H+wXaHxf7aLQT0dZR+AlfA,
	ishii.hironobu-+CUm20s59erQFUHtdCDX3A,
	bhelgaas-hpIqsD4AKlfQT0dZR+AlfA, bill.sumner-VXdhtT5mjnY

On Thu, Aug 01, 2013 at 03:34:06PM +0900, Takao Indoh wrote:
> (2013/08/01 6:23), Rafael J. Wysocki wrote:
> > On Wednesday, July 31, 2013 03:08:03 PM Bjorn Helgaas wrote:
> >> [+cc Rafael, linux-acpi]
> >>
> >> On Tue, Jul 30, 2013 at 6:35 PM, Takao Indoh <indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org> wrote:
> >>
> >>> On x86, currently IOMMU initialization run *after* PCI enumeration, but
> >>> what you are talking about is that it should be changed so that x86
> >>> IOMMU initialization is done *before* PCI enumeration like sparc, right?
> >>
> >> Yes.  I don't know whether or when that initialization order will ever
> >> be changed, but I do think we should avoid building more
> >> infrastructure that depends on the current order.
> >>
> >> Changing the order is a pretty big deal because it's a lot more than
> >> just the IOMMU.  Basically I think we should be enumerating ACPI
> >> devices, including the IOMMU, before PCI devices, but there's a lot of
> >> legacy involved in that area.  Added Rafael in case he has any
> >> thoughts.
> > 
> > Well, actually, I'm not really familiar with IOMMUs, sorry.
> > 
> > I do think that initializing IOMMU before PCI enumeration would be better,
> > however.  At least if the ordering should be the same on all architectures,
> > which I suppose is the case, that's the one I'd choose.
> 
> Ok guys. If x86 IOMMU maintainer also thinks changing order is
> necessary, maybe I need to give up device reset in kdump kernel and
> consider doing it in panic kernel.

I don't think trying to reset all the devices in panic kernel is
a good idea.

We need to handle the problem at IOMMU level first which is 
independent of whether devices have been reset or not.

IOW, we should have the capability to initialize IOMMU first
and be able to deal with devices which are doing DMA.

I am not against doing device reset and it most likely is a good thing
but it should happen in second kernel and not in crashed kernel.

Thanks
Vivek

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-01 13:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1368509365-2260-1-git-send-email-indou.takao@jp.fujitsu.com>
     [not found] ` <CAErSpo4t_2Xw76p3Z9FVzyyK-MBovavDu9D=pYoPMjESSxgT=w@mail.gmail.com>
     [not found]   ` <51B19DF3.2070009@jp.fujitsu.com>
     [not found]     ` <CAErSpo6dfEnzriHD_aWZB_3E-kSzauhNRHPd+VuFX5HONVKgqw@mail.gmail.com>
     [not found]       ` <51B6BEDB.3000509@jp.fujitsu.com>
     [not found]         ` <CAErSpo5u8qGALt6C+tuPYXdd2YgyMH6fnPnA+afUteEZ7kY0iw@mail.gmail.com>
     [not found]           ` <51B93221.2040505@jp.fujitsu.com>
     [not found]             ` <CAErSpo5tVK-Z3aOdMTzab-S8o5zLVtDOFQ8-LSYpUgbrJSsxuw@mail.gmail.com>
     [not found]               ` <51BA7BB6.1080104@jp.fujitsu.com>
     [not found]                 ` <51EF7466.20703@jp.fujitsu.com>
     [not found]                   ` <CAErSpo5B7NzVfxwW3bQnfK+iK+DrRsWQd2Cm14z5PWNnRHWL5w@mail.gmail.com>
     [not found]                     ` <51F5B966.9080405@jp.fujitsu.com>
     [not found]                       ` <CAErSpo4JtG5qVJb-nCywe3vkft=-cDeRDKn_V92RCZ-sGXpwbg@mail.gmail.com>
     [not found]                         ` <51F758B6.9090204@jp.fujitsu.com>
     [not found]                           ` <CAErSpo7TNhQO0dx_xZvF=dU2fSWTFf8x=xUJcEsbadJkv8ktuQ@mail.gmail.com>
     [not found]                             ` <51F85BCC.2070103@jp.fujitsu.com>
2013-07-31 21:08                               ` [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA Bjorn Helgaas
     [not found]                                 ` <CAErSpo4yJ2yqCWv7GT7jWSVd_8SktU=xJXT78m8Vxp_wLA4Fow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-31 21:23                                   ` Rafael J. Wysocki
2013-08-01  6:34                                     ` Takao Indoh
     [not found]                                       ` <51FA015E.10901-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-08-01 12:42                                         ` Alex Williamson
2013-08-01 13:20                                         ` Vivek Goyal

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).