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
Quoted 7 lines · Gavin Shan
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.
Hi; you forgot to cc qemu-devel; can you repost, please, so that the tools like patchew that monitor the mailing list pick it up?
thanks
-- PMM
Quoted 9 lines · Peter Maydell
Quoted 7 lines · Gavin Shan
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.
Quoted 6 lines
Hi; you forgot to cc qemu-devel; can you repost, please, so that the tools like patchew that monitor the mailing list pick it up?
thanks
-- PMM
Sure, The series was resent with a "RESEND" tag.
Thanks,
Gavin
Quoted 10 lines · Gavin Shan
Quoted 9 lines · Peter Maydell
Quoted 7 lines · Gavin Shan
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.
Quoted 9 lines
Quoted 6 lines
Hi; you forgot to cc qemu-devel; can you repost, please, so that the tools like patchew that monitor the mailing list pick it up?
thanks
-- PMMSure, The series was resent with a "RESEND" tag.
Another problem with the series is that patches 1/2 and 2/2 are not in-reply-to 0/2, so the threading of the series is broken. I see you've already reposted. I'm not sure patchew will be happy without the threading corrected though.
Thanks,
drew
Quoted 21 lines · Andrew Jones
Quoted 10 lines · Gavin Shan
Quoted 9 lines · Peter Maydell
Quoted 7 lines · Gavin Shan
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.
Quoted 9 lines
Quoted 6 lines
Hi; you forgot to cc qemu-devel; can you repost, please, so that the tools like patchew that monitor the mailing list pick it up?
thanks
-- PMMSure, The series was resent with a "RESEND" tag.
Quoted 8 lines
Another problem with the series is that patches 1/2 and 2/2 are not in-reply-to 0/2, so the threading of the series is broken. I see you've already reposted. I'm not sure patchew will be happy without the threading corrected though.
Thanks,
drew
Thanks, Drew. I had "sendemail.thread=false" in the configuration script, which was copied from somebody else. Threading starts to work after it's corrected to "true". I probably wait until getting some feedbacks on "RESEND RFC v2" if it's reasonable.
Thanks,
Gavin