KVM/arm64 fixes for 6.14, take #2
Marc Zyngier
maintainerPaolo,
Here's the second batch of KVM/arm64 fixes for 6.14.
The most noticeable item here is a rather large rework of our FP/SIMD/SVE/SME handling, mostly removing a bunch of fairly pointless and not-quite-thought-out optimisations. This fixes a bunch of failures reported in the wild, and makes the code far more maintainable. Thanks to Mark Rutland for doing all the hard work.
The rest is mostly a bunch of fixes cleanups after the merge window (timers, vgic, pKVM...).
Please pull,
M.
The following changes since commit 0e459810285503fb354537e84049e212c5917c33:
KVM: arm64: timer: Don't adjust the EL2 virtual timer offset (2025-02-04 15:10:38 +0000)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git tags/kvmarm-fixes-6.14-2
for you to fetch changes up to b3aa9283c0c505b5cfd25f7d6cfd720de2adc807:
KVM: arm64: vgic: Hoist SGI/PPI alloc from vgic_init() to kvm_create_vgic() (2025-02-13 18:03:54 +0000)
----------------------------------------------------------------
KVM/arm64 fixes for 6.14, take #2
- Large set of fixes for vector handling, specially in the interactions between host and guest state. This fixes a number of bugs affecting actual deployments, and greatly simplifies the FP/SIMD/SVE handling. Thanks to Mark Rutland for dealing with this thankless task.
- Fix an ugly race between vcpu and vgic creation/init, resulting in unexpected behaviours.
- Fix use of kernel VAs at EL2 when emulating timers with nVHE.
- Small set of pKVM improvements and cleanups.
----------------------------------------------------------------
Marc Zyngier (4):
KVM: arm64: Fix __pkvm_host_mkyoung_guest() return value
KVM: arm64: Convert timer offset VA when accessed in HYP code
KVM: arm64: timer: Drop warning on failed interrupt signalling
KVM: arm64: vgic: Hoist SGI/PPI alloc from vgic_init() to kvm_create_vgic()
Mark Rutland (9):
KVM: arm64: Unconditionally save+flush host FPSIMD/SVE/SME state
KVM: arm64: Remove host FPSIMD saving for non-protected KVM
KVM: arm64: Remove VHE host restore of CPACR_EL1.ZEN
KVM: arm64: Remove VHE host restore of CPACR_EL1.SMEN
KVM: arm64: Refactor CPTR trap deactivation
KVM: arm64: Refactor exit handlers
KVM: arm64: Mark some header functions as inline
KVM: arm64: Eagerly switch ZCR_EL{1,2}
KVM: arm64: Simplify warning in kvm_arch_vcpu_load_fp()
Quentin Perret (3):
KVM: arm64: Improve error handling from check_host_shared_guest()
KVM: arm64: Simplify np-guest hypercalls
KVM: arm64: Fix alignment of kvm_hyp_memcache allocations
arch/arm64/include/asm/kvm_emulate.h | 42 --------- arch/arm64/include/asm/kvm_host.h | 24 ++---- arch/arm64/kernel/fpsimd.c | 25 ------ arch/arm64/kvm/arch_timer.c | 16 ++-- arch/arm64/kvm/arm.c | 8 -- arch/arm64/kvm/fpsimd.c | 107 ++--------------------- arch/arm64/kvm/hyp/entry.S | 5 ++ arch/arm64/kvm/hyp/include/hyp/switch.h | 148 ++++++++++++++++++++++++-------- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 15 ++-- arch/arm64/kvm/hyp/nvhe/mem_protect.c | 76 ++++++++-------- arch/arm64/kvm/hyp/nvhe/switch.c | 89 +++++++++---------- arch/arm64/kvm/hyp/vhe/switch.c | 33 ++++--- arch/arm64/kvm/vgic/vgic-init.c | 74 ++++++++-------- 13 files changed, 287 insertions(+), 375 deletions(-)
Paolo Bonzini
maintainerQuoted 37 lines · Marc Zyngier
Paolo,
Here's the second batch of KVM/arm64 fixes for 6.14.
The most noticeable item here is a rather large rework of our FP/SIMD/SVE/SME handling, mostly removing a bunch of fairly pointless and not-quite-thought-out optimisations. This fixes a bunch of failures reported in the wild, and makes the code far more maintainable. Thanks to Mark Rutland for doing all the hard work.
The rest is mostly a bunch of fixes cleanups after the merge window (timers, vgic, pKVM...).
Please pull,
The following changes since commit
0e459810285503fb354537e84049e212c5917c33:KVM: arm64: timer: Don't adjust the EL2 virtual timer offset (2025-02-04 15:10:38 +0000)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.gittags/kvmarm-fixes-6.14-2for you to fetch changes up to
b3aa9283c0c505b5cfd25f7d6cfd720de2adc807:KVM: arm64: vgic: Hoist SGI/PPI alloc from
vgic_init()tokvm_create_vgic()(2025-02-13 18:03:54 +0000)----------------------------------------------------------------
KVM/arm64 fixes for 6.14, take #2- Large set of fixes for vector handling, specially in the interactions between host and guest state. This fixes a number of bugs affecting actual deployments, and greatly simplifies the FP/SIMD/SVE handling. Thanks to Mark Rutland for dealing with this thankless task.
Quoted 6 lines
- Fix an ugly race between vcpu and vgic creation/init, resulting in unexpected behaviours.
- Fix use of kernel VAs at EL2 when emulating timers with nVHE.
- Small set of pKVM improvements and cleanups.
Done, thanks,
Paolo