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 29D84C4167B for ; Wed, 13 Dec 2023 14:07:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A286A6B04CA; Wed, 13 Dec 2023 09:07:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9D96A6B04CB; Wed, 13 Dec 2023 09:07:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A1C56B04CC; Wed, 13 Dec 2023 09:07:02 -0500 (EST) 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 74E716B04CA for ; Wed, 13 Dec 2023 09:07:02 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 56E6DA21C4 for ; Wed, 13 Dec 2023 14:07:02 +0000 (UTC) X-FDA: 81561971484.08.ADDDE92 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf19.hostedemail.com (Postfix) with ESMTP id 59F631A0009 for ; Wed, 13 Dec 2023 14:07:00 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=c9zQEcvQ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of robh@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=robh@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702476420; a=rsa-sha256; cv=none; b=BIPNFD5wLk0Vb1wvr+ye/oMjjqR4jwUrgNrDLz6G9FKpZQwbsY80k8zlb8sfLUX5IKeQoK 2yvhHMv1LNERXA4OuBpYnJ36n1i/Cg61munIJphQNK+oj1+1+1yWWcbW3y6/C9szH3RpDL Yse7uzoPNP7LQH2YXF0I+uoRJK1uN/0= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=c9zQEcvQ; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf19.hostedemail.com: domain of robh@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=robh@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702476420; 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:dkim-signature; bh=VRnEygp4Q7lGFh/1IoyfjULOkzXzuZvuh8JNhE/Dx5g=; b=LwR2rChTwdwjEVZaCMYfcpKZQsHVZe8nEj2jrYJhi0azZoqhz0VQ/wQMlaCjLQ/8GXT33K n2nyZ9hRgZz9A0s73WeW/TvOK3kFACpUOh4jvf3CoJlewKTxftF7xJ487vO1eBB2easMg6 G+MHYnzt1pK2fF4ebIguIfqYyJmDVIs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6844961D78 for ; Wed, 13 Dec 2023 14:06:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39049C433B9 for ; Wed, 13 Dec 2023 14:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702476419; bh=tm2PI5P6o9KPIR9RVFv5cihdxeSVXN3uEt/yiTzKpe0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=c9zQEcvQ/I/2TrO3daFju8Q2xvsVxymZ1J7YViFzMZ22+GvhKczCBu8rrJUDo+TO1 Anc8NUN4dA8ow4LVobcs6qb1jWphf9bw+jELBUPJqudNn/xWmkIMxcrIKvu8XEBcOa WGHuZ4mBaB1rMvlvIqSSVkfP8pw0u8oJznFFXHh/0RHC1S6PyvN8OnGfzj5MLKjOEg HySg5HD2tSeAL5m4LdWat8MD42qViAcfpBu0xgVl4Hr5NLzfEv0Y0pYxVLkLYlhamB Yq4b1VHB5b6j9M45TKb0UiSQxQhkgwHVuLjWoh+MIYvXWbVA5RP95pk6+8WdFm9kYM Og9EiU/75zGdQ== Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-50e0d1f9fe6so1525825e87.1 for ; Wed, 13 Dec 2023 06:06:59 -0800 (PST) X-Gm-Message-State: AOJu0Yz6Rk1vXv5kACot/dwDNpIqWbW+ESLP8zMZUpP2VqTGJHZ/xO3V D4PI8ylA4oilqma8WEF/oG1Jpo6I0kkxJUUmag== X-Google-Smtp-Source: AGHT+IEHGprK2wtm9q9hd2ZZLdtHsMouVaTGmtumsX7/XD4d3zOhREC7oFbL/aoRWTZ5IHg9+YH7vjYm3B+d1JvtS+g= X-Received: by 2002:a19:8c5b:0:b0:50d:1733:ceba with SMTP id i27-20020a198c5b000000b0050d1733cebamr3208254lfj.58.1702476417164; Wed, 13 Dec 2023 06:06:57 -0800 (PST) MIME-Version: 1.0 References: <20231119165721.9849-1-alexandru.elisei@arm.com> <20231119165721.9849-12-alexandru.elisei@arm.com> In-Reply-To: From: Rob Herring Date: Wed, 13 Dec 2023 08:06:44 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC v2 11/27] arm64: mte: Reserve tag storage memory To: Alexandru Elisei Cc: catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, maz@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, arnd@arndb.de, akpm@linux-foundation.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, mhiramat@kernel.org, rppt@kernel.org, hughd@google.com, pcc@google.com, steven.price@arm.com, anshuman.khandual@arm.com, vincenzo.frascino@arm.com, david@redhat.com, eugenis@google.com, kcc@google.com, hyesoo.yu@samsung.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 59F631A0009 X-Stat-Signature: ieif8bueycd39y41fafd3o1595uics4j X-HE-Tag: 1702476420-320167 X-HE-Meta: U2FsdGVkX189cVLAlOnM0R0vMhYQd+r5nwG5Pm0Xfyq+3rUGP5CgQnitjTP75wprRApRl0rb6kihig9GUiBrQhsvdeAq1NMCOJwiI65DUZ5zdaRq3cJ2uY1eUbtffIl2LLSQi5KRTIYAckhc6LUfHov3Jhuv5UcCMFv82ipL+N3b5Gl0n/9+3uz5BzxJAejTBFoJ3IDSZ65y0hMAZHhbBE3Wt1L2lRocohEgBlfgiH+TkWd3MiPK0WivsJEEc3iyALeDn+uYn0IMw2x67Mx9OUB1tohGVacgzfpsuQGsBLVf90DdFV0aEGxqzndY1qri86o6slm+yomOwuYmpULNsaLIojMIowEgYahPJo6vfDo0IJSouvcosHCvVwC0pwQDsiMM4UnV+kiJtqLo6h22vvEWFrHqXwHzwyvthKwAVpg0xsFkfDYdRkJaBKBwj5cxWyShPEic/dQiK/jmXLBbHCMccqtevlwlPxHIOfxquAiSJxDLocGUwxjzMLnjrmyTu5Jbnb8UfL5+Qvu9fTnAtr9BrrcJZK1Gz4Ty/R0/pTyEmb5qplOWVDM+JIllfwtXKAduy0TNGONVkySftyY4Wk+H7KwXYsh2I8RwtggVMGb/PHDbs0EoR+Yo3+ISriSHRj4b0MXdnnMPd4WtfZK3CjP9yqGG5KnKBYSAYgr8EnVvXnQyTMj+J+fsXRydsQNEghCa92bbBzObQSeg3ZYEV0NteA9wxZUE+jCndyVsfJzJTu6zOdKd0ZbFQJ9JuENi1cZdIg5kc7l4cPij+MX0rDSRBRVYum4UGCVtSKt06l98hHX6CSyQC43Z893Q6HU2tioI+rYn71T9i6Fgyga+ilL4l6ixU3s4V8x+kZwckcmTN1wHCclqrGY4xolt1eAidUBa3JLtW3BylZx+zDCPZKpGpEX3dASR4N2GZE2qSGBhfMYNoDSFKhR0s+vY7xuV669xdSEE6euaW04HMot LE1wGfxZ WVqJDg5JRXAUShtx6S5k8SSmqOPvWQq5jR4LAJ4hGDzX2YLaJb9+Ly6fcOVr3j83K0ff5yX7DQxZe3cPsS34heULo3/kOAmROd9ixkS7aj1kUt5zd3lToe0sFv76UDlUFJewxShAhllhIQ2HX9bNDcHPs+Zr59Zz5YkgLFqELmiraLCyNmsLmSux6SRGrLecr7kOovJhclWJs9zleXS86dYsK/H1nBgxmF/iiAvMmDvkQuWN9UTqfkPRsLJn4njBHbHiLXFD3hFMFzPcfCBpdYkDECIrBnN5F1Xr6y8MdM7Js6IqcwVFbbqByObJXldMTAHRc 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 Wed, Dec 13, 2023 at 7:05=E2=80=AFAM Alexandru Elisei wrote: > > Hi Rob, > > On Tue, Dec 12, 2023 at 12:44:06PM -0600, Rob Herring wrote: > > On Tue, Dec 12, 2023 at 10:38=E2=80=AFAM Alexandru Elisei > > wrote: > > > > > > Hi Rob, > > > > > > Thank you so much for the feedback, I'm not very familiar with device= tree, > > > and any comments are very useful. > > > > > > On Mon, Dec 11, 2023 at 11:29:40AM -0600, Rob Herring wrote: > > > > On Sun, Nov 19, 2023 at 10:59=E2=80=AFAM Alexandru Elisei > > > > wrote: > > > > > > > > > > Allow the kernel to get the size and location of the MTE tag stor= age > > > > > regions from the DTB. This memory is marked as reserved for now. > > > > > > > > > > The DTB node for the tag storage region is defined as: > > > > > > > > > > tags0: tag-storage@8f8000000 { > > > > > compatible =3D "arm,mte-tag-storage"; > > > > > reg =3D <0x08 0xf8000000 0x00 0x4000000>; > > > > > block-size =3D <0x1000>; > > > > > memory =3D <&memory0>; // Associated tagged me= mory node > > > > > }; > > > > > > > > I skimmed thru the discussion some. If this memory range is within > > > > main RAM, then it definitely belongs in /reserved-memory. > > > > > > Ok, will do that. > > > > > > If you don't mind, why do you say that it definitely belongs in > > > reserved-memory? I'm not trying to argue otherwise, I'm curious about= the > > > motivation. > > > > Simply so that /memory nodes describe all possible memory and > > /reserved-memory is just adding restrictions. It's also because > > /reserved-memory is what gets handled early, and we don't need > > multiple things to handle early. > > > > > Tag storage is not DMA and can live anywhere in memory. > > > > Then why put it in DT at all? The only reason CMA is there is to set > > the size. It's not even clear to me we need CMA in DT either. The > > reasoning long ago was the kernel didn't do a good job of moving and > > reclaiming contiguous space, but that's supposed to be better now (and > > most h/w figured out they need IOMMUs). > > > > But for tag storage you know the size as it is a function of the > > memory size, right? After all, you are validating the size is correct. > > I guess there is still the aspect of whether you want enable MTE or > > not which could be done in a variety of ways. > > Oh, sorry, my bad, I should have been clearer about this. I don't want to > put it in the DT as a "linux,cma" node. But I want it to be managed by CM= A. Yes, I understand, but my point remains. Why do you need this in DT? If the location doesn't matter and you can calculate the size from the memory size, what else is there to add to the DT? Rob