From patchwork Tue Aug 20 13:18:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Zyngier X-Patchwork-Id: 13770097 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 7F8D1C3DA4A for ; Tue, 20 Aug 2024 13:21:49 +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:References:In-Reply-To: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:List-Owner; bh=URJQWGjrLamdTVhO4XCbEGmYL18Ca1QHFyRTUxqSDI4=; b=iHAD9Hp54JtKS162nkeM/blRul p8epMcg/hPqFFxvjxY0DVcChHydSAm8I0oanj1taYmFK61PQuWhK/JS/0NaiZ38lvGNNJ3+yE873/ Up7f8OoUt5HZboXFhirIns5G6rMLaEri7AfCTvvgm8kSdVXgQ2P9yKncgijUE3WKYRXF7U/3W1q4Q mP9z/IuzzCcq0Z2eqxhaFckGqM18IYpWVDrWYo+au0r6GnR5pgnFEB1CYUR3Kg+7G1ABNY3RAQQ5N pwTL/eHxvSxQsO3v9y8aE39w7dUOO/SUuReAzsscdi+NSsvzTMDXqNKyLWDr0vffDu0iZtulKD8uJ AFW5lxgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgOnp-00000005Ke2-25I4; Tue, 20 Aug 2024 13:21:37 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgOkU-00000005Ji6-1Pa4 for linux-arm-kernel@lists.infradead.org; Tue, 20 Aug 2024 13:18:12 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 5531560DC0; Tue, 20 Aug 2024 13:18:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05488C4AF0C; Tue, 20 Aug 2024 13:18:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1724159889; bh=c3Z1JxPnPDc0JyvzdjgMda935deX6eK6ajc0Q+Qvets=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U3oUGGqa9JMkDJxqUXk/CcBrIuxgjMWcBc9qmIxU6Nq5JjKDLBW2+EJZ7F6OlZqMU 2F308LEUA0WiSLyqNVLEU+PChu0YG4v/lQRnDSwflYiEenxT0IRwfyT74z4ByryWWu aJH0kGPfDKz+unolps36LKFZc0sq4LULPAcQha6OLIgJPXh+s/fuWFACs8QEINbKsi UN/o1VDz9oPfx+PQNsENz30yircLteHmcei6fr2Ub304dB+V6rpweIoi+J3CaL8aQp wUHKOSD0sO5r8d3u+4hUSDaoLSvPD6SlehkquYq15kFIIDyviDjNyX5k8u0CZTq30S rP97TWzutFUiQ== 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 1sgOkR-005HMQ-6n; Tue, 20 Aug 2024 14:18:07 +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 , Fuad Tabba , Joey Gouly , Mark Brown Subject: [PATCH v4 6/8] KVM: arm64: Expose ID_AA64FPFR0_EL1 as a writable ID reg Date: Tue, 20 Aug 2024 14:18:00 +0100 Message-Id: <20240820131802.3547589-7-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240820131802.3547589-1-maz@kernel.org> References: <20240820131802.3547589-1-maz@kernel.org> 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, tabba@google.com, joey.gouly@arm.com, broonie@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-20240820_061810_461167_15DC55A2 X-CRM114-Status: GOOD ( 12.58 ) 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 ID_AA64FPFR0_EL1 contains all sort of bits that contain a description of which FP8 subfeatures are implemented. We don't really care about them, so let's just expose that register and allow userspace to disable subfeatures at will. Signed-off-by: Marc Zyngier --- arch/arm64/kvm/sys_regs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 79d67f19130d..4c2f7c0af537 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -2386,7 +2386,7 @@ static const struct sys_reg_desc sys_reg_descs[] = { ID_WRITABLE(ID_AA64ZFR0_EL1, ~ID_AA64ZFR0_EL1_RES0), ID_HIDDEN(ID_AA64SMFR0_EL1), ID_UNALLOCATED(4,6), - ID_UNALLOCATED(4,7), + ID_WRITABLE(ID_AA64FPFR0_EL1, ~ID_AA64FPFR0_EL1_RES0), /* CRm=5 */ { SYS_DESC(SYS_ID_AA64DFR0_EL1),