[PATCH 0/5] ppc: sreset and machine check injection

Nicholas Piggin posted 5 patches 4 years, 1 month ago
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test checkpatch passed
Test FreeBSD passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200325144147.221875-1-npiggin@gmail.com
Maintainers: "Cédric Le Goater" <clg@kaod.org>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, David Gibson <david@gibson.dropbear.id.au>
hmp-commands.hx              | 20 ++++++++-
hw/core/nmi.c                | 61 ++++++++++++++++++++++++++
hw/ppc/pnv.c                 | 85 +++++++++++++++++++++++++++++++++++-
hw/ppc/spapr.c               | 63 ++++++++++++++++++++++++--
include/hw/nmi.h             | 20 +++++++++
include/hw/ppc/spapr.h       |  3 ++
include/monitor/hmp-target.h |  1 -
include/monitor/hmp.h        |  1 +
monitor/hmp-cmds.c           |  1 +
target/ppc/cpu.h             |  3 +-
target/ppc/excp_helper.c     | 17 ++++++--
target/ppc/monitor.c         | 11 +++++
12 files changed, 275 insertions(+), 11 deletions(-)
[PATCH 0/5] ppc: sreset and machine check injection
Posted by Nicholas Piggin 4 years, 1 month ago
This adds nmi injection for pnv, and similar mce injection for
spapr and pnv. The mce injection has already uncovered quite a
few bugs in Linux papr guest and one in pnv host code, so it
has been already very useful. The mambo simulator can do similar
injection but it's a bit more clunky and needs to run KVM and
QEMU in the sim to test papr guests, which is quite slow.

HMIs like timebase corruption would be another good candidate
for error injection.

Thanks,
Nick

Nicholas Piggin (5):
  ppc/spapr: tweak change system reset helper
  ppc/pnv: Add support for NMI interface
  nmi: add MCE class for implementing machine check injection commands
  ppc/spapr: Implement mce injection
  ppc/pnv: Implement mce injection

 hmp-commands.hx              | 20 ++++++++-
 hw/core/nmi.c                | 61 ++++++++++++++++++++++++++
 hw/ppc/pnv.c                 | 85 +++++++++++++++++++++++++++++++++++-
 hw/ppc/spapr.c               | 63 ++++++++++++++++++++++++--
 include/hw/nmi.h             | 20 +++++++++
 include/hw/ppc/spapr.h       |  3 ++
 include/monitor/hmp-target.h |  1 -
 include/monitor/hmp.h        |  1 +
 monitor/hmp-cmds.c           |  1 +
 target/ppc/cpu.h             |  3 +-
 target/ppc/excp_helper.c     | 17 ++++++--
 target/ppc/monitor.c         | 11 +++++
 12 files changed, 275 insertions(+), 11 deletions(-)

-- 
2.23.0


Re: [PATCH 0/5] ppc: sreset and machine check injection
Posted by Cédric Le Goater 4 years, 1 month ago
On 3/25/20 3:41 PM, Nicholas Piggin wrote:
> This adds nmi injection for pnv, and similar mce injection for
> spapr and pnv. The mce injection has already uncovered quite a
> few bugs in Linux papr guest and one in pnv host code, so it
> has been already very useful. 

Nice ! 

> The mambo simulator can do similar
> injection but it's a bit more clunky and needs to run KVM and
> QEMU in the sim to test papr guests, which is quite slow.

You can run a KVM guest under the QEMU powernv machine. You will 
need a patch from Suraj adding radix support for guests, which is 
still in my powernv-5.0 branch.

> HMIs like timebase corruption would be another good candidate
> for error injection.
 
XSCOM errors also. 

Thanks,

C. 


> Thanks,
> Nick
> 
> Nicholas Piggin (5):
>   ppc/spapr: tweak change system reset helper
>   ppc/pnv: Add support for NMI interface
>   nmi: add MCE class for implementing machine check injection commands
>   ppc/spapr: Implement mce injection
>   ppc/pnv: Implement mce injection
> 
>  hmp-commands.hx              | 20 ++++++++-
>  hw/core/nmi.c                | 61 ++++++++++++++++++++++++++
>  hw/ppc/pnv.c                 | 85 +++++++++++++++++++++++++++++++++++-
>  hw/ppc/spapr.c               | 63 ++++++++++++++++++++++++--
>  include/hw/nmi.h             | 20 +++++++++
>  include/hw/ppc/spapr.h       |  3 ++
>  include/monitor/hmp-target.h |  1 -
>  include/monitor/hmp.h        |  1 +
>  monitor/hmp-cmds.c           |  1 +
>  target/ppc/cpu.h             |  3 +-
>  target/ppc/excp_helper.c     | 17 ++++++--
>  target/ppc/monitor.c         | 11 +++++
>  12 files changed, 275 insertions(+), 11 deletions(-)
>