public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v11 RESEND 0/9] support FEAT_LSUI
@ 2025-12-14 11:22 Yeoreum Yun
  2025-12-14 11:22 ` [PATCH v11 RESEND 1/9] arm64: cpufeature: add FEAT_LSUI Yeoreum Yun
                   ` (9 more replies)
  0 siblings, 10 replies; 37+ messages in thread
From: Yeoreum Yun @ 2025-12-14 11:22 UTC (permalink / raw)
  To: catalin.marinas, will, maz, broonie, oliver.upton,
	miko.lenczewski, kevin.brodsky, ardb, suzuki.poulose, lpieralisi,
	yangyicong, scott, joey.gouly, yuzenghui, pbonzini, shuah,
	mark.rutland, arnd
  Cc: linux-arm-kernel, linux-kernel, kvmarm, kvm, linux-kselftest,
	Yeoreum Yun

Since Armv9.6, FEAT_LSUI supplies the load/store instructions for
previleged level to access to access user memory without clearing
PSTATE.PAN bit.

This patchset support FEAT_LSUI and applies in futex atomic operation
and user_swpX emulation where can replace from ldxr/st{l}xr
pair implmentation with clearing PSTATE.PAN bit to correspondant
load/store unprevileged atomic operation without clearing PSTATE.PAN bit.

This patch based on v6.19-rc1


Patch Sequences
================

Patch #1 adds cpufeature for FEAT_LSUI

Patch #2-#3 expose FEAT_LSUI to guest

Patch #4 adds Kconfig for FEAT_LSUI

Patch #5-#6 support futex atomic-op with FEAT_LSUI

Patch #7-#9 support user_swpX emulation with FEAT_LSUI


Patch History
==============
from v10 to v11:
  - rebase to v6.19-rc1
  - use cast instruction to emulate deprecated swpb instruction
  - https://lore.kernel.org/all/20251103163224.818353-1-yeoreum.yun@arm.com/

from v9 to v10:
  - apply FEAT_LSUI to user_swpX emulation.
  - add test coverage for LSUI bit in ID_AA64ISAR3_EL1
  - rebase to v6.18-rc4
  - https://lore.kernel.org/all/20250922102244.2068414-1-yeoreum.yun@arm.com/

from v8 to v9:
  - refotoring __lsui_cmpxchg64()
  - rebase to v6.17-rc7
  - https://lore.kernel.org/all/20250917110838.917281-1-yeoreum.yun@arm.com/

from v7 to v8:
  - implements futex_atomic_eor() and futex_atomic_cmpxchg() with casalt
    with C helper.
  - Drop the small optimisation on ll/sc futex_atomic_set operation.
  - modify some commit message.
  - https://lore.kernel.org/all/20250816151929.197589-1-yeoreum.yun@arm.com/

from v6 to v7:
  - wrap FEAT_LSUI with CONFIG_AS_HAS_LSUI in cpufeature
  - remove unnecessary addition of indentation.
  - remove unnecessary mte_tco_enable()/disable() on LSUI operation.
  - https://lore.kernel.org/all/20250811163635.1562145-1-yeoreum.yun@arm.com/

from v5 to v6:
  - rebase to v6.17-rc1
  - https://lore.kernel.org/all/20250722121956.1509403-1-yeoreum.yun@arm.com/

from v4 to v5:
  - remove futex_ll_sc.h futext_lsui and lsui.h and move them to futex.h
  - reorganize the patches.
  - https://lore.kernel.org/all/20250721083618.2743569-1-yeoreum.yun@arm.com/

from v3 to v4:
  - rebase to v6.16-rc7
  - modify some patch's title.
  - https://lore.kernel.org/all/20250617183635.1266015-1-yeoreum.yun@arm.com/

from v2 to v3:
  - expose FEAT_LUSI to guest
  - add help section for LUSI Kconfig
  - https://lore.kernel.org/all/20250611151154.46362-1-yeoreum.yun@arm.com/

