Skip to content

KVM: arm64: Per-vCPU TLB and I-cache flush in pKVM

Fuad Tabba kvmarm linux-arm-kernel lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: Track physical CPU number at EL2arch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/nvhe/hyp-smp.c+8 -02 replies
2/2KVM: arm64: Ensure TLBs and I-cache are private to each vCPU in pKVMarch/arm64/kvm/hyp/include/nvhe/pkvm.h arch/arm64/kvm/hyp/nvhe/hyp-main.c arch/arm64/kvm/hyp/nvhe/pkvm.c+29 -37 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchJoey Gouly
1/2
2/2R-b

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

Read the v1 thread

Cover letter [PATCH 0/2] KVM: arm64: Per-vCPU TLB and I-cache flush in pKVM

Hi folks,

Since 6.14, protected and non-protected pKVM guests run on the hypervisor's VMID. The host no longer flushes a CPU's TLBs and I-cache when a different vCPU of the same VM is loaded there, so vCPUs of one guest can hit each other's entries. This series adds the flush at EL2.

An earlier version of these patches was in Will's pKVM base series in 2022 [1], but didn't make it into its later versions.

This series is based on kvmarm/next because the hyp VM is allocated with hyp_alloc() there, and the per-CPU array it adds is allocated the same way.

Based on kvmarm/next (dd0bc00e3e920).

Cheers,
/fuad

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

Fuad Tabba (2):
KVM: arm64: Track physical CPU number at EL2
KVM: arm64: Ensure TLBs and I-cache are private to each vCPU in pKVM

 arch/arm64/include/asm/kvm_hyp.h       |  3 +++
 arch/arm64/kvm/arm.c                   |  3 +++
 arch/arm64/kvm/hyp/include/nvhe/pkvm.h |  3 +++
 arch/arm64/kvm/hyp/nvhe/hyp-main.c     |  8 ++++++++
 arch/arm64/kvm/hyp/nvhe/hyp-smp.c      |  2 ++
 arch/arm64/kvm/hyp/nvhe/pkvm.c         | 21 ++++++++++++++++++---
 6 files changed, 37 insertions(+), 3 deletions(-)

base-commit: dd0bc00e3e9201fd49b62ff9cc07890c89003afe

Signature · 1 line
2.39.5