From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Jones Subject: Re: [PATCH v7 25/27] KVM: arm64: Add a capability to advertise SVE support Date: Thu, 4 Apr 2019 22:39:19 +0200 Message-ID: <20190404203919.rrhb5fataphgjqr2@kamzik.brq.redhat.com> References: <1553864452-15080-1-git-send-email-Dave.Martin@arm.com> <1553864452-15080-26-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 621974A444 for ; Thu, 4 Apr 2019 16:39:26 -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 fxBXylCcuCjR for ; Thu, 4 Apr 2019 16:39:25 -0400 (EDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 6BC6B4A42E for ; Thu, 4 Apr 2019 16:39:25 -0400 (EDT) Content-Disposition: inline In-Reply-To: <1553864452-15080-26-git-send-email-Dave.Martin@arm.com> 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: Dave Martin Cc: Okamoto Takayuki , Christoffer Dall , Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , Zhang Lei , Julien Grall , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org List-Id: kvmarm@lists.cs.columbia.edu On Fri, Mar 29, 2019 at 01:00:50PM +0000, Dave Martin wrote: > To provide a uniform way to check for KVM SVE support amongst other > features, this patch adds a suitable capability KVM_CAP_ARM_SVE, > and reports it as present when SVE is available. > > Signed-off-by: Dave Martin > Reviewed-by: Julien Thierry > Tested-by: zhang.lei > > --- > > Changes since v5: > > * [Julien Thierry] Strip out has_vhe() sanity-check, which wasn't in > the most logical place, and anyway doesn't really belong in this > patch. > > Moved to KVM: arm64/sve: Allow userspace to enable SVE for vcpus > instead. > --- > arch/arm64/kvm/reset.c | 3 +++ > include/uapi/linux/kvm.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c > index 32c5ac0..f13378d 100644 > --- a/arch/arm64/kvm/reset.c > +++ b/arch/arm64/kvm/reset.c > @@ -98,6 +98,9 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext) > case KVM_CAP_ARM_VM_IPA_SIZE: > r = kvm_ipa_limit; > break; > + case KVM_CAP_ARM_SVE: > + r = system_supports_sve(); > + break; > default: > r = 0; > } > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > index c3b8e7a..1d56444 100644 > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -988,6 +988,7 @@ struct kvm_ppc_resize_hpt { > #define KVM_CAP_ARM_VM_IPA_SIZE 165 > #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 > #define KVM_CAP_HYPERV_CPUID 167 > +#define KVM_CAP_ARM_SVE 168 > > #ifdef KVM_CAP_IRQ_ROUTING > > -- > 2.1.4 > Reviewed-by: Andrew Jones 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=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_NEOMUTT 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 4A24DC4360F for ; Thu, 4 Apr 2019 20:39:31 +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 1C2682177E for ; Thu, 4 Apr 2019 20:39:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uJYHB/6V" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C2682177E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pFBs+cp9xcDlazVv0T2ecCN27zB9huuzPk5kXzvPlrg=; b=uJYHB/6VsgOIf1 FE7xSy4wmsDQD4/TOiMQIYXHjOSghlCCe7NspEl4Yyydt2K5OdhQmi8xWEF/y2dlCoebhXDAo9JF5 HiSUvkYCU1zuimu0Ugk/RFoAp1hu7brbVrjsxYrP6ILNg0DwX28Gaevv++8UjXJRbXKAk8GRbXbg1 OBK24jPSOA/g+1MnMZ3KpvO2RcU6ksNFYAatp8pqMKXQVsjQfkUSzizJXvWxBUycNrsyey+Nqh/X5 UrhDsJB9eFEqfTfL8pJUOYUkNsFbmrg1sdA7CbKn3q5Fl9b/lqspjAW3A56IbDCLkSuS0yOIphY5S BSgU2YeNr/2pGZON5Ltg==; 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 1hC98x-0001E2-Ms; Thu, 04 Apr 2019 20:39:27 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hC98v-0001Dg-2j for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 20:39:26 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 92A2B81F01; Thu, 4 Apr 2019 20:39:24 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63ED260C05; Thu, 4 Apr 2019 20:39:22 +0000 (UTC) Date: Thu, 4 Apr 2019 22:39:19 +0200 From: Andrew Jones To: Dave Martin Subject: Re: [PATCH v7 25/27] KVM: arm64: Add a capability to advertise SVE support Message-ID: <20190404203919.rrhb5fataphgjqr2@kamzik.brq.redhat.com> References: <1553864452-15080-1-git-send-email-Dave.Martin@arm.com> <1553864452-15080-26-git-send-email-Dave.Martin@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1553864452-15080-26-git-send-email-Dave.Martin@arm.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 04 Apr 2019 20:39:24 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_133925_138469_AFFA0BD9 X-CRM114-Status: GOOD ( 21.34 ) 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: Okamoto Takayuki , Christoffer Dall , Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , Zhang Lei , Julien Grall , kvmarm@lists.cs.columbia.edu, 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 On Fri, Mar 29, 2019 at 01:00:50PM +0000, Dave Martin wrote: > To provide a uniform way to check for KVM SVE support amongst other > features, this patch adds a suitable capability KVM_CAP_ARM_SVE, > and reports it as present when SVE is available. > > Signed-off-by: Dave Martin > Reviewed-by: Julien Thierry > Tested-by: zhang.lei > > --- > > Changes since v5: > > * [Julien Thierry] Strip out has_vhe() sanity-check, which wasn't in > the most logical place, and anyway doesn't really belong in this > patch. > > Moved to KVM: arm64/sve: Allow userspace to enable SVE for vcpus > instead. > --- > arch/arm64/kvm/reset.c | 3 +++ > include/uapi/linux/kvm.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c > index 32c5ac0..f13378d 100644 > --- a/arch/arm64/kvm/reset.c > +++ b/arch/arm64/kvm/reset.c > @@ -98,6 +98,9 @@ int kvm_arch_vm_ioctl_check_extension(struct kvm *kvm, long ext) > case KVM_CAP_ARM_VM_IPA_SIZE: > r = kvm_ipa_limit; > break; > + case KVM_CAP_ARM_SVE: > + r = system_supports_sve(); > + break; > default: > r = 0; > } > diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h > index c3b8e7a..1d56444 100644 > --- a/include/uapi/linux/kvm.h > +++ b/include/uapi/linux/kvm.h > @@ -988,6 +988,7 @@ struct kvm_ppc_resize_hpt { > #define KVM_CAP_ARM_VM_IPA_SIZE 165 > #define KVM_CAP_MANUAL_DIRTY_LOG_PROTECT 166 > #define KVM_CAP_HYPERV_CPUID 167 > +#define KVM_CAP_ARM_SVE 168 > > #ifdef KVM_CAP_IRQ_ROUTING > > -- > 2.1.4 > Reviewed-by: Andrew Jones _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel