Re: [PATCH v4 2/3] KVM: PPC: Book3S HV: Add support for H_RPT_INVALIDATE

2021-02-21 Thread Bharata B Rao
On Wed, Feb 17, 2021 at 11:38:07AM +1100, David Gibson wrote: > On Mon, Feb 15, 2021 at 12:05:41PM +0530, Bharata B Rao wrote: > > Implement H_RPT_INVALIDATE hcall and add KVM capability > > KVM_CAP_PPC_RPT_INVALIDATE to indicate the support for the same. > > > > This hcall does two types of TLB

[PATCH] scsi: ibmvfc: Switch to using the new API kobj_to_dev()

2021-02-21 Thread Yang Li
fixed the following coccicheck: ./drivers/scsi/ibmvscsi/ibmvfc.c:3161:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v4 1/3] powerpc/book3s64/radix/tlb: tlbie primitives for process-scoped invalidations from guests

2021-02-21 Thread Bharata B Rao
On Wed, Feb 17, 2021 at 11:24:48AM +1100, David Gibson wrote: > On Mon, Feb 15, 2021 at 12:05:40PM +0530, Bharata B Rao wrote: > > H_RPT_INVALIDATE hcall needs to perform process scoped tlbie > > invalidations of L1 and nested guests from L0. This needs RS register > > for TLBIE instruction to

Re: [PATCH kernel 2/2] powerpc/iommu: Do not immediately panic when failed IOMMU table allocation

2021-02-21 Thread Alexey Kardashevskiy
On 18/02/2021 06:32, Leonardo Bras wrote: On Tue, 2021-02-16 at 14:33 +1100, Alexey Kardashevskiy wrote: Most platforms allocate IOMMU table structures (specifically it_map) at the boot time and when this fails - it is a valid reason for panic(). However the powernv platform allocates

Re: [PATCH] powerpc: use ARRAY_SIZE instead of division operation

2021-02-21 Thread Daniel Axtens
Hi Yang, > This eliminates the following coccicheck warning: > ./arch/powerpc/boot/mktree.c:130:31-32: WARNING: Use ARRAY_SIZE > > Reported-by: Abaci Robot > Signed-off-by: Yang Li > --- > arch/powerpc/boot/mktree.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v18 03/11] of: Add a common kexec FDT setup function

2021-02-21 Thread Lakshmi Ramasubramanian
On 2/21/21 5:32 PM, Guenter Roeck wrote: Hi Guenter, On Sat, Feb 13, 2021 at 08:10:41AM -0800, Lakshmi Ramasubramanian wrote: From: Rob Herring Both arm64 and powerpc do essentially the same FDT /chosen setup for kexec. The differences are either omissions that arm64 should have or

Re: [PATCH v18 03/11] of: Add a common kexec FDT setup function

2021-02-21 Thread Guenter Roeck
On Sat, Feb 13, 2021 at 08:10:41AM -0800, Lakshmi Ramasubramanian wrote: > From: Rob Herring > > Both arm64 and powerpc do essentially the same FDT /chosen setup for > kexec. The differences are either omissions that arm64 should have > or additional properties that will be ignored. The setup

[PATCH v2] PCI: Convert enum pci_bus_flags to bit fields in struct pci_bus

2021-02-21 Thread Krzysztof WilczyƄski
All the flags defined in the enum pci_bus_flags are used to determine whether a particular feature of a PCI bus is available or not - features are also often disabled via architecture or device-specific quirk. These flags are tightly coupled with a PCI buses and PCI bridges and primarily used in

[PATCH v19 13/13] arm64: Enable passing IMA log to next kernel on kexec

2021-02-21 Thread Lakshmi Ramasubramanian
Update CONFIG_KEXEC_FILE to select CONFIG_HAVE_IMA_KEXEC, if CONFIG_IMA is enabled, to indicate that the IMA measurement log information is present in the device tree for ARM64. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian

[PATCH v19 12/13] powerpc: Delete unused function delete_fdt_mem_rsv()

2021-02-21 Thread Lakshmi Ramasubramanian
delete_fdt_mem_rsv() defined in "arch/powerpc/kexec/file_load.c" has been renamed to fdt_find_and_del_mem_rsv(), and moved to "drivers/of/kexec.c". Remove delete_fdt_mem_rsv() in "arch/powerpc/kexec/file_load.c". Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava

[PATCH v19 11/13] kexec: Use fdt_appendprop_addrrange() to add ima buffer to FDT

2021-02-21 Thread Lakshmi Ramasubramanian
fdt_appendprop_addrrange() function adds a property, with the given name, to the device tree at the given node offset, and also sets the address and size of the property. This function should be used to add "linux,ima-kexec-buffer" property to the device tree and set the address and size of the

[PATCH v19 10/13] powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c

2021-02-21 Thread Lakshmi Ramasubramanian
The functions defined in "arch/powerpc/kexec/ima.c" handle setting up and freeing the resources required to carry over the IMA measurement list from the current kernel to the next kernel across kexec system call. These functions do not have architecture specific code, but are currently limited to

[PATCH v19 09/13] powerpc: Enable passing IMA log to next kernel on kexec

2021-02-21 Thread Lakshmi Ramasubramanian
CONFIG_HAVE_IMA_KEXEC is enabled to indicate that the IMA measurement log information is present in the device tree. This should be selected only if CONFIG_IMA is enabled. Update CONFIG_KEXEC_FILE to select CONFIG_HAVE_IMA_KEXEC, if CONFIG_IMA is enabled, to indicate that the IMA measurement log

[PATCH v19 08/13] powerpc: Move ima buffer fields to struct kimage

2021-02-21 Thread Lakshmi Ramasubramanian
The fields ima_buffer_addr and ima_buffer_size in "struct kimage_arch" for powerpc are used to carry forward the IMA measurement list across kexec system call. These fields are not architecture specific, but are currently limited to powerpc. arch_ima_add_kexec_buffer() defined in

[PATCH v19 06/13] arm64: Use common of_kexec_alloc_and_setup_fdt()

2021-02-21 Thread Lakshmi Ramasubramanian
From: Rob Herring The code for setting up the /chosen node in the device tree and updating the memory reservation for the next kernel has been moved to of_kexec_alloc_and_setup_fdt() defined in "drivers/of/kexec.c". Use the common of_kexec_alloc_and_setup_fdt() to setup the device tree and

[PATCH v19 07/13] powerpc: Use common of_kexec_alloc_and_setup_fdt()

2021-02-21 Thread Lakshmi Ramasubramanian
From: Rob Herring The code for setting up the /chosen node in the device tree and updating the memory reservation for the next kernel has been moved to of_kexec_alloc_and_setup_fdt() defined in "drivers/of/kexec.c". Use the common of_kexec_alloc_and_setup_fdt() to setup the device tree and

[PATCH v19 05/13] of: Add a common kexec FDT setup function

2021-02-21 Thread Lakshmi Ramasubramanian
From: Rob Herring Both arm64 and powerpc do essentially the same FDT /chosen setup for kexec. The differences are either omissions that arm64 should have or additional properties that will be ignored. The setup code can be combined and shared by both powerpc and arm64. The differences

[PATCH v19 02/13] arm64: Use ELF fields defined in 'struct kimage'

2021-02-21 Thread Lakshmi Ramasubramanian
ELF related fields elf_headers, elf_headers_sz, and elf_headers_mem have been moved from 'struct kimage_arch' to 'struct kimage' as elf_headers, elf_headers_sz, and elf_load_addr respectively. Use the ELF fields defined in 'struct kimage'. Signed-off-by: Lakshmi Ramasubramanian Suggested-by:

[PATCH v19 03/13] powerpc: Use ELF fields defined in 'struct kimage'

2021-02-21 Thread Lakshmi Ramasubramanian
ELF related fields elf_headers, elf_headers_sz, and elfcorehdr_addr have been moved from 'struct kimage_arch' to 'struct kimage' as elf_headers, elf_headers_sz, and elf_load_addr respectively. Use the ELF fields defined in 'struct kimage'. Signed-off-by: Lakshmi Ramasubramanian Suggested-by:

[PATCH v19 00/13] Carry forward IMA measurement log on kexec on ARM64

2021-02-21 Thread Lakshmi Ramasubramanian
On kexec file load Integrity Measurement Architecture (IMA) subsystem may verify the IMA signature of the kernel and initramfs, and measure it. The command line parameters passed to the kernel in the kexec call may also be measured by IMA. A remote attestation service can verify a TPM quote

[PATCH v19 01/13] kexec: Move ELF fields to struct kimage

2021-02-21 Thread Lakshmi Ramasubramanian
ELF related fields elf_headers, elf_headers_sz, and elf_load_addr are defined in architecture specific 'struct kimage_arch' for x86, powerpc, and arm64. The name of these fields are different in these architectures that makes it hard to have a common code for setting up the device tree for kexec

[PATCH v19 04/13] x86: Use ELF fields defined in 'struct kimage'

2021-02-21 Thread Lakshmi Ramasubramanian
ELF related fields elf_headers, elf_headers_sz, and elf_load_addr have been moved from 'struct kimage_arch' to 'struct kimage'. Use the ELF fields defined in 'struct kimage'. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Rob Herring Fixes: 33488dc4d61f ("of: Add a common kexec FDT setup

Re: [PATCH 1/2] arch: syscalls: add missing FORCE and fix 'targets' to make if_changed work

2021-02-21 Thread Masahiro Yamada
On Mon, Feb 15, 2021 at 9:50 AM Masahiro Yamada wrote: > > The rules in these Makefiles cannot detect the command line change > because the prerequisite 'FORCE' is missing. > > Adding 'FORCE' will result in the headers being rebuilt every time > because the 'targets' additions are also wrong; the