Re: [PATCH] mm/memtest: Add ARCH_USE_MEMTEST

2021-02-04 Thread Max Filippov
On Thu, Feb 4, 2021 at 8:10 PM Anshuman Khandual wrote: > > early_memtest() does not get called from all architectures. Hence enabling > CONFIG_MEMTEST and providing a valid memtest=[1..N] kernel command line > option might not trigger the memory pattern tests as would be expected in > normal

Re: [PATCH] arch:powerpc simple_write_to_buffer return check

2021-02-04 Thread Christophe Leroy
Please provide some description of the change. And please clarify the patch subject, because as far as I can see, the return is already checked allthough the check seams wrong. Le 04/02/2021 à 19:16, Mayank Suman a écrit : Signed-off-by: Mayank Suman --- arch/powerpc/kernel/eeh.c

Re: [PATCH v2 1/1] powerpc/kvm: Save Timebase Offset to fix sched_clock() while running guest code.

2021-02-04 Thread Leonardo Bras
Hey Nick, thanks for reviewing :) On Fri, 2021-02-05 at 16:28 +1000, Nicholas Piggin wrote: > Excerpts from Leonardo Bras's message of February 5, 2021 4:06 pm: > > Before guest entry, TBU40 register is changed to reflect guest timebase. > > After exitting guest, the register is reverted to it's

Re: [PATCH v2 1/1] powerpc/kvm: Save Timebase Offset to fix sched_clock() while running guest code.

2021-02-04 Thread Nicholas Piggin
Excerpts from Leonardo Bras's message of February 5, 2021 4:06 pm: > Before guest entry, TBU40 register is changed to reflect guest timebase. > After exitting guest, the register is reverted to it's original value. > > If one tries to get the timestamp from host between those changes, it > will

Re: [PATCH] arch:powerpc simple_write_to_buffer return check

2021-02-04 Thread Mayank Suman
On 05/02/21 4:05 am, Oliver O'Halloran wrote: > On Fri, Feb 5, 2021 at 5:17 AM Mayank Suman wrote: >> >> Signed-off-by: Mayank Suman > > commit messages aren't optional Sorry. I will include the commit message in PATCH v2. > >> --- >> arch/powerpc/kernel/eeh.c| 8

[PATCH v2 1/1] powerpc/kvm: Save Timebase Offset to fix sched_clock() while running guest code.

2021-02-04 Thread Leonardo Bras
Before guest entry, TBU40 register is changed to reflect guest timebase. After exitting guest, the register is reverted to it's original value. If one tries to get the timestamp from host between those changes, it will present an incorrect value. An example would be trying to add a tracepoint in

Re: [PATCH v3 28/32] powerpc/64s: interrupt implement exit logic in C

2021-02-04 Thread Christophe Leroy
Le 05/02/2021 à 03:16, Nicholas Piggin a écrit : Excerpts from Michael Ellerman's message of February 5, 2021 10:22 am: Nicholas Piggin writes: Excerpts from Christophe Leroy's message of February 4, 2021 6:03 pm: Le 04/02/2021 à 04:27, Nicholas Piggin a écrit : Excerpts from Christophe

Re: [PATCH v5 02/10] powerpc/signal: Add unsafe_copy_{vsx, fpr}_from_user()

2021-02-04 Thread Daniel Axtens
Hi Christopher, I have checked that each implementation matches the corresponding *_to_user implementation. We've had some debate about whether the overarching implementation in the to/from pairs (especially where things go via a bounce buffer) can be simplified - but that's probably not really

Re: [PATCH v5 01/10] powerpc/uaccess: Add unsafe_copy_from_user

2021-02-04 Thread Daniel Axtens
Hi Chris, Pending anything that sparse reported (which I haven't checked), this looks ok to me. Reviewed-by: Daniel Axtens Kind regards, Daniel > Just wrap __copy_tofrom_user() for the usual 'unsafe' pattern which > takes in a label to goto on error. > > Signed-off-by: Christopher M. Riedl >

Re: [PATCH v5 10/10] powerpc/signal64: Use __get_user() to copy sigset_t

2021-02-04 Thread Christopher M. Riedl
On Wed Feb 3, 2021 at 12:43 PM CST, Christopher M. Riedl wrote: > Usually sigset_t is exactly 8B which is a "trivial" size and does not > warrant using __copy_from_user(). Use __get_user() directly in > anticipation of future work to remove the trivial size optimizations > from __copy_from_user().

[PATCH] mm/memtest: Add ARCH_USE_MEMTEST

2021-02-04 Thread Anshuman Khandual
early_memtest() does not get called from all architectures. Hence enabling CONFIG_MEMTEST and providing a valid memtest=[1..N] kernel command line option might not trigger the memory pattern tests as would be expected in normal circumstances. This situation is misleading. The change here prevents

[PATCH 1/1] powerpc/kvm: Save Timebase Offset to fix sched_clock() while running guest code.

2021-02-04 Thread Leonardo Bras
Before guest entry, TBU40 register is changed to reflect guest timebase. After exitting guest, the register is reverted to it's original value. If one tries to get the timestamp from host between those changes, it will present an incorrect value. An example would be trying to add a tracepoint in

[PATCH] powerpc/kuap: Allow kernel thread to access userspace after kthread_use_mm

2021-02-04 Thread Aneesh Kumar K.V
This fix the bad fault reported by KUAP when io_wqe_worker access userspace. Bug: Read fault blocked by KUAP! WARNING: CPU: 1 PID: 101841 at arch/powerpc/mm/fault.c:229 __do_page_fault+0x6b4/0xcd0 NIP [c009e7e4] __do_page_fault+0x6b4/0xcd0 LR [c009e7e0]

[PATCH] mm/pmem: Avoid inserting hugepage PTE entry with fsdax if hugepage support is disabled

2021-02-04 Thread Aneesh Kumar K.V
Differentiate between hardware not supporting hugepages and user disabling THP via 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' For the devdax namespace, the kernel handles the above via the supported_alignment attribute and failing to initialize the namespace if the namespace align

Re: [PATCH] powerpc/perf: Record counter overflow always if SAMPLE_IP is unset

2021-02-04 Thread Athira Rajeev
> On 04-Feb-2021, at 8:25 AM, Michael Ellerman wrote: > > Athira Rajeev writes: >> While sampling for marked events, currently we record the sample only >> if the SIAR valid bit of Sampled Instruction Event Register (SIER) is >> set. SIAR_VALID bit is used for fetching the instruction

Re: [PATCH v3 28/32] powerpc/64s: interrupt implement exit logic in C

2021-02-04 Thread Nicholas Piggin
Excerpts from Michael Ellerman's message of February 5, 2021 10:22 am: > Nicholas Piggin writes: >> Excerpts from Christophe Leroy's message of February 4, 2021 6:03 pm: >>> Le 04/02/2021 à 04:27, Nicholas Piggin a écrit : Excerpts from Christophe Leroy's message of February 4, 2021 2:25 am:

Re: [PATCH v3 28/32] powerpc/64s: interrupt implement exit logic in C

2021-02-04 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Christophe Leroy's message of February 4, 2021 6:03 pm: >> Le 04/02/2021 à 04:27, Nicholas Piggin a écrit : >>> Excerpts from Christophe Leroy's message of February 4, 2021 2:25 am: Le 25/02/2020 à 18:35, Nicholas Piggin a écrit : ... > + > +

Re: [PATCH v16 11/12] powerpc: Use OF alloc and free for FDT

2021-02-04 Thread Lakshmi Ramasubramanian
On 2/4/21 3:36 PM, Rob Herring wrote: On Thu, Feb 4, 2021 at 5:23 PM Lakshmi Ramasubramanian wrote: On 2/4/21 11:26 AM, Rob Herring wrote: On Thu, Feb 4, 2021 at 10:42 AM Lakshmi Ramasubramanian wrote: of_alloc_and_init_fdt() and of_free_fdt() have been defined in drivers/of/kexec.c to

Re: [PATCH v16 11/12] powerpc: Use OF alloc and free for FDT

2021-02-04 Thread Rob Herring
On Thu, Feb 4, 2021 at 5:23 PM Lakshmi Ramasubramanian wrote: > > On 2/4/21 11:26 AM, Rob Herring wrote: > > On Thu, Feb 4, 2021 at 10:42 AM Lakshmi Ramasubramanian > > wrote: > >> > >> of_alloc_and_init_fdt() and of_free_fdt() have been defined in > >> drivers/of/kexec.c to allocate and free

Re: [PATCH 1/2] PCI/AER: Disable AER interrupt during suspend

2021-02-04 Thread Bjorn Helgaas
[+cc Alex] On Thu, Jan 28, 2021 at 12:09:37PM +0800, Kai-Heng Feng wrote: > On Thu, Jan 28, 2021 at 4:51 AM Bjorn Helgaas wrote: > > On Thu, Jan 28, 2021 at 01:31:00AM +0800, Kai-Heng Feng wrote: > > > Commit 50310600ebda ("iommu/vt-d: Enable PCI ACS for platform opt in > > > hint") enables ACS,

Re: [PATCH v16 11/12] powerpc: Use OF alloc and free for FDT

2021-02-04 Thread Lakshmi Ramasubramanian
On 2/4/21 11:26 AM, Rob Herring wrote: On Thu, Feb 4, 2021 at 10:42 AM Lakshmi Ramasubramanian wrote: of_alloc_and_init_fdt() and of_free_fdt() have been defined in drivers/of/kexec.c to allocate and free memory for FDT. Use of_alloc_and_init_fdt() and of_free_fdt() to allocate and

Re: [PATCH] arch:powerpc simple_write_to_buffer return check

2021-02-04 Thread Oliver O'Halloran
On Fri, Feb 5, 2021 at 5:17 AM Mayank Suman wrote: > > Signed-off-by: Mayank Suman commit messages aren't optional > --- > arch/powerpc/kernel/eeh.c| 8 > arch/powerpc/platforms/powernv/eeh-powernv.c | 4 ++-- > 2 files changed, 6 insertions(+), 6 deletions(-) > >

[PATCH] KVM: PPC: Book3S HV: Save and restore FSCR in the P9 path

2021-02-04 Thread Fabiano Rosas
The Facility Status and Control Register is a privileged SPR that defines the availability of some features in problem state. Since it can be written by the guest, we must restore it to the previous host value after guest exit. This restoration is currently done by taking the value from

[PATCH] arch:powerpc simple_write_to_buffer return check

2021-02-04 Thread Mayank Suman
Signed-off-by: Mayank Suman --- arch/powerpc/kernel/eeh.c| 8 arch/powerpc/platforms/powernv/eeh-powernv.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c index 813713c9120c..2dbe1558a71f

Re: [PATCH RFC v1 2/6] swiotlb: convert variables to arrays

2021-02-04 Thread Konrad Rzeszutek Wilk
On Thu, Feb 04, 2021 at 11:49:23AM +, Robin Murphy wrote: > On 2021-02-04 07:29, Christoph Hellwig wrote: > > On Wed, Feb 03, 2021 at 03:37:05PM -0800, Dongli Zhang wrote: > > > This patch converts several swiotlb related variables to arrays, in > > > order to maintain stat/status for

Re: [PATCH v16 11/12] powerpc: Use OF alloc and free for FDT

2021-02-04 Thread Rob Herring
On Thu, Feb 4, 2021 at 10:42 AM Lakshmi Ramasubramanian wrote: > > of_alloc_and_init_fdt() and of_free_fdt() have been defined in > drivers/of/kexec.c to allocate and free memory for FDT. > > Use of_alloc_and_init_fdt() and of_free_fdt() to allocate and > initialize the FDT, and to free the FDT

Re: [PATCH] cpufreq: Remove unused flag CPUFREQ_PM_NO_WARN

2021-02-04 Thread Rafael J. Wysocki
On Tue, Feb 2, 2021 at 6:42 AM Viresh Kumar wrote: > > This flag is set by one of the drivers but it isn't used in the code > otherwise. Remove the unused flag and update the driver. > > Signed-off-by: Viresh Kumar Applied as 5.12 material, thanks! > --- > Rebased over: > >

Re: [PATCH v16 10/12] arm64: Use OF alloc and free functions for FDT

2021-02-04 Thread Will Deacon
On Thu, Feb 04, 2021 at 08:41:33AM -0800, Lakshmi Ramasubramanian wrote: > of_alloc_and_init_fdt() and of_free_fdt() have been defined in > drivers/of/kexec.c to allocate and free memory for FDT. > > Use of_alloc_and_init_fdt() and of_free_fdt() to allocate and > initialize the FDT, and to free

[PATCH v2 1/2] ima: Free IMA measurement buffer on error

2021-02-04 Thread Lakshmi Ramasubramanian
IMA allocates kernel virtual memory to carry forward the measurement list, from the current kernel to the next kernel on kexec system call, in ima_add_kexec_buffer() function. In error code paths this memory is not freed resulting in memory leak. Free the memory allocated for the IMA measurement

[PATCH v2 2/2] ima: Free IMA measurement buffer after kexec syscall

2021-02-04 Thread Lakshmi Ramasubramanian
IMA allocates kernel virtual memory to carry forward the measurement list, from the current kernel to the next kernel on kexec system call, in ima_add_kexec_buffer() function. This buffer is not freed before completing the kexec system call resulting in memory leak. Add ima_buffer field in

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Aneesh Kumar K.V
On 2/4/21 11:27 PM, Zorro Lang wrote: On Thu, Feb 04, 2021 at 10:31:59PM +0530, Aneesh Kumar K.V wrote: On 2/4/21 10:23 PM, Jens Axboe wrote: On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: On 2/2/21 11:50 AM, Christophe Leroy wrote: Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : On 2/2/21

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Zorro Lang
On Thu, Feb 04, 2021 at 10:31:59PM +0530, Aneesh Kumar K.V wrote: > On 2/4/21 10:23 PM, Jens Axboe wrote: > > On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: > > > On 2/2/21 11:50 AM, Christophe Leroy wrote: > > > > > > > > > > > > Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : > > > > > On

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Jens Axboe
On 2/4/21 10:01 AM, Aneesh Kumar K.V wrote: > On 2/4/21 10:23 PM, Jens Axboe wrote: >> On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: >>> On 2/2/21 11:50 AM, Christophe Leroy wrote: Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : > On 2/2/21 11:32 AM, Christophe Leroy wrote:

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Aneesh Kumar K.V
On 2/4/21 10:23 PM, Jens Axboe wrote: On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: On 2/2/21 11:50 AM, Christophe Leroy wrote: Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : Aneesh Kumar K.V

Re: [PATCH] powerpc/fault: fix wrong KUAP fault for IO_URING

2021-02-04 Thread Jens Axboe
On 2/1/21 11:30 PM, Aneesh Kumar K.V wrote: > On 2/2/21 11:50 AM, Christophe Leroy wrote: >> >> >> Le 02/02/2021 à 07:16, Aneesh Kumar K.V a écrit : >>> On 2/2/21 11:32 AM, Christophe Leroy wrote: Le 02/02/2021 à 06:55, Aneesh Kumar K.V a écrit : > Aneesh Kumar K.V writes:

[PATCH v16 11/12] powerpc: Use OF alloc and free for FDT

2021-02-04 Thread Lakshmi Ramasubramanian
of_alloc_and_init_fdt() and of_free_fdt() have been defined in drivers/of/kexec.c to allocate and free memory for FDT. Use of_alloc_and_init_fdt() and of_free_fdt() to allocate and initialize the FDT, and to free the FDT respectively. powerpc sets the FDT address in image_loader_data field in

[PATCH v16 12/12] arm64: Enable passing IMA log to next kernel on kexec

2021-02-04 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 v16 10/12] arm64: Use OF alloc and free functions for FDT

2021-02-04 Thread Lakshmi Ramasubramanian
of_alloc_and_init_fdt() and of_free_fdt() have been defined in drivers/of/kexec.c to allocate and free memory for FDT. Use of_alloc_and_init_fdt() and of_free_fdt() to allocate and initialize the FDT, and to free the FDT respectively. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Rob

[PATCH v16 08/12] powerpc: Delete unused function delete_fdt_mem_rsv()

2021-02-04 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 v16 09/12] of: Define functions to allocate and free FDT

2021-02-04 Thread Lakshmi Ramasubramanian
Kernel components that use Flattened Device Tree (FDT) allocate kernel memory and call fdt_open_into() to reorganize the tree into a form suitable for the read-write operations. These operations can be combined into a single function to allocate and initialize the FDT so the different

[PATCH v16 07/12] kexec: Use fdt_appendprop_addrrange() to add ima buffer to FDT

2021-02-04 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 v16 06/12] powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c

2021-02-04 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 v16 05/12] powerpc: Move ima buffer fields to struct kimage

2021-02-04 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 v16 04/12] powerpc: Use common of_kexec_setup_new_fdt()

2021-02-04 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_setup_new_fdt() defined in "drivers/of/kexec.c". Use the common of_kexec_setup_new_fdt() to setup the device tree and update the

[PATCH v16 03/12] arm64: Use common of_kexec_setup_new_fdt()

2021-02-04 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_setup_new_fdt() defined in "drivers/of/kexec.c". Use the common of_kexec_setup_new_fdt() to setup the device tree and update the

[PATCH v16 00/12] Carry forward IMA measurement log on kexec on ARM64

2021-02-04 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 v16 01/12] powerpc: Rename kexec elfcorehdr_addr to elf_headers_mem

2021-02-04 Thread Lakshmi Ramasubramanian
From: Rob Herring The architecture specific field, elfcorehdr_addr in struct kimage_arch, that holds the address of the buffer in memory for ELF core header for powerpc has a different name than the one used for arm64. This makes it hard to have a common code for setting up the device tree for

[PATCH v16 02/12] of: Add a common kexec FDT setup function

2021-02-04 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

Re: [PATCH v2] powerpc/uprobes: Validation for prefixed instruction

2021-02-04 Thread Naveen N. Rao
On 2021/02/04 06:38PM, Naveen N. Rao wrote: > On 2021/02/04 04:17PM, Ravi Bangoria wrote: > > Don't allow Uprobe on 2nd word of a prefixed instruction. As per > > ISA 3.1, prefixed instruction should not cross 64-byte boundary. > > So don't allow Uprobe on such prefixed instruction as well. > > >

Re: [PATCH] vio: make remove callback return void

2021-02-04 Thread Greg Kroah-Hartman
On Wed, Jan 27, 2021 at 10:50:10PM +0100, Uwe Kleine-König wrote: > The driver core ignores the return value of struct bus_type::remove() > because there is only little that can be done. To simplify the quest to > make this function return void, let struct vio_driver::remove() return > void, too.

Re: [PATCH v2] powerpc/uprobes: Validation for prefixed instruction

2021-02-04 Thread Ananth N Mavinakayanahalli
On 2/4/21 4:19 PM, Ravi Bangoria wrote: On 2/4/21 4:17 PM, Ravi Bangoria wrote: Don't allow Uprobe on 2nd word of a prefixed instruction. As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction as well. There are two ways

Re: [PATCH v2] powerpc/uprobes: Validation for prefixed instruction

2021-02-04 Thread Naveen N. Rao
On 2021/02/04 04:19PM, Ravi Bangoria wrote: > > > On 2/4/21 4:17 PM, Ravi Bangoria wrote: > > Don't allow Uprobe on 2nd word of a prefixed instruction. As per > > ISA 3.1, prefixed instruction should not cross 64-byte boundary. > > So don't allow Uprobe on such prefixed instruction as well. > >

Re: [PATCH v2] powerpc/uprobes: Validation for prefixed instruction

2021-02-04 Thread Naveen N. Rao
On 2021/02/04 04:17PM, Ravi Bangoria wrote: > Don't allow Uprobe on 2nd word of a prefixed instruction. As per > ISA 3.1, prefixed instruction should not cross 64-byte boundary. > So don't allow Uprobe on such prefixed instruction as well. > > There are two ways probed instruction is changed in

[PATCH kernel v3] powerpc/uaccess: Skip might_fault() when user access is enabled

2021-02-04 Thread Alexey Kardashevskiy
The amount of code executed with enabled user space access (unlocked KUAP) should be minimal. However with CONFIG_PROVE_LOCKING or CONFIG_DEBUG_ATOMIC_SLEEP enabled, might_fault() may end up replaying interrupts which in turn may access the user space and forget to restore the KUAP state. The

Re: [PATCH 3/3] tools/perf: Add perf tools support to expose Performance Monitor Counter SPRs as part of extended regs

2021-02-04 Thread Athira Rajeev
> On 03-Feb-2021, at 9:55 PM, Arnaldo Carvalho de Melo wrote: > > Em Wed, Feb 03, 2021 at 01:55:37AM -0500, Athira Rajeev escreveu: >> To enable presenting of Performance Monitor Counter Registers >> (PMC1 to PMC6) as part of extended regsiters, patch adds these >> to sample_reg_mask in the

Re: [PATCH] tools/perf: Fix powerpc gap between kernel end and module start

2021-02-04 Thread Athira Rajeev
> On 03-Feb-2021, at 9:01 PM, Arnaldo Carvalho de Melo wrote: > > Thanks, collected the Tested-by from Kajol and the Acked-by from Jiri > and applied to my local tree for testing, then up to my perf/core > branch. > > - Arnaldo Thanks Arnaldo for taking this fix.

Re: [PATCH RFC v1 2/6] swiotlb: convert variables to arrays

2021-02-04 Thread Robin Murphy
On 2021-02-04 07:29, Christoph Hellwig wrote: On Wed, Feb 03, 2021 at 03:37:05PM -0800, Dongli Zhang wrote: This patch converts several swiotlb related variables to arrays, in order to maintain stat/status for different swiotlb buffers. Here are variables involved: - io_tlb_start and

Re: [PATCH v7 39/42] powerpc: move NMI entry/exit code into wrapper

2021-02-04 Thread Nicholas Piggin
Excerpts from Michael Ellerman's message of February 4, 2021 8:15 pm: > Nicholas Piggin writes: >> This moves the common NMI entry and exit code into the interrupt handler >> wrappers. >> >> This changes the behaviour of soft-NMI (watchdog) and HMI interrupts, and >> also MCE interrupts on 64e,

[PATCH] powerpc/kexec_file: fix FDT size estimation for kdump kernel

2021-02-04 Thread Hari Bathini
On systems with large amount of memory, loading kdump kernel through kexec_file_load syscall may fail with the below error: "Failed to update fdt with linux,drconf-usable-memory property" This happens because the size estimation for kdump kernel's FDT does not account for the additional

Re: [PATCH] powerpc64/idle: Fix SP offsets when saving GPRs

2021-02-04 Thread Nicholas Piggin
Excerpts from Michael Ellerman's message of February 4, 2021 9:13 pm: > Nicholas Piggin writes: >> Excerpts from Christopher M. Riedl's message of February 4, 2021 4:59 pm: >>> On Sat Jan 30, 2021 at 7:44 AM CST, Nicholas Piggin wrote: Excerpts from Michael Ellerman's message of January 30,

Re: [PATCH] powerpc64/idle: Fix SP offsets when saving GPRs

2021-02-04 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Christopher M. Riedl's message of February 4, 2021 4:59 pm: >> On Sat Jan 30, 2021 at 7:44 AM CST, Nicholas Piggin wrote: >>> Excerpts from Michael Ellerman's message of January 30, 2021 9:32 pm: >>> > "Christopher M. Riedl" writes: >>> >> The idle

[PATCH 18/20] crypto: nx: nx_debugfs: Header comments should not be kernel-doc

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx_debugfs.c:34: warning: Function parameter or member 'drv' not described in 'nx_debugfs_init' drivers/crypto/nx/nx_debugfs.c:34: warning: expecting prototype for Nest Accelerators driver(). Prototype was for

[PATCH 16/20] crypto: vmx: Source headers are not good kernel-doc candidates

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/vmx/vmx.c:23: warning: expecting prototype for Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead Cc: "Breno Leitão" Cc: Nayna Jain Cc: Paulo Flabiano Smorigo Cc: Michael Ellerman Cc:

[PATCH 17/20] crypto: nx: nx-aes-cbc: Headers comments should not be kernel-doc

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'tfm' not described in 'cbc_aes_nx_set_key' drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'in_key' not described in 'cbc_aes_nx_set_key'

[PATCH 19/20] crypto: nx: Demote header comment and add description for 'nbytes'

2021-02-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx.c:31: warning: Incorrect use of kernel-doc format: * nx_hcall_sync - make an H_COP_OP hcall for the passed in op structure drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'nx_ctx' not described in

[PATCH 00/20] Rid W=1 warnings in Crypto

2021-02-04 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. This is set 1 of 2 sets required to fully clean Crypto. Lee Jones (20): crypto: hisilicon: sec_drv: Supply missing description for

Re: [PATCH v2] powerpc/uprobes: Validation for prefixed instruction

2021-02-04 Thread Ravi Bangoria
On 2/4/21 4:17 PM, Ravi Bangoria wrote: Don't allow Uprobe on 2nd word of a prefixed instruction. As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction as well. There are two ways probed instruction is changed in mapped

[PATCH v2] powerpc/uprobes: Validation for prefixed instruction

2021-02-04 Thread Ravi Bangoria
Don't allow Uprobe on 2nd word of a prefixed instruction. As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction as well. There are two ways probed instruction is changed in mapped pages. First, when Uprobe is activated, it

Re: [PATCH 01/13] powerpc/powernv: remove get_cxl_module

2021-02-04 Thread Michael Ellerman
Christoph Hellwig writes: > The static inline get_cxl_module function is entirely unused since commit > 8bf6b91a5125a ("Revert "powerpc/powernv: Add support for the cxl kernel > api on the real phb"), so remove it. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Andrew Donnellan > --- >

RE: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-04 Thread David Laight
From: Segher Boessenkool > Sent: 03 February 2021 21:18 ... > Power9 does: > > Load with Update Instructions (RA = 0) > EA is placed into R0. Does that change the value of 0? Rather reminds me of some 1960s era systems that had the small integers at fixed (global) addresses. FORTRAN always

Re: [PATCH v7 39/42] powerpc: move NMI entry/exit code into wrapper

2021-02-04 Thread Michael Ellerman
Nicholas Piggin writes: > This moves the common NMI entry and exit code into the interrupt handler > wrappers. > > This changes the behaviour of soft-NMI (watchdog) and HMI interrupts, and > also MCE interrupts on 64e, by adding missing parts of the NMI entry to > them. > > Signed-off-by:

Re: [PATCH] powerpc64/idle: Fix SP offsets when saving GPRs

2021-02-04 Thread Nicholas Piggin
Excerpts from Christopher M. Riedl's message of February 4, 2021 4:59 pm: > On Sat Jan 30, 2021 at 7:44 AM CST, Nicholas Piggin wrote: >> Excerpts from Michael Ellerman's message of January 30, 2021 9:32 pm: >> > "Christopher M. Riedl" writes: >> >> The idle entry/exit code saves/restores GPRs in

Re: [PATCH v3 28/32] powerpc/64s: interrupt implement exit logic in C

2021-02-04 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of February 4, 2021 6:03 pm: > > > Le 04/02/2021 à 04:27, Nicholas Piggin a écrit : >> Excerpts from Christophe Leroy's message of February 4, 2021 2:25 am: >>> >>> >>> Le 25/02/2020 à 18:35, Nicholas Piggin a écrit : Implement the bulk of interrupt

Re: [PATCH RFC v1 5/6] xen-swiotlb: convert variables to arrays

2021-02-04 Thread Christoph Hellwig
So one thing that has been on my mind for a while: I'd really like to kill the separate dma ops in Xen swiotlb. If we compare xen-swiotlb to swiotlb the main difference seems to be: - additional reasons to bounce I/O vs the plain DMA capable - the possibility to do a hypercall on arm/arm64 -

Re: [PATCH v4 1/2] powerpc: sstep: Fix load-store and update emulation

2021-02-04 Thread Naveen N. Rao
On 2021/02/04 01:37PM, Sandipan Das wrote: > The Power ISA says that the fixed-point load and update > instructions must neither use R0 for the base address (RA) > nor have the destination (RT) and the base address (RA) as > the same register. Similarly, for fixed-point stores and > floating-point

Re: [PATCH v2 1/3] powerpc: sstep: Fix load and update emulation

2021-02-04 Thread Naveen N. Rao
On 2021/02/03 03:17PM, Segher Boessenkool wrote: > On Wed, Feb 03, 2021 at 03:19:09PM +0530, Naveen N. Rao wrote: > > On 2021/02/03 12:08PM, Sandipan Das wrote: > > > The Power ISA says that the fixed-point load and update > > > instructions must neither use R0 for the base address (RA) > > > nor

Re: [PATCH v2 0/5] shoot lazy tlbs

2021-02-04 Thread Nicholas Piggin
I'll ask Andrew to put this in -mm if no objections. The series now doesn't touch other archs in non-trivial ways, and core code is functionally not changed much / at all if the option is not selected so it's actually pretty simple aside from the powerpc change. Thanks, Nick Excerpts from

[PATCH v4 2/2] powerpc: sstep: Fix darn emulation

2021-02-04 Thread Sandipan Das
Commit 8813ff49607e ("powerpc/sstep: Check instruction validity against ISA version before emulation") introduced a proper way to skip unknown instructions. This makes sure that the same is used for the darn instruction when the range selection bits have a reserved value. Fixes: a23987ef267a

[PATCH v4 1/2] powerpc: sstep: Fix load-store and update emulation

2021-02-04 Thread Sandipan Das
The Power ISA says that the fixed-point load and update instructions must neither use R0 for the base address (RA) nor have the destination (RT) and the base address (RA) as the same register. Similarly, for fixed-point stores and floating-point loads and stores, the instruction is invalid when R0

Re: [PATCH v3 28/32] powerpc/64s: interrupt implement exit logic in C

2021-02-04 Thread Christophe Leroy
Le 04/02/2021 à 04:27, Nicholas Piggin a écrit : Excerpts from Christophe Leroy's message of February 4, 2021 2:25 am: Le 25/02/2020 à 18:35, Nicholas Piggin a écrit : Implement the bulk of interrupt return logic in C. The asm return code must handle a few cases: restoring full GPRs, and