from v1 to v2:
  - remove empty v9.6 menu entry
  - locate HAS_LUSI in cpucaps in order
  - https://lore.kernel.org/all/20250611104916.10636-1-yeoreum.yun@arm.com/


Yeoreum Yun (9):
  arm64: cpufeature: add FEAT_LSUI
  KVM: arm64: expose FEAT_LSUI to guest
  KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI
  arm64: Kconfig: Detect toolchain support for LSUI
  arm64: futex: refactor futex atomic operation
  arm64: futex: support futex with FEAT_LSUI
  arm64: separate common LSUI definitions into lsui.h
  arm64: armv8_deprecated: convert user_swpX to inline function
  arm64: armv8_deprecated: apply FEAT_LSUI for swpX emulation.

 arch/arm64/Kconfig                            |   5 +
 arch/arm64/include/asm/futex.h                | 291 +++++++++++++++---
 arch/arm64/include/asm/lsui.h                 |  25 ++
 arch/arm64/kernel/armv8_deprecated.c          | 111 +++++--
 arch/arm64/kernel/cpufeature.c                |  10 +
 arch/arm64/kvm/sys_regs.c                     |   3 +-
 arch/arm64/tools/cpucaps                      |   1 +
 .../testing/selftests/kvm/arm64/set_id_regs.c |   1 +
 8 files changed, 381 insertions(+), 66 deletions(-)
 create mode 100644 arch/arm64/include/asm/lsui.h


base-commit: 8f0b4cce4481fb22653697cced8d0d04027cb1e8
--
LEVI:{C3F47F37-75D8-414A-A8BA-3980EC8A46D7}



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

end of thread, other threads:[~2026-01-21 16:53 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-14 11:22 [PATCH v11 RESEND 0/9] support FEAT_LSUI Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 1/9] arm64: cpufeature: add FEAT_LSUI Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 2/9] KVM: arm64: expose FEAT_LSUI to guest Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 3/9] KVM: arm64: kselftest: set_id_regs: add test for FEAT_LSUI Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 4/9] arm64: Kconfig: Detect toolchain support for LSUI Yeoreum Yun
2026-01-19 15:50   ` Will Deacon
2026-01-19 15:54     ` Mark Brown
2026-01-20 11:35       ` Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 5/9] arm64: futex: refactor futex atomic operation Yeoreum Yun
2026-01-19 15:57   ` Will Deacon
2026-01-19 22:19     ` Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 6/9] arm64: futex: support futex with FEAT_LSUI Yeoreum Yun
2026-01-19 16:37   ` Will Deacon
2026-01-19 22:17     ` Yeoreum Yun
2026-01-20 15:44       ` Yeoreum Yun
2026-01-21 13:48       ` Will Deacon
2026-01-21 14:16         ` Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 7/9] arm64: separate common LSUI definitions into lsui.h Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 8/9] arm64: armv8_deprecated: convert user_swpX to inline function Yeoreum Yun
2025-12-14 11:22 ` [PATCH v11 RESEND 9/9] arm64: armv8_deprecated: apply FEAT_LSUI for swpX emulation Yeoreum Yun
2025-12-15  9:33   ` Marc Zyngier
2025-12-15  9:56     ` Yeoreum Yun
2026-01-19 15:34       ` Will Deacon
2026-01-19 22:32         ` Yeoreum Yun
2026-01-20  9:32           ` Yeoreum Yun
2026-01-20  9:46           ` Mark Rutland
2026-01-20 10:07             ` Yeoreum Yun
2026-01-20 11:50               ` Will Deacon
2026-01-20 12:14                 ` Yeoreum Yun
2026-01-20 17:59                 ` Yeoreum Yun
2026-01-21 13:56                   ` Will Deacon
2026-01-21 14:51                     ` Yeoreum Yun
2026-01-21 16:20                       ` Will Deacon
2026-01-21 16:31                         ` Yeoreum Yun
2026-01-21 16:36                           ` Will Deacon
2026-01-21 16:51                             ` Yeoreum Yun
2025-12-31 10:07 ` [PATCH v11 RESEND 0/9] support FEAT_LSUI Yeoreum Yun

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