Skip to content

KVM: arm64: Support SVE in protected VMs

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4KVM: arm64: Remove redundant kern_hyp_va() calls from the pKVM FP syncarch/arm64/kvm/hyp/nvhe/hyp-main.c+2 -20 replies
2/4KVM: arm64: Allocate a protected vCPU's SVE state at EL2arch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/hyp/nvhe/pkvm.c arch/arm64/kvm/hyp/nvhe/sys_regs.c +1 more+31 -142 replies
3/4KVM: arm64: Advertise ID_AA64ZFR0_EL1 to protected VMsarch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/nvhe/sys_regs.c+21 -00 replies
4/4KVM: arm64: Allow protected VMs to use SVEDocumentation/virt/kvm/arm/pkvm.rst arch/arm64/include/asm/kvm_pkvm.h arch/arm64/kvm/hyp/nvhe/switch.c +1 more+5 -50 replies

Reviews trailers per patch

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

PatchVincent Donnefort
SeriesR-b T-b
1/4
2/4
3/4
4/4

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/4] KVM: arm64: Support SVE in protected VMs

Hi folks,

This series adds SVE support for protected VMs. EL2 allocates a protected vCPU's SVE state from its own heap rather than pinning the host's buffer, so the host never sees the guest's vector registers. It then advertises ID_AA64ZFR0_EL1 to protected VMs, and routes the SVE trap to the lazy FP switch. The first patch is a small tidy-up of the pKVM FP sync code that saves a guest's SVE state.

v2 of the pKVM selftests series [1] will add a selftest for this.

Based on Linux 7.4-rc1 (6628e7d4c6b25).

Cheers,
/fuad

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

Fuad Tabba (4):
KVM: arm64: Remove redundant kern_hyp_va() calls from the pKVM FP sync
KVM: arm64: Allocate a protected vCPU's SVE state at EL2
KVM: arm64: Advertise ID_AA64ZFR0_EL1 to protected VMs
KVM: arm64: Allow protected VMs to use SVE

 Documentation/virt/kvm/arm/pkvm.rst |  6 ++---
 arch/arm64/include/asm/kvm_hyp.h    |  2 ++
 arch/arm64/include/asm/kvm_pkvm.h   |  1 +
 arch/arm64/kvm/arm.c                |  1 +
 arch/arm64/kvm/hyp/nvhe/hyp-main.c  |  4 +--
 arch/arm64/kvm/hyp/nvhe/pkvm.c      | 41 +++++++++++++++++++----------
 arch/arm64/kvm/hyp/nvhe/switch.c    |  1 +
 arch/arm64/kvm/hyp/nvhe/sys_regs.c  | 22 ++++++++++++++--
 arch/arm64/kvm/reset.c              |  2 ++
 9 files changed, 59 insertions(+), 21 deletions(-)

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4

Signature · 1 line
2.47.3