Skip to content

KVM: arm64: pKVM host hypercall and GICv5 CPU interface fixes

Fuad Tabba kvmarm linux-arm-kernel lkml 3 versions – Applied

Status from this message: Applied to fixes, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 2 repliesApplied
  2. v25 patches 5 repliesSuperseded
  3. v17 patches 5 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5KVM: arm64: Reject the GICv5 CPU interface hypercalls under pKVMarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c+4 -41 reply
2/5KVM: arm64: Reject the stage-2 flush hypercalls under pKVMarch/arm64/include/asm/kvm_asm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c+12 -110 replies
3/5KVM: arm64: Validate the host-provided vgic model in pKVMarch/arm64/kvm/hyp/nvhe/pkvm.c+8 -20 replies
4/5KVM: arm64: vgic: Do not access the GICv5 CPU interface from EL1arch/arm64/kvm/vgic/vgic.c+3 -40 replies
5/5KVM: arm64: Fix stale VGICv3 comments in the nVHE world switcharch/arm64/kvm/hyp/nvhe/switch.c+2 -20 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchSuzuki K PouloseSascha Bischoff
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

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

Read the v3 thread

Cover letter [PATCH v3 0/5] KVM: arm64: pKVM host hypercall and GICv5 CPU interface fixes

Hi folks,

Changes since v2 [1]:
- Patch 4 now allows only GICv2 from EL1 and requires VHE for every other CPU interface, instead of adding GICv5 to the VHE list. Same behaviour; I kept Sascha's Reviewed-by. (Marc)
- Added Suzuki's Reviewed-by on patches 1-3.

Thanks Suzuki for the reviews.

Patches 1 and 2 move the GICv5 CPU interface save/restore and the stage-2 flushes into the band the dispatcher rejects once pKVM has finalised, since the host has no use for them in protected mode. Patch 3 validates the vgic model EL2 copies from the host. Patch 4 stops nVHE from accessing the GICv5 CPU interface from EL1, and patch 5 fixes two stale comments.

The GICv5 residency and VDPEND hypercalls in kvmarm/next still check for pKVM in each handler. I'll move them into the same band once this lands.

Based on Linux 7.3-rc3 (fd73f4a665989). On kvmarm/next, patches 1 and 2 have a minor conflict: new hypercall IDs sit next to the ones they move.

Cheers,
/fuad

[1] https://lore.kernel.org/all/[email protected]/

Fuad Tabba (5):
KVM: arm64: Reject the GICv5 CPU interface hypercalls under pKVM
KVM: arm64: Reject the stage-2 flush hypercalls under pKVM
KVM: arm64: Validate the host-provided vgic model in pKVM
KVM: arm64: vgic: Do not access the GICv5 CPU interface from EL1
KVM: arm64: Fix stale VGICv3 comments in the nVHE world switch

 arch/arm64/include/asm/kvm_asm.h   | 16 ++++++++--------
 arch/arm64/kvm/hyp/nvhe/hyp-main.c | 15 ++++++++-------
 arch/arm64/kvm/hyp/nvhe/pkvm.c     | 10 ++++++++--
 arch/arm64/kvm/hyp/nvhe/switch.c   |  4 ++--
 arch/arm64/kvm/vgic/vgic.c         |  7 +++----
 5 files changed, 29 insertions(+), 23 deletions(-)

base-commit: fd73f4a6659897191fa0d40695fe370925dd3780

Signature · 1 line
2.39.5