Skip to content

KVM: arm64: Add support for FP8

Marc Zyngier kvm kvmarm linux-arm-kernel 4 versions – Applied

Status from this message: Applied to next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 2 repliesApplied
  2. v38 patches 3 repliesSuperseded
  3. v28 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches8 repliesSuperseded

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/8KVM: arm64: Move SVCR into the sysreg arrayarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/fpsimd.c arch/arm64/kvm/sys_regs.c+14 -30 replies
2/8KVM: arm64: Add predicate for FPMR support in a VMarch/arm64/include/asm/kvm_host.h+4 -00 replies
3/8KVM: arm64: Move FPMR into the sysreg arrayarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/fpsimd.c arch/arm64/kvm/sys_regs.c+12 -20 replies
4/8KVM: arm64: Add save/restore support for FPMRarch/arm64/include/asm/kvm_host.h arch/arm64/kvm/fpsimd.c arch/arm64/kvm/hyp/include/hyp/switch.h +3 more+35 -00 replies
5/8KVM: arm64: Honor trap routing for FPMRarch/arm64/kvm/emulate-nested.c+8 -00 replies
6/8KVM: arm64: Expose ID_AA64FPFR0_EL1 as a writable ID regarch/arm64/kvm/sys_regs.c+1 -10 replies
7/8KVM: arm64: Enable FP8 support when available and configuredarch/arm64/kvm/sys_regs.c+3 -00 replies
8/8KVM: arm64: Expose ID_AA64PFR2_EL1 to userspace and guestsarch/arm64/kvm/sys_regs.c+5 -10 replies

Reviews trailers per patch

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

PatchMark Brown
SeriesR-b T-b
1/8
2/8
3/8
4/8
5/8
6/8
7/8
8/8

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

Read the v4 thread

Cover letter [PATCH v4 0/8] KVM: arm64: Add support for FP8

Although FP8 support was merged in 6.9, the KVM side was dropped, with no sign of it being picked up again. Given that its absence is getting in the way of NV upstreaming (HCRX_EL2 needs fleshing out), here's a small series addressing it.

The support is following the save/restore model established for the rest of the FP code, with FPMR being tied to it. The sole additions are the handling of traps in a nested context, and the corresponding ID registers being made writable. As an extra cleanup, SVCR and FPMR are moved into the sysreg array.

Patches are on top of v6.11-rc1. Note that this is compile-tested only, as I have no access to FP8 HW or model (and running NV in a model is not something I wish to entertain ever again).

* From v3 [3]

- Simplify handling of SYS_ID_AA64PFR2_EL1

* From v2 [2]

- Add missing kern_hyp_va() when dereferencing vcpu->kvm on nVHE setups

* From v1 [1]

- Correctly save/restore the guest state (duh), including pKVM (double duh)

- Add a predicate for FPMR support in a VM, as this gets used more than twice...

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

Marc Zyngier (8):
KVM: arm64: Move SVCR into the sysreg array
KVM: arm64: Add predicate for FPMR support in a VM
KVM: arm64: Move FPMR into the sysreg array
KVM: arm64: Add save/restore support for FPMR
KVM: arm64: Honor trap routing for FPMR
KVM: arm64: Expose ID_AA64FPFR0_EL1 as a writable ID reg
KVM: arm64: Enable FP8 support when available and configured
KVM: arm64: Expose ID_AA64PFR2_EL1 to userspace and guests

 arch/arm64/include/asm/kvm_host.h       | 20 ++++++++++++++--
 arch/arm64/kvm/emulate-nested.c         |  8 +++++++
 arch/arm64/kvm/fpsimd.c                 |  5 ++--
 arch/arm64/kvm/hyp/include/hyp/switch.h |  3 +++
 arch/arm64/kvm/hyp/nvhe/hyp-main.c      |  9 +++++++
 arch/arm64/kvm/hyp/nvhe/switch.c        |  9 +++++++
 arch/arm64/kvm/hyp/vhe/switch.c         |  3 +++
 arch/arm64/kvm/sys_regs.c               | 32 ++++++++++++++++++++++---
 8 files changed, 82 insertions(+), 7 deletions(-)
Signature · 1 line
2.39.2