[PATCH 0/4] ppc: add machine check injection HMP command

Nicholas Piggin posted 4 patches 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240118143459.166994-1-npiggin@gmail.com
Maintainers: "Dr. David Alan Gilbert" <dave@treblig.org>, "Cédric Le Goater" <clg@kaod.org>, Nicholas Piggin <npiggin@gmail.com>, "Frédéric Barrat" <fbarrat@linux.ibm.com>, Daniel Henrique Barboza <danielhb413@gmail.com>, David Gibson <david@gibson.dropbear.id.au>, Harsh Prateek Bora <harshpb@linux.ibm.com>
include/hw/nmi.h             | 20 ++++++++++++
include/hw/ppc/spapr.h       |  3 ++
include/monitor/hmp-target.h |  1 -
include/monitor/hmp.h        |  1 +
target/ppc/cpu.h             |  1 +
hw/core/nmi.c                | 61 ++++++++++++++++++++++++++++++++++++
hw/ppc/pnv.c                 | 55 ++++++++++++++++++++++++++++++++
hw/ppc/spapr.c               | 54 +++++++++++++++++++++++++++++++
hw/ppc/spapr_events.c        |  3 +-
monitor/hmp-cmds.c           |  1 +
target/ppc/excp_helper.c     |  7 +++++
target/ppc/ppc-qmp-cmds.c    | 10 ++++++
hmp-commands.hx              | 20 +++++++++++-
13 files changed, 233 insertions(+), 4 deletions(-)
[PATCH 0/4] ppc: add machine check injection HMP command
Posted by Nicholas Piggin 8 months ago
I'd like to resurrect this and get it merged, because it's quite
useful for testing (has caught several Linux bugs in the past).

IIRC the main concern David had last time it came up was that it
should have QMP commands too. Which is valid. But I ended up
deciding it wouldn't be nice to expose this low level interface too
much, it would be better to use maybe a higher level error injection
interface that would be emulated in more detail (e.g., not just a
MCE, but would set relevant FIR registers and go through error
handling logic).

Since x86 has a low level 'mce' hmp command without qmp equivalent,
and since better error injection might take some time, I'd like to
just hold nose and take this for now.

Thanks,
Nick

Nicholas Piggin (4):
  nmi: add MCE class for implementing machine check injection commands
  ppc/spapr: Implement mce injection
  target/ppc: Add machine check interrupt injection helper
  ppc/pnv: Implement mce injection

 include/hw/nmi.h             | 20 ++++++++++++
 include/hw/ppc/spapr.h       |  3 ++
 include/monitor/hmp-target.h |  1 -
 include/monitor/hmp.h        |  1 +
 target/ppc/cpu.h             |  1 +
 hw/core/nmi.c                | 61 ++++++++++++++++++++++++++++++++++++
 hw/ppc/pnv.c                 | 55 ++++++++++++++++++++++++++++++++
 hw/ppc/spapr.c               | 54 +++++++++++++++++++++++++++++++
 hw/ppc/spapr_events.c        |  3 +-
 monitor/hmp-cmds.c           |  1 +
 target/ppc/excp_helper.c     |  7 +++++
 target/ppc/ppc-qmp-cmds.c    | 10 ++++++
 hmp-commands.hx              | 20 +++++++++++-
 13 files changed, 233 insertions(+), 4 deletions(-)

-- 
2.42.0
Re: [PATCH 0/4] ppc: add machine check injection HMP command
Posted by Cédric Le Goater 8 months ago
Hello Nick,

On 1/18/24 15:34, Nicholas Piggin wrote:
> I'd like to resurrect this and get it merged, because it's quite
> useful for testing (has caught several Linux bugs in the past).
> 
> IIRC the main concern David had last time it came up was that it
> should have QMP commands too. Which is valid. But I ended up
> deciding it wouldn't be nice to expose this low level interface too
> much, it would be better to use maybe a higher level error injection
> interface that would be emulated in more detail (e.g., not just a
> MCE, but would set relevant FIR registers and go through error
> handling logic).
> 
> Since x86 has a low level 'mce' hmp command without qmp equivalent,
> and since better error injection might take some time, I'd like to
> just hold nose and take this for now.


I reworked this series some years ago :

   https://lore.kernel.org/qemu-devel/20211013214042.618918-1-clg@kaod.org/

Did you take into account the changes ?


Thanks,

C.



> Thanks,
> Nick
> 
> Nicholas Piggin (4):
>    nmi: add MCE class for implementing machine check injection commands
>    ppc/spapr: Implement mce injection
>    target/ppc: Add machine check interrupt injection helper
>    ppc/pnv: Implement mce injection
> 
>   include/hw/nmi.h             | 20 ++++++++++++
>   include/hw/ppc/spapr.h       |  3 ++
>   include/monitor/hmp-target.h |  1 -
>   include/monitor/hmp.h        |  1 +
>   target/ppc/cpu.h             |  1 +
>   hw/core/nmi.c                | 61 ++++++++++++++++++++++++++++++++++++
>   hw/ppc/pnv.c                 | 55 ++++++++++++++++++++++++++++++++
>   hw/ppc/spapr.c               | 54 +++++++++++++++++++++++++++++++
>   hw/ppc/spapr_events.c        |  3 +-
>   monitor/hmp-cmds.c           |  1 +
>   target/ppc/excp_helper.c     |  7 +++++
>   target/ppc/ppc-qmp-cmds.c    | 10 ++++++
>   hmp-commands.hx              | 20 +++++++++++-
>   13 files changed, 233 insertions(+), 4 deletions(-)
>