From: Patrick Daly <pdaly@codeaurora.org>
To: catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org
Cc: akpm@linux-foundation.org, anshuman.khandual@arm.com,
david@redhat.com, linux-mm@kvack.org, pdaly@codeaurora.org,
vincenzo.frascino@arm.com, will@kernel.org
Subject: [PATCH] arm64: mte: Map hotplugged memory as Normal Tagged
Date: Wed, 10 Mar 2021 11:24:35 -0800 [thread overview]
Message-ID: <20210309122601.5543-1-catalin.marinas@arm.com> (raw)
Message-ID: <20210310192435.j_Tw_9MQwSEX-wDpdBNQN8SyfGNCQT-yYZwIqjYAD6U@z> (raw)
In-Reply-To: <20210309122601.5543-1-catalin.marinas@arm.com>
From: Catalin Marinas <catalin.marinas@arm.com>
> In a system supporting MTE, the linear map must allow reading/writing
> allocation tags by setting the memory type as Normal Tagged. Currently,
> this is only handled for memory present at boot. Hotplugged memory uses
> Normal non-Tagged memory.
>
> Introduce pgprot_mhp() for hotplugged memory and use it in
> add_memory_resource(). The arm64 code maps pgprot_mhp() to
> pgprot_tagged().
>
> Note that ZONE_DEVICE memory should not be mapped as Tagged and
> therefore setting the memory type in arch_add_memory() is not feasible.
>
> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
> Fixes: 0178dc761368 ("arm64: mte: Use Normal Tagged attributes for the linear map")
> Reported-by: Patrick Daly <pdaly@codeaurora.org>
> Link: https://lore.kernel.org/r/1614745263-27827-1-git-send-email-pdaly@codeaurora.org
> Cc: <stable@vger.kernel.org> # 5.10.x
> Cc: Will Deacon <will@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Cc: David Hildenbrand <david@redhat.com>
> ---
>
> Patrick, could you please give this patch a try on your platform? Thanks.
It works for me. Sry for the double reply.
next parent reply other threads:[~2021-03-10 19:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 12:26 Catalin Marinas [this message]
2021-03-09 12:28 ` David Hildenbrand
2021-03-09 12:35 ` Vincenzo Frascino
2021-03-10 6:16 ` Patrick Daly
2021-03-10 7:05 ` Anshuman Khandual
2021-03-10 11:39 ` Will Deacon
2021-03-10 19:24 ` Patrick Daly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210309122601.5543-1-catalin.marinas@arm.com \
--to=pdaly@codeaurora.org \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=david@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mm@kvack.org \
--cc=vincenzo.frascino@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox