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=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no 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 E9EE6C433ED for ; Tue, 18 May 2021 16:45:12 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 A0D0E601FE for ; Tue, 18 May 2021 16:45:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A0D0E601FE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc: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=FcDUdCRAA4fEEZc9f+kHxH8tKPXCEbFxvGHO5AgVAWk=; b=f2Ad1KYx4r0RxhKskDJkSHB15 AO9kF1ND27wyRcv1oas6SBHdl/Yd08H9L64Pj2DkjDev04kBiVyz3IqD7NIA4VBunJ2Ik50iGGXIo /E+dYE1CVVVcGjjJBUOdRrI/CLhW6wKAW0l0XjC6OVInOO50NdfxGrj7m8EDvzzRkvgQfyDe6QSWy DWzvWuJj1sqS7Vj/LPjdEt011BubXFxvXrardQi5wAppfAqTolX8zqrPdBvwUOYGJH/9IuXY4J0aE dCVqpIICrggm4twtZoLayYfzmHXN7wcOgR7k7FJqngEfbQB8drpyh0Ig6boAAG7FDY06s8+U9BjQ6 Ou+REx/6Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj2oV-001N40-0V; Tue, 18 May 2021 16:43:23 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lj2oO-001N3S-Cs for linux-arm-kernel@desiato.infradead.org; Tue, 18 May 2021 16:43:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=NHP9BxneCUxd+rr36oxjcq/BjpxbOD9xNW+GeIOes+0=; b=k/iJORoYordqC849o6sEJTxR2U qXUIPSMgvfVrpAK0s9YGUkfZi0BoaFOFUzWJWZ6bJnAZVgzWlmSzPOMZSkVI4AbZz/ZMXhv51gCK9 FRxmS2XZOELlcNFGzAQrodhbrZgaJGkXH8NUIVGO48TMOHL2pxM6rcoafLl3O/D4CP95ekAok7gub K869cnTNgaFw/htMWyyuKVTvr7m9UgHFb2m4rJosXhYK3zUltcZy7trwDDor+RiyGyYtz3CcFY15v XfSCX4W6jEKLPFn2RJttmEnYVl/9C/FjMxRZzooas0DegCF383f0aNMQVdZ0aJocO+dhKu8ISmuRT 86oaOiwg==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lj2oL-00EoVW-EJ for linux-arm-kernel@lists.infradead.org; Tue, 18 May 2021 16:43:15 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ECC0B6D; Tue, 18 May 2021 09:43:08 -0700 (PDT) Received: from bogus (unknown [10.57.72.88]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BDFE73F73B; Tue, 18 May 2021 09:43:07 -0700 (PDT) Date: Tue, 18 May 2021 17:43:02 +0100 From: Sudeep Holla To: Mark Brown Cc: Catalin Marinas , Will Deacon , Mark Rutland , Lorenzo Pieralisi , Marc Zyngier , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v1 2/2] arm64: smccc: Support SMCCC v1.3 SVE register saving hint Message-ID: <20210518164302.ldogm56xvhccnyas@bogus> References: <20210518100919.6674-1-broonie@kernel.org> <20210518100919.6674-3-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210518100919.6674-3-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210518_094313_548094_9A4F13A7 X-CRM114-Status: GOOD ( 19.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Mark, On Tue, May 18, 2021 at 11:09:19AM +0100, Mark Brown wrote: > SMCCC v1.2 requires that all SVE state be preserved over SMC calls which > introduces substantial overhead in the common case where there is no SVE > state in the registers. To avoid this SMCCC v1.3 introduces a flag which > allows the caller to say that there is no state that needs to be preserved > in the registers. Make use of this flag, setting it if the SMCCC version > indicates support for it and the TIF_ flags indicate that there is no live > SVE state in the registers, this avoids placing any constraints on when > SMCCC calls can be done or triggering extra saving and reloading of SVE > register state in the kernel. > > This would be straightforward enough except for the rather entertaining > inline assembly we use to do SMCCC v1.1 calls to allow us to take advantage > of the limited number of registers it clobbers. Deal with this by having a > slightly non-standard function which we call immediately before issuing the > SMCCC call to make our checks. This causes an extra function call on any > system built with SVE support, and extra checks when SVE is detected at > runtime, but these costs are expected to be reasonable in the context of > doing a SMCCC call in the first place. > I am adding another interface that extends the input/output register set for v1.2 and above. I assume we may need these changes there too. I have cc-ed you in the updated version I just posted. The lore link is not yet available, so sharing the one for earlier version[1] -- Regards, Sudeep [1] https://lore.kernel.org/r/20210505093843.3308691-2-sudeep.holla@arm.com/ _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel