From: luc.michel@greensocs.com
To: qemu-devel@nongnu.org
Cc: Luc MICHEL <luc.michel@greensocs.com>,
qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
saipava@xilinx.com, edgari@xilinx.com, mark.burton@greensocs.com,
Jan Kiszka <jan.kiszka@web.de>
Subject: [Qemu-devel] [PATCH v2 0/7] arm_gic: add virtualization extensions support
Date: Tue, 19 Jun 2018 11:31:17 +0200 [thread overview]
Message-ID: <20180619093124.24011-1-luc.michel@greensocs.com> (raw)
From: Luc MICHEL <luc.michel@greensocs.com>
This patch series add support for the virtualization extensions in the
ARM GICv2 interrupt controller.
The first two commits do some refactoring to prepare for the
implementation. Commits 3 and 4 are the actual implementation. The last
commit updates the ZynqMP implementation to support virtualization.
The current state allows to boot Xen (tested with 4.8 and 4.10) with
Linux Dom0 guest properly.
I also tested in SMP. It does not work directly because Xen expects to
find CPU IDs in the GIC ITARGETSR0 register. This behavior is not
documented in the GICv2 specification, and is not implemented in QEMU.
By hacking this register, I was able to get the whole thing to boot in
SMP properly. This hack is not part of those patches though.
I also tested migration, it works fine AFAIK. I had to add the HYP and
SEC timers in the ARM CPU VMState though (Xen uses the HYP one) (not
part of those patches).
I want to thanks the Xilinx's QEMU team who sponsored this work for
their collaboration.
v2:
- Add VMSTATE_UINT16_SUB_ARRAY to vmstate.h
- Keep backward compatibility on the GIC VMState by storing vCPUs
state in the virt VMState subsection.
- Use h_apr to store APR value for vCPUs, instead of increasing apr 2D
array. This adds a little complexity to the implementation (a bunch
of `if (gic_is_vcpu(cpu))'), but avoid ugly VMState description for
the apr array.
Luc MICHEL (7):
intc/arm_gic: Refactor operations on the distributor
intc/arm_gic: Remove some dead code and put some functions static
vmstate.h: Provide VMSTATE_UINT16_SUB_ARRAY
intc/arm_gic: Add the virtualization extensions to the GIC state
intc/arm_gic: Add virtualization extensions logic
intc/arm_gic: Improve traces
xlnx-zynqmp: Improve GIC wiring and MMIO mapping
hw/arm/xlnx-zynqmp.c | 92 +++-
hw/intc/arm_gic.c | 790 ++++++++++++++++++++++++-------
hw/intc/arm_gic_common.c | 158 +++++--
hw/intc/arm_gic_kvm.c | 31 +-
hw/intc/gic_internal.h | 258 ++++++++--
hw/intc/trace-events | 12 +-
include/hw/arm/xlnx-zynqmp.h | 4 +-
include/hw/intc/arm_gic_common.h | 51 +-
include/migration/vmstate.h | 3 +
9 files changed, 1153 insertions(+), 246 deletions(-)
--
2.17.1
next reply other threads:[~2018-06-19 9:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 9:31 luc.michel [this message]
2018-06-19 9:31 ` [Qemu-devel] [PATCH v2 1/7] intc/arm_gic: Refactor operations on the distributor luc.michel
2018-06-19 9:31 ` [Qemu-devel] [PATCH v2 2/7] intc/arm_gic: Remove some dead code and put some functions static luc.michel
2018-06-19 9:31 ` [Qemu-devel] [PATCH v2 3/7] vmstate.h: Provide VMSTATE_UINT16_SUB_ARRAY luc.michel
2018-06-25 11:47 ` Peter Maydell
2018-06-19 9:31 ` [Qemu-devel] [PATCH v2 4/7] intc/arm_gic: Add the virtualization extensions to the GIC state luc.michel
2018-06-25 14:23 ` Peter Maydell
2018-06-19 9:31 ` [Qemu-devel] [PATCH v2 5/7] intc/arm_gic: Add virtualization extensions logic luc.michel
2018-06-25 14:23 ` Peter Maydell
2018-06-26 9:17 ` Luc Michel
2018-06-19 9:31 ` [Qemu-devel] [PATCH v2 6/7] intc/arm_gic: Improve traces luc.michel
2018-06-25 11:50 ` Peter Maydell
2018-06-19 9:31 ` [Qemu-devel] [PATCH v2 7/7] xlnx-zynqmp: Improve GIC wiring and MMIO mapping luc.michel
2018-06-25 14:29 ` Peter Maydell
2018-06-25 4:55 ` [Qemu-devel] [PATCH v2 0/7] arm_gic: add virtualization extensions support Jan Kiszka
2018-06-25 11:12 ` Peter Maydell
2018-06-26 9:20 ` Luc Michel
2018-06-26 9:24 ` Luc Michel
2018-06-26 10:22 ` Jan Kiszka
2018-06-26 10:29 ` Jan Kiszka
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=20180619093124.24011-1-luc.michel@greensocs.com \
--to=luc.michel@greensocs.com \
--cc=edgari@xilinx.com \
--cc=jan.kiszka@web.de \
--cc=mark.burton@greensocs.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=saipava@xilinx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.