[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YmeOUEyGIp6HPCM4@kernel.org>
Date: Tue, 26 Apr 2022 09:16:48 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Martin Fernandez <martin.fernandez@...ypsium.com>
Cc: linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
platform-driver-x86@...r.kernel.org, linux-mm@...ck.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de,
dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
ardb@...nel.org, dvhart@...radead.org, andy@...radead.org,
gregkh@...uxfoundation.org, rafael@...nel.org,
akpm@...ux-foundation.org, daniel.gutson@...ypsium.com,
hughsient@...il.com, alex.bazhaniuk@...ypsium.com,
alison.schofield@...el.com, keescook@...omium.org
Subject: Re: [PATCH v7 2/8] mm/mmzone: Tag pg_data_t with crypto capabilities
On Mon, Apr 25, 2022 at 02:15:20PM -0300, Martin Fernandez wrote:
> Add a new member in the pg_data_t struct to tell whether the node
> corresponding to that pg_data_t is able to do hardware memory
> encryption.
>
> This will be read from sysfs.
>
> Signed-off-by: Martin Fernandez <martin.fernandez@...ypsium.com>
Reviewed-by: Mike Rapoport <rppt@...ux.ibm.com>
> ---
> include/linux/mmzone.h | 3 +++
> mm/page_alloc.c | 1 +
> 2 files changed, 4 insertions(+)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index 46ffab808f03..89054af9e599 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -886,6 +886,9 @@ typedef struct pglist_data {
> struct task_struct *kcompactd;
> bool proactive_compact_trigger;
> #endif
> +
> + bool crypto_capable;
> +
> /*
> * This is a per-node reserve of pages that are not available
> * to userspace allocations.
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 0e42038382c1..a244151045b4 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -7699,6 +7699,7 @@ static void __init free_area_init_node(int nid)
> pgdat->node_id = nid;
> pgdat->node_start_pfn = start_pfn;
> pgdat->per_cpu_nodestats = NULL;
> + pgdat->crypto_capable = memblock_node_is_crypto_capable(nid);
>
> if (start_pfn != end_pfn) {
> pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid,
> --
> 2.30.2
>
>
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists