Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3906373rdb; Thu, 14 Sep 2023 06:28:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH5yJlUZ0DRkrRP0ZrTbWSZJ+FclEjfsNM09tm65Os8xjguX87S7K/V8n2srp5fJT0+2AmK X-Received: by 2002:a17:902:d512:b0:1c0:bf60:ba4f with SMTP id b18-20020a170902d51200b001c0bf60ba4fmr6073755plg.4.1694698082292; Thu, 14 Sep 2023 06:28:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694698082; cv=none; d=google.com; s=arc-20160816; b=LL305EGTTxyWe94TVvsoyYSSxfJlk9aaEZAZSv9rqI4DdRy6Q4JcGR5qBHZkaZCuPi CLhqwa2fxN+XamGw41QI0iAmrzH2G514q/Xn7cqSCtDijuexNkL01Usc+bWg3TEP6wNn zYLwVSpG9EUmr+5szzb6hsBFMYpyh5DN/BBzfjiiT58Bb85jpthUZAzeyGMrK23LXFs4 IHiXvArnmMXA0+lF8uoPHeHY/+z75kO2W0dTwXrClf01vtrkZ5VZNjeoKS+h8OtBkQvk Vx3n97oe4HenSzwV7o2cMYW9Vfc4bbty9WyGn3jTqS8XrvAjn+Dg3/Crf3qr+f09sx1F K63Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=e6aPu6h6vNm+4UiOVYQ/IN+Qc55tMPu5HgU1n+Gwkuc=; fh=dRB/sM2bU6cMPp4EtZtdKFQoX1qsI2R4TO8yvae13qg=; b=llW1qE13HL21THg+kEvKT5+p1PdodgyfKufSg1AC5VilUcla1mhJKxR1NU7PEQJN6L 5vOK4426+I5Sv9pe+Md2FDlZOb1fF5cDUYayCE0jCKjqtaZO99G32qK90bNQol9F6F0r +EcBNlUlFWTnRMXgRjnLl1C4CBM62PQVrnyztCGaYpZFCg57+KmcZTzDkhW84FbFFV7J oiZpL1/8lYj6Wqe27QnayALK+0S3HwivRyW2cVG62/5DoP32UI3Q6nJppnIeyhVgjFem 1iPSkGhHlKNHIKckkBfdlzlewn9Ct2XuBhmLGPApk7TWLJlobx+LPnqTDV66VSeF/vyS Ws0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vt5N4LvG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u15-20020a170902714f00b001bf1d1d99f6si1592965plm.358.2023.09.14.06.28.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 06:28:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vt5N4LvG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 419B08245A4C; Thu, 14 Sep 2023 03:32:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236618AbjINKc2 (ORCPT + 99 others); Thu, 14 Sep 2023 06:32:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237113AbjINKcW (ORCPT ); Thu, 14 Sep 2023 06:32:22 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 226D41FC6 for ; Thu, 14 Sep 2023 03:32:18 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE97BC433C7; Thu, 14 Sep 2023 10:32:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694687537; bh=HWuwnMWwmoy6y7laW8KuI+FiHflIOtHqs/4Y7u4IyRY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vt5N4LvG5mD+1xGzst1aDJ4tbntqF3o5GfmCS2r+ZXx0DW6ZYmygEFJMddzXLu7x0 zqHabs+cbjvebiTmOWGujwGmfGDjL8lIxWDUUuXybrBzBwi/tsyh8iwSdYugHjqoer 6TH84ietbmQGqsSOPZqIV06BGUFmDyrlYbLsROp1MKApKYcNm4yqQ4QrOkwKXvCo0d 0xFnyfYeI5RbjQO737blVUnSZpeCWiknG7bR9bHa0cZpcDwY6l7r2460Jas1sjO8oi a9dNtbKbWKASHlI9rJ2lap/sa70puBAIyR2ecZMcR1pKMwnTBQYsg3DoCy1/biGzRo /mTE9uxV8ClBg== Date: Thu, 14 Sep 2023 11:32:12 +0100 From: Mark Brown To: Oliver Upton Cc: Marc Zyngier , James Morse , Suzuki K Poulose , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: Only default to enabling SVE when present Message-ID: References: <20230913-kvm-arm64-fp-init-v1-1-8ce9ba1cc4c4@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="z0nQ7h2X83FBCQV9" Content-Disposition: inline In-Reply-To: X-Cookie: Do clones have navels? Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Sep 2023 03:32:27 -0700 (PDT) --z0nQ7h2X83FBCQV9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Sep 14, 2023 at 12:04:29AM +0000, Oliver Upton wrote: > On Wed, Sep 13, 2023 at 07:34:16PM +0100, Mark Brown wrote: > > - if (!vcpu_has_sve(vcpu) || > > - (vcpu->arch.fp_state != FP_STATE_GUEST_OWNED)) > > + if (cpus_have_final_cap(ARM64_SVE) && > > + (!vcpu_has_sve(vcpu) || > > + (vcpu->arch.fp_state != FP_STATE_GUEST_OWNED))) > vcpu_has_sve() already tests system_supports_sve(), so I don't believe > this hunk is necessary. That'll mean that the first branch of the || should always return true on systems without SVE so we'll set CPTR_EL2_TZ, and there's also the check for guest ownership as well. --z0nQ7h2X83FBCQV9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmUC4SsACgkQJNaLcl1U h9CFOQf/QechB02CRL9EgDHH6cg1JKq0BnYtRhWUwz4dRh8P9+AOR9+EGb+HsFXO fEDX/KBk6rjyAQxOdW4h9Xeiz3FwDwzqp5bByWlQqCBahox0Hu9tVq2B592IhzOm Iskr9i0ysKw/oJ40YgBYB2dMuAEoS3kCk3rLGhzog4N59jzt3l/NkKt4SHkhjwtE 83pIAzF+TGu2g2fzMaDRYdGyA/RobSDnxGyLrDvSRyq4PVHIAzHWhS2+e5yoNid7 tNeo65Rxjumu3e8DdGhQarWfW9Rb51cWFIGEw3SqYn73DdnV7DBxMSVPaq1McW3n cz1MP4Y8H+8mm+6rOtv5S4/SzzfEyQ== =Ph8R -----END PGP SIGNATURE----- --z0nQ7h2X83FBCQV9--