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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 54AA6C3DA5D for ; Thu, 25 Jul 2024 15:58:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B89396B0089; Thu, 25 Jul 2024 11:58:36 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B37636B0092; Thu, 25 Jul 2024 11:58:36 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9D9446B0093; Thu, 25 Jul 2024 11:58:36 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 7D3E96B0089 for ; Thu, 25 Jul 2024 11:58:36 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 37E7641054 for ; Thu, 25 Jul 2024 15:58:36 +0000 (UTC) X-FDA: 82378732632.17.9D09438 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf25.hostedemail.com (Postfix) with ESMTP id 76539A000B for ; Thu, 25 Jul 2024 15:58:34 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of Dave.Martin@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=Dave.Martin@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1721923076; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PFXxQwtLMQAZ09YUAD/h38uGSZ+1yapP3Vz2F1glEGE=; b=nKY9DR6ncOgyxTmsdWlVwBnFiZ4q0qU2S96q+416YCPYsD0SsBBJQJy45RDYhdiCP7fL8k b5PXTYaG/jaOodZgchBoVmc8uyYBdYm/s9l95IL3fe7UaK7uzhE9pKEBy1IsVGiFtYgTEp 0ny3RjBxVdRymxbO4dsGRhtq/SR2QCY= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of Dave.Martin@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=Dave.Martin@arm.com; dmarc=pass (policy=none) header.from=arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721923076; a=rsa-sha256; cv=none; b=ZKJWIa7771UAvoGc0bT0Z6mNXnQh+a5MdZGbTg/CoWHSAyYAUeBBY3YKx76Y48KoEy9hYU JhKu8P1C7RROuwLFGUi7FIMP8OAscw3srrbcO/2rfyrChcslg7YIJX8AqH1qiooGOaZr5D 9FQjEqmX2eT0+8wCMqz9Mc9Eu0QzqH4= 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 22CF21007; Thu, 25 Jul 2024 08:58:59 -0700 (PDT) Received: from e133380.arm.com (e133380.arm.com [10.1.197.55]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C07A83F5A1; Thu, 25 Jul 2024 08:58:29 -0700 (PDT) Date: Thu, 25 Jul 2024 16:58:27 +0100 From: Dave Martin To: Amit Daniel Kachhap Cc: Mark Brown , Joey Gouly , linux-arm-kernel@lists.infradead.org, akpm@linux-foundation.org, aneesh.kumar@kernel.org, aneesh.kumar@linux.ibm.com, bp@alien8.de, catalin.marinas@arm.com, christophe.leroy@csgroup.eu, dave.hansen@linux.intel.com, hpa@zytor.com, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, maz@kernel.org, mingo@redhat.com, mpe@ellerman.id.au, naveen.n.rao@linux.ibm.com, npiggin@gmail.com, oliver.upton@linux.dev, shuah@kernel.org, szabolcs.nagy@arm.com, tglx@linutronix.de, will@kernel.org, x86@kernel.org, kvmarm@lists.linux.dev Subject: Re: [PATCH v4 18/29] arm64: add POE signal support Message-ID: References: <20240503130147.1154804-1-joey.gouly@arm.com> <20240503130147.1154804-19-joey.gouly@arm.com> <229bd367-466e-4bf9-9627-24d2d0821ff4@arm.com> <7789da64-34e2-49db-b203-84b80e5831d5@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Stat-Signature: jfpct1jgshwfk6p68ifrexwqndozuoff X-Rspam-User: X-Rspamd-Queue-Id: 76539A000B X-Rspamd-Server: rspam02 X-HE-Tag: 1721923114-830334 X-HE-Meta: U2FsdGVkX1/UCc6AsnULZ14XyIZkSvd5Dp8CknRdpZM9cEl4RLjytlg0bI9kCyzx03t7EcG5EVKqAHbMggKyqCjZO8MdcVaixggzbx8CCeWEsPp07+4L0grNpmb9jbreZaI3CvlSLc+QB+cWalIxJUYD1M+YwXWxoaZVO2Y4n9sngkiFvnd265dKhZlfBfj0cuG6bOMoG2bqOmQaOgKCqdBOMEoHzWIr8iRlU2c5ylJ18hhwabEqjNzOBNM5PK3OJQcYVHaFH3HDWcx9Mpc/NKwosmfI9pCRbvyU9lp6wfID7ENRwECvdmjEcci1bmVFXpds3+9j1r1bB7xFTfIXqREs2F8Rr5PxwSQBbAdMcSuzezc9q1TUjMTVsCRKd9/b73o1KQbMDxI0FXxO/eBA7D3C9z00pijmXW7JlufNr6nDnYg73nYXg8Ko/yQpEUs7s8/icc01jMHXU99PgE32TFVOBNSNbFnVxS143LMBHS0j2FQjILs7Ou67ObrOFDMP3eD5MXGg0nG3zOS2orEPWJNlJB91YSSLtQt7qVcxYhN7zVbukaNNcBdBPGctHuEqZF6TSAiH6lnCd14W0rMiwql97tvbvdXVbUN4Wcc2xfxe7m9Ia/Mv+QLIfBkki4gZ2k/qgiKcRCNoNZ4lghpvJ5FQK+weEvHVwVeLW3tqZENwW1LDZtBNYDJ94JjAUJHIDMi0FejnF/HHfd97xyOY2R97cMF3n4NqIxBavpUghzhJ4LJj5wO34e0ZhMhoD/l5pdTQbdAVMQKquo18PZT3DcjAM0Rog55NTjL3i/42mFPKHXmxbNRE4q+pv0HYUY8nydgoPTGasoJWxZHZQhPiULT1Axdw894xz/23PwfQduZ07fqEAdyD8V4Qo2tESY+511HSylKr7yfYdKX8+jCz4dVHC60eXoFQFOnnuatdhUJ7ebJA/Y0sapJav/iwDK3zoaXEFMHA94w2ScPe66v leeSN9op RcnKSr8Z4rdJpxb5iVE3smCT97NyC2QVK6nYyL6pAOUB3PCcmGiqRxTRbnujjeLbrohtQR0iz/27jBISeCj9ldC7WqLTH7b0y5kGLZaAMEkZUL6x9Fn1Ktm1qNs/Fv6JzLxrk5NUvfcC1iUVZavAWIS8OCA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Mon, Jun 03, 2024 at 02:51:46PM +0530, Amit Daniel Kachhap wrote: > > > On 5/31/24 22:09, Mark Brown wrote: > > On Tue, May 28, 2024 at 12:26:54PM +0530, Amit Daniel Kachhap wrote: > > > On 5/3/24 18:31, Joey Gouly wrote: > > > > > > +#define POE_MAGIC 0x504f4530 > > > > +struct poe_context { > > > > + struct _aarch64_ctx head; > > > > + __u64 por_el0; > > > > +}; > > > > > There is a comment section in the beginning which mentions the size > > > of the context frame structure and subsequent reduction in the > > > reserved range. So this new context description can be added there. > > > Although looks like it is broken for za, zt and fpmr context. > > > > Could you be more specific about how you think these existing contexts > > are broken? The above looks perfectly good and standard and the > > existing contexts do a reasonable simulation of working. Note that the > > ZA and ZT contexts don't generate data payload unless userspace has set > > PSTATE.ZA. > > Sorry for not being clear on this as I was only referring to the > comments in file arch/arm64/include/uapi/asm/sigcontext.h and no code > as such is broken. > > * Allocation of __reserved[]: > * (Note: records do not necessarily occur in the order shown here.) > * > * size description > * > * 0x210 fpsimd_context > * 0x10 esr_context > * 0x8a0 sve_context (vl <= 64) (optional) > * 0x20 extra_context (optional) > * 0x10 terminator (null _aarch64_ctx) > * > * 0x510 (reserved for future allocation) > > Here I think that optional context like za, zt, fpmr and poe should have > size mentioned here to make the description consistent.As you said ZA > and ZT context are enabled by userspace so some extra details can be > added for them too. Regarding this, __reserved[] is looking very full now. I'll post a draft patch separately, since I think the update could benefit from separate discussion, but my back-of-the-envelope calculation suggests that (before this patch) we are down to 0x90 bytes of free space (i.e., over 96% full). I wonder whether it is time to start pushing back on adding a new _foo_context for every individual register, though? Maybe we could add some kind of _misc_context for miscellaneous 64-bit regs. [...] Cheers ---Dave