Skip to content

RFC Support NMI Injection

Gavin Shan qemu-arm qemu-devel 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 RFC Latest posting 2/22 patches 9 repliesIn review
  2. v2 RFC posting 1/22 patches 4 repliesSuperseded

Changes in v2 from the cover letter

* Redesigned to fully exploit SError interrupt

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2target/arm: Allow to inject SError interrupttarget/arm/cpu.c target/arm/cpu.h target/arm/helper.c+24 -37 replies
2/2target/arm: Support NMI injectionhw/arm/virt.c target/arm/cpu-qom.h target/arm/cpu.c +2 more+96 -42 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [RESEND RFC PATCH v2 0/2] Support NMI Injection

This intends to support HMP/QMP "nmi" command. When it's issued, the SError interrupt is injected to the guest. The guest is expected to crash with it. The behavior is similar to x86: NMI is injected to guest as error indication. The guest possiblly crashes and reboots with the injected NMI. Note that the functionality is currently supported on "virt" machine and {"host", "max"} CPU models only.

PATCH[1/2] allows to inject SError interrupt, which will be used by the subsequent patch. PATH[2/2] injects SError interrupt when "nmi" command is issued. With that, the guest is expected to crash and possiblly reboot.

Testing
=======
Start linux 5.5 guest with "virt"+"host", or "virt"+"max". The guest crashes and reboot if "/proc/sys/core/panic" had been configured properly, after "nmi" command is issued. The following error message is given on "virt"+"cortext-a72": "Error: NMI injection not supported"

Changelog
=========
v2:
* Redesigned to fully exploit SError interrupt

Gavin Shan (2):
target/arm: Allow to inject SError interrupt
target/arm: Support NMI injection

 hw/arm/virt.c          | 18 +++++++++++++
 target/arm/cpu-qom.h   |  1 +
 target/arm/cpu.c       | 59 ++++++++++++++++++++++++++++++++++++++++++
 target/arm/cpu.h       | 12 ++++++---
 target/arm/cpu64.c     | 25 +++++++++++++++---
 target/arm/helper.c    |  4 +++
 target/arm/internals.h |  8 ++++++
 7 files changed, 120 insertions(+), 7 deletions(-)
Signature · 1 line
2.23.0