Skip to content

KVM: arm64: Sanitise host vCPU fields copied in flush_hyp_vcpu()

Hyunwoo Kim kvmarm linux-arm-kernel stable 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 4 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v3 from the cover letter

- 2/2: replicate kvm_vgic_global_state.nr_lr into hyp_gicv3_nr_lr once at init (guarded by gicv3_cpuif), instead of reading ICH_VTR_EL2 on every entry behind a gicv3_cpuif gate. (Marc)
- v2: https://lore.kernel.org/all/[email protected]/

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2KVM: arm64: Clear __hyp_running_vcpu when flushing the pKVM hyp vCPUarch/arm64/kvm/hyp/nvhe/hyp-main.c+3 -00 replies
2/2KVM: arm64: Bound used_lrs when flushing the pKVM hyp vCPUarch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/nvhe/hyp-main.c+12 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFuad Tabba
SeriesR-b T-b
1/2
2/2

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/2] KVM: arm64: Sanitise host vCPU fields copied in flush_hyp_vcpu()

flush_hyp_vcpu() copies the host vCPU context and vGIC state into the hyp's private vCPU on every run. This series sanitises two fields that it currently copies verbatim (host -> EL2): __hyp_running_vcpu is cleared in the guest context, and used_lrs is bounded by the number of implemented list registers.

Changes in v3:
- 2/2: replicate kvm_vgic_global_state.nr_lr into hyp_gicv3_nr_lr once at init (guarded by gicv3_cpuif), instead of reading ICH_VTR_EL2 on every entry behind a gicv3_cpuif gate. (Marc)
- v2: https://lore.kernel.org/all/[email protected]/

Changes in v2:
- split into two patches, one per field, per review.
- v1: https://lore.kernel.org/all/aiFe-CXo-XVTFz1g@v4bel/

Hyunwoo Kim (2):
KVM: arm64: Clear __hyp_running_vcpu when flushing the pKVM hyp vCPU
KVM: arm64: Bound used_lrs when flushing the pKVM hyp vCPU

 arch/arm64/include/asm/kvm_hyp.h   |  1 +
 arch/arm64/kvm/arm.c               |  2 ++
 arch/arm64/kvm/hyp/nvhe/hyp-main.c | 12 ++++++++++++
 3 files changed, 15 insertions(+)
Signature · 1 line
2.43.0