From: Gavin Shan <gwshan@linux.vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: aik@ozlabs.ru, Gavin Shan <gwshan@linux.vnet.ibm.com>,
kvm-ppc@vger.kernel.org, agraf@suse.de,
Mike Qiu <qiudayu@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v1 2/3] powerpc/powernv: Support PCI error injection
Date: Wed, 25 Jun 2014 10:03:05 +1000 [thread overview]
Message-ID: <20140625000305.GA5742@shangw> (raw)
In-Reply-To: <1403593252.4587.163.camel@pasglop>
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 misunderstand :)
>
>Ah no, make different patches, we don't want to use IOMMU group ID, just
>PE numbers. Maybe we should expose in sysfs the PEs from the platform
>code with the error injection files underneath ...
>
Yeah, "errinjct" needs grab PCI_domain_nr+PE number from sysfs. We
already had PE number sysfs file:
[root@ltcfbl8eb 0000:01:00.1]# pwd
/sys/bus/pci/devices/0000:01:00.1
[root@ltcfbl8eb 0000:01:00.1]# cat eeh_pe_config_addr
0x1
For guest support, we will rely on VFIO group ioctl command, which
naturally depends on pass-through.
---
We probably implement it like this. If there're anything wrong, please
correct me:
- Introduce EEH callback struct eeh_ops::err_inject(), which will be
implemented for PowerNV (NULL for pSeries) by calling the PCI error
injection dedicated OPAL API (opal_pci_err_inject()).
- Introduce global function eeh.c::eeh_err_inject(), which calls to
eeh_ops::err_inject() and newly introduced VFIO EEH operation
will be implemented based on this function.
- Introduce debugfs /sys/kernel/debug/powerpc/PCIxxxx/errinjct, which
receives PCI error injection parameters from "errinjct". It could
have format: "ei_token:addr:mask:PCI_domain_nr:PE_num:function".
Eventually, eeh_err_inject() is invoked to call the corresponding
OPAL API.
Thanks,
Gavin
next prev parent reply other threads:[~2014-06-25 0:03 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 2:14 [PATCH v1 0/3] Support PCI Error Injection Gavin Shan
2014-06-23 2:14 ` [PATCH v1 1/3] powerpc/powernv: Sync header with firmware Gavin Shan
2014-06-23 21:10 ` Benjamin Herrenschmidt
2014-06-23 23:44 ` Gavin Shan
2014-06-23 23:50 ` Benjamin Herrenschmidt
2014-06-23 2:14 ` [PATCH v1 2/3] powerpc/powernv: Support PCI error injection Gavin Shan
2014-06-23 6:36 ` Michael Neuling
2014-06-25 0:05 ` Gavin Shan
2014-06-26 4:48 ` Stewart Smith
2014-06-23 21:05 ` Benjamin Herrenschmidt
2014-06-24 6:18 ` Mike Qiu
2014-06-24 6:36 ` Benjamin Herrenschmidt
2014-06-24 6:57 ` Mike Qiu
2014-06-24 7:00 ` Benjamin Herrenschmidt
2014-06-25 0:03 ` Gavin Shan [this message]
2014-06-25 3:05 ` Mike Qiu
2014-06-25 3:19 ` Benjamin Herrenschmidt
2014-07-21 8:06 ` Mike Qiu
2014-07-21 22:49 ` Benjamin Herrenschmidt
2014-07-22 3:10 ` Mike Qiu
2014-07-22 3:21 ` Benjamin Herrenschmidt
2014-07-22 3:26 ` Gavin Shan
2014-07-22 4:00 ` Mike Qiu
2014-06-26 4:52 ` Stewart Smith
2014-06-23 2:14 ` [PATCH v1 3/3] powerpc/powernv: Clear PAPR error injection registers Gavin Shan
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=20140625000305.GA5742@shangw \
--to=gwshan@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=benh@kernel.crashing.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=qiudayu@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).