From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Martin Subject: [PATCH v7 00/27] KVM: arm64: SVE guest support Date: Fri, 29 Mar 2019 13:00:25 +0000 Message-ID: <1553864452-15080-1-git-send-email-Dave.Martin@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 785104A319 for ; Fri, 29 Mar 2019 09:01:02 -0400 (EDT) Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y5U7XwtIvbA9 for ; Fri, 29 Mar 2019 09:01:00 -0400 (EDT) Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C13584A2F8 for ; Fri, 29 Mar 2019 09:01:00 -0400 (EDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu To: kvmarm@lists.cs.columbia.edu Cc: Okamoto Takayuki , Christoffer Dall , Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , Zhang Lei , Julien Grall , linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu This series implements support for allowing KVM guests to use the Arm Scalable Vector Extension (SVE), superseding the previous v6 series [1]. The patches are also available on a branch for reviewer convenience. [2] The patches are based on v5.1-rc2. This series addresses a couple of minor review comments received on v6 and otherwise applies reviewer tags only. The code differences between v6 and this series consist of minor cosmetic fixups only. Draft kvmtool patches were posted separately [3], [4]. For a description of minor updates, see the individual patches. Thanks go to Julien Thierry and Julian Grall for their review efforts, and to Zhang Lei for testing the series -- many thanks for their help in getting the series to this point! Reviewers' attention is drawn to the following patches, which have no Reviewed-by/Acked-by. Please take a look if you have a moment. * Patch 11 (KVM: arm64: Support runtime sysreg visibility filtering) Previously Reviewed-by Julien Thierry, but this version of the patch contains some minor rework suggested by Mark Rutland during the v5 review [5]. * Patch 15 (KVM: arm64: Add missing #include of in guest.c) (Trivial patch.) * Patch 26: (KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG) (Documentation only.) * Patch 27: KVM: arm64/sve: Document KVM API extensions for SVE (Documentation only.) Known issues: none Testing status: * Lightweight testing on the Arm Fast Model, primarily to exercise the new vcpu finalization API. Ran sve-stress testing for several days on v6 on the Arm Fast Model, with no errors observed. * ThunderX2: basic testing of arm64 defconfig, including booting guests (no SVE support on this hardware). Some stress testing with fpsimd-stress (to be published separately) and paranoia, with no problems observed over several days. This testing was done on v6. * aarch32 host testing has only been done in v5 so far. arch/arm changes between v5 and v7 are minimal. I plan to redo sanity-check testing after this posting. [1] Previous series: [PATCH v5 00/26] KVM: arm64: SVE guest support https://lists.cs.columbia.edu/pipermail/kvmarm/2019-March/thread.html (Note, the subject line for this posting was incorrect. It should have read: [PATCH v6 00/27] KVM: arm64: SVE guest support) [2] This series in git: http://linux-arm.org/git?p=linux-dm.git;a=shortlog;h=refs/heads/sve-kvm/v7/head git://linux-arm.org/linux-dm.git sve-kvm/v7/head [3] [PATCH kvmtool v2 0/3] arm64: Basic SVE guest support https://lists.cs.columbia.edu/pipermail/kvmarm/2019-March/035198.html [4] git://linux-arm.org/kvmtool-dm.git sve-linuxv6/v2/head http://linux-arm.org/git?p=kvmtool-dm.git;a=shortlog;h=refs/heads/sve-linuxv6/v2/head [5] Mark Rutland Re: [PATCH v5 12/26] KVM: arm64: Support runtime sysreg visibility filtering https://lists.cs.columbia.edu/pipermail/kvmarm/2019-February/034718.html Dave Martin (27): KVM: Documentation: Document arm64 core registers in detail arm64: fpsimd: Always set TIF_FOREIGN_FPSTATE on task state flush KVM: arm64: Delete orphaned declaration for __fpsimd_enabled() KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance KVM: arm64: Add missing #includes to kvm_host.h arm64/sve: Clarify role of the VQ map maintenance functions arm64/sve: Check SVE virtualisability arm64/sve: Enable SVE state tracking for non-task contexts KVM: arm64: Add a vcpu flag to control SVE visibility for the guest KVM: arm64: Propagate vcpu into read_id_reg() KVM: arm64: Support runtime sysreg visibility filtering KVM: arm64/sve: System register context switch and access support KVM: arm64/sve: Context switch the SVE registers KVM: Allow 2048-bit register access via ioctl interface KVM: arm64: Add missing #include of in guest.c KVM: arm64: Factor out core register ID enumeration KVM: arm64: Reject ioctl access to FPSIMD V-regs on SVE vcpus KVM: arm64/sve: Add SVE support to register access ioctl interface KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST arm64/sve: In-kernel vector length availability query interface KVM: arm/arm64: Add hook for arch-specific KVM initialisation KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl KVM: arm64/sve: Add pseudo-register for the guest's vector lengths KVM: arm64/sve: Allow userspace to enable SVE for vcpus KVM: arm64: Add a capability to advertise SVE support KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG KVM: arm64/sve: Document KVM API extensions for SVE Documentation/virtual/kvm/api.txt | 156 +++++++++++++++ arch/arm/include/asm/kvm_host.h | 6 + arch/arm64/include/asm/fpsimd.h | 33 +++- arch/arm64/include/asm/kvm_host.h | 43 ++++- arch/arm64/include/asm/kvm_hyp.h | 1 - arch/arm64/include/asm/sysreg.h | 3 + arch/arm64/include/uapi/asm/kvm.h | 22 +++ arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/fpsimd.c | 172 ++++++++++++----- arch/arm64/kernel/signal.c | 5 - arch/arm64/kvm/fpsimd.c | 17 +- arch/arm64/kvm/guest.c | 394 +++++++++++++++++++++++++++++++++++--- arch/arm64/kvm/hyp/switch.c | 74 +++++-- arch/arm64/kvm/reset.c | 135 ++++++++++++- arch/arm64/kvm/sys_regs.c | 130 +++++++++++-- arch/arm64/kvm/sys_regs.h | 25 +++ include/uapi/linux/kvm.h | 5 + virt/kvm/arm/arm.c | 22 +++ 18 files changed, 1115 insertions(+), 130 deletions(-) -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,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 8E00DC43381 for ; Fri, 29 Mar 2019 13:01:09 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5DBD6217F5 for ; Fri, 29 Mar 2019 13:01:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d8JLe6j7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5DBD6217F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=B5W4ubAxSFvp6fFx2ghzOT01+Utsmlakd4ydiscjxuM=; b=d8JLe6j7mJyc+H w38cYCLit80WifOH7Il1haQJpXwCNvUtHjud84Qe2sysxO84mmPzp0DIIkFNNB2w4mx1eIiyKyJyJ qG0MoT6szv6HAmvWQIBwBPWanHl5NS9oMol3VH4rIpUd6n/ypg/hscyPbahE/WLEX+38TEHkuVbnD UkKwaI3cTaD4AcA1oR6BfQiDWDEUWTSBunJTx4JxS59iSV8Wy64d4dwkt7JUWlyadWpG7uHaop8zS hLRH7JklPavdmbVonPEt/1eAqj/SK7o1DZYapozOz50vTWzU8nRX1/TTEi9JeHhW9N6dsVVSGHhPY AcVYKQcW1dOxCfr/PS9w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9r84-0003HI-6Q; Fri, 29 Mar 2019 13:01:04 +0000 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70] helo=foss.arm.com) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h9r80-0003F7-Pr for linux-arm-kernel@lists.infradead.org; Fri, 29 Mar 2019 13:01:02 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0C4CAA78; Fri, 29 Mar 2019 06:01:00 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 19F683F575; Fri, 29 Mar 2019 06:00:57 -0700 (PDT) From: Dave Martin To: kvmarm@lists.cs.columbia.edu Subject: [PATCH v7 00/27] KVM: arm64: SVE guest support Date: Fri, 29 Mar 2019 13:00:25 +0000 Message-Id: <1553864452-15080-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190329_060100_958547_16A7D16F X-CRM114-Status: GOOD ( 16.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Okamoto Takayuki , Christoffer Dall , Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , Zhang Lei , Julien Grall , =?UTF-8?q?Alex=20Benn=C3=A9e?= , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series implements support for allowing KVM guests to use the Arm Scalable Vector Extension (SVE), superseding the previous v6 series [1]. The patches are also available on a branch for reviewer convenience. [2] The patches are based on v5.1-rc2. This series addresses a couple of minor review comments received on v6 and otherwise applies reviewer tags only. The code differences between v6 and this series consist of minor cosmetic fixups only. Draft kvmtool patches were posted separately [3], [4]. For a description of minor updates, see the individual patches. Thanks go to Julien Thierry and Julian Grall for their review efforts, and to Zhang Lei for testing the series -- many thanks for their help in getting the series to this point! Reviewers' attention is drawn to the following patches, which have no Reviewed-by/Acked-by. Please take a look if you have a moment. * Patch 11 (KVM: arm64: Support runtime sysreg visibility filtering) Previously Reviewed-by Julien Thierry, but this version of the patch contains some minor rework suggested by Mark Rutland during the v5 review [5]. * Patch 15 (KVM: arm64: Add missing #include of in guest.c) (Trivial patch.) * Patch 26: (KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG) (Documentation only.) * Patch 27: KVM: arm64/sve: Document KVM API extensions for SVE (Documentation only.) Known issues: none Testing status: * Lightweight testing on the Arm Fast Model, primarily to exercise the new vcpu finalization API. Ran sve-stress testing for several days on v6 on the Arm Fast Model, with no errors observed. * ThunderX2: basic testing of arm64 defconfig, including booting guests (no SVE support on this hardware). Some stress testing with fpsimd-stress (to be published separately) and paranoia, with no problems observed over several days. This testing was done on v6. * aarch32 host testing has only been done in v5 so far. arch/arm changes between v5 and v7 are minimal. I plan to redo sanity-check testing after this posting. [1] Previous series: [PATCH v5 00/26] KVM: arm64: SVE guest support https://lists.cs.columbia.edu/pipermail/kvmarm/2019-March/thread.html (Note, the subject line for this posting was incorrect. It should have read: [PATCH v6 00/27] KVM: arm64: SVE guest support) [2] This series in git: http://linux-arm.org/git?p=linux-dm.git;a=shortlog;h=refs/heads/sve-kvm/v7/head git://linux-arm.org/linux-dm.git sve-kvm/v7/head [3] [PATCH kvmtool v2 0/3] arm64: Basic SVE guest support https://lists.cs.columbia.edu/pipermail/kvmarm/2019-March/035198.html [4] git://linux-arm.org/kvmtool-dm.git sve-linuxv6/v2/head http://linux-arm.org/git?p=kvmtool-dm.git;a=shortlog;h=refs/heads/sve-linuxv6/v2/head [5] Mark Rutland Re: [PATCH v5 12/26] KVM: arm64: Support runtime sysreg visibility filtering https://lists.cs.columbia.edu/pipermail/kvmarm/2019-February/034718.html Dave Martin (27): KVM: Documentation: Document arm64 core registers in detail arm64: fpsimd: Always set TIF_FOREIGN_FPSTATE on task state flush KVM: arm64: Delete orphaned declaration for __fpsimd_enabled() KVM: arm64: Refactor kvm_arm_num_regs() for easier maintenance KVM: arm64: Add missing #includes to kvm_host.h arm64/sve: Clarify role of the VQ map maintenance functions arm64/sve: Check SVE virtualisability arm64/sve: Enable SVE state tracking for non-task contexts KVM: arm64: Add a vcpu flag to control SVE visibility for the guest KVM: arm64: Propagate vcpu into read_id_reg() KVM: arm64: Support runtime sysreg visibility filtering KVM: arm64/sve: System register context switch and access support KVM: arm64/sve: Context switch the SVE registers KVM: Allow 2048-bit register access via ioctl interface KVM: arm64: Add missing #include of in guest.c KVM: arm64: Factor out core register ID enumeration KVM: arm64: Reject ioctl access to FPSIMD V-regs on SVE vcpus KVM: arm64/sve: Add SVE support to register access ioctl interface KVM: arm64: Enumerate SVE register indices for KVM_GET_REG_LIST arm64/sve: In-kernel vector length availability query interface KVM: arm/arm64: Add hook for arch-specific KVM initialisation KVM: arm/arm64: Add KVM_ARM_VCPU_FINALIZE ioctl KVM: arm64/sve: Add pseudo-register for the guest's vector lengths KVM: arm64/sve: Allow userspace to enable SVE for vcpus KVM: arm64: Add a capability to advertise SVE support KVM: Document errors for KVM_GET_ONE_REG and KVM_SET_ONE_REG KVM: arm64/sve: Document KVM API extensions for SVE Documentation/virtual/kvm/api.txt | 156 +++++++++++++++ arch/arm/include/asm/kvm_host.h | 6 + arch/arm64/include/asm/fpsimd.h | 33 +++- arch/arm64/include/asm/kvm_host.h | 43 ++++- arch/arm64/include/asm/kvm_hyp.h | 1 - arch/arm64/include/asm/sysreg.h | 3 + arch/arm64/include/uapi/asm/kvm.h | 22 +++ arch/arm64/kernel/cpufeature.c | 2 +- arch/arm64/kernel/fpsimd.c | 172 ++++++++++++----- arch/arm64/kernel/signal.c | 5 - arch/arm64/kvm/fpsimd.c | 17 +- arch/arm64/kvm/guest.c | 394 +++++++++++++++++++++++++++++++++++--- arch/arm64/kvm/hyp/switch.c | 74 +++++-- arch/arm64/kvm/reset.c | 135 ++++++++++++- arch/arm64/kvm/sys_regs.c | 130 +++++++++++-- arch/arm64/kvm/sys_regs.h | 25 +++ include/uapi/linux/kvm.h | 5 + virt/kvm/arm/arm.c | 22 +++ 18 files changed, 1115 insertions(+), 130 deletions(-) -- 2.1.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel