From patchwork Fri Apr 12 16:28:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 10898743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C56CA17E0 for ; Fri, 12 Apr 2019 16:28:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A5E5528E95 for ; Fri, 12 Apr 2019 16:28:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9899428EB5; Fri, 12 Apr 2019 16:28:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3CA0E28E95 for ; Fri, 12 Apr 2019 16:28:32 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=UrQruU0xY0m9ruCN9kLu2eU/UxHtDdr949DMDyKFNJo=; b=P8F 3ZhK9LMRgfV92Aheo4nTKJB9hG3LahcRvrdD0cjz+iXd3NFWg4vh9fWtRmc7Ttlw8XVx+k/jitCBU F2BuJ3cmZxal5oh+0XyQ/wjRrLVbSqgtISrV3E/6gdHAetjH4919hxIP2bpdTtHP6j4088B7G9mop p0L2Ndl2o2tjnXhiSNMs4K0/lbxD1H6/TcRZVTwim3Gxxu7Ib8dTkheJyC42QmbEbiQg/E4e55iEN 2aPb0XD+AaDOzMaaYoO+nuSGwCHQW9sinKlSSp/TcQNWIU3+xqG9XVTGFAPsCW+QScpwlDdL3YWd2 LOImS63M164xvMxwXFIXjEUPhAINTpw==; 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 1hEz2U-0001hY-6S; Fri, 12 Apr 2019 16:28:30 +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 1hEz2P-0001gq-Gy for linux-arm-kernel@lists.infradead.org; Fri, 12 Apr 2019 16:28:26 +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 EBAF915AB; Fri, 12 Apr 2019 09:28:24 -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 D022B3F718; Fri, 12 Apr 2019 09:28:22 -0700 (PDT) From: Dave Martin To: kvmarm@lists.cs.columbia.edu Subject: [PATCH 00/14] KVM: arm64: SVE cleanups Date: Fri, 12 Apr 2019 17:28:04 +0100 Message-Id: <1555086498-26691-1-git-send-email-Dave.Martin@arm.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190412_092825_566429_8D38E75F X-CRM114-Status: GOOD ( 10.49 ) 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 , Andrew Jones , Zhang Lei , Julien Grall , =?utf-8?q?Alex_Benn=C3=A9e?= , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This series contains some cleanups applicable to the SVE KVM support patches merged into kvmarm/next. These arose from Andrew Jones' review. Apart from some minor changes to error codes and checking, these are mostly cosmetic / sytlistic changes only. Although straightforward, these changes have not been tested yet: I'm posting them now so that reviewers can make a start on them. The patches are based on git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm.git next 5d8d4af24460 ("arm64: KVM: Fix system register enumeration") This series in git: git://linux-arm.org/linux-dm.git sve-kvm-fixes/v1/head http://linux-arm.org/git?p=linux-dm.git;a=shortlog;h=refs/heads/sve-kvm-fixes/v1/head Dave Martin (14): arm64/sve: Clarify vq map semantics KVM: arm/arm64: Demote kvm_arm_init_arch_resources() to just set up SVE KVM: arm: Make vcpu finalization stubs into inline functions KVM: arm64/sve: sys_regs: Demote redundant vcpu_has_sve() checks to WARNs KVM: arm64/sve: Clean up UAPI register ID definitions KVM: arm64/sve: Miscellaneous tidyups in guest.c KVM: arm64/sve: Make register ioctl access errors more consistent KVM: arm64/sve: WARN when avoiding divide-by-zero in sve_reg_to_region() KVM: arm64/sve: Simplify KVM_REG_ARM64_SVE_VLS array sizing KVM: arm64/sve: Explain validity checks in set_sve_vls() KVM: arm/arm64: Clean up vcpu finalization function parameter naming KVM: Clarify capability requirements for KVM_ARM_VCPU_FINALIZE KVM: Clarify KVM_{SET,GET}_ONE_REG error code documentation KVM: arm64: Clarify access behaviour for out-of-range SVE register slice IDs Documentation/virtual/kvm/api.txt | 24 ++++++----- arch/arm/include/asm/kvm_host.h | 13 ++++-- arch/arm64/include/asm/fpsimd.h | 4 -- arch/arm64/include/asm/kvm_host.h | 4 +- arch/arm64/include/uapi/asm/kvm.h | 32 ++++++++++---- arch/arm64/kernel/fpsimd.c | 7 ++- arch/arm64/kvm/guest.c | 91 +++++++++++++++++++++++---------------- arch/arm64/kvm/reset.c | 6 +-- arch/arm64/kvm/sys_regs.c | 4 +- virt/kvm/arm/arm.c | 2 +- 10 files changed, 116 insertions(+), 71 deletions(-) Reviewed-by: Andrew Jones