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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id C71FBC433F5 for ; Thu, 10 Feb 2022 18:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=LVxIhXsNSYwOATQvJ/DSlL40/wv/Bibhq1+yQmrMO0Q=; b=ohwWB/GKQDcVGq +4KrER9HoeM3aYWHTbUnaHX7qs+cUEBLzfwntx5nSo6rNd58ME5HUU0tKM1F+pPy2l7bBUB1ca9Ti 9yKUzWyw4O0ZpNf0ldlTyxEwpzFdWJ5p9SDhRPN60gSrlFXkWJ71mTSl5rqFi+Ux+2DKNeNyGiC5u o7QSemDcT9DhQ3qXA83QoAQDwieQvP2TcnW8705Okx8LoB1T+tLSv1oYhXw6RxIu82/4xELkuxiW9 grO5UJ2TQZZ+5YyePIEO1B+zGHeOmYUHvm0AVm5bn8sVwxS00GvjypOLq0ircZJM/xyMllG+kiAzx DE92H50VXOY8aqRyXIWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIEFW-004cnf-5e; Thu, 10 Feb 2022 18:32:58 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIEFT-004cnH-4y for linux-arm-kernel@lists.infradead.org; Thu, 10 Feb 2022 18:32:56 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 276A861E69; Thu, 10 Feb 2022 18:32:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79A94C004E1; Thu, 10 Feb 2022 18:32:50 +0000 (UTC) Date: Thu, 10 Feb 2022 18:32:46 +0000 From: Catalin Marinas To: Mark Brown Cc: Will Deacon , Marc Zyngier , Shuah Khan , Shuah Khan , Alan Hayward , Luis Machado , Salil Akerkar , Basant Kumar Dwivedi , Szabolcs Nagy , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, kvmarm@lists.cs.columbia.edu Subject: Re: [PATCH v11 06/40] arm64/sme: Provide ABI documentation for SME Message-ID: References: <20220207152109.197566-1-broonie@kernel.org> <20220207152109.197566-7-broonie@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220207152109.197566-7-broonie@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220210_103255_279503_064734BB X-CRM114-Status: GOOD ( 20.96 ) 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 On Mon, Feb 07, 2022 at 03:20:35PM +0000, Mark Brown wrote: > diff --git a/Documentation/arm64/sme.rst b/Documentation/arm64/sme.rst > new file mode 100644 > index 000000000000..15df3157c592 > --- /dev/null > +++ b/Documentation/arm64/sme.rst [...] > +3. Sharing of streaming and non-streaming mode SVE state > +--------------------------------------------------------- > + > +It is implementation defined which if any parts of the SVE state are shared > +between streaming and non-streaming modes. When switching between modes > +via software interfaces such as ptrace if no register content is provided as > +part of switching no state will be assumed to be shared and everything will > +be zeroed. Is there anything other than ptrace() here? I read the sigreturn() case below but did not say anything about changing PSTATE.SM via the sigcontext. I guess it's similar to ptrace(). > +4. System call behaviour > +------------------------- > + > +* On syscall PSTATE.ZA is preserved, if PSTATE.ZA==1 then the contents of the > + ZA matrix are preserved. Sorry if this was discussed. What is the rationale for preserving the ZA registers on syscall? We don't do this for the top part of the Z registers. > +* On syscall PSTATE.SM will be cleared and the SVE registers will be handled > + as normal. What does that mean? Is this as per the sve.rst doc (unspecified but zeroed in practice)? > +* Neither the SVE registers nor ZA are used to pass arguments to or receive > + results from any syscall. > + > +* On creation fork() or clone() the newly created process will have PSTATE.SM > + and PSTATE.ZA cleared. This looks slightly inconsistent with the first bullet point on ZA being preserved on syscalls. Why do these differ? [...] > +References > +========== > + > +[1] arch/arm64/include/uapi/asm/sigcontext.h > + AArch64 Linux signal ABI definitions > + > +[2] arch/arm64/include/uapi/asm/ptrace.h > + AArch64 Linux ptrace ABI definitions > + > +[3] Documentation/arm64/cpu-feature-registers.rst > + > +[4] ARM IHI0055C > + http://infocenter.arm.com/help/topic/com.arm.doc.ihi0055c/IHI0055C_beta_aapcs64.pdf > + http://infocenter.arm.com/help/topic/com.arm.doc.subset.swdev.abi/index.html > + Procedure Call Standard for the ARM 64-bit Architecture (AArch64) The second link no longer works. I also couldn't find any reference to [4] but there's a lot of text to scan, so I may have missed it. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel