Skip to content

KVM: arm64: Support debug, SVE, MOPS, PIE/POE, FPMR and more in protected VMs

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16KVM: arm64: Add support for self-hosted debug in protected guestsDocumentation/virt/kvm/arm/pkvm.rst arch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c +4 more+248 -250 replies
2/16KVM: arm64: Remove redundant kern_hyp_va() calls from the pKVM FP syncarch/arm64/kvm/hyp/nvhe/hyp-main.c+2 -20 replies
3/16KVM: 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 -140 replies
4/16KVM: 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 -01 reply
5/16KVM: 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
6/16KVM: arm64: Move the VM's FGU initialisation into config.carch/arm64/include/asm/kvm_host.h arch/arm64/kvm/config.c arch/arm64/kvm/sys_regs.c+21 -180 replies
7/16KVM: arm64: Compute a protected vCPU's fine-grained traps at EL2arch/arm64/kvm/config.c arch/arm64/kvm/hyp/nvhe/Makefile arch/arm64/kvm/hyp/nvhe/pkvm.c+10 -52 replies
8/16KVM: arm64: Advertise TCR2, SCTLR2, S1PIE and S1POE to protected VMsarch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/nvhe/sys_regs.c+25 -10 replies
9/16KVM: arm64: Advertise MOPS to protected VMsarch/arm64/kvm/hyp/nvhe/sys_regs.c+1 -00 replies
10/16KVM: arm64: Advertise FPMR to protected VMsarch/arm64/kvm/hyp/nvhe/sys_regs.c+2 -00 replies
11/16KVM: arm64: Advertise HBC, CLRBHB, RPRFM, CSSC and LUT to protected VMsarch/arm64/kvm/hyp/nvhe/sys_regs.c+5 -00 replies
12/16KVM: arm64: Advertise FAMINMAX, LSFE, LSUI and FPRCVT to protected VMsarch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/nvhe/sys_regs.c+14 -10 replies
13/16KVM: arm64: Advertise AFP and RPRES to protected VMsarch/arm64/kvm/hyp/nvhe/sys_regs.c+2 -00 replies
14/16KVM: arm64: Advertise ECBHB, TIDCP1, TTST and LVA to protected VMsarch/arm64/kvm/hyp/nvhe/sys_regs.c+4 -00 replies
15/16KVM: arm64: Advertise FP8 and F16MM to protected VMsarch/arm64/include/asm/kvm_hyp.h arch/arm64/kvm/arm.c arch/arm64/kvm/hyp/nvhe/sys_regs.c+19 -10 replies
16/16KVM: arm64: Advertise ECV, HAFT and ETS3 to protected VMsarch/arm64/kvm/hyp/nvhe/sys_regs.c+3 -20 replies

Reviews trailers per patch

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

PatchVincent Donnefort
1/16
2/16T-b R-b
3/16T-b R-b
4/16T-b R-b
5/16T-b R-b
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 v1 thread

Cover letter [PATCH 00/16] KVM: arm64: Support debug, SVE, MOPS, PIE/POE, FPMR and more in protected VMs

Hi folks,

With most of the groundwork now merged, bringing protected VMs up to the features we support for them in Android turns out not to be a big series. So this folds self-hosted debug [1] and SVE [2], which I posted separately last week, into one series with the rest. Both are small, and keeping them apart would only leave a few conflicts where they add neighbouring lines to the pVM ID-register code. The debug and SVE patches are unchanged from those postings.

  01:     Self-hosted debug.
  02-05:  SVE, with EL2 owning a protected vCPU's SVE state.
  06-07:  Compute a protected vCPU's fine-grained traps at EL2.
  08-16:  Advertise TCR2, SCTLR2, S1PIE, S1POE, MOPS, FPMR and the

features EL2 already handles for non-protected guests.

Tested on QEMU, in hVHE and nVHE, and on FVP for S1POE and the fields QEMU doesn't model (CLRBHB, RPRFM, ECBHB, LSFE, LSUI, HAFT, ETS3 and F16MM). v2 of the pKVM selftests series [3] will cover debug, SVE, MOPS, PIE, POE and FPMR.

Based on Linux 7.4-rc1 (6628e7d4c6b25); it also applies to 7.4-rc2 (7475ea8b58616).

Cheers,
/fuad

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

Fuad Tabba (16):
KVM: arm64: Add support for self-hosted debug in protected guests
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
KVM: arm64: Move the VM's FGU initialisation into config.c
KVM: arm64: Compute a protected vCPU's fine-grained traps at EL2
KVM: arm64: Advertise TCR2, SCTLR2, S1PIE and S1POE to protected VMs
KVM: arm64: Advertise MOPS to protected VMs
KVM: arm64: Advertise FPMR to protected VMs
KVM: arm64: Advertise HBC, CLRBHB, RPRFM, CSSC and LUT to protected
VMs
KVM: arm64: Advertise FAMINMAX, LSFE, LSUI and FPRCVT to protected VMs
KVM: arm64: Advertise AFP and RPRES to protected VMs
KVM: arm64: Advertise ECBHB, TIDCP1, TTST and LVA to protected VMs
KVM: arm64: Advertise FP8 and F16MM to protected VMs
KVM: arm64: Advertise ECV, HAFT and ETS3 to protected VMs

 Documentation/virt/kvm/arm/pkvm.rst    |  13 +-
 arch/arm64/include/asm/kvm_host.h      |   2 +-
 arch/arm64/include/asm/kvm_hyp.h       |   6 +
 arch/arm64/include/asm/kvm_pkvm.h      |   1 +
 arch/arm64/kvm/arm.c                   |   5 +
 arch/arm64/kvm/config.c                |  32 ++-
 arch/arm64/kvm/hyp/include/nvhe/pkvm.h |   1 +
 arch/arm64/kvm/hyp/nvhe/Makefile       |   1 +
 arch/arm64/kvm/hyp/nvhe/hyp-main.c     |   6 +-
 arch/arm64/kvm/hyp/nvhe/pkvm.c         |  51 ++--
 arch/arm64/kvm/hyp/nvhe/switch.c       |   1 +
 arch/arm64/kvm/hyp/nvhe/sys_regs.c     | 349 +++++++++++++++++++++++--
 arch/arm64/kvm/reset.c                 |   2 +
 arch/arm64/kvm/sys_regs.c              |  17 +-
 14 files changed, 413 insertions(+), 74 deletions(-)

base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4

Signature · 1 line
2.47.3