From: Gavin Shan <gshan@redhat.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org
Cc: peter.maydell@linaro.org, drjones@redhat.com,
jthierry@redhat.com, aik@ozlabs.ru, maz@kernel.org,
richard.henderson@linaro.org, eric.auger@redhat.com,
shan.gavin@gmail.com, pbonzini@redhat.com
Subject: [PATCH v3 0/2] hw/arm/virt: Simulate NMI Injection
Date: Fri, 14 Feb 2020 16:59:48 +1100 [thread overview]
Message-ID: <20200214055950.62477-1-gshan@redhat.com> (raw)
This series simulates the behavior of receiving NMI interrupt for "virt"
board. First of all, a new interrupt (SError) is supported for each CPU.
The backend is either sending error events through kvm module or emulating
the bahavior when TCG is enabled. The outcome is SError or data abort is
raised to crash guest.
For GICv2 or GICv3, a new IRQ line is added for each CPU and it's connected
to the (above) introduced SError interrupt. The IRQ line of CPU#0 is raised
when HMP/QMP "nmi" is issued, to crash the guest.
Testing
=======
After the HMP/QMP "nmi" is issued in the following 4 environment, the guest is
crashed as expected.
Accel Mode Crashed Parameter
------------------------------------------------------------------------
kvm aarch64 yes -machine virt -cpu host
kvm aarch32(cortex-a15) yes -machine virt -cpu host,aarch64=off
tcg aarch64 yes -machine virt -cpu max
tcg aarch32(cortex-a15) yes -machine virt -cpu cortex-a15
Changelog
=========
v3:
* Support SError injection for aarch32 (Richard Henderson)
* Export the SError injection through IRQ line (Peter Maydell)
* Removed RFC tag as it seems in correct track (Gavin Shan)
v2:
* Redesigned to fully exploit SError interrupt
Gavin Shan (2):
target/arm: Support SError injection
hw/arm/virt: Simulate NMI injection
hw/arm/virt.c | 34 ++++++++++++++-
hw/intc/arm_gic_common.c | 3 ++
hw/intc/arm_gicv3_common.c | 3 ++
include/hw/intc/arm_gic_common.h | 1 +
include/hw/intc/arm_gicv3_common.h | 1 +
target/arm/cpu.c | 69 ++++++++++++++++++++++++------
target/arm/cpu.h | 17 +++++---
target/arm/helper.c | 6 +++
target/arm/m_helper.c | 8 ++++
9 files changed, 122 insertions(+), 20 deletions(-)
--
2.23.0
next reply other threads:[~2020-02-14 6:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 5:59 Gavin Shan [this message]
2020-02-14 5:59 ` [PATCH v3 1/2] target/arm: Support SError injection Gavin Shan
2020-02-16 3:41 ` Richard Henderson
2020-02-16 23:42 ` Gavin Shan
2020-02-16 12:34 ` Marc Zyngier
2020-02-17 2:59 ` Gavin Shan
2020-02-14 5:59 ` [PATCH v3 2/2] hw/arm/virt: Simulate NMI injection Gavin Shan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200214055950.62477-1-gshan@redhat.com \
--to=gshan@redhat.com \
--cc=aik@ozlabs.ru \
--cc=drjones@redhat.com \
--cc=eric.auger@redhat.com \
--cc=jthierry@redhat.com \
--cc=maz@kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=shan.gavin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).