Message ID | 20240801091955.2066364-8-maz@kernel.org (mailing list archive) |
---|---|
State | New, archived |
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 934ACC3DA64 for <linux-arm-kernel@archiver.kernel.org>; Thu, 1 Aug 2024 09:24:07 +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=FcWqYFJyuo6CuiuBaQrRxbtVxDiNESKx9NIxpclNY9g=; b=ktw+6PyYkax1WwWAe3+lp+Q47Z IBgKXTA3Jkp5875l9lF+EX4XxB45lgnaghNnLicvFFLhegaKajiyIT0rz8PnXjBiSARKa7UPZAXjg 5rvdYmD5h02KKXM63v+e34LnLL6HClc6HFoAM89tGRjJT8P5yAybcCbDR9IjUq8+c0QXUb58Tatwv guetKqk3kpF5VM5iezi8CmjDU4JDQPXcygUcHsIwTQsP9RuPUFI+HSJiqSvS0v7FCdPJC8A8koMI6 7L7fG3lPWFubzJ5/yM2TP2FB+JS8cpgC5keOnojvdoiSRu2bG2EugYTHMdxZNwrc65OXvsYGXOVWw ZCkH8xxQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZS2Q-00000004XZ0-0Pwf; Thu, 01 Aug 2024 09:23:58 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sZS11-00000004X49-3Xp8 for linux-arm-kernel@lists.infradead.org; Thu, 01 Aug 2024 09:22:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 34BACCE1894; Thu, 1 Aug 2024 09:22:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83A98C4AF0B; Thu, 1 Aug 2024 09:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722504149; bh=4HwTm/sykbQDERcywrayLevJsGBUpXDaZP64IyuOh0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OQgq3rmAGnBq5Ot53TWe8ag+xh848jukPFqjcPIi8KUy8Sr7cwP1wKVCiBq51YK18 RBvmGjqOEFGnSi5LXy/hlEt2eBvvvCFpUnL4WlIftVvzvVSVNy5spBPaECAbCMydBS Yzlbw3U+EsnILQjD/HcwyuAImVFFX10FpuoIBhwsdguyiqUMXFdjE25qmAacDEy5sU p6iBpzt953czwn5/ZyBE597La+RgafxIr+O5d0ekES8BgQMDEHoW7nuNXX3rDBvmrA Op9F5OEaAhUn1KSFlLkeMFCSw0RKKkD4Ir4RusTPeeA5cWoCTqLDPi8v5QGrCAz4uQ k/EJi4NTs+Ajg== 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 <maz@kernel.org>) id 1sZRyb-00HKNZ-CO; Thu, 01 Aug 2024 10:20:01 +0100 From: Marc Zyngier <maz@kernel.org> To: kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Cc: James Morse <james.morse@arm.com>, Suzuki K Poulose <suzuki.poulose@arm.com>, Oliver Upton <oliver.upton@linux.dev>, Zenghui Yu <yuzenghui@huawei.com>, Fuad Tabba <tabba@google.com>, Joey Gouly <joey.gouly@arm.com>, Mark Brown <broonie@kernel.org> Subject: [PATCH v2 7/8] KVM: arm64: Enable FP8 support when available and configured Date: Thu, 1 Aug 2024 10:19:54 +0100 Message-Id: <20240801091955.2066364-8-maz@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240801091955.2066364-1-maz@kernel.org> References: <20240801091955.2066364-1-maz@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-20240801_022232_077673_9E180D91 X-CRM114-Status: GOOD ( 11.46 ) 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: Add support for FP8
|
expand
|
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c index 4c2f7c0af537..51627add0a72 100644 --- a/arch/arm64/kvm/sys_regs.c +++ b/arch/arm64/kvm/sys_regs.c @@ -4579,6 +4579,9 @@ void kvm_calculate_traps(struct kvm_vcpu *vcpu) if (kvm_has_feat(kvm, ID_AA64MMFR3_EL1, TCRX, IMP)) vcpu->arch.hcrx_el2 |= HCRX_EL2_TCR2En; + + if (kvm_has_fpmr(kvm)) + vcpu->arch.hcrx_el2 |= HCRX_EL2_EnFPM; } if (test_bit(KVM_ARCH_FLAG_FGU_INITIALIZED, &kvm->arch.flags))
If userspace has enabled FP8 support (by setting ID_AA64PFR2_EL1.FPMR to 1), let's enable the feature by setting HCRX_EL2.EnFPM for the vcpu. Signed-off-by: Marc Zyngier <maz@kernel.org> --- arch/arm64/kvm/sys_regs.c | 3 +++ 1 file changed, 3 insertions(+)