From patchwork Wed Sep 4 08:24:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13790013 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 14B19CA0ED3 for ; Wed, 4 Sep 2024 08:35:57 +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-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Xzn77nEGYbf3F9mGHHff5+nQrb68IjVz9wNGW/bM5Mw=; b=Frk7byR1zsDkWKgFHj8XEN6ZIU 81H96lfQQA0a1kwhgSgMo1bOdLgfJWi1rhz5vkdQGc4F+ChgqXkrP2rKvZCv4yOyx5K4ebwpd4+sy eumvAFSmfVHI5tOqAysyiXr0fHkuSgImlqb+xt18LvctsvJe//yHoB38l4WFGSQSBKitI2k4UiYUa vLFnCgpC7gO/wrInxiqkkrHU8E4NLS6l3I7mFGNG+o7RlI8HI3cj5ia3t5+KXOvNRMtV15F4YNkq4 sbVtAbOPrz+PG9ZHEjPFjoh4oPKgn69s6hKEaxlVHwa0ej3LyWc5l3VYfXYWs04Gl+XENSJde+C22 Q6P2nL5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sllUS-00000003RBA-0FtT; Wed, 04 Sep 2024 08:35:48 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sllJh-00000003OIk-306b for linux-arm-kernel@lists.infradead.org; Wed, 04 Sep 2024 08:24:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id A770EA426F1; Wed, 4 Sep 2024 08:24:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8828DC4CEC2; Wed, 4 Sep 2024 08:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725438280; bh=O5vZyMzug2hfi0WUZ+7tWFsjuAc2OLNoqgduTkj7QBA=; h=From:To:Cc:Subject:Date:From; b=KkeR3001iosJpJ6q/vRE2/Hyhi6bSKxYQCJzYX1VKJmOSvBR12/oi4uKIZDv84AsK vjJRwUdGBRGTxV8AK/lyG78xrexjSUOqkuzsEHl/nJ41rA5bz/VLLVWBQU0h3c3Jih IoSU1kyhwTG05cqMiVInyX4RTYiHWHyYxlQm+HqTq6MpnBa7+qzqeX9BqXT1p8S/Mi TIfiRccEsij6nsBN7kbnHCDAGAbAqh4HU6+xX8DrEcYowY7KLjMKrrP0AEXGtEAdpg e6kac418LNv+T/qhrxVn/9A3KO16MdiwO4ItCZZhY0w9HrGwcYEwqBdEPiassMpYaT nBytBzx6sQ83A== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sllJe-009VF3-9L; Wed, 04 Sep 2024 09:24:38 +0100 From: Marc Zyngier To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: James Morse , Suzuki K Poulose , Oliver Upton , Zenghui Yu Subject: [PATCH 0/3] KVM: arm64: Get rid of REG_HIDDEN_USER Date: Wed, 4 Sep 2024 09:24:16 +0100 Message-Id: <20240904082419.1982402-1-maz@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, oliver.upton@linux.dev, yuzenghui@huawei.com 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-20240904_012441_857146_E15304BF X-CRM114-Status: GOOD ( 10.56 ) 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 REG_HIDDEN_USER was introduced as a way to deal with the ARMv8.3 flavour of FEAT_NV, where most EL12 sysreg accesses would trap and yet be mapped to a EL1 register (KVM doing in SW what FEAT_NV2 does in HW). This handling imposed that the EL12 register shouldn't be visible to userspace, hence the special REG_HIDDEN_USER visibility. Since 4d4f52052ba8 ("KVM: arm64: nv: Drop EL12 register traps that are redirected to VNCR") and the admission that KVM would never be supporting the original FEAT_NV, REG_HIDDEN_USER only had a few users, all of which could either be replaced by a more ad-hoc mechanism, or removed altogether. This series goes ahead and cleans it up for good, removing a tiny bit of unnecessary complexity. Marc Zyngier (3): KVM: arm64: Simplify handling of CNTKCTL_EL12 KVM: arm64: Simplify visibility handling of AArch32 SPSR_* KVM: arm64: Get rid of REG_HIDDEN_USER visibility qualifier arch/arm64/kvm/sys_regs.c | 52 +++++++++++++++------------------------ arch/arm64/kvm/sys_regs.h | 14 ++--------- 2 files changed, 22 insertions(+), 44 deletions(-) Reviewed-by: Oliver Upton