From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796291854; b=EdlNp+7FfKqlRIaPldOBm4e8ifMvGbvJptNPTELXOvcfNrqfNk6j0v2tAUboj4XKPvva PMNOiWKgqc57Ln1mbZ5uByEfQRUkUe22L5+PpzoXHE99i80m2Z4k4nrhm6a6LrFNBJisD m2O3Yv2TUTc11KgOZYtdPNK5IZkD8cvqc9h0ep6QMkq53LB7ZNc85mELnr0n/DSHozHjG liuNDrBK2jBDeRizdyUYx9tK9x7uhWQu+mlFPwSHyH5HBBoQXunz00vi+GAekEgzTgvC+ NwrN9b1cK1rvweSVl4XDY2Nw2WyC4pgrTwXIFFpwPbQsTPrfsqrMcHPAhhHoPJ5ov0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796291854; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=K8T0Hc/XJoT/S/s2CxmkRCgW9f5aH9ynFxGecpRqr0o=; b=XoY0h4EXunS+oHeTF6WHFSiLGUVfAIETE4MF5f5bYvq7oAM1SsCza8Rjbi+YckB19GDs dCSDcXFeNvh3yEPZsWqsNDNteWnhNtwiSYlBOQZy/rJXbjvJ5nczMbQFVlN3uSVFh0si0 2roy0gC4G/XdMbCI0XocBt66f9W2Eyuo3RTcuUu7y6vHd8Y0VpDGQo/8f0GA4doQXPcon QfjPwp2cY8Int25GS4YQ5AbuzAj4m3C2/iFso0+u6B/O/tpW1wUf5c0QBhwzOsiTkRaW/ hKSAH15PbjqiecgMsGCol4SOVYSm/HGTce/9yc2dysAayWXg+/HGkKD/PQioqSBkbGg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="kptFXm/q"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C023606A32F; Thu, 3 Dec 2026 09:57:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kptFXm/q Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EE4D1F00898; Thu, 3 Dec 2026 09:57:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796291853; bh=K8T0Hc/XJoT/S/s2CxmkRCgW9f5aH9ynFxGecpRqr0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kptFXm/q/Q40nn6kTKtlXXQjNCXDwv70Dz5tM4FRm3fycUUNrhePmXVPmknZWi+jk wUYPFdg8ohUpwuTZD+GYJj9zsBWI0Vjz0R5jfpPcgU6K63fmCGB/dIqEIiPtL84nnd mpg15xaIiIhi+MCrmGSEwqhEu8yGaENcPTCwSfwyo1m41X+9OalM1tN4al5orShVOa dIsmm5cBy3dLKlqQOww2bH7cZ6rO9tg0XphiCqhykJnmRAnhLPwyJeCFJ5SOb+onqj 4OWKyiNtz/cpikpujbxs5qTfNKPz2Nux5pcOahXenB4FNTuEGTeGIn4BYwADVelu4B 1zQL14O+rt91w== From: Arnd Bergmann To: Catalin Marinas , Mark Rutland , Will Deacon Cc: Arnd Bergmann , apais@microsoft.com, Christian Borntraeger , Fuad Tabba , hargar@linux.microsoft.com, Joey Gouly , Marc Zyngier , Navneet Singh , Oliver Upton , rlmenge@gmail.com, Siddharth Chintamaneni , Steffen Eiden , Suzuki K Poulose , Sven Schnelle , Yicong Yang , Zenghui Yu , Zhou Wang , kvmarm@lists.linux.dev, kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/4] arm64: add HWCAP3_LS64_ACCDATA Date: Thu, 3 Dec 2026 10:57:02 +0100 Message-ID: <20261203095703.655796-4-arnd@kernel.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261203095703.655796-1-arnd@kernel.org> References: <20261203095703.655796-1-arnd@kernel.org> X-Mailing-List: kvm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Arnd Bergmann LS64_ACCDATA extends the LS64 feature with the user-space st64bv0 instruction and the EL1 ACCDATA register. Like LS64, it was added with Armv8.7, and it roughly corresponds to the 'enqcmd' feature for shared hardware workqueues on x86 CPUs as described in the kernel's SVA documentation. [1] Userspace can check availability of HWCAP3_LS64_ACCDATA to see if the shared hardware workqueue feature is possible. This will be reported regardless of whether CONFIG_ARM64_LS64_ACCDATA is enabled, and a device driver may still fail to enable SVA on a device depending on both kernel configuration and hardware capabilities of the system. Link: https://www.kernel.org/doc/html/v7.3/arch/x86/sva.html#enqcmd [1] Signed-off-by: Arnd Bergmann --- Documentation/arch/arm64/elf_hwcaps.rst | 11 +++++++++++ arch/arm64/include/uapi/asm/hwcap.h | 1 + arch/arm64/kernel/cpufeature.c | 1 + arch/arm64/kernel/cpuinfo.c | 1 + 4 files changed, 14 insertions(+) diff --git a/Documentation/arch/arm64/elf_hwcaps.rst b/Documentation/arch/arm64/elf_hwcaps.rst index f60ca5612daa..f56b38e4349b 100644 --- a/Documentation/arch/arm64/elf_hwcaps.rst +++ b/Documentation/arch/arm64/elf_hwcaps.rst @@ -478,6 +478,17 @@ HWCAP3_SVE_LUT6 Functionality implied by ID_AA64PFR0_EL1.SVE == 0b0001 and ID_AA64ISAR2_EL1.LUT == 0b0010. +HWCAP3_LS64_ACCDATA + Functionality implied by ID_AA64ISAR1_EL1.LS64 >= 0b0011. + Note that the function of instruction st64bv0 requires support + by CPU, system and target (device) memory location and a matching + device driver. HWCAP3_LS64_ACCDATA implies the support of CPU only. + The kernel uses ACCDATA_EL1 to supply the Process Address Space ID + (PASID) of the calling process. The CPU replaces bits [31:0] of the + 64-byte store data with this value. st64bv0 can only be used after + a device driver has bound the process address space to a device that + supports this instruction. Any other I/O access raises SIGBUS with + si_code == BUS_OBJERR. 4. Unused AT_HWCAP bits ----------------------- diff --git a/arch/arm64/include/uapi/asm/hwcap.h b/arch/arm64/include/uapi/asm/hwcap.h index 10272ddb4d6f..c85c445275f6 100644 --- a/arch/arm64/include/uapi/asm/hwcap.h +++ b/arch/arm64/include/uapi/asm/hwcap.h @@ -155,5 +155,6 @@ #define HWCAP3_F16F32DOT (1UL << 9) #define HWCAP3_F16F32MM (1UL << 10) #define HWCAP3_SVE_LUT6 (1UL << 11) +#define HWCAP3_LS64_ACCDATA (1UL << 12) #endif /* _UAPI__ASM_HWCAP_H */ diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index c88ea4b93138..dcbe024284e0 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -3223,6 +3223,7 @@ static const struct arm64_cpu_capabilities arm64_elf_hwcaps[] = { HWCAP_CAP(ID_AA64ISAR1_EL1, DGH, IMP, CAP_HWCAP, KERNEL_HWCAP_DGH), HWCAP_CAP(ID_AA64ISAR1_EL1, I8MM, IMP, CAP_HWCAP, KERNEL_HWCAP_I8MM), HWCAP_CAP(ID_AA64ISAR1_EL1, LS64, LS64, CAP_HWCAP, KERNEL_HWCAP_LS64), + HWCAP_CAP(ID_AA64ISAR1_EL1, LS64, LS64_ACCDATA, CAP_HWCAP, KERNEL_HWCAP_LS64_ACCDATA), HWCAP_CAP(ID_AA64ISAR2_EL1, LUT, IMP, CAP_HWCAP, KERNEL_HWCAP_LUT), HWCAP_CAP(ID_AA64ISAR3_EL1, FAMINMAX, IMP, CAP_HWCAP, KERNEL_HWCAP_FAMINMAX), HWCAP_CAP(ID_AA64ISAR3_EL1, LSFE, IMP, CAP_HWCAP, KERNEL_HWCAP_LSFE), diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 7c374b8c25af..5162babe0304 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -158,6 +158,7 @@ static const char *const hwcap_str[] = { [KERNEL_HWCAP_F16F32DOT] = "f16f32dot", [KERNEL_HWCAP_F16F32MM] = "f16f32mm", [KERNEL_HWCAP_SVE_LUT6] = "svelut6", + [KERNEL_HWCAP_LS64_ACCDATA] = "ls64accdata", }; #ifdef CONFIG_COMPAT -- 2.53.0