From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B043C71136 for ; Wed, 11 Jun 2025 21:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Hmr3Nnpb48WHbsbFoVVaq7xUpq92NAd3Si7yKk/JUkg=; b=hcGfMqL7NhzxuROY9XhShs0rKc +67RHc4xuWVrtEO2E3XpLxlWPBg4YzNLgo12HYFMZu1tQ8Tq5wA2YnjERDXCa3OFi5PLelZQxQk28 Yf9fmAkXITYYwJ2gFr5p6SuQMlSrBPkwl3X0Z/f9rvZdPnu5FEJfHN3eZpunEv1kKUC6jjZQEG6jm NLYZlvBR6GknDT7YZRX3dTBFtjK21kwnrZ4lXNFpFCheuCFr6ojTW+r9SATLngE1agWO4lhmimB5L IcAocWSGywNZXoOg+JD7egifP9VdzmqEKrngcRMJDhIgsVQQ80tz+c5fK+WJtzm+9zG+pcRtmaoVD eMkEHKBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPSh8-0000000BFVO-0rVt; Wed, 11 Jun 2025 21:09:14 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPNBX-0000000AM3x-2pvu for linux-arm-kernel@lists.infradead.org; Wed, 11 Jun 2025 15:16:16 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id E99C7A518AD; Wed, 11 Jun 2025 15:16:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F50BC4CEEE; Wed, 11 Jun 2025 15:16:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749654974; bh=nXklkhjhGPFueXugk206tjO1XocGEjlotHKEQ1wizoo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=JSvmFqqyv27mHrmgQnp+DqL683JVATCFJGGw0Kz9zlTnpHNSCrMtHSn19B8xef+xO RvnDSeavvvV3Skxc6lSLFtvMTB2+KOg5XUOuZT0dWqjEzazcsDqptEj0nh669oxTGJ CMw2/pHNNy4aH03QvpRNx1ts7ubFsqhumrpwOfT1FTUadiiYcV7/u/hu8BEGEhw04y CZnpPLDyxufARaquOkvKFIvYbKscmxoj6SUfJZukcGa9zcV+ln9fg1XEO3m+POPu/3 9S+NT0VWvak8dD0/5nEhOrR7bA4wfcA1eN1nUVTeQYNWDr25AXUwGWzuPbtu3ths53 qYRpdhMG3/THQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1uPNBU-005umF-8L; Wed, 11 Jun 2025 16:16:12 +0100 Date: Wed, 11 Jun 2025 16:16:10 +0100 Message-ID: <861prqe2bp.wl-maz@kernel.org> From: Marc Zyngier To: Yeoreum Yun Cc: catalin.marinas@arm.com, will@kernel.org, broonie@kernel.org, oliver.upton@linux.dev, ardb@kernel.org, frederic@kernel.org, james.morse@arm.com, joey.gouly@arm.com, scott@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/6] arm64: cpufeature: add FEAT_LSUI In-Reply-To: <20250611104916.10636-2-yeoreum.yun@arm.com> References: <20250611104916.10636-1-yeoreum.yun@arm.com> <20250611104916.10636-2-yeoreum.yun@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: yeoreum.yun@arm.com, catalin.marinas@arm.com, will@kernel.org, broonie@kernel.org, oliver.upton@linux.dev, ardb@kernel.org, frederic@kernel.org, james.morse@arm.com, joey.gouly@arm.com, scott@os.amperecomputing.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250611_081615_779404_5D738323 X-CRM114-Status: GOOD ( 18.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 11 Jun 2025 11:49:11 +0100, Yeoreum Yun wrote: > > Since Armv9.6, FEAT_LSUI supplies load/store instructions > for privileged level to access user memory without clearing PSTATE.PAN bit. > > Add LSUI feature so that the unprevilieged load/store instrcutions nit: instructions > could be used when kernel accesses user memory without clearing PSTATE.PAN bit. > > Signed-off-by: Yeoreum Yun > --- > arch/arm64/kernel/cpufeature.c | 8 ++++++++ > arch/arm64/tools/cpucaps | 1 + > 2 files changed, 9 insertions(+) > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > index b34044e20128..d914982c7cee 100644 > --- a/arch/arm64/kernel/cpufeature.c > +++ b/arch/arm64/kernel/cpufeature.c > @@ -278,6 +278,7 @@ static const struct arm64_ftr_bits ftr_id_aa64isar2[] = { > > static const struct arm64_ftr_bits ftr_id_aa64isar3[] = { > ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR3_EL1_FPRCVT_SHIFT, 4, 0), > + ARM64_FTR_BITS(FTR_HIDDEN, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR3_EL1_LSUI_SHIFT, 4, ID_AA64ISAR3_EL1_LSUI_NI), > ARM64_FTR_BITS(FTR_VISIBLE, FTR_NONSTRICT, FTR_LOWER_SAFE, ID_AA64ISAR3_EL1_FAMINMAX_SHIFT, 4, 0), > ARM64_FTR_END, > }; Please enable the equivalent bits in KVM so that the feature can be exposed to a guest. Thanks, M. -- Without deviation from the norm, progress is not possible.