Message ID | 20240822-kvm-arm64-hide-pie-regs-v2-0-376624fa829c@kernel.org (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 B252EC52D7C for <linux-arm-kernel@archiver.kernel.org>; Wed, 21 Aug 2024 23:37:18 +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=SK1brc/tY+hl7KT/8MV+4oUOPUaoWYDQKypuHUvlF1U=; b=f2zNNUGWcchG9f iUv7TlRvhy8kPhQ5LwbKujQtf8uR8hXY8AvtO6vBhj/zs83VoB6zo3pjs8v8QPC2QJJI1kT/23EXi sVvmSvmARLlmr2cz/vZ3epn8YjDvWarZOpWpIfRdbQxOxw6XBKpS8dPE+SqHwVGJ8VIUXSUmcTKXA gMzHiDwlcU6QDcWGSqKqD4Jj7H1gURedKM3TPz8Tl8UJ59sTDAESTAk/P6krnwGLEYhbiineOVwIX KbODmCuk6Bf0wQdKIvGORN8CizwmY5Q8W0bzC4EmRkJa7Sm2/kpcRI2fVw6LLy+k8ICqGClXiBwMy PrZrpw2asiAA1Nl+ZFDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgusy-0000000AgD1-49nd; Wed, 21 Aug 2024 23:37:04 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgusF-0000000Ag1w-0kuZ for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 23:36:20 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 51F3FCE0599; Wed, 21 Aug 2024 23:36:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D4E9C32781; Wed, 21 Aug 2024 23:36:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724283376; bh=brdzSmFxxU9/yqU24WmdMPuHbC0JPXjGsAbpj8ZmrZ4=; h=From:Subject:Date:To:Cc:From; b=Hdy8/RKS7vtZnQzBzb4jZ4FB6deBgkOouQHpXgvGb6g0R5Pde7NL93mHcJd9ASBCJ 03P+oOPLKKIUoKNBJvvmRNzgy897zDxBLqkjo2yy2rj1Ftp045/+mZ6tnLMN9kOjQm h+fFVkKzuLnVfcLmOeLuw3hcgayMF5IJJpiJG8qY/I6vggavl0l3QBNFX9zwTpxnIP vTdROTdec7Z4tZUY5veVLz358vr8N7eOKjIABZ8ZgJmLFAuxMGDDKqdMGUPkndglCL XN49lQeM3Pbxm/UXYEPAQrCvTmkb1R5soqGYPmXS7V1Cyo1NlwDAw9m+COFNmUcW1U x9Ld+rWGHt2MQ== From: Mark Brown <broonie@kernel.org> Subject: [PATCH v2 0/3] KVM: arm64: Control visibility of S1PIE related sysregs to userspace Date: Thu, 22 Aug 2024 00:35:35 +0100 Message-Id: <20240822-kvm-arm64-hide-pie-regs-v2-0-376624fa829c@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAMh5xmYC/3WPyw6CMBBFf8V07ZjpQ4uu/A/DouAAjfJwikQl/ LsV4sKFy3uTOefOKAKxpyAOq1EwDT74tolBrVcir1xTEvhzzEKhMpgohMtQg+N6Z6DyZ4LOEzC VAZTSu8KiRe0yEa87psI/ZvIpjbnyoW/5OYsG+Wm/TPmXOUhAwCTPdG73eba1xwtxQ9dNy6VIp 8XCdLvH2f2iEjWF4ObZ8YtZILU0xupko9AkGhVIqN3rFzW9AUZ88gQJAQAA To: Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Joey Gouly <joey.gouly@arm.com> Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>, 20240813144738.2048302-1-maz@kernel.org X-Mailer: b4 0.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=1995; i=broonie@kernel.org; h=from:subject:message-id; bh=brdzSmFxxU9/yqU24WmdMPuHbC0JPXjGsAbpj8ZmrZ4=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmxnnoOWysVLhxSWycGXZ8N9XZwL9wb3sAprSecenR +uMKq8SJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZsZ56AAKCRAk1otyXVSH0O6hB/ 0RJ5zr+dhVm9vjv5mbW+0pOYknpegjpcfRrhn1XOua8/+PO9lekL0bw7bijwe7Foyi9eFn7Z0x5I5K Z6+QXKM1IrNJdFhBUUO1ygJhedI/6wuELWDM65Xu2xNfb4zrZdrbjcc2xmLMFDUFhI3dreO/xlTqrG XuBTHRRWe/Mo0DGcfXrUpFHakrJ0UngN3FvYi8hKcB6o/U/U8WIldRs5nFCqrs/p5kdK2ooc7q6gHQ l7CIm/7vFXf8JF88TiRYvlNp1KrRVZyb9wBY1C247HGMNvAHPL5k2LH55S6/oUlD+1Dm0S+Com+Z2y exi9UuWwqyUgMA3nsT+RHYfiR/S03Z 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_163619_605756_963590F7 X-CRM114-Status: UNSURE ( 9.52 ) 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: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
KVM: arm64: Control visibility of S1PIE related sysregs to userspace
|
expand
|
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. This is based on Marc Zyngier's series: https://lore.kernel.org/all/20240813144738.2048302-4-maz@kernel.org/ Signed-off-by: Mark Brown <broonie@kernel.org> --- Changes in v2: - Rebase on top of Marc's series adding EL2 S1PIE support. - Handle EL2 versions of registers. - Link to v1: https://lore.kernel.org/r/20240821-kvm-arm64-hide-pie-regs-v1-0-08cb3c79cb57@kernel.org --- Mark Brown (3): KVM: arm64: Define helper for EL2 registers with custom visibility 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 | 77 ++++++++++++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 10 deletions(-) --- base-commit: 6998fa93fbbf237b518bf921f8c21e71514e5aed change-id: 20240820-kvm-arm64-hide-pie-regs-2236f70703ab prerequisite-message-id: 20240813144738.2048302-1-maz@kernel.org prerequisite-patch-id: 7e65cb84e9a1ac67ec6174bc2c8e6f8a3cd7a2b8 prerequisite-patch-id: 0e79993ba049d517f676a461104379fa0c34f963 prerequisite-patch-id: 075ad9eb54d31d099a9e30ad914e29e927156ee9 prerequisite-patch-id: d61f24087c8e4c6c650969ed2db55681aa0a5562 prerequisite-patch-id: abb476d6ac155c9060656eb383e4f42cf3465c10 prerequisite-patch-id: f0cace2aabf2385d74514a3733ddbbdb1e6d575d prerequisite-patch-id: 62ce04c9f054610b9a992a2c65d30c6cb0a0c23b prerequisite-patch-id: efc96c4b2c999e86de8e8cbd2e5a66a3640ee187 prerequisite-patch-id: df53b3c1bc3339de587651f1f884f2bcad11a36f prerequisite-patch-id: 58095341c1baa606c91dac8b2fc1446f5d5178de Best regards,