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=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 D4196C64E7B for ; Mon, 30 Nov 2020 11:03:02 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 54E5F207F7 for ; Mon, 30 Nov 2020 11:03:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ha209m6g"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="UFhwrF+K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 54E5F207F7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=YCfa15Twy8iElkE13UJ0sOucFIt+nQ5lUo3aPXeXcBc=; b=ha209m6gsxckh92NW14RcJpbz uHfWnE3Xt3zH4+QXmG4p5QrtztLq0IADmsUpJV1ogUFOTdCXRLiXAUGPOAfRqiz+njdiQagDaNG58 +Pdy+6rKpjB9CCyVh3YFEHcTpgaI9U7ghAKkgVqST2suDC6Aiml1Q3QhskOF8z97wfLC9+EyUWlAw 924eAZtPMX+N8ePgIH61xWaZn6S6EzcckOY4VEIxrn3NNEdjk4FRquJ3QtISGq84wRZrEyxCoORKG Gr5bO0THreeanmTw0Y8WQE6alw9811LMFzDIlo19U7Fg5VYRZSH7qaWM+yukVSUt6LCnJpEnV141X d0as8IEHQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjgwO-0008SO-2i; Mon, 30 Nov 2020 11:01:56 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjgwL-0008RG-RY for linux-arm-kernel@lists.infradead.org; Mon, 30 Nov 2020 11:01:54 +0000 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 912652084C; Mon, 30 Nov 2020 11:01:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606734112; bh=2m3gDcKX9kwRGE/dJedYzohfGLVLzOsTnGqQu5GoxuU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UFhwrF+KIiDkS4Cua96mMikBhyGpJ1R4PITwjcuQoQwacJ38WzQFYnAzN1aFeoas6 Jm7XiKb2lMFQbeXIWLd2sbyGyzGgvAYdJkt7DHNBnJePQS3MIOxdMYD+QaVpFISDWM LDU7KPUPK0HoGSWWgntz8ANh1bkyavv0WdyW2giQ= Date: Mon, 30 Nov 2020 11:01:47 +0000 From: Will Deacon To: Mark Rutland Subject: Re: [PATCH 08/11] arm64: ptrace: prepare for EL1 irq/rcu tracking Message-ID: <20201130110146.GC24098@willie-the-truck> References: <20201126123602.23454-1-mark.rutland@arm.com> <20201126123602.23454-9-mark.rutland@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201126123602.23454-9-mark.rutland@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201130_060154_042659_79E4BF49 X-CRM114-Status: GOOD ( 23.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: elver@google.com, paulmck@kernel.org, peterz@infradead.org, catalin.marinas@arm.com, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, dvyukov@google.com 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 Thu, Nov 26, 2020 at 12:35:59PM +0000, Mark Rutland wrote: > Exceptions from EL1 may be taken when RCU isn't watching (e.g. in idle > sequences), or when the lockdep hardirqs transiently out-of-sync with > the hardware state (e.g. in the middle of local_irq_enable()). To > correctly handle these cases, we'll need to save/restore this state > across some exceptions taken from EL1. > > A series of subsequent patches will update EL1 exception handlers to > handle this. In preparation for this, and to avoid dependencies between > those patches, this patch adds two new fields to struct pt_regs so that > exception handlers can track this state. > > Note that this is placed in pt_regs as some entry/exit sequences such as > el1_irq are invoked from assembly, which makes it very difficult to add > a separate structure as with the irqentry_state used by x86. We can > separate this once more of the exception logic is moved to C. While the > fields only need to be bool, they are both made u64 to keep pt_regs > 16-bite aligned. "bite" ?! > There should be no functional change as a result of this patch. > > Signed-off-by: Mark Rutland > Cc: Catalin Marinas > Cc: James Morse > Cc: Will Deacon > --- > arch/arm64/include/asm/ptrace.h | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/arch/arm64/include/asm/ptrace.h b/arch/arm64/include/asm/ptrace.h > index 997cf8c8cd52..b4a841d9511d 100644 > --- a/arch/arm64/include/asm/ptrace.h > +++ b/arch/arm64/include/asm/ptrace.h > @@ -193,6 +193,13 @@ struct pt_regs { > /* Only valid when ARM64_HAS_IRQ_PRIO_MASKING is enabled. */ > u64 pmr_save; > u64 stackframe[2]; > + > + /* > + * Only valid for some EL1 exceptions. > + * TODO: move this out of pt_regs. Please drop the "TODO". Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel