Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Mike Qiu
On 06/25/2014 11:19 AM, Benjamin Herrenschmidt wrote: On Wed, 2014-06-25 at 11:05 +0800, Mike Qiu wrote: Here maybe /sys/kernel/debug/powerpc/errinjct is better, because it will supply PCI_domain_nr in parameters, so no need supply errinjct for each PCI domain. Another reason is error inject

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Benjamin Herrenschmidt
On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the corresponding PCI bridge etc... So PowerNV error injection will be designed rely on debugfs been

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Mike Qiu
On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the corresponding PCI bridge etc... So PowerNV error injection

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Benjamin Herrenschmidt
On Tue, 2014-07-22 at 11:10 +0800, Mike Qiu wrote: On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Gavin Shan
On Tue, Jul 22, 2014 at 11:10:42AM +0800, Mike Qiu wrote: On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their respective locations, something for PCI under the

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-07-21 Thread Mike Qiu
On 07/22/2014 11:26 AM, Gavin Shan wrote: On Tue, Jul 22, 2014 at 11:10:42AM +0800, Mike Qiu wrote: On 07/22/2014 06:49 AM, Benjamin Herrenschmidt wrote: On Mon, 2014-07-21 at 16:06 +0800, Mike Qiu wrote: I don't like this. I much prefer have dedicated error injection files in their

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-25 Thread Stewart Smith
Gavin Shan gws...@linux.vnet.ibm.com writes: On Mon, Jun 23, 2014 at 04:36:44PM +1000, Michael Neuling wrote: On Mon, 2014-06-23 at 12:14 +1000, Gavin Shan wrote: The patch implements one OPAL firmware sysfs file to support PCI error injection: /sys/firmware/opal/errinjct, which will be used

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-25 Thread Stewart Smith
Gavin Shan gws...@linux.vnet.ibm.com writes: +static struct kobj_attribute errinjct_attr = + __ATTR(errinjct, 0600, NULL, errinjct_store); May also be good to have a read method that either lists current injected errors? I guess it depends on if they're one time errors or persistent errors

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Mike Qiu
On 06/23/2014 10:14 AM, Gavin Shan wrote: The patch implements one OPAL firmware sysfs file to support PCI error injection: /sys/firmware/opal/errinjct, which will be used like the way described as follows. According to PAPR spec, there are 3 RTAS calls related to error injection:

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Benjamin Herrenschmidt
Is it reasonable to do error injection with CONFIG_IOMMU_API ? That means if use default config(CONFIG_IOMMU_API = n), we can not do error injection to pci devices? Well we can't pass them through either so ... In any case, this is not a priority. First we need to implement a solid error

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Mike Qiu
On 06/24/2014 02:36 PM, Benjamin Herrenschmidt wrote: Is it reasonable to do error injection with CONFIG_IOMMU_API ? That means if use default config(CONFIG_IOMMU_API = n), we can not do error injection to pci devices? Well we can't pass them through either so ... In any case, this is not a

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Benjamin Herrenschmidt
On Tue, 2014-06-24 at 14:57 +0800, Mike Qiu wrote: Is that mean *host* side error injection should base on CONFIG_IOMMU_API ? If it is just host side(no guest, no pass through), can't we do error inject? Maybe I misunderstand :) Ah no, make different patches, we don't want to use IOMMU

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Gavin Shan
On Tue, Jun 24, 2014 at 05:00:52PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2014-06-24 at 14:57 +0800, Mike Qiu wrote: Is that mean *host* side error injection should base on CONFIG_IOMMU_API ? If it is just host side(no guest, no pass through), can't we do error inject? Maybe I

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Gavin Shan
On Mon, Jun 23, 2014 at 04:36:44PM +1000, Michael Neuling wrote: On Mon, 2014-06-23 at 12:14 +1000, Gavin Shan wrote: The patch implements one OPAL firmware sysfs file to support PCI error injection: /sys/firmware/opal/errinjct, which will be used like the way described as follows. According

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Mike Qiu
On 06/25/2014 08:03 AM, Gavin Shan wrote: On Tue, Jun 24, 2014 at 05:00:52PM +1000, Benjamin Herrenschmidt wrote: On Tue, 2014-06-24 at 14:57 +0800, Mike Qiu wrote: Is that mean *host* side error injection should base on CONFIG_IOMMU_API ? If it is just host side(no guest, no pass through),

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-24 Thread Benjamin Herrenschmidt
On Wed, 2014-06-25 at 11:05 +0800, Mike Qiu wrote: Here maybe /sys/kernel/debug/powerpc/errinjct is better, because it will supply PCI_domain_nr in parameters, so no need supply errinjct for each PCI domain. Another reason is error inject not only for PCI(in future), so better not in

Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-23 Thread Michael Neuling
On Mon, 2014-06-23 at 12:14 +1000, Gavin Shan wrote: The patch implements one OPAL firmware sysfs file to support PCI error injection: /sys/firmware/opal/errinjct, which will be used like the way described as follows. According to PAPR spec, there are 3 RTAS calls related to error injection:

[PATCH v1 2/3] powerpc/powernv: Support PCI error injection

2014-06-22 Thread Gavin Shan
The patch implements one OPAL firmware sysfs file to support PCI error injection: /sys/firmware/opal/errinjct, which will be used like the way described as follows. According to PAPR spec, there are 3 RTAS calls related to error injection: ibm,open-errinjct: allocate token prior to doing error