Support NMI Injection
v2 cover 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