From patchwork Tue Mar 2 16:48:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiss X-Patchwork-Id: 12113995 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F702C433DB for ; Wed, 3 Mar 2021 17:58:59 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23C8A64EF0 for ; Wed, 3 Mar 2021 17:58:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23C8A64EF0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To: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=a+GKbR1Oq1m2n0HRxLOSSmmUJsyAEVPCp/UA4mF5z6I=; b=FDKcI2dUa8HVDdRoGYfPde1y8N qQvH5aE8K56SyaqEQ9acxnJv3WaqJbvzYu4E6PogNtSjoaVHBze/SbqUje7zRWUSq4WMPaim5J3rc Rba+Iw43VZODOSK8PFeldcfuecCVML7nwcnuuPmpfaEStczsNnwoixvcA96D19yVEnhainAc3fIK2 g2+19A+m6EONnoyEEuKKxhZjF+VmF78g65SuSy+svt1YJ+qAiLifjMp32yZCHPzNApuoyvQBrkeF+ e0f3BvKGoFlt0RrHfu8G6r0pQlJ5sM4VfO1Xy0n2rBAdiBr5wCw+B97BUFlpiDfjXPzHYWlW00jm2 sCyZBykw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHVjh-005uCx-LE; Wed, 03 Mar 2021 17:56:37 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHSxC-005G26-I7 for linux-arm-kernel@desiato.infradead.org; Wed, 03 Mar 2021 14:58:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=p/cAfQAroUT5740P2Zc4xfUzremcmBYPQFIyIomyqDA=; b=sUmRqz2d2K+1DL3OVINaoTYAtT sXYQOtQBw+DuDppT5l4o4g3469U3MBkanRcDO7l6nAo/ENwhGPhaPXhjJAsGZ2qzJg007Yqc7CFfy VaG9xQZtS7HjXYywo8pxgiTCVYnoVxXoVCu61bXyCBa5D9gvtwVegqSaEjQERB27EgAAdVmcnxndm L22D7vNgyTXK3viFHRFR+E/ivl6Kx/M0eRifhM+Px+H/KQGBymDvB7N4ZeHZ+TgO1e68jIDCHJLZr P/ipoAwp1DJCV2a0i6vh6Rpopkw1MUYgpng9ZTklX5Tbv2sTVWHJ2cMJPUhMSUYN2wrEIvspiddS/ xwhFl5Pg==; Received: from foss.arm.com ([217.140.110.172]) by casper.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lH8DF-00HTdG-Us for linux-arm-kernel@lists.infradead.org; Tue, 02 Mar 2021 16:49:39 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5A6DA1FB; Tue, 2 Mar 2021 08:49:16 -0800 (PST) Received: from e120529.arm.com (unknown [10.37.8.4]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8F7493F7D7; Tue, 2 Mar 2021 08:49:13 -0800 (PST) From: Daniel Kiss To: kvmarm@lists.cs.columbia.edu Cc: maz@kernel.org, Dave.Martin@arm.com, broonie@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, Daniel Kiss Subject: [PATCH v3 0/1] kvm: arm64: Add SVE support for nVHE. Date: Tue, 2 Mar 2021 17:48:49 +0100 Message-Id: <20210302164850.3553701-1-daniel.kiss@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-ARM-No-Footer: FoSSMail X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210302_164939_923993_F904F8B4 X-CRM114-Status: UNSURE ( 8.07 ) 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: 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 Addressing review comments from the previous version[1]. The discussed optimisation will be a sparate patch later. [1] https://www.spinics.net/lists/arm-kernel/msg874768.html Changes from v2: * Comments are addressed. * rebased to v5.11 Changes from v1: * Vector length handling is changed. Daniel Kiss (1): kvm: arm64: Add SVE support for nVHE. arch/arm64/Kconfig | 7 ----- arch/arm64/include/asm/el2_setup.h | 2 +- arch/arm64/include/asm/fpsimd.h | 6 ++++ arch/arm64/include/asm/fpsimdmacros.h | 24 ++++++++++++++-- arch/arm64/include/asm/kvm_arm.h | 6 ++++ arch/arm64/include/asm/kvm_host.h | 17 +++-------- arch/arm64/kernel/entry-fpsimd.S | 5 ---- arch/arm64/kvm/arm.c | 5 ---- arch/arm64/kvm/fpsimd.c | 38 ++++++++++++++++++++----- arch/arm64/kvm/hyp/fpsimd.S | 15 ++++++++++ arch/arm64/kvm/hyp/include/hyp/switch.h | 34 +++++++++++----------- arch/arm64/kvm/hyp/nvhe/switch.c | 24 ++++++++++++++++ arch/arm64/kvm/reset.c | 4 --- 13 files changed, 127 insertions(+), 60 deletions(-)