Skip to content

RFC GICv4 Support for Xen

Mykyta Poturai xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest19 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19arm/gicv4 add management structure definitionsxen/arch/arm/include/asm/vgic.h+43 -01 reply
2/19arm/gicv4-its: Add GICv4 ITS command definitionsxen/arch/arm/include/asm/gic_v4_its.h+41 -01 reply
3/19arm/its: Export struct its_devicexen/arch/arm/gic-v3-its.c xen/arch/arm/include/asm/gic_v3_its.h+34 -250 replies
4/19arm/its: Add vlpi configurationxen/arch/arm/gic-v3-lpi.c xen/arch/arm/include/asm/gic_v3_its.h+43 -230 replies
5/19arm/irq: Add hw flag to pending_irqxen/arch/arm/include/asm/vgic.h xen/arch/arm/vgic-v3-its.c xen/arch/arm/vgic.c+22 -70 replies
6/19arm/gicv4-its: Add VLPI map/unmap operationsxen/arch/arm/gic-v3-its.c xen/arch/arm/gic-v4-its.c xen/arch/arm/include/asm/gic_v3_its.h +3 more+387 -61 reply
7/19xen/domain: Alloc enough pages for VCPU structxen/common/domain.c+10 -41 reply
8/19arm/gic: Keep track of GIC featuresxen/arch/arm/gic-v3.c xen/arch/arm/include/asm/gic.h xen/arch/arm/include/asm/gic_v3_defs.h +1 more+162 -331 reply
9/19arm/its: Implement LPI invalidationxen/arch/arm/gic-v3-its.c xen/arch/arm/gic-v4-its.c xen/arch/arm/include/asm/gic_v3_its.h+47 -10 replies
10/19arm/its: Keep track of BASER regsxen/arch/arm/gic-v3-its.c xen/arch/arm/include/asm/gic_v3_its.h+43 -72 replies
11/19arm/its: Add ITS VM and VPE allocation/teardownxen/arch/arm/gic-v3-its.c xen/arch/arm/gic-v3-lpi.c xen/arch/arm/gic-v3.c +5 more+496 -451 reply
12/19arm/gic: Add VPENDBASER/VPROPBASER accessorsxen/arch/arm/include/asm/gic_v4_its.h+38 -01 reply
13/19arm/gic: VPE schedulingxen/arch/arm/gic-v2.c xen/arch/arm/gic-v3.c xen/arch/arm/gic-v4-its.c +5 more+170 -41 reply
14/19arm/its: VPE affinity changesxen/arch/arm/gic-v3-its.c xen/arch/arm/gic-v4-its.c xen/arch/arm/include/asm/gic_v3_its.h+172 -01 reply
15/19arm: Add gicv4 to domain creationxen/arch/arm/dom0less-build.c xen/arch/arm/domain.c xen/arch/arm/vgic.c +1 more+21 -01 reply
16/19arm/gic: Fix LR group handling for GICv4xen/arch/arm/gic-v3.c+6 -61 reply
17/19arm/gicv4: Handle doorbellsxen/arch/arm/gic-v3-its.c xen/arch/arm/gic-v3-lpi.c xen/arch/arm/gic-v4-its.c +2 more+203 -261 reply
18/19arm/gic: Add VPE proxy supportxen/arch/arm/gic-v3-its.c xen/arch/arm/gic-v3.c xen/arch/arm/gic-v4-its.c +4 more+235 -71 reply
19/19arm/gicv4: Add GICv4 to the build systemxen/arch/arm/Kconfig xen/arch/arm/Makefile+7 -01 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH 00/19] GICv4 Support for Xen

This series introduces GICv4 direct LPI injection for Xen.

Direct LPI injection relies on the GIC tracking the mapping between physical and virtual CPUs. Each VCPU requires a VPE that is created and registered with the GIC via the VMAPP ITS command. The GIC is then informed of the current VPE-to-PCPU placement by programming VPENDBASER and VPROPBASER in the appropriate redistributor. LPIs are associated with VPEs through the VMAPTI ITS command, after which the GIC handles delivery without trapping into the hypervisor for each interrupt.

When a VPE is not scheduled but has pending interrupts, the GIC raises a per-VPE doorbell LPI. Doorbells are owned by the hypervisor and prompt rescheduling so the VPE can drain its pending LPIs.

Because GICv4 lacks a native doorbell invalidation mechanism, this series includes a helper that invalidates doorbell LPIs via synthetic “proxy” devices, following the approach used until GICv4.1.

All of this work is mostly based on the work of Penny Zheng <[email protected]> and Luca Fancellu <[email protected]>. And also from Linux patches by Mark Zyngier.

Some patches are still a little rough and need some styling fixes and more testing, as all of them needed to be carved line by line from a giant ~4000 line patch. This RFC is directed mostly to get a general idea if the proposed approach is suitable and OK with everyone. And there is still an open question of how to handle Signed-off-by lines for Penny and Luca, since they have not indicated their preference yet.

Mykyta Poturai (19):
arm/gicv4 add management structure definitions arm/gicv4-its: Add GICv4 ITS command definitions arm/its: Export struct its_device arm/its: Add vlpi configuration
arm/irq: Add hw flag to pending_irq arm/gicv4-its: Add VLPI map/unmap operations xen/domain: Alloc enough pages for VCPU struct arm/gic: Keep track of GIC features arm/its: Implement LPI invalidation arm/its: Keep track of BASER regs arm/its: Add ITS VM and VPE allocation/teardown arm/gic: Add VPENDBASER/VPROPBASER accessors arm/gic: VPE scheduling
arm/its: VPE affinity changes
arm: Add gicv4 to domain creation arm/gic: Fix LR group handling for GICv4 arm/gicv4: Handle doorbells
arm/gic: Add VPE proxy support arm/gicv4: Add GICv4 to the build system

 xen/arch/arm/Kconfig                   |    6 +
 xen/arch/arm/Makefile                  |    1 +
 xen/arch/arm/dom0less-build.c          |    1 +
 xen/arch/arm/domain.c                  |   16 +
 xen/arch/arm/gic-v2.c                  |    2 +-
 xen/arch/arm/gic-v3-its.c              |  339 +++++--
 xen/arch/arm/gic-v3-lpi.c              |  169 +++-
 xen/arch/arm/gic-v3.c                  |  215 ++++-
 xen/arch/arm/gic-v4-its.c              | 1136 ++++++++++++++++++++++++
 xen/arch/arm/gic-vgic.c                |    6 +
 xen/arch/arm/include/asm/gic.h         |    4 +-
 xen/arch/arm/include/asm/gic_v3_defs.h |   22 +
 xen/arch/arm/include/asm/gic_v3_its.h  |  139 ++-
 xen/arch/arm/include/asm/gic_v4_its.h  |  114 +++
 xen/arch/arm/include/asm/vgic.h        |   79 +-
 xen/arch/arm/vgic-v3-its.c             |   60 +-
 xen/arch/arm/vgic.c                    |   37 +-
 xen/common/domain.c                    |   14 +-
 xen/include/public/arch-arm.h          |    2 +
 19 files changed, 2174 insertions(+), 188 deletions(-)
 create mode 100644 xen/arch/arm/gic-v4-its.c
 create mode 100644 xen/arch/arm/include/asm/gic_v4_its.h
Signature · 1 line
2.51.2