Re: [PATCH V2] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-13 Thread Disha Goel
-Original Message- From: Athira Rajeev To: a...@kernel.org, jo...@kernel.org Cc: m...@ellerman.id.au, linux-perf-us...@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ma...@linux.vnet.ibm.com, rnsas...@linux.ibm.com, kj...@linux.ibm.com, disg...@linux.vnet.ibm.com , irog...@google.com

Re: [PATCH V2] tools/perf/tests: Fix session topology test to skip the test in guest environment

2022-05-13 Thread Disha Goel
-Original Message- From: Athira Rajeev To: a...@kernel.org, jo...@kernel.org Cc: m...@ellerman.id.au, linux-perf-us...@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ma...@linux.vnet.ibm.com, rnsas...@linux.ibm.com, kj...@linux.ibm.com, disg...@linux.vnet.ibm.com , irog...@google.com

Re: [PATCH v3] KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()

2022-05-13 Thread Christophe Leroy
Le 10/05/2022 à 14:37, Alexander Graf a écrit : > Commit 863771a28e27 ("powerpc/32s: Convert switch_mmu_context() to C") > moved the switch_mmu_context() to C. While in principle a good idea, it > meant that the function now uses the stack. The stack is not accessible > from real mode though. >

Re: [PATCH 4/5] bpf ppc32: add support for BPF_ATOMIC bitwise operations

2022-05-13 Thread Christophe Leroy
Le 12/05/2022 à 09:45, Hari Bathini a écrit : > Adding instructions for ppc32 for > > atomic_and > atomic_or > atomic_xor > atomic_fetch_add > atomic_fetch_and > atomic_fetch_or > atomic_fetch_xor > > Signed-off-by: Hari Bathini > --- > arch/powerpc/net/bpf_jit_comp32.c | 45

Re: [PATCH 0/5] Atomics support for eBPF on powerpc

2022-05-13 Thread Michael Ellerman
Daniel Borkmann writes: > On 5/12/22 9:45 AM, Hari Bathini wrote: >> This patchset adds atomic operations to the eBPF instruction set on >> powerpc. The instructions that are added here can be summarised with >> this list of kernel operations for ppc64: >> >> * atomic[64]_[fetch_]add >> *

Re: [PATCH 5/5] bpf ppc32: Add instructions for atomic_[cmp]xchg

2022-05-13 Thread Christophe Leroy
Le 12/05/2022 à 09:45, Hari Bathini a écrit : > This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc32, both > of which include the BPF_FETCH flag. The kernel's atomic_cmpxchg > operation fundamentally has 3 operands, but we only have two register > fields. Therefore the operand we

Re: [PATCH v6 05/29] x86/apic/vector: Do not allocate vectors for NMIs

2022-05-13 Thread Ricardo Neri
On Fri, May 06, 2022 at 11:12:20PM +0200, Thomas Gleixner wrote: > On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > > Vectors are meaningless when allocating IRQs with NMI as the delivery > > mode. > > Vectors are not meaningless. NMI has a fixed vector. > > The point is that for a fixed

Re: [PATCH v6 12/29] iommu/amd: Enable NMIPass when allocating an NMI irq

