Skip to content

KVM: arm64: Add NV GICv3 support

Marc Zyngier kvm kvmarm linux-arm-kernel 4 versions – Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest16 patches 1 replyApplied
  2. v316 patches 0 repliesSuperseded
  3. v217 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v116 patches1 replySuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/16arm64: sysreg: Add layout for ICH_HCR_EL2arch/arm64/include/asm/sysreg.h arch/arm64/kvm/emulate-nested.c arch/arm64/kvm/hyp/vgic-v3-sr.c +4 more+50 -510 replies
2/16arm64: sysreg: Add layout for ICH_VTR_EL2arch/arm64/include/asm/sysreg.h arch/arm64/kvm/vgic-sys-reg-v3.c arch/arm64/kvm/vgic/vgic-v3.c +2 more+25 -390 replies
3/16arm64: sysreg: Add layout for ICH_MISR_EL2arch/arm64/include/asm/sysreg.h arch/arm64/tools/sysreg tools/arch/arm64/include/asm/sysreg.h+12 -100 replies
4/16KVM: arm64: nv: Load timer before the GICarch/arm64/kvm/arm.c+1 -10 replies
5/16KVM: arm64: nv: Add ICH_*_EL2 registers to vpcu_sysregarch/arm64/include/asm/kvm_host.h+26 -00 replies
6/16KVM: arm64: nv: Plumb handling of GICv3 EL2 accessesarch/arm64/kvm/Makefile arch/arm64/kvm/sys_regs.c arch/arm64/kvm/vgic/vgic-v3-nested.c +1 more+224 -20 replies
7/16KVM: arm64: nv: Sanitise ICH_HCR_EL2 accessesarch/arm64/kvm/nested.c+9 -00 replies
8/16KVM: arm64: nv: Nested GICv3 emulationarch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/hyp/vgic-v3-sr.c arch/arm64/kvm/vgic/vgic-v3-nested.c +4 more+244 -10 replies
9/16KVM: arm64: nv: Handle L2->L1 transition on interrupt injectionarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/arm.c arch/arm64/kvm/nested.c +1 more+41 -80 replies
10/16KVM: arm64: nv: Add Maintenance Interrupt emulationarch/arm64/kvm/arm.c arch/arm64/kvm/vgic/vgic-init.c arch/arm64/kvm/vgic/vgic-v3-nested.c +3 more+95 -00 replies
11/16KVM: arm64: nv: Respect virtual HCR_EL2.TWx settingarch/arm64/include/asm/kvm_emulate.h arch/arm64/kvm/handle_exit.c+18 -10 replies
12/16KVM: arm64: nv: Request vPE doorbell upon nested ERET to L2arch/arm64/include/asm/kvm_host.h arch/arm64/kvm/emulate-nested.c arch/arm64/kvm/vgic/vgic-v4.c+21 -10 replies
13/16KVM: arm64: nv: Propagate used_lrs between L1 and L0 contextsarch/arm64/kvm/vgic/vgic-v3-nested.c+7 -00 replies
14/16KVM: arm64: nv: Fold GICv3 host trapping requirements into guest setuparch/arm64/kvm/vgic/vgic-v3-nested.c+17 -30 replies
15/16KVM: arm64: nv: Allow userland to set VGIC maintenance IRQDocumentation/virt/kvm/devices/arm-vgic-v3.rst arch/arm64/include/uapi/asm/kvm.h arch/arm64/kvm/vgic/vgic-kvm-device.c +1 more+40 -30 replies
16/16KVM: arm64: nv: Fail KVM init if asking for NV without GICv3arch/arm64/kvm/arm.c+7 -00 replies

Reviews trailers per patch

3 of 16 patches have a Reviewed-by or Acked-by.

PatchAndre Przywara
1/16R-b
2/16R-b
3/16R-b
4/16
5/16
6/16
7/16
8/16
9/16
10/16
11/16
12/16
13/16
14/16
15/16
16/16

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 00/16] KVM: arm64: Add NV GICv3 support

Here's a respin of the NV support for GICv3. The integration branch containing this (and the rest of the NV stack) is still at [4].

