From patchwork Wed Aug 21 13:07:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13771610 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 8B8EFC52D6F for ; Wed, 21 Aug 2024 13:14:58 +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:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=GHVBN+m1mSlTy5jP+Yo2OrzzL0CaQAEcTyCqNC5X0os=; b=uoHU3twPj2QFww gGLGNKuUA7seX/7JJG5KkSlY7zStSvMQrwqSVNTb0JI7l0YyqUtqePJE3138S77+p+9g5KKP9Q13U ju65qIAcA0gIn9kY7IlDYTIxSu6M0jcsTFJP14uWTLbn52Q6kvJVVC4LEsRYw8eMRbOMrkvSM70WC efbjCrqwI8qQ8qmjIQLofUt4yV0jCqPuXS8j7n0SEceVMVer1Qs7Ig0pGAZlzS5MkVibSon+y8gGq ovE7QhU1Ho1+cV4WzF5I/BNX0is7De46OxpiIgdYUcqGUkkYji1a+568lGtWcTs1RH04ZHo7ssPrs 5VdtY9kwIrF7qACvqQHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sglAm-000000095Fu-1kSp; Wed, 21 Aug 2024 13:14:48 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sglA1-000000094yJ-0tHL for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 13:14:02 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E3E0C6101A; Wed, 21 Aug 2024 13:13:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 445D1C4AF09; Wed, 21 Aug 2024 13:13:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724246039; bh=Fp/kBiHhGW3ypUrMjF3hQ3gJlZW1Yk2OBO3LISE+nPA=; h=From:Subject:Date:To:Cc:From; b=m8GbwIcAnkvNooBUabiD42uIEi7h1gcYlSrqALGUzHKRpz4LHaCMVHXabZUeYVKt4 LRhcEMYGDb3ok5ILZfRLFGI7mpUUmM6BtL5U3+C90wRwSU3/u9DAj+grqu53E2w381 VQYPsW1J51anpvk9HfHwQwPxX0bVpLWY66pH6lvM9T70Pkai5mXWBEU+sPVx7XncgJ hNb0wk3laXHHanoFOCdKbDyTzeyN+5mHort1alyepGByJTTpBHF87LJI+3NCj24ewC tfrdwl7DboduahXiutL3uUMCfnozghKaV4b+k7h2uJKezsqU7DljumNz3n04ONVFOE NKIWkNEkwTnUQ== From: Mark Brown Subject: [PATCH 0/2] KVM: arm64: Control visibility of S1PIE related sysregs to userspace Date: Wed, 21 Aug 2024 14:07:14 +0100 Message-Id: <20240821-kvm-arm64-hide-pie-regs-v1-0-08cb3c79cb57@kernel.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAILmxWYC/x3MSwqAMAwA0atI1gZilCpeRVxUjTWIH1IQQby7x eVbzDwQxVQitNkDJpdGPfaEIs9gXPweBHVKBiauqGHC9drQ2+YqXHQSPFXQJERkLt1cU02lHyD Vp8ms93/u+vf9AObAoa9pAAAA To: Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , Joey Gouly Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=858; i=broonie@kernel.org; h=from:subject:message-id; bh=Fp/kBiHhGW3ypUrMjF3hQ3gJlZW1Yk2OBO3LISE+nPA=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmxegR90BAwaQnJTILyD4vHttQU9B/QKF3cFt5DPVl 0tcmFXaJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZsXoEQAKCRAk1otyXVSH0OJsB/ 0Xeckx36onhHACU75Xlrqk8Peem3AyN0vY2O/ewZ4ri8qEOuTKl2U6ZTelpfYIa8mW6cV2tWSTEM2Y O+HxSWIb0M5kDMslZgiawHY5x+JtgoaxD5B8cIcjekFGcKbEOiyljQWShOV2AoVn9mf4WFlYtIlg2L D2/yFA6eMkbjhh1olHFUniBaE/h+yf9lW1C/bnje38UCZzJLOjREcb17ozPjYWMl4CDu7CZTg0d7EM QfXqg9D7htYXcwdtI72Z7KuKmJg0KfaAS+FLhCxdSwjUx5fosAvtBo8DlhFDAtqLzhJzop9ugjqpJp XYgJ8DuSlY8guPF6jcXg0CkJicRuE7 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_061401_413263_F6B50648 X-CRM114-Status: UNSURE ( 8.39 ) X-CRM114-Notice: Please train this message. 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 While looking at the KVM system register code I noticed that we do not have visibility operations for TCR2 or the S1PIE registers, I may be missing some reason why they are not required but in case I'm not I figured the most direct way to ask was to propose adding the operations. Signed-off-by: Mark Brown --- Mark Brown (2): KVM: arm64: Hide TCR2_EL1 from userspace when disabled for guests KVM: arm64: Hide S1PIE registers from userspace when disabled for guests arch/arm64/include/asm/kvm_host.h | 6 ++++++ arch/arm64/kvm/sys_regs.c | 31 ++++++++++++++++++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) --- base-commit: 6e4436539ae182dc86d57d13849862bcafaa4709 change-id: 20240820-kvm-arm64-hide-pie-regs-2236f70703ab Best regards,