2022-05-13 Thread Ricardo Neri
On Fri, May 06, 2022 at 11:26:22PM +0200, Thomas Gleixner wrote: > On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > > > > + if (info->flags & X86_IRQ_ALLOC_AS_NMI) { > > + /* Only one IRQ per NMI */ > > + if (nr_irqs != 1) > > + return -EINVAL; > > See

Re: [PATCH v6 13/29] iommu/amd: Compose MSI messages for NMI irqs in non-IR format

2022-05-13 Thread Ricardo Neri
On Fri, May 06, 2022 at 11:31:56PM +0200, Thomas Gleixner wrote: > On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > > +* > > +* Also, NMIs do not have an associated vector. No need for cleanup. > > They have a vector and what the heck is this cleanup comment for here? > There is

Re: [PATCH v6 10/29] iommu/vt-d: Implement minor tweaks for NMI irqs

2022-05-13 Thread Ricardo Neri
On Fri, May 06, 2022 at 11:23:23PM +0200, Thomas Gleixner wrote: > On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > > The Intel IOMMU interrupt remapping driver already programs correctly the > > delivery mode of individual irqs as per their irq_data. Improve handling > > of NMIs. Allow only

Re: [PATCH 11/30] um: Improve panic notifiers consistency and ordering

2022-05-13 Thread Johannes Berg
On Wed, 2022-05-11 at 17:22 -0300, Guilherme G. Piccoli wrote: > On 10/05/2022 11:28, Petr Mladek wrote: > > [...] > > It is not clear to me why user mode linux should not care about > > the other notifiers. It might be because I do not know much > > about the user mode linux. > > > > Is the

Re: [PATCH -next v4 5/7] arm64: mte: Clean up user tag accessors

2022-05-13 Thread Mark Rutland
On Wed, Apr 20, 2022 at 03:04:16AM +, Tong Tiangen wrote: > From: Robin Murphy > > Invoking user_ldst to explicitly add a post-increment of 0 is silly. > Just use a normal USER() annotation and save the redundant instruction. > > Signed-off-by: Robin Murphy > Reviewed-by: Tong Tiangen

Re: [PATCH -next v4 4/7] arm64: add copy_{to, from}_user to machine check safe

2022-05-13 Thread Mark Rutland
On Wed, Apr 20, 2022 at 03:04:15AM +, Tong Tiangen wrote: > Add copy_{to, from}_user() to machine check safe. > > If copy fail due to hardware memory error, only the relevant processes are > affected, so killing the user process and isolate the user page with > hardware memory errors is a

Re: [PATCH -next v4 3/7] arm64: add support for machine check error safe

2022-05-13 Thread Mark Rutland
On Wed, Apr 20, 2022 at 03:04:14AM +, Tong Tiangen wrote: > During the processing of arm64 kernel hardware memory errors(do_sea()), if > the errors is consumed in the kernel, the current processing is panic. > However, it is not optimal. > > Take uaccess for example, if the uaccess operation

Re: [PATCH -next v4 7/7] arm64: add cow to machine check safe

2022-05-13 Thread Mark Rutland
On Wed, Apr 20, 2022 at 03:04:18AM +, Tong Tiangen wrote: > In the cow(copy on write) processing, the data of the user process is > copied, when hardware memory error is encountered during copy, only the > relevant processes are affected, so killing the user process and isolate > the user page

Re: [PATCH -next v4 6/7] arm64: add {get, put}_user to machine check safe

2022-05-13 Thread Mark Rutland
On Wed, Apr 20, 2022 at 03:04:17AM +, Tong Tiangen wrote: > Add {get, put}_user() to machine check safe. > > If get/put fail due to hardware memory error, only the relevant processes > are affected, so killing the user process and isolate the user page with > hardware memory errors is a more

Re: [PATCH v6 05/29] x86/apic/vector: Do not allocate vectors for NMIs

2022-05-13 Thread Thomas Gleixner
On Fri, May 13 2022 at 11:03, Ricardo Neri wrote: > On Fri, May 06, 2022 at 11:12:20PM +0200, Thomas Gleixner wrote: >> Why would a NMI ever end up in this code? There is no vector management >> required and this find cpu exercise is pointless. > > But even if the NMI has a fixed vector, it is

Re: [PATCH v6 15/29] x86/hpet: Add helper function hpet_set_comparator_periodic()

2022-05-13 Thread Ricardo Neri
On Fri, May 06, 2022 at 11:51:52PM +0200, Thomas Gleixner wrote: > On Fri, May 06 2022 at 23:41, Thomas Gleixner wrote: > > On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > >> Programming an HPET channel as periodic requires setting the > >> HPET_TN_SETVAL bit in the channel configuration.

Re: [PATCH v6 22/29] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2022-05-13 Thread Ricardo Neri
On Mon, May 09, 2022 at 04:03:39PM +0200, Thomas Gleixner wrote: > On Thu, May 05 2022 at 17:00, Ricardo Neri wrote: > > + if (is_hpet_hld_interrupt(hdata)) { > > + /* > > +* Kick the timer first. If the HPET channel is periodic, it > > +* helps to reduce the

Re: [PATCH v6 24/29] watchdog/hardlockup: Use parse_option_str() to handle "nmi_watchdog"

2022-05-13 Thread Ricardo Neri
On Tue, May 10, 2022 at 08:46:41PM +1000, Nicholas Piggin wrote: > Excerpts from Ricardo Neri's message of May 6, 2022 10:00 am: > > Prepare hardlockup_panic_setup() to handle a comma-separated list of > > options. Thus, it can continue parsing its own command-line options while > > ignoring

Re: [PATCH v6 20/29] init/main: Delay initialization of the lockup detector after smp_init()

2022-05-13 Thread Ricardo Neri
On Tue, May 10, 2022 at 08:38:22PM +1000, Nicholas Piggin wrote: > Excerpts from Ricardo Neri's message of May 6, 2022 9:59 am: > > Certain implementations of the hardlockup detector require support for > > Inter-Processor Interrupt shorthands. On x86, support for these can only > > be determined

Re: [PATCH v6 05/29] x86/apic/vector: Do not allocate vectors for NMIs

2022-05-13 Thread Ricardo Neri
On Fri, May 13, 2022 at 10:50:09PM +0200, Thomas Gleixner wrote: > On Fri, May 13 2022 at 11:03, Ricardo Neri wrote: > > On Fri, May 06, 2022 at 11:12:20PM +0200, Thomas Gleixner wrote: > >> Why would a NMI ever end up in this code? There is no vector management > >> required and this find cpu

Re: [PATCH v6 15/29] x86/hpet: Add helper function hpet_set_comparator_periodic()

2022-05-13 Thread Ricardo Neri
On Fri, May 06, 2022 at 11:41:13PM +0200, Thomas Gleixner wrote: > On Thu, May 05 2022 at 16:59, Ricardo Neri wrote: > > Programming an HPET channel as periodic requires setting the > > HPET_TN_SETVAL bit in the channel configuration. Plus, the comparator > > register must be written twice (once

Re: [PATCH 11/12] powerpc: wiiu: don't enforce flat memory

2022-05-13 Thread Pali Rohár
On Wednesday 02 March 2022 15:44:05 Ash Logan wrote: > pgtable_32.c:mapin_ram loops over each valid memory range, which means > non-contiguous memory just works. Hello! Does it mean that non-contiguous memory works for any 32-bit powerpc platform, and not only for wiiu? If yes, should not be