At this stage, I think this is good to go.

* From v3 [3]:

- Added a comment indicating the relative priority of L2->L1 IRQ handling as a request

- Rebased on 6.14-rc3

* From v2 [2]:

- Picked RBs from Andre, with thanks

- Rebased on 6.14-rc1

* From v1 [1]:

- Fix the default value for the MI INTID to PPI9, instead of something fairly random...

- Fail KVM initialisation if asking for NV on HW without a virtual

    GICv3.

[1] https://lore.kernel.org/r/[email protected]
[2] https://lore.kernel.org/r/[email protected]
[3] https://lore.kernel.org/r/[email protected]
[4] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/nv-next

Andre Przywara (1):
KVM: arm64: nv: Allow userland to set VGIC maintenance IRQ

Jintack Lim (1):
KVM: arm64: nv: Respect virtual HCR_EL2.TWx setting

Marc Zyngier (13):
arm64: sysreg: Add layout for ICH_HCR_EL2
arm64: sysreg: Add layout for ICH_VTR_EL2
arm64: sysreg: Add layout for ICH_MISR_EL2
KVM: arm64: nv: Load timer before the GIC
KVM: arm64: nv: Add ICH_*_EL2 registers to vpcu_sysreg
KVM: arm64: nv: Plumb handling of GICv3 EL2 accesses
KVM: arm64: nv: Sanitise ICH_HCR_EL2 accesses
KVM: arm64: nv: Nested GICv3 emulation
KVM: arm64: nv: Handle L2->L1 transition on interrupt injection
KVM: arm64: nv: Add Maintenance Interrupt emulation
KVM: arm64: nv: Propagate used_lrs between L1 and L0 contexts
KVM: arm64: nv: Fold GICv3 host trapping requirements into guest setup
KVM: arm64: nv: Fail KVM init if asking for NV without GICv3

Oliver Upton (1):
KVM: arm64: nv: Request vPE doorbell upon nested ERET to L2

 .../virt/kvm/devices/arm-vgic-v3.rst          |  12 +-
 arch/arm64/include/asm/kvm_emulate.h          |  13 +
 arch/arm64/include/asm/kvm_host.h             |  45 +-
 arch/arm64/include/asm/kvm_hyp.h              |   2 +
 arch/arm64/include/asm/sysreg.h               |  30 --
 arch/arm64/include/uapi/asm/kvm.h             |   1 +
 arch/arm64/kvm/Makefile                       |   2 +-
 arch/arm64/kvm/arm.c                          |  20 +-
 arch/arm64/kvm/emulate-nested.c               |  18 +-
 arch/arm64/kvm/handle_exit.c                  |   6 +-
 arch/arm64/kvm/hyp/vgic-v3-sr.c               |  16 +-
 arch/arm64/kvm/nested.c                       |  13 +
 arch/arm64/kvm/sys_regs.c                     |  95 +++-
 arch/arm64/kvm/vgic-sys-reg-v3.c              |   8 +-
 arch/arm64/kvm/vgic/vgic-init.c               |  29 ++
 arch/arm64/kvm/vgic/vgic-kvm-device.c         |  29 +-
 arch/arm64/kvm/vgic/vgic-v3-nested.c          | 409 ++++++++++++++++++
 arch/arm64/kvm/vgic/vgic-v3.c                 |  44 +-
 arch/arm64/kvm/vgic/vgic-v4.c                 |  18 +-
 arch/arm64/kvm/vgic/vgic.c                    |  38 ++
 arch/arm64/kvm/vgic/vgic.h                    |   6 +
 arch/arm64/tools/sysreg                       |  48 ++
 drivers/irqchip/irq-apple-aic.c               |   8 +-
 include/kvm/arm_vgic.h                        |  10 +
 tools/arch/arm/include/uapi/asm/kvm.h         |   1 +
 tools/arch/arm64/include/asm/sysreg.h         |  30 --
 26 files changed, 834 insertions(+), 117 deletions(-)
 create mode 100644 arch/arm64/kvm/vgic/vgic-v3-nested.c
Signature · 1 line
2.39.2