[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180716114447.GA7650@gmail.com>
Date: Mon, 16 Jul 2018 13:44:47 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Chao Fan <fanc.fnst@...fujitsu.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org, hpa@...or.com,
tglx@...utronix.de, mingo@...hat.com, bhe@...hat.com,
keescook@...omium.org, yasu.isimatu@...il.com,
indou.takao@...fujitsu.com, lcapitulino@...hat.com,
caoj.fnst@...fujitsu.com, douly.fnst@...fujitsu.com
Subject: Re: [RFC PATCH v2 3/4] x86/boot/KASLR: Walk srat tables to filter
immovable memory
* Chao Fan <fanc.fnst@...fujitsu.com> wrote:
> If 'CONFIG_MEMORY_HOTREMOVE' specified, walk the acpi srat memory
> tables, store the immovable memory regions, so that kaslr can get
> the information abouth where can be selected or not.
> If 'CONFIG_MEMORY_HOTREMOVE' not specified, go on the old code.
>
> Signed-off-by: Chao Fan <fanc.fnst@...fujitsu.com>
> ---
> arch/x86/boot/compressed/kaslr.c | 55 ++++++++++++++++++++++++++++++++
> 1 file changed, 55 insertions(+)
>
> diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c
> index 531c9876f573..0ec5aab915db 100644
> --- a/arch/x86/boot/compressed/kaslr.c
> +++ b/arch/x86/boot/compressed/kaslr.c
> @@ -31,6 +31,7 @@
>
> #include "misc.h"
> #include "error.h"
> +#include "acpitb.h"
> #include "../string.h"
>
> #include <generated/compile.h>
> @@ -104,6 +105,14 @@ static bool memmap_too_large;
> /* Store memory limit specified by "mem=nn[KMG]" or "memmap=nn[KMG]" */
> unsigned long long mem_limit = ULLONG_MAX;
>
> +#ifdef CONFIG_MEMORY_HOTREMOVE
> +/* Store the movable memory */
> +struct mem_vector immovable_mem[MAX_NUMNODES*2];
> +
> +/* Store the num of movable mem regions */
> +static int num_immovable_mem;
> +#endif
So comment says 'movable', but variables are named 'immovable'??
Thanks,
Ingo
Powered by blists - more mailing lists