mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/5] KVM: arm64: Enable GICv3 guests on GICv5 hosts using FEAT_GCIE_LEGACY
@ 2025-06-20 16:07 Sascha Bischoff
  2025-06-20 16:07 ` [PATCH 1/5] irqchip/gic-v5: Skip deactivate for forwarded PPI interrupts Sascha Bischoff
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Sascha Bischoff @ 2025-06-20 16:07 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm, linux-kernel, kvm
  Cc: nd, maz, oliver.upton, Joey Gouly, Suzuki Poulose, yuzenghui,
	will, tglx, lpieralisi, Timothy Hayes

Hi all,

This series introduces support for running GICv3 guests on GICv5 hosts
by leveraging the GICv5 legacy compatibility feature
(FEAT_GCIE_LEGACY). The main motivation is to enable existing GICv3
VMs on GICv5 system without VM or VMM modifications - things should
work out of the box.

The changes are focused on two main areas:

    KVM GIC support: Enabling detection of a GICv5 host and
    configuring it to support GICv3 guests.

    IRQ chip support: Ensuring forwarded PPIs behave consistently with
    GICv3 expectations.

Summary of the patches:

    Ensure injected guest interrupts behave correctly by deferring
    deactivation to the guest, matching GICv3-native behavior.

    Set up the necessary GIC capabilities to advertise
    FEAT_GCIE_LEGACY to KVM.

    Add missing system register required for enabling GICv3 compat
    mode from EL2.

    Enable full support for running GICv3 VMs on a GICv5 host when
    compat mode is present, covering VHE, nVHE, and protected KVM
    configurations (excluding nested virt).

    Introduce a probe routine to enable GICv5 when FEAT_GCIE_LEGACY is
    detected. This consumes the gic_kvm_info populated earlier.

This support has been co-developed with T.Hayes, indicated with
Co-authored-by tags.

This series is based and dependent on [PATCH v5 00/27] Arm GICv5: Host
driver implementation [1].

Feedback welcome!

Thanks,
Sascha

[1] https://lore.kernel.org/all/20250618-gicv5-host-v5-0-d9e622ac5539@kernel.org/

Sascha Bischoff (5):
  irqchip/gic-v5: Skip deactivate for forwarded PPI interrupts
  irqchip/gic-v5: Populate struct gic_kvm_info
  arm64/sysreg: Add ICH_VCTLR_EL2
  KVM: arm64: gic-v5: Support GICv3 compat
  KVM: arm64: gic-v5: Probe for GICv5

 arch/arm64/include/asm/kvm_asm.h      |  2 +
 arch/arm64/include/asm/kvm_hyp.h      |  2 +
 arch/arm64/kvm/Makefile               |  3 +-
 arch/arm64/kvm/hyp/nvhe/hyp-main.c    | 12 +++++
 arch/arm64/kvm/hyp/vgic-v3-sr.c       | 51 +++++++++++++++++----
 arch/arm64/kvm/sys_regs.c             | 10 ++++-
 arch/arm64/kvm/vgic/vgic-init.c       |  9 +++-
 arch/arm64/kvm/vgic/vgic-v3.c         |  6 +++
 arch/arm64/kvm/vgic/vgic-v5.c         | 64 +++++++++++++++++++++++++++
 arch/arm64/kvm/vgic/vgic.h            |  4 ++
 arch/arm64/tools/sysreg               |  6 +++
 drivers/irqchip/irq-gic-v5.c          | 51 +++++++++++++++++++++
 include/kvm/arm_vgic.h                |  9 +++-
 include/linux/irqchip/arm-vgic-info.h |  4 ++
 14 files changed, 220 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm64/kvm/vgic/vgic-v5.c

-- 
2.34.1

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2025-06-27  9:50 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-20 16:07 [PATCH 0/5] KVM: arm64: Enable GICv3 guests on GICv5 hosts using FEAT_GCIE_LEGACY Sascha Bischoff
2025-06-20 16:07 ` [PATCH 1/5] irqchip/gic-v5: Skip deactivate for forwarded PPI interrupts Sascha Bischoff
2025-06-23 15:21   ` Lorenzo Pieralisi
2025-06-27  9:49     ` Sascha Bischoff
2025-06-20 16:07 ` [PATCH 3/5] arm64/sysreg: Add ICH_VCTLR_EL2 Sascha Bischoff
2025-06-20 16:07 ` [PATCH 4/5] KVM: arm64: gic-v5: Support GICv3 compat Sascha Bischoff
2025-06-20 20:20   ` Oliver Upton
2025-06-20 23:02     ` Oliver Upton
2025-06-23 13:11       ` Sascha Bischoff
2025-06-22 12:19     ` Marc Zyngier
2025-06-22 12:37       ` Oliver Upton
2025-06-23 13:02         ` Sascha Bischoff
2025-06-20 16:07 ` [PATCH 2/5] irqchip/gic-v5: Populate struct gic_kvm_info Sascha Bischoff
2025-06-23 15:14   ` Lorenzo Pieralisi
2025-06-27  9:49     ` Sascha Bischoff
2025-06-20 16:07 ` [PATCH 5/5] KVM: arm64: gic-v5: Probe for GICv5 Sascha Bischoff
2025-06-20 20:25   ` Oliver Upton
2025-06-23 13:12     ` Sascha Bischoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®