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 2A63AC4360F for ; Thu, 4 Apr 2019 21:16: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 EBA2320882 for ; Thu, 4 Apr 2019 21:16:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PcZ8u1FD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBA2320882 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=8SZvNFplndyWPWdaHfNgy4dGt0QP9ZRaQv08wm066ng=; b=PcZ8u1FDJJQw4G F4FpJX3SI0xkz0CkVn3Rlnuyr5TXszX1WJbuIgnNGPBt9DYpiqpqEP+sTL7qsz6h2y6jaNrB8IMfK vxa1rbVZBeeR6Yd7iuHOsDwvxJHsFxC0S7WInLtr+WGzeP5qd1NdE+QeIQVhYiZuHqNXK17kyxJuV 56JEFzJKYeGpLx3h3ikBy9wrxFmKrqzLIcdZoVM4Fa/ZCzwSC1Ah85egufNVSkjqSCNMnMMnqfsVp F4NWTO5+K36cKrOX5Dy2LpHkcG7ZCE8DD9wQ6ezUKCV2llr+xcBiO71rkc0J1N2csEc3O93dw42XH 5nKCeG/6wC1aNuzaEbvg==; 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 1hC9iO-0007CE-LT; Thu, 04 Apr 2019 21:16:04 +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 1hC9iL-0007BM-1j for linux-arm-kernel@lists.infradead.org; Thu, 04 Apr 2019 21:16:02 +0000 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AE1A6301BE68; Thu, 4 Apr 2019 21:16:00 +0000 (UTC) Received: from kamzik.brq.redhat.com (unknown [10.43.2.160]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9156E1001E84; Thu, 4 Apr 2019 21:15:58 +0000 (UTC) Date: Thu, 4 Apr 2019 23:15:56 +0200 From: Andrew Jones To: Dave Martin Subject: Re: [PATCH v7 09/27] KVM: arm64: Add a vcpu flag to control SVE visibility for the guest Message-ID: <20190404211556.pr7vr6sn3sw4yyft@kamzik.brq.redhat.com> References: <1553864452-15080-1-git-send-email-Dave.Martin@arm.com> <1553864452-15080-10-git-send-email-Dave.Martin@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1553864452-15080-10-git-send-email-Dave.Martin@arm.com> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 04 Apr 2019 21:16:00 +0000 (UTC) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190404_141601_103126_730E3079 X-CRM114-Status: GOOD ( 18.84 ) 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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:34PM +0000, Dave Martin wrote: > Since SVE will be enabled or disabled on a per-vcpu basis, a flag > is needed in order to track which vcpus have it enabled. > = > This patch adds a suitable flag and a helper for checking it. > = > Signed-off-by: Dave Martin > Reviewed-by: Alex Benn=E9e > Tested-by: zhang.lei > --- > arch/arm64/include/asm/kvm_host.h | 4 ++++ > 1 file changed, 4 insertions(+) > = > diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/k= vm_host.h > index 6d10100..ad4f7f0 100644 > --- a/arch/arm64/include/asm/kvm_host.h > +++ b/arch/arm64/include/asm/kvm_host.h > @@ -328,6 +328,10 @@ struct kvm_vcpu_arch { > #define KVM_ARM64_FP_HOST (1 << 2) /* host FP regs loaded */ > #define KVM_ARM64_HOST_SVE_IN_USE (1 << 3) /* backup for host TIF_SVE */ > #define KVM_ARM64_HOST_SVE_ENABLED (1 << 4) /* SVE enabled for EL0 */ > +#define KVM_ARM64_GUEST_HAS_SVE (1 << 5) /* SVE exposed to guest */ > + > +#define vcpu_has_sve(vcpu) (system_supports_sve() && \ > + ((vcpu)->arch.flags & KVM_ARM64_GUEST_HAS_SVE)) > = > #define vcpu_gp_regs(v) (&(v)->arch.ctxt.gp_regs) > = > -- = > 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