Re: [PATCH] powerpc/machdep: Remove stale functions from ppc_md structure

2021-09-02 Thread Daniel Axtens
Hi Christophe, > ppc_md.iommu_save() is not set anymore by any platform after > commit c40785ad305b ("powerpc/dart: Use a cachable DART"). > So iommu_save() has become a nop and can be removed. I wonder if it makes sense to have an iommu_restore() without an iommu_save. Only dart_iommu.c defines

Re: [PATCH] powerpc: Remove unused prototype for of_show_percpuinfo

2021-09-02 Thread Andrew Donnellan
On 3/9/21 4:32 pm, Daniel Axtens wrote: commit 6d7f58b04d82 ("[PATCH] powerpc: Some minor cleanups to setup_32.c") removed of_show_percpuinfo but didn't remove the prototype. Remove it. Fixes: 6d7f58b04d82 ("[PATCH] powerpc: Some minor cleanups to setup_32.c") Signed-off-by: Daniel Axtens I

[PATCH] powerpc: Remove unused prototype for of_show_percpuinfo

2021-09-02 Thread Daniel Axtens
commit 6d7f58b04d82 ("[PATCH] powerpc: Some minor cleanups to setup_32.c") removed of_show_percpuinfo but didn't remove the prototype. Remove it. Fixes: 6d7f58b04d82 ("[PATCH] powerpc: Some minor cleanups to setup_32.c") Signed-off-by: Daniel Axtens --- arch/powerpc/platforms/powermac/pmac.h |

[PATCH kernel] KVM: PPC: Book3S: Merge powerpc's debugfs entry content into generic entry

2021-09-02 Thread Alexey Kardashevskiy
At the moment the generic KVM code creates an "%pid-%fd" entry per a KVM instance; and the PPC HV KVM creates its own at "vm%pid". The rproblems with the PPC entries are: 1. they do not allow multiple VMs in the same process (which is extremely rare case mostly used by syzkaller fuzzer); 2. prone

Re: [PATCH 0/5] KVM: PPC: Book3S: Modules cleanup and unification

2021-09-02 Thread David Gibson
On Thu, Sep 02, 2021 at 11:32:41AM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > On Wed, Sep 01, 2021 at 02:33:52PM -0300, Fabiano Rosas wrote: > >> This series merges our three kvm modules kvm.ko, kvm-hv.ko and > >> kvm-pr.ko into one kvm.ko module. > > > > That doesn't sound like a g

[RESEND PATCH v4 4/4] powerpc/papr_scm: Document papr_scm sysfs event format entries

2021-09-02 Thread Kajol Jain
Details is added for the event, cpumask and format attributes in the ABI documentation. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Madhavan Srinivasan Tested-by: Nageswara R Sastry Signed-off-by: Kajol Jain --- Documentation/ABI/testing/sysfs-bus-papr-pmem | 31 +++ 1 file

[RESEND PATCH v4 3/4] powerpc/papr_scm: Add perf interface support

2021-09-02 Thread Kajol Jain
Performance monitoring support for papr-scm nvdimm devices via perf interface is added which includes addition of pmu functions like add/del/read/event_init for nvdimm_pmu struture. A new parameter 'priv' in added to the pdev_archdata structure to save nvdimm_pmu device pointer, to handle the unre

[RESEND PATCH v4 2/4] drivers/nvdimm: Add perf interface to expose nvdimm performance stats

2021-09-02 Thread Kajol Jain
A common interface is added to get performance stats reporting support for nvdimm devices. Added interface includes support for pmu register/unregister functions, cpu hotplug and pmu event functions like event_init/add/read/del. User could use the standard perf tool to access perf events exposed vi

[RESEND PATCH v4 1/4] drivers/nvdimm: Add nvdimm pmu structure

2021-09-02 Thread Kajol Jain
A structure is added, called nvdimm_pmu, for performance stats reporting support of nvdimm devices. It can be used to add nvdimm pmu data such as supported events and pmu event functions like event_init/add/read/del with cpu hotplug support. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Madhavan

[RESEND PATCH v4 0/4] Add perf interface to expose nvdimm

2021-09-02 Thread Kajol Jain
Patchset adds performance stats reporting support for nvdimm. Added interface includes support for pmu register/unregister functions. A structure is added called nvdimm_pmu to be used for adding arch/platform specific data such as supported events, cpumask pmu event functions like event_init/add/re

Re: [PATCH v2 1/2] powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state

2021-09-02 Thread Christophe Leroy
Le 03/09/2021 à 00:20, Segher Boessenkool a écrit : On Thu, Sep 02, 2021 at 04:52:03PM -0500, Segher Boessenkool wrote: On Thu, Sep 02, 2021 at 01:33:10PM +1000, Nicholas Piggin wrote: Excerpts from Christophe Leroy's message of September 2, 2021 3:21 am: - /* Firstly we need to enabl

Re: [PATCH v2 1/2] powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state

2021-09-02 Thread Segher Boessenkool
On Thu, Sep 02, 2021 at 04:52:03PM -0500, Segher Boessenkool wrote: > On Thu, Sep 02, 2021 at 01:33:10PM +1000, Nicholas Piggin wrote: > > Excerpts from Christophe Leroy's message of September 2, 2021 3:21 am: > > >> -/* Firstly we need to enable TM in the kernel */ > > >> +/* We ne

Re: [PATCH v2 1/2] powerpc/64s: system call scv tabort fix for corrupt irq soft-mask state

2021-09-02 Thread Segher Boessenkool
On Thu, Sep 02, 2021 at 01:33:10PM +1000, Nicholas Piggin wrote: > Excerpts from Christophe Leroy's message of September 2, 2021 3:21 am: > >> - /* Firstly we need to enable TM in the kernel */ > >> + /* We need to enable TM in the kernel, and disable EE (for scv) */ > >>mfmsr r10 > >>l

Re: [PATCH v2 5/5] powerpc/signal: Use unsafe_copy_siginfo_to_user()

2021-09-02 Thread Eric W. Biederman
Christophe Leroy writes: > Use unsafe_copy_siginfo_to_user() in order to do the copy > within the user access block. > > On an mpc 8321 (book3s/32) the improvment is about 5% on a process > sending a signal to itself. Nacked-by: "Eric W. Biederman" copy_siginfo_to_user is not the same as copy_

Re: [PATCH v2 3/5] signal: Add unsafe_copy_siginfo_to_user()

2021-09-02 Thread Eric W. Biederman
Christophe Leroy writes: > In the same spirit as commit fb05121fd6a2 ("signal: Add > unsafe_get_compat_sigset()"), implement an 'unsafe' version of > copy_siginfo_to_user() in order to use it within user access blocks. > > For that, also add an 'unsafe' version of clear_user(). Looking at your u

Re: [PATCH printk v4 3/6] printk: remove safe buffers

2021-09-02 Thread Geert Uytterhoeven
Hi John, On Thu, Jul 15, 2021 at 9:53 PM John Ogness wrote: > With @logbuf_lock removed, the high level printk functions for > storing messages are lockless. Messages can be stored from any > context, so there is no need for the NMI and safe buffers anymore. > Remove the NMI and safe buffers. > >

Re: [PATCH v2 3/5] signal: Add unsafe_copy_siginfo_to_user()

2021-09-02 Thread Linus Torvalds
On Wed, Sep 1, 2021 at 11:55 PM Christoph Hellwig wrote: > > I'm a little worried about all these unsafe helper in powerpc and the > ever increasing scope of the unsafe sections. Can you at least at > powerpc support to objtool to verify them? objtool verifications has > helped to find quite a f

Re: [PATCH v3 4/5] KVM: selftests: Add a test for KVM_RUN+rseq to detect task migration bugs

2021-09-02 Thread Mathieu Desnoyers
- On Sep 1, 2021, at 4:30 PM, Sean Christopherson sea...@google.com wrote: > Add a test to verify an rseq's CPU ID is updated correctly if the task is > migrated while the kernel is handling KVM_RUN. This is a regression test > for a bug introduced by commit 72c3c0fe54a3 ("x86/kvm: Use generi

Re: [PATCH 0/5] KVM: PPC: Book3S: Modules cleanup and unification

2021-09-02 Thread Fabiano Rosas
David Gibson writes: > On Wed, Sep 01, 2021 at 02:33:52PM -0300, Fabiano Rosas wrote: >> This series merges our three kvm modules kvm.ko, kvm-hv.ko and >> kvm-pr.ko into one kvm.ko module. > > That doesn't sound like a good idea to me. People who aren't on BookS > servers don't want - and can't

RE: [PATCH kernel] KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots

2021-09-02 Thread David Laight
... > > This is from my deep Windows past :) > > > > https://docs.microsoft.com/en-us/windows/win32/stg/coding-style-conventions > > =D How interesting! And according to that link 'sz' means "Zero terminated > String". Imagine the confusion.. haha Is that document responsible for some of the gene

[powerpc:next] BUILD SUCCESS e432fe97f3e5de325b40021e505cce53877586c5

2021-09-02 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next branch HEAD: e432fe97f3e5de325b40021e505cce53877586c5 powerpc/bug: Cast to unsigned long before passing to inline asm elapsed time: 1390m configs tested: 152 configs skipped: 3 The following configs have been

Re: [PATCH kernel] KVM: PPC: Book3S: Suppress warnings when allocating too big memory slots

2021-09-02 Thread Fabiano Rosas
Alexey Kardashevskiy writes: > On 02/09/2021 00:59, Fabiano Rosas wrote: >> Alexey Kardashevskiy writes: >> >>> The userspace can trigger "vmalloc size %lu allocation failure: exceeds >>> total pages" via the KVM_SET_USER_MEMORY_REGION ioctl. >>> >>> This silences the warning by checking the li

Re: [PATCH 0/2] powerpc/perf: Add instruction and data address registers to extended regs

2021-09-02 Thread kajoljain
On 6/20/21 8:15 PM, Athira Rajeev wrote: > Patch set adds PMU registers namely Sampled Instruction Address Register > (SIAR) and Sampled Data Address Register (SDAR) as part of extended regs > in PowerPC. These registers provides the instruction/data address and > adding these to extended regs h