All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Takao Indoh <indou.takao@jp.fujitsu.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	"open list:INTEL IOMMU (VT-d)" <iommu@lists.linux-foundation.org>,
	kexec@lists.infradead.org, ishii.hironobu@jp.fujitsu.com,
	Don Dutile <ddutile@redhat.com>,
	bill.sumner@hp.com,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	Vivek Goyal <vgoyal@redhat.com>, Haren Myneni <hbabu@us.ibm.com>
Subject: Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
Date: Tue, 11 Jun 2013 22:45:27 -0600	[thread overview]
Message-ID: <CAErSpo5u8qGALt6C+tuPYXdd2YgyMH6fnPnA+afUteEZ7kY0iw@mail.gmail.com> (raw)
In-Reply-To: <51B6BEDB.3000509@jp.fujitsu.com>

[+cc Vivek, Haren; sorry I didn't think to add you earlier]

On Tue, Jun 11, 2013 at 12:08 AM, Takao Indoh
<indou.takao@jp.fujitsu.com> wrote:
> (2013/06/11 11:20), Bjorn Helgaas wrote:

>> I'm not sure you need to reset legacy devices (or non-PCI devices)
>> yet, but the current hook isn't anchored anywhere -- it's just an
>> fs_initcall() that doesn't give the reader any clue about the
>> connection between the reset and the problem it's solving.
>>
>> If we do something like this patch, I think it needs to be done at the
>> point where we enable or disable the IOMMU.  That way, it's connected
>> to the important event, and there's a clue about how to make
>> corresponding fixes for other IOMMUs.
>
> Ok. pci_iommu_init() is appropriate place to add this hook?

I looked at various IOMMU init places today, and it's far more
complicated and varied than I had hoped.

This reset scheme depends on enumerating PCI devices before we
initialize the IOMMU used by those devices.  x86 works that way today,
but not all architectures do (see the sparc pci_fire_pbm_init(), for
example).  And I think conceptually, the IOMMU should be enumerated
and initialized *before* the devices that use it.

So I'm uncomfortable with that aspect of this scheme.

It would be at least conceivable to reset the devices in the system
kernel, before the kexec.  I know we want to do as little as possible
in the crashing kernel, but it's at least a possibility, and it might
be cleaner.

Bjorn

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Takao Indoh <indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
Cc: "linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Haren Myneni <hbabu-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
	"open list:INTEL IOMMU (VT-d)"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	ishii.hironobu-+CUm20s59erQFUHtdCDX3A@public.gmane.org,
	bill.sumner-VXdhtT5mjnY@public.gmane.org
Subject: Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
Date: Tue, 11 Jun 2013 22:45:27 -0600	[thread overview]
Message-ID: <CAErSpo5u8qGALt6C+tuPYXdd2YgyMH6fnPnA+afUteEZ7kY0iw@mail.gmail.com> (raw)
In-Reply-To: <51B6BEDB.3000509-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

[+cc Vivek, Haren; sorry I didn't think to add you earlier]

On Tue, Jun 11, 2013 at 12:08 AM, Takao Indoh
<indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org> wrote:
> (2013/06/11 11:20), Bjorn Helgaas wrote:

>> I'm not sure you need to reset legacy devices (or non-PCI devices)
>> yet, but the current hook isn't anchored anywhere -- it's just an
>> fs_initcall() that doesn't give the reader any clue about the
>> connection between the reset and the problem it's solving.
>>
>> If we do something like this patch, I think it needs to be done at the
>> point where we enable or disable the IOMMU.  That way, it's connected
>> to the important event, and there's a clue about how to make
>> corresponding fixes for other IOMMUs.
>
> Ok. pci_iommu_init() is appropriate place to add this hook?

I looked at various IOMMU init places today, and it's far more
complicated and varied than I had hoped.

This reset scheme depends on enumerating PCI devices before we
initialize the IOMMU used by those devices.  x86 works that way today,
but not all architectures do (see the sparc pci_fire_pbm_init(), for
example).  And I think conceptually, the IOMMU should be enumerated
and initialized *before* the devices that use it.

So I'm uncomfortable with that aspect of this scheme.

It would be at least conceivable to reset the devices in the system
kernel, before the kexec.  I know we want to do as little as possible
in the crashing kernel, but it's at least a possibility, and it might
be cleaner.

Bjorn

WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <bhelgaas@google.com>
To: Takao Indoh <indou.takao@jp.fujitsu.com>
Cc: "alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
	kexec@lists.infradead.org,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Haren Myneni <hbabu@us.ibm.com>,
	"open list:INTEL IOMMU (VT-d)" <iommu@lists.linux-foundation.org>,
	Don Dutile <ddutile@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
	ishii.hironobu@jp.fujitsu.com, bill.sumner@hp.com
Subject: Re: [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA
Date: Tue, 11 Jun 2013 22:45:27 -0600	[thread overview]
Message-ID: <CAErSpo5u8qGALt6C+tuPYXdd2YgyMH6fnPnA+afUteEZ7kY0iw@mail.gmail.com> (raw)
In-Reply-To: <51B6BEDB.3000509@jp.fujitsu.com>

[+cc Vivek, Haren; sorry I didn't think to add you earlier]

On Tue, Jun 11, 2013 at 12:08 AM, Takao Indoh
<indou.takao@jp.fujitsu.com> wrote:
> (2013/06/11 11:20), Bjorn Helgaas wrote:

>> I'm not sure you need to reset legacy devices (or non-PCI devices)
>> yet, but the current hook isn't anchored anywhere -- it's just an
>> fs_initcall() that doesn't give the reader any clue about the
>> connection between the reset and the problem it's solving.
>>
>> If we do something like this patch, I think it needs to be done at the
>> point where we enable or disable the IOMMU.  That way, it's connected
>> to the important event, and there's a clue about how to make
>> corresponding fixes for other IOMMUs.
>
> Ok. pci_iommu_init() is appropriate place to add this hook?

I looked at various IOMMU init places today, and it's far more
complicated and varied than I had hoped.

This reset scheme depends on enumerating PCI devices before we
initialize the IOMMU used by those devices.  x86 works that way today,
but not all architectures do (see the sparc pci_fire_pbm_init(), for
example).  And I think conceptually, the IOMMU should be enumerated
and initialized *before* the devices that use it.

So I'm uncomfortable with that aspect of this scheme.

It would be at least conceivable to reset the devices in the system
kernel, before the kexec.  I know we want to do as little as possible
in the crashing kernel, but it's at least a possibility, and it might
be cleaner.

Bjorn

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2013-06-12  4:45 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-14  5:29 [PATCH v2] PCI: Reset PCIe devices to stop ongoing DMA Takao Indoh
2013-05-14  5:29 ` Takao Indoh
2013-05-14 22:04 ` Eric W. Biederman
2013-05-14 22:04   ` Eric W. Biederman
2013-05-14 22:04   ` Eric W. Biederman
2013-05-21 23:46   ` Takao Indoh
2013-05-21 23:46     ` Takao Indoh
2013-06-06  7:25 ` Takao Indoh
2013-06-06  7:25   ` Takao Indoh
2013-06-06  7:25   ` Takao Indoh
2013-06-07  4:14 ` Bjorn Helgaas
2013-06-07  4:14   ` Bjorn Helgaas
2013-06-07  8:46   ` Takao Indoh
2013-06-07  8:46     ` Takao Indoh
2013-06-07  8:46     ` Takao Indoh
2013-06-11  2:20     ` Bjorn Helgaas
2013-06-11  2:20       ` Bjorn Helgaas
2013-06-11  6:08       ` Takao Indoh
2013-06-11  6:08         ` Takao Indoh
2013-06-11  6:08         ` Takao Indoh
2013-06-11 23:19         ` Sumner, William
2013-06-11 23:19           ` Sumner, William
2013-06-12  0:53           ` Bjorn Helgaas
2013-06-12  0:53             ` Bjorn Helgaas
2013-06-12 13:19           ` Don Dutile
2013-06-12 13:19             ` Don Dutile
2013-06-13  3:25             ` Takao Indoh
2013-06-13  3:25               ` Takao Indoh
2013-06-12  4:45         ` Bjorn Helgaas [this message]
2013-06-12  4:45           ` Bjorn Helgaas
2013-06-12  4:45           ` Bjorn Helgaas
2013-06-13  2:44           ` Takao Indoh
2013-06-13  2:44             ` Takao Indoh
2013-06-13  2:44             ` Takao Indoh
2013-06-13  3:41             ` Bjorn Helgaas
2013-06-13  3:41               ` Bjorn Helgaas
2013-06-13  3:41               ` Bjorn Helgaas
2013-06-14  2:11               ` Takao Indoh
2013-06-14  2:11                 ` Takao Indoh
2013-06-14  2:11                 ` Takao Indoh
     [not found]                 ` <51BA7BB6.1080104-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2013-06-25  8:41                   ` Dave Young
2013-07-24  6:29                 ` Takao Indoh
2013-07-24  6:29                   ` Takao Indoh
2013-07-25 14:24                   ` Vivek Goyal
2013-07-25 14:24                     ` Vivek Goyal
2013-07-25 14:24                     ` Vivek Goyal
2013-07-29  0:20                     ` Takao Indoh
2013-07-29  0:20                       ` Takao Indoh
2013-07-29  0:20                       ` Takao Indoh
2013-07-25 17:00                   ` Bjorn Helgaas
2013-07-25 17:00                     ` Bjorn Helgaas
2013-07-29  0:37                     ` Takao Indoh
2013-07-29  0:37                       ` Takao Indoh
2013-07-29 14:17                       ` Bjorn Helgaas
2013-07-29 14:17                         ` Bjorn Helgaas
2013-07-29 14:17                         ` Bjorn Helgaas
2013-07-30  6:09                         ` Takao Indoh
2013-07-30  6:09                           ` Takao Indoh
2013-07-30  6:09                           ` Takao Indoh
2013-07-30 15:59                           ` Bjorn Helgaas
2013-07-30 15:59                             ` Bjorn Helgaas
2013-07-31  0:35                             ` Takao Indoh
2013-07-31  0:35                               ` Takao Indoh
2013-07-31  3:11                               ` Alex Williamson
2013-07-31  3:11                                 ` Alex Williamson
2013-07-31  3:11                                 ` Alex Williamson
2013-07-31  5:50                                 ` Takao Indoh
2013-07-31  5:50                                   ` Takao Indoh
2013-07-31  5:50                                   ` Takao Indoh
2013-07-31 21:08                               ` Bjorn Helgaas
2013-07-31 21:08                                 ` Bjorn Helgaas
     [not found]                                 ` <CAErSpo4yJ2yqCWv7GT7jWSVd_8SktU=xJXT78m8Vxp_wLA4Fow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-07-31 21:23                                   ` Rafael J. Wysocki
2013-07-31 21:23                                     ` Rafael J. Wysocki
2013-07-31 21:23                                     ` Rafael J. Wysocki
2013-08-01  6:34                                     ` Takao Indoh
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 12:42                                           ` Alex Williamson
2013-08-01 12:42                                           ` Alex Williamson
2013-08-01 13:20                                         ` Vivek Goyal
2013-08-01 13:20                                           ` Vivek Goyal
2013-08-01 13:20                                           ` Vivek Goyal
2013-07-31 19:56                             ` Vivek Goyal
2013-07-31 19:56                               ` Vivek Goyal
2013-07-31 19:56                               ` Vivek Goyal
2013-07-31 16:09                     ` Vivek Goyal
2013-07-31 16:09                       ` Vivek Goyal
2013-07-31 16:09                       ` Vivek Goyal

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=CAErSpo5u8qGALt6C+tuPYXdd2YgyMH6fnPnA+afUteEZ7kY0iw@mail.gmail.com \
    --to=bhelgaas@google.com \
    --cc=alex.williamson@redhat.com \
    --cc=bill.sumner@hp.com \
    --cc=ddutile@redhat.com \
    --cc=hbabu@us.ibm.com \
    --cc=indou.takao@jp.fujitsu.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=ishii.hironobu@jp.fujitsu.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=vgoyal@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.