[PATCH v3 0/4] st64bv0 support in iommu-sva
Arnd Bergmann
arnd at kernel.org
Thu Dec 3 01:56:59 PST 2026
From: Arnd Bergmann <arnd at arndb.de>
This is an updated set of patches to enable ls64_accdata with the
st64bv0 instruction in Linux, based on additional review from
Catalin and remaining sashiko-bot replies.
The only remaining issue I'm aware of is the error code reported
by the signal handler. I used a hardcoded '0' here instead of
reporting reporting the esr value, which is consistent with
most other trap handlers. If we determine that reporting esr
is both safe to do here and desired, a follow-up patch can
change this for all the traps that have the same behavior.
Changes since v2:
- split out kvm context save/restore change
- turn off fine grained traps for ACCDATA_EL1
- fix thread switch by moving ACCDATA_EL1 access to __switch_to
- report invalid access consistently as SIGBUS when
ls64_accdata is supported by CPU
Changes since v1:
- fix SCTLR_USER_MASK and reset feature on fork/exec
- add a testcase for the HWCAP
- fix compilation with old assembler version
- enable HCRX_EL2_EnAS0 when booting in EL2
- restore ACCDATA_EL1 in cpu_resume
- context-switch host ACCDATA when entering KVM guest
Arnd
Arnd Bergmann (4):
arm64: kvm: save and restore ACCDATA_EL1 if used by host
arm64: dynamically enable st64bv0 for SVA
arm64: add HWCAP3_LS64_ACCDATA
kselftest/arm64: Add HWCAP test for FEAT_LS64_ACCDATA
Documentation/arch/arm64/elf_hwcaps.rst | 11 ++++
arch/arm64/Kconfig | 13 +++++
arch/arm64/include/asm/cpufeature.h | 5 ++
arch/arm64/include/asm/el2_setup.h | 12 +++++
arch/arm64/include/asm/exception.h | 1 +
arch/arm64/include/asm/processor.h | 2 +-
arch/arm64/include/asm/sysreg.h | 2 -
arch/arm64/include/uapi/asm/hwcap.h | 1 +
arch/arm64/kernel/cpufeature.c | 1 +
arch/arm64/kernel/cpuinfo.c | 1 +
arch/arm64/kernel/entry-common.c | 11 ++++
arch/arm64/kernel/process.c | 42 +++++++++++++++
arch/arm64/kernel/suspend.c | 19 +++++++
arch/arm64/kernel/traps.c | 63 ++++++++++++++++++++++
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h | 8 ++-
arch/arm64/tools/sysreg | 5 ++
tools/testing/selftests/arm64/abi/hwcap.c | 50 +++++++++++++++++
17 files changed, 242 insertions(+), 5 deletions(-)
--
2.53.0
Cc: apais at microsoft.com
Cc: Catalin Marinas <catalin.marinas at arm.com>
Cc: Christian Borntraeger <borntraeger at linux.ibm.com>
Cc: Fuad Tabba <fuad.tabba at linux.dev>
Cc: hargar at linux.microsoft.com
Cc: Joey Gouly <joey.gouly at arm.com>
Cc: Marc Zyngier <maz at kernel.org>
Cc: Mark Rutland <mark.rutland at arm.com>
Cc: Navneet Singh <navneetsingh at microsoft.com>
Cc: Oliver Upton <oupton at kernel.org>
Cc: rlmenge at gmail.com
Cc: Siddharth Chintamaneni <sidchintamaneni at gmail.com>
Cc: Steffen Eiden <seiden at linux.ibm.com>
Cc: Suzuki K Poulose <suzuki.poulose at arm.com>
Cc: Sven Schnelle <sven at linux.ibm.com>
Cc: Will Deacon <will at kernel.org>
Cc: Yicong Yang <yangyicong at hisilicon.com>
Cc: Zenghui Yu <yuzenghui at huawei.com>
Cc: Zhou Wang <wangzhou1 at hisilicon.com>
Cc: kvmarm at lists.linux.dev
Cc: kvm at vger.kernel.org
Cc: linux-arm-kernel at lists.infradead.org
Cc: linux-kernel at vger.kernel.org
More information about the linux-arm-kernel
mailing list