From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59D696BFA7 for ; Mon, 3 Jun 2024 09:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717406519; cv=none; b=PjZyXPCKtvfPFLX4tD4fdNi7Hv1KTKqxU9QpXjigd8aXJVArsJlz0rfD7tZqQaOnWxob9bNmoM9e/E7HQzzGNM5QU5QHMoUpU6mhfiwOl8ynTbTiAKv7HxhVDGxQvB8ssgEWPXHvwFE9OZeiRyqFIenAQhmDF6P8aCO2LWdqqfU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717406519; c=relaxed/simple; bh=qoK6Vr3POzDChICSFnKDCHg67IUVeSeJ5myh4uqVVis=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tp6hJTTl7McD0aoD12GKATGRm+mrrbY7wLh1K+Kir6BY8cONGQDqeajGSRHf+V3UBpZdgUmcy52cMyUNbpotw+iOs89yxHBg7+R7JByze0BzyRU8+HXScCLtPgHQJaKmrlLusy1M6XZayKU2XO/Xmg6TPO54jLuwGXviGi3cTEw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 Precedence: bulk X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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 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. 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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 9D355C25B76 for ; Mon, 3 Jun 2024 09:22:59 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Vt7YY2rQnz3cZ5 for ; Mon, 3 Jun 2024 19:22:57 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=amitdaniel.kachhap@arm.com; receiver=lists.ozlabs.org) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 4Vt7Y52Pq9z30Vp for ; Mon, 3 Jun 2024 19:22:30 +1000 (AEST) 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 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-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: szabolcs.nagy@arm.com, catalin.marinas@arm.com, dave.hansen@linux.intel.com, Joey Gouly , linux-mm@kvack.org, hpa@zytor.com, shuah@kernel.org, maz@kernel.org, x86@kernel.org, aneesh.kumar@kernel.org, mingo@redhat.com, aneesh.kumar@linux.ibm.com, naveen.n.rao@linux.ibm.com, will@kernel.org, npiggin@gmail.com, bp@alien8.de, kvmarm@lists.linux.dev, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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. 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 D0804C25B76 for ; Mon, 3 Jun 2024 09:22:13 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wo+LOIRC+I4Y/lAUsLKjACk89u+gPv4PGivc0yamXCY=; b=c64TGVXQrorhOO BbA25mAfOA/HUbUA7tXZX0VotRdyoZoUU2jgFIqQua1dJ3Dev6jGkFibmNyDQ4dCL1mEJtWXbiW/F idwE3BqoqKHg8Xq6J2qf/iGnvZjUtidtbG4smYWinHp27+QWzucSnxjc2ihiFmZqeMorOtJORx9sL dFil4u440NeE8KcPqNqzziNzSYA/Nq5U2VW+XCy69MX7ODuYa95GtrKgpb3NyTs+IoOxh/wDF6Xf7 At3Roq5pu6syLC9LaGxtMNuVJh0Inl6CaA3sc1H2Ke8Rf2LJ27hmYIUTH37LFGWS22NgM3jpJ0n7y 2aTGe1BGhLu0Svcm7PVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE3tD-0000000GBCn-1nsW; Mon, 03 Jun 2024 09:22:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sE3tA-0000000GBBq-0Z2y for linux-arm-kernel@lists.infradead.org; Mon, 03 Jun 2024 09:22:01 +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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240603_022200_370523_5505777C X-CRM114-Status: GOOD ( 12.33 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel