Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-11 Thread Tom Lendacky
On 8/11/21 7:19 AM, Kirill A. Shutemov wrote: > On Tue, Aug 10, 2021 at 02:48:54PM -0500, Tom Lendacky wrote: >> On 8/10/21 1:45 PM, Kuppuswamy, Sathyanarayanan wrote: >>> >>> >>> On 7/27/21 3:26 PM, Tom Lendacky wrote: diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c

Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-08-11 Thread Tom Lendacky
On 8/11/21 9:53 AM, Kuppuswamy, Sathyanarayanan wrote: > On 7/27/21 3:26 PM, Tom Lendacky wrote: >> diff --git a/include/linux/protected_guest.h >> b/include/linux/protected_guest.h >> new file mode 100644 >> index ..f8ed7b72967b >> --- /dev/null >> +++

Re: [PATCH v5 1/9] MIPS: Avoid future duplicate elf core header reservation

2021-08-11 Thread Geert Uytterhoeven
On Wed, Aug 11, 2021 at 10:51 AM Geert Uytterhoeven wrote: > Prepare for early_init_fdt_scan_reserved_mem() reserving the memory > occupied by an elf core header described in the device tree. > As arch_mem_init() calls early_init_fdt_scan_reserved_mem() before > mips_reserve_vmcore(), the latter

Re: [PATCH 01/11] mm: Introduce a function to check for virtualization protection features

2021-08-11 Thread Kuppuswamy, Sathyanarayanan
On 7/27/21 3:26 PM, Tom Lendacky wrote: diff --git a/include/linux/protected_guest.h b/include/linux/protected_guest.h new file mode 100644 index ..f8ed7b72967b --- /dev/null +++ b/include/linux/protected_guest.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* +

Re: [PATCH RFC 0/2] dma-pool: allow user to disable atomic pool

2021-08-11 Thread Tom Lendacky
On 8/10/21 9:23 PM, Baoquan He wrote: > On 08/10/21 at 03:52pm, Tom Lendacky wrote: >> On 8/5/21 1:54 AM, Baoquan He wrote: >>> On 06/24/21 at 11:47am, Robin Murphy wrote: On 2021-06-24 10:29, Baoquan He wrote: > On 06/24/21 at 08:40am, Christoph Hellwig wrote: ... > Looking at the

Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-11 Thread Kirill A. Shutemov
On Tue, Aug 10, 2021 at 02:48:54PM -0500, Tom Lendacky wrote: > On 8/10/21 1:45 PM, Kuppuswamy, Sathyanarayanan wrote: > > > > > > On 7/27/21 3:26 PM, Tom Lendacky wrote: > >> diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c > >> index de01903c3735..cafed6456d45 100644 > >> ---

[PATCH v5 3/9] of: fdt: Add generic support for handling elf core headers property

2021-08-11 Thread Geert Uytterhoeven
There are two methods to specify the location of the elf core headers: using the "elfcorehdr=" kernel parameter, as handled by generic code in kernel/crash_dump.c, or using the "linux,elfcorehdr" property under the "/chosen" node in the Device Tree, as handled by architecture-specific code in

[PATCH v5 8/9] arm64: kdump: Remove custom linux, usable-memory-range handling

2021-08-11 Thread Geert Uytterhoeven
Remove the architecture-specific code for handling the "linux,usable-memory-range" property under the "/chosen" node in DT, as the platform-agnostic FDT core code already takes care of this. Signed-off-by: Geert Uytterhoeven --- v5: - Remove all handling, not just parsing, v4: - New. ---

[PATCH v5 9/9] ARM: uncompress: Parse "linux, usable-memory-range" DT property

2021-08-11 Thread Geert Uytterhoeven
Add support for parsing the "linux,usable-memory-range" DT property. This property is used to describe the usable memory reserved for the crash dump kernel, and thus makes the memory reservation explicit. If present, Linux no longer needs to mask the program counter, and rely on the "mem=" kernel

[PATCH v5 6/9] riscv: Remove non-standard linux,elfcorehdr handling

2021-08-11 Thread Geert Uytterhoeven
RISC-V uses platform-specific code to locate the elf core header in memory. However, this does not conform to the standard "linux,elfcorehdr" DT bindings, as it relies on a reserved memory node with the "linux,elfcorehdr" compatible value, instead of on a "linux,elfcorehdr" property under the

[PATCH v5 0/9] Add generic support for kdump DT properties

2021-08-11 Thread Geert Uytterhoeven
Hi all, This patch series adds generic support for parsing DT properties related to crash dump kernels ("linux,elfcorehdr" and "linux,elfcorehdr" under the "/chosen" node), makes use of it on arm32, and performs a few cleanups. It is an evolution of the combination of [1] and [2]. The

[PATCH v5 5/9] of: fdt: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD) instead of #ifdef

2021-08-11 Thread Geert Uytterhoeven
Replace the conditional compilation using "#ifdef CONFIG_BLK_DEV_INITRD" by a check for "IS_ENABLED(CONFIG_BLK_DEV_INITRD)", to increase compile coverage and to simplify the code. Signed-off-by: Geert Uytterhoeven --- v5: - No changes, v4: - New. --- drivers/of/fdt.c | 9 +++-- 1 file

[PATCH v5 2/9] crash_dump: Make elfcorehdr address/size symbols always visible

2021-08-11 Thread Geert Uytterhoeven
Make the forward declarations of elfcorehdr_addr and elfcorehdr_size, and the definitions of ELFCORE_ADDR_MAX and ELFCORE_ADDR_ERR always available, like is done for phys_initrd_start and phys_initrd_size. Code referring to these symbols can then just check for IS_ENABLED(CONFIG_CRASH_DUMP),

[PATCH v5 1/9] MIPS: Avoid future duplicate elf core header reservation

2021-08-11 Thread Geert Uytterhoeven
Prepare for early_init_fdt_scan_reserved_mem() reserving the memory occupied by an elf core header described in the device tree. As arch_mem_init() calls early_init_fdt_scan_reserved_mem() before mips_reserve_vmcore(), the latter needs to check if the memory has already been reserved before. Note

[PATCH v5 4/9] of: fdt: Add generic support for handling usable memory range property

2021-08-11 Thread Geert Uytterhoeven
Add support for handling the "linux,usable-memory-range" property in the "/chosen" node to the FDT core code. This can co-exist safely with the architecture-specific handling, until the latter has been removed. Signed-off-by: Geert Uytterhoeven --- About the change to chosen.txt: I have a

[PATCH v5 7/9] arm64: kdump: Remove custom linux,elfcorehdr handling

2021-08-11 Thread Geert Uytterhoeven
Remove the architecture-specific code for handling the "linux,elfcorehdr" property under the "/chosen" node in DT, as the platform-agnostic handling in the FDT core code already takes care of this. Signed-off-by: Geert Uytterhoeven --- v5: - Remove all handling, not just parsing, v4: -

Re: [PATCH v4 02/10] memblock: Add variables for usable memory limitation

2021-08-11 Thread Geert Uytterhoeven
On Wed, Jul 14, 2021 at 3:51 PM Rob Herring wrote: > On Wed, Jul 14, 2021 at 02:50:12PM +0200, Geert Uytterhoeven wrote: > > Add two global variables (cap_mem_addr and cap_mem_size) for storing a > > base address and size, describing a limited region in which memory may > > be considered