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 6539BC25B75 for ; Mon, 3 Jun 2024 09:22:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA55E6B0095; Mon, 3 Jun 2024 05:22:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C55276B0098; Mon, 3 Jun 2024 05:22:01 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B6A5B6B009C; Mon, 3 Jun 2024 05:22:01 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9A4ED6B0095 for ; Mon, 3 Jun 2024 05:22:01 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 4C2C016097C for ; Mon, 3 Jun 2024 09:22:01 +0000 (UTC) X-FDA: 82189035642.22.56AEECE Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf20.hostedemail.com (Postfix) with ESMTP id ACF9D1C001A for ; Mon, 3 Jun 2024 09:21:58 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf20.hostedemail.com: domain of amitdaniel.kachhap@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=amitdaniel.kachhap@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1717406519; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=paFYB08PdZ8xwtuPusfyexzSX0tjtLwJziAR/pnND0k=; b=Zmt2GI3Qdw99sFsxEeUgQ4KGsjaRPLI4pO85rnMSWReHkn9nHmIT1cpxvYvGGwIH1Hxzxc PeorVCa5mQk7blOzFzcgBYb1ivY6I1MB45FJOrgRLdqezyIiCDan+uGJnNuy5ayGiiaKXk 6g9JgcRcB35JqUdKUx9MT2Eo9cGgWzM= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf20.hostedemail.com: domain of amitdaniel.kachhap@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=amitdaniel.kachhap@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1717406519; a=rsa-sha256; cv=none; b=eI5LYPrmVm7XKd4AlN9AxsJ1SQGN7gpvhoqIyBdJNKhQEl+utZSgs02bq4b6aY1UVcxi3L bJNUQpY7GKeCXIGERzYtx4VNdWWe5co2u+DkYLeh/hIj+AO80AP6Hu1dQK39K3Jcjbu12/ YYLiyCoCTFbBsIsPKbEwIE2KuGmxOeo= 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 01C731042; Mon, 3 Jun 2024 02:22:22 -0700 (PDT) Received: from [10.162.42.12] (a077841.arm.com [10.162.42.12]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 005CB3F762; Mon, 3 Jun 2024 02:21:49 -0700 (PDT) Message-ID: Date: Mon, 3 Jun 2024 14:51:46 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 18/29] arm64: add POE signal support To: Mark Brown Cc: 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 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> Content-Language: en-US From: Amit Daniel Kachhap In-Reply-To: <7789da64-34e2-49db-b203-84b80e5831d5@sirena.org.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: ACF9D1C001A X-Stat-Signature: bwsnbg5opkksynnwbkrdptnm3xs6xgwm X-HE-Tag: 1717406518-604800 X-HE-Meta: U2FsdGVkX1/zloeJXozjAmviZvWcPjiNFYWvR7nO5WsUU4PRVRmzigW/jZiOHbIBks/zea0s8OK0d6GjaV8O4uLhdfqouNmCbBCu4O4UlKAyDeicyXmnApHpJTZnE+Mxh9JbscUZ0bTILKAw4Zb6G4cwfBMqH1shGlbvJxqPHWAYxJrSHb50dAy3nIzKa5bexle1/BokVeqarO9pbFG12O6I8tWBf1rJNtdqubK6pMN+EGOgvRZHmxrgoCCRkbrbUrOPep8KzWt8bOcfC2hRLot7UvYL2blMoaOkb3/QBvGo2uAdaBr+LAka2yzMeBHXSUgX/5yLzWVFOYWLK0BywtTByakNrKd8ad5bFaX0TnaW4y3FqCSfqlcRuXmU5Er7eFCKjZgTOQlfTUTdPeK21Vc7U8po7qRJQ+54NUJQlTaWE8M9oT0PTo/h+C8vi8DyZrCp4ScfM4Tg9BqAv/GXgspy6fsd+cibLpj6Rqo0ThmWG9QyuoNP06WQMeWPD3RkeZI+EYWZ49HVGSoUtkISVizFjuuggF1oizc3kaNhwmdwOV051hwLIFHO4li9KB4h4DzduaX/b0EmFJRIbZUN5vr9WoIyXPHY0mnUkp8m9SBvAfzI+O6+WUD+VxbggZ7AkLCrjNhJe7nlooK4oKu/EhQeaBr0uTwPrx+zBXZ25rob9saAGWc19aWcTiOlOlg1e63iTib7uagBQ+2Y8zDydNf7DdBCKNz3cv6ucZCJ99r3zGQZc7RcbYDqND45W1ucBLBGwiksWLdnFNDEPlNlfTHo0sZtxHfuDWNoW5FlP2HE8yQrG9weR0W0g7Qs5VdcaA5UnvXO/HmdKiAWmW8As2WhHEC9R0CF95S+iMYijjZ7nDT+3kbUq2cz6IC+62tTFlW17TwoJSgA1c5WDX/X+jWVZv9aOUhy/7qxfX5GzYPfOV51Goh8N2SO5haGWLobFO+uPxMXPSPU9oD5OM+ oHAbF53s uaPFdkvYdb+E952RKedgtNH7qPxxOfwDmD/MlCKpJcYTZxPU4Os2WRUp11Y8PcB7hDu5A2XdW21i4J0LuFfcLrWoGWAFDCLOiYaK+GkTOGiy3ugc2V8tUO+A/7Wb9nbg5qR/12oJ0nTnzfEMNcbDmI7vEWA== 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 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.