mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/4] st64bv0 support in iommu-sva
@ 2026-12-03  9:56 Arnd Bergmann
  2026-12-03  9:57 ` [PATCH v3 1/4] arm64: kvm: save and restore ACCDATA_EL1 if used by host Arnd Bergmann
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Arnd Bergmann @ 2026-12-03  9:56 UTC (permalink / raw)
  To: Catalin Marinas, Mark Rutland, Will Deacon
  Cc: Arnd Bergmann, apais, Christian Borntraeger, Fuad Tabba, hargar,
	Joey Gouly, Marc Zyngier, Navneet Singh, Oliver Upton, rlmenge,
	Siddharth Chintamaneni, Steffen Eiden, Suzuki K Poulose,
	Sven Schnelle, Yicong Yang, Zenghui Yu, Zhou Wang, kvmarm, kvm,
	linux-arm-kernel, linux-kernel

From: Arnd Bergmann <arnd@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@microsoft.com
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christian Borntraeger <borntraeger@linux.ibm.com>
Cc: Fuad Tabba <fuad.tabba@linux.dev>
Cc: hargar@linux.microsoft.com
Cc: Joey Gouly <joey.gouly@arm.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Navneet Singh <navneetsingh@microsoft.com>
Cc: Oliver Upton <oupton@kernel.org>
Cc: rlmenge@gmail.com
Cc: Siddharth Chintamaneni <sidchintamaneni@gmail.com>
Cc: Steffen Eiden <seiden@linux.ibm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Sven Schnelle <sven@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Cc: Zenghui Yu <yuzenghui@huawei.com>
Cc: Zhou Wang <wangzhou1@hisilicon.com>
Cc: kvmarm@lists.linux.dev
Cc: kvm@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-03  9:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-03  9:56 [PATCH v3 0/4] st64bv0 support in iommu-sva Arnd Bergmann
2026-12-03  9:57 ` [PATCH v3 1/4] arm64: kvm: save and restore ACCDATA_EL1 if used by host Arnd Bergmann
2026-12-03  9:57 ` [PATCH v3 2/4] arm64: dynamically enable st64bv0 for SVA Arnd Bergmann
2026-12-03  9:57 ` [PATCH v3 3/4] arm64: add HWCAP3_LS64_ACCDATA Arnd Bergmann
2026-12-03  9:57 ` [PATCH v3 4/4] kselftest/arm64: Add HWCAP test for FEAT_LS64_ACCDATA Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®