From patchwork Fri Mar 29 00:13:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13609775 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 C2FDDCD128A for ; Fri, 29 Mar 2024 00:14: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: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To: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=jVyzANpY7AkSmK18yX2Riy/ULaMAAD0iYGRAUlO0KDM=; b=qYKI6cJPj592y4 NtBlIFHjriK8Sc5uPp1C+y2TI1Y97zv1Umd0/b+NkBf+XajLyQpHqIAVxF26sRG9O7iXlDpVWObm4 YRRY8lTFK7aMZsiXKm0T3NrQ5XR1QUxEbLgfJs1iBh4mfkktTVGIoZpn9PkKiB91KGRo7M3KvM5Vo 0r6ulUWucOxS1PHZfUIpxjfjSQguh2CMA3QTLKqPMwNfJNb60LcouK199Pfau9vkwRmk/DaHTNbJ2 RzmHrMQ6FYYsqJkersMR7tQU9+q2s9XrNnt+7sgAjHUzL1jd+RFkaK8Za0kD/skSpFlRSQn2hZCYW OIvk1ft8Nfz4xuBzjOhg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rpzse-0000000GB18-2kzk; Fri, 29 Mar 2024 00:14:00 +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 1rpzsb-0000000GB0A-2jLC for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2024 00:13:59 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 7E0C9CE2D52; Fri, 29 Mar 2024 00:13:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F18CEC433C7; Fri, 29 Mar 2024 00:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711671234; bh=WaKteGNUZ/NFFEBoV918r7uJ9rXae9sVwJg6sjxhGbw=; h=From:Subject:Date:To:Cc:From; b=kuX5Q4IkEeEaR/oS6zXwUH4ubqqp6YCgizU0yk5+deofn+YXBfRHnf46itFog4OUU hZvPZyPx9/SubnZGE7jE7diObsfEFrzNAeDyLmp5Hyq2FVYncxlLIm9aCH/KvTM+AS I27Q+/qK1CHRRgGWT7FIuuMbvJJebTMTkqIGeIcDago/poV2bpUL/ky9P7McOrijjq gHdVJ92tS6pWE9PhtYJHqDEJYBKcCv9MHUrd6rfNPokrKYK5uREakM5jh+FMVG5GUS hmafnX76XNHxvVXR2gspAlCjbhOvqE7oxjpcUHPvhdOHH3+4QI/dcEXrf4wFv0jtHx Oq8wadNHMUGTw== From: Mark Brown Subject: [PATCH v6 0/5] KVM: arm64: Support for 2023 dpISA extensions Date: Fri, 29 Mar 2024 00:13:41 +0000 Message-Id: <20240329-arm64-2023-dpisa-v6-0-ba42db6c27f3@kernel.org> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIALUHBmYC/23QS2rEMAwG4KsMXtdFluVHuuo9SheOrcyYtslgl 9Ay5O51hpZAk4UWv0CfhG6icslcxdPpJgrPueZpbME+nES8hPHMMqeWBQJqBaBlKB+W5BpluuY aJA46oXFkyZFoY9fCQ/66ky+vLV9y/ZzK933DrNbuL4Z2j81KgvTkIKXOd32Pz29cRn5/nMpZr NqMm6AUHQjYBHJolO9osMHvBL0JCOZA0E1Ifexj8tYFN+wE+hMIFOKBQE1wzjJ05K1Ke8Fsgoa jP5gmRGM9p9jq3w3LsvwA40aa6bkBAAA= To: Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Jonathan Corbet , Shuah Khan Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Dave Martin , kvmarm@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org, Mark Brown X-Mailer: b4 0.14-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2988; i=broonie@kernel.org; h=from:subject:message-id; bh=WaKteGNUZ/NFFEBoV918r7uJ9rXae9sVwJg6sjxhGbw=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBmBge6b1dMM99N8t/UdqYyloY6+6oVeNZr+0mCG0iK cM25EaqJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZgYHugAKCRAk1otyXVSH0Oa9B/ 9xM8b3qsLcPZzl+tOQkQVDP78MiPgRLRAwyT9YSUS7v4si4z9EMCibX/Wb5OtRS8w+SAnbkcLXKUoK BW0H3zZtUlGWa2gm/xJYzSSD9HSM/7XslxGkYPwcXiZyVBn7k6PdSdapDdGmqyTNZJQtbl+CG8b2M0 Hyw82EZvE/hR58v1RU5ooeHvjgll+xO4YtJlrKR/FxPRroqi9StmZvEeo14AwrkLybv4K0e33heaoZ 8UNSBxH1W2VubJAQVtMtqOvzB6/Oqx5BCm4kOdaQtqa7DwzNyeQfa+qFoQD+/U1uoshY75K2RuJdzH Ju7mK4CMrWahCyc04g12i7WHWz/PlV 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-20240328_171358_108854_EF98EF30 X-CRM114-Status: GOOD ( 11.39 ) 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 This series implements support for the 2023 dpISA extensions in KVM guests, it was previously posted as part of a series with the host support but that has now been merged so only the KVM portions remain. Most of these extensions add only new instructions so the guest support consists of adding the relevant ID registers, masking out other features like the 2023 MTE extensions. FEAT_FPMR introduces a new system register FPMR to the floating point state which we enable guest access to and context switch when the ID registers indicate that it is supported. Currently we implement visibility for FPMR with a fpmr_visibility() function as for other system registers, I will separately look into adding support for specifying this in the struct sys_reg_desc. Signed-off-by: Mark Brown --- Changes in v6: - Rebase onto v6.9-rc1. - The host portions of the series were merged so only the KVM guest support remains. - Link to v5: https://lore.kernel.org/r/20240306-arm64-2023-dpisa-v5-0-c568edc8ed7f@kernel.org Changes in v5: - Rebase onto v6.8-rc3. - Use u64 rather than unsigned long for storing FPMR. - Temporarily drop KVM guest support due to issues with KVM being a moving target. - Link to v4: https://lore.kernel.org/r/20240122-arm64-2023-dpisa-v4-0-776e094861df@kernel.org Changes in v4: - Rebase onto v6.8-rc1. - Move KVM support to the end of the series. - Link to v3: https://lore.kernel.org/r/20231205-arm64-2023-dpisa-v3-0-dbcbcd867a7f@kernel.org Changes in v3: - Rebase onto v6.7-rc3. - Hook up traps for FPMR in emulate-nested.c. - Link to v2: https://lore.kernel.org/r/20231114-arm64-2023-dpisa-v2-0-47251894f6a8@kernel.org Changes in v2: - Rebase onto v6.7-rc1. - Link to v1: https://lore.kernel.org/r/20231026-arm64-2023-dpisa-v1-0-8470dd989bb2@kernel.org --- Mark Brown (5): KVM: arm64: Share all userspace hardened thread data with the hypervisor KVM: arm64: Add newly allocated ID registers to register descriptions KVM: arm64: Support FEAT_FPMR for guests KVM: arm64: selftests: Document feature registers added in 2023 extensions KVM: arm64: selftests: Teach get-reg-list about FPMR arch/arm64/include/asm/kvm_host.h | 6 ++++-- arch/arm64/include/asm/processor.h | 2 +- arch/arm64/kvm/emulate-nested.c | 9 ++++++++ arch/arm64/kvm/fpsimd.c | 15 +++++++------- arch/arm64/kvm/hyp/include/hyp/switch.h | 9 ++++++-- arch/arm64/kvm/hyp/nvhe/hyp-main.c | 4 ++-- arch/arm64/kvm/sys_regs.c | 24 +++++++++++++++++++--- tools/testing/selftests/kvm/aarch64/get-reg-list.c | 11 ++++++++-- 8 files changed, 60 insertions(+), 20 deletions(-) --- base-commit: 4cece764965020c22cff7665b18a012006359095 change-id: 20231003-arm64-2023-dpisa-2f3d25746474 Best regards,