Re: [PATCH V3 0/3] Add new PowerPC specific ELF core notes

2014-07-24 Thread Sam Bobroff
On 24/05/14 01:15, Anshuman Khandual wrote: This patch series adds five new ELF core note sections which can be used with existing ptrace request PTRACE_GETREGSET/SETREGSET for accessing various transactional memory and miscellaneous register sets on PowerPC platform. Please find a test

Re: [PATCH V3 2/3] powerpc, ptrace: Enable support for transactional memory register sets

2014-07-24 Thread Sam Bobroff
On 24/05/14 01:15, Anshuman Khandual wrote: This patch enables get and set of transactional memory related register sets through PTRACE_GETREGSET/PTRACE_SETREGSET interface by implementing four new powerpc specific register sets i.e REGSET_TM_SPR, REGSET_TM_CGPR, REGSET_TM_CFPR, REGSET_CVMX

[PATCH 3/3] powerpc: Document sysfs DSCR interface

2014-05-21 Thread Sam Bobroff
Add some documentation about ... /sys/devices/system/cpu/dscr_default /sys/devices/system/cpu/cpuN/dscr ... to Documentation/ABI/stable. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- Documentation/ABI/stable/sysfs-devices-system-cpu | 25 + 1 file changed, 25

[PATCH 2/3] powerpc: fix regression of per-CPU DSCR setting

2014-05-21 Thread Sam Bobroff
of the per-CPU values and reads return the last written value. The new per-CPU default is added to the paca_struct and is used everywhere outside of sysfs.c instead of the old global default. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- arch/powerpc/include/asm/paca.h |3 +++ arch

[PATCH 0/3] powerpc: fix regression of per-CPU DSCR setting

2014-05-21 Thread Sam Bobroff
; if anything it should get slightly faster due to the per-CPU value being easier to access than the old global default. Sam Bobroff (3): powerpc: Split __SYSFS_SPRSETUP macro powerpc: fix regression of per-CPU DSCR setting powerpc: Document sysfs DSCR interface Documentation/ABI/stable

[PATCH 1/3] powerpc: Split __SYSFS_SPRSETUP macro

2014-05-21 Thread Sam Bobroff
Split the __SYSFS_SPRSETUP macro into two parts so that registers requiring custom read and write functions can use common code for their show and store functions. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- arch/powerpc/kernel/sysfs.c | 19 +-- 1 file changed, 13

[PATCH 1/1] powerpc: correct DSCR during TM context switch

2014-06-03 Thread Sam Bobroff
, dscr1); exit(EXIT_FAILURE); } if (i 10) { printf(\n DSCR TM context switching seems OK.\n); exit(EXIT_SUCCESS); } } } Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- arch/powerpc/include/asm/switch_to.h |6 -- arch/powerpc/kernel

Re: [PATCH 1/1] powerpc: correct DSCR during TM context switch

2014-06-04 Thread Sam Bobroff
On 04/06/14 20:03, Michael Neuling wrote: On Wed, 2014-06-04 at 17:31 +1000, Michael Ellerman wrote: Hi Sam, Comments inline .. Ditto Responses inline... On Wed, 2014-06-04 at 13:33 +1000, Sam Bobroff wrote: Correct the DSCR SPR becoming temporarily corrupted when a task is context

[PATCH 1/1 v2] powerpc: Correct DSCR during TM context switch

2014-06-05 Thread Sam Bobroff
the transaction. The fix is to treat the DSCR similarly to the TAR and save it early in __switch_to(). A program exposing the problem is added to the kernel self tests as: tools/testing/selftests/powerpc/tm/tm-resched-dscr. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- Changes: v2: * Reworked commit

[PATCH 1/1] selftests/powerpc: fix TARGETS in powerpc selftests makefile

2014-06-24 Thread Sam Bobroff
-by: Sam Bobroff sam.bobr...@au1.ibm.com --- tools/testing/selftests/powerpc/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile index 54833a7..84795c0 100644 --- a/tools/testing

Re: [PATCH V3 0/3] Add new PowerPC specific ELF core notes

2014-07-17 Thread Sam Bobroff
On 17/07/14 21:14, Michael Neuling wrote: On Jul 17, 2014 9:11 PM, Benjamin Herrenschmidt b...@kernel.crashing.org mailto:b...@kernel.crashing.org wrote: Outstanding Issues == (1) Running DSCR register value inside a transaction does not seem to be saved at

suspicious RCU usage clockevents_lock, tick_broadcast_lock, hrtimer_bases.lock

2015-02-12 Thread Sam Bobroff
Hello, I'm receiving this while booting a vanilla 3.19 kernel on a Power 8 machine: [2.522179] device-mapper: uevent: version 1.0.3 [2.522741] device-mapper: ioctl: 4.29.0-ioctl (2014-10-28) initialised: dm-de...@redhat.com [2.543590] [2.543630] === [

Re: [PATCH] powerpc/powernv: Check image loaded or not before calling flash

2015-02-12 Thread Sam Bobroff
stage then we endup displaying Flashing new firmware message.. which may confuse end user. This patch adds additional validation to make sure image is actually loaded or not. Reported-by: Sam Bobroff sam.bobr...@au1.ibm.com Signed-off-by: Vasant Hegde hegdevas...@linux.vnet.ibm.com --- arch

[PATCH 1/3] powerpc/tm: Abort syscalls in active transactions

2015-03-18 Thread Sam Bobroff
powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a system call increases by about 0.5%. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- Documentation

[PATCH 2/3] selftests/powerpc: Move get_auxv_entry() to harness.c

2015-03-18 Thread Sam Bobroff
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- tools/testing/selftests/powerpc/harness.c | 47 + tools/testing/selftests/powerpc/pmu/lib.c | 47

[PATCH 3/3] selftests/powerpc: Add transactional syscall test

2015-03-18 Thread Sam Bobroff
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- tools/testing/selftests/powerpc/tm/Makefile |3 +- tools/testing/selftests

[PATCH 0/3] powerpc/tm: Abort syscalls in active transactions

2015-03-18 Thread Sam Bobroff
See the first patch for a description of the reasoning behind this change. This set includes the change, a kernel selftest for it and some slight refactoring of the selftest code. Sam Bobroff (3): powerpc/tm: Abort syscalls in active transactions selftests/powerpc: Move get_auxv_entry

[PATCH v2 4/4] powerpc/tm: Correct minor documentation typos

2015-03-29 Thread Sam Bobroff
Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- v2: Discovered some typos while updating the documentation. Documentation/powerpc/transactional_memory.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/powerpc/transactional_memory.txt b

[PATCH v2 0/4] powerpc/tm: Abort syscalls in active transactions

2015-03-29 Thread Sam Bobroff
documentation typos Discovered some typos while updating the documentation. Sam Bobroff (4): powerpc/tm: Abort syscalls in active transactions selftests/powerpc: Move get_auxv_entry() to harness.c selftests/powerpc: Add transactional syscall test powerpc/tm: Correct minor documentation typos

Re: [PATCH 3/3] selftests/powerpc: Add transactional syscall test

2015-03-29 Thread Sam Bobroff
On 24/03/15 13:02, Michael Ellerman wrote: On Tue, 2015-03-24 at 12:52 +1100, Sam Bobroff wrote: On 20/03/15 20:25, Anshuman Khandual wrote: On 03/19/2015 10:13 AM, Sam Bobroff wrote: Check that a syscall made during an active transaction will fail with the correct failure code and that one

[PATCH v2 2/4] selftests/powerpc: Move get_auxv_entry() to harness.c

2015-03-29 Thread Sam Bobroff
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- tools/testing/selftests/powerpc/harness.c | 47 + tools/testing/selftests/powerpc/pmu/lib.c | 47

[PATCH v2 1/4] powerpc/tm: Abort syscalls in active transactions

2015-03-29 Thread Sam Bobroff
powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a system call increases by about 0.5%. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- v2: Also update

[PATCH v2 3/4] selftests/powerpc: Add transactional syscall test

2015-03-29 Thread Sam Bobroff
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- v2: Further testing has shown that the success or failure of the transactions

Re: [PATCH 3/3] selftests/powerpc: Add transactional syscall test

2015-03-23 Thread Sam Bobroff
On 20/03/15 20:25, Anshuman Khandual wrote: On 03/19/2015 10:13 AM, Sam Bobroff wrote: Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff sam.bobr...@au1

[PATCH v3 2/4] selftests/powerpc: Move get_auxv_entry() to harness.c

2015-04-06 Thread Sam Bobroff
Move get_auxv_entry() from pmu/lib.c up to harness.c in order to make it available to other tests. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- tools/testing/selftests/powerpc/harness.c | 47 + tools/testing/selftests/powerpc/pmu/lib.c | 47

[PATCH v3 0/4] powerpc/tm: Abort syscalls in active transactions

2015-04-06 Thread Sam Bobroff
that occur more rarely. This has stabilised the results, and it's no longer necessary to use special compiler or linker flags. Patch 4/4: powerpc/tm: Correct minor documentation typos Discovered some typos while updating the documentation. Sam Bobroff (4): powerpc/tm: Abort syscalls in active

[PATCH v3 1/4] powerpc/tm: Abort syscalls in active transactions

2015-04-06 Thread Sam Bobroff
powerpc and platforms that do not support suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a system call increases by about 0.5%. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com Acked-By: Michael

[PATCH v3 4/4] powerpc/tm: Correct minor documentation typos

2015-04-06 Thread Sam Bobroff
Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- v2: Discovered some typos while updating the documentation. Documentation/powerpc/transactional_memory.txt |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/powerpc/transactional_memory.txt b

[PATCH v3 3/4] selftests/powerpc: Add transactional syscall test

2015-04-06 Thread Sam Bobroff
Check that a syscall made during an active transaction will fail with the correct failure code and that one made during a suspended transaction will succeed. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- v2: Further testing has shown that the success or failure of the transactions

[PATCH 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-19 Thread Sam Bobroff
instruction which, depending on endianness, will cause either the lower or upper 32 bits to be missed. In another case it is cast as a u32, causing the upper 32 bits to be cleared. This patch corrects those places by extending the access methods to 64 bits. Signed-off-by: Sam Bobroff sam.bobr...@au1

[PATCH 1/1] powerpc/tm: Abort syscalls in active transactions (v2)

2015-06-11 Thread Sam Bobroff
suspended transactions (e.g. x86 and s390). Performance measurements using http://ozlabs.org/~anton/junkcode/null_syscall.c indicate the cost of a normal (non-aborted) system call increases by about 0.25%. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- Documentation/powerpc

[PATCH v3 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-26 Thread Sam Bobroff
instruction which, depending on endianness, will cause either the lower or upper 32 bits to be missed. In another case it is cast as a u32, causing the upper 32 bits to be cleared. This patch corrects those places by extending the access methods to 64 bits. Signed-off-by: Sam Bobroff sam.bobr...@au1

Re: [PATCH v2 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-26 Thread Sam Bobroff
On Tue, May 26, 2015 at 10:35:08AM +0200, Alexander Graf wrote: On 26.05.15 02:27, Sam Bobroff wrote: In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is accessed as such. This patch corrects

Re: [PATCH 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-25 Thread Sam Bobroff
On Mon, May 25, 2015 at 11:08:08PM +0200, Alexander Graf wrote: On 20.05.15 07:26, Sam Bobroff wrote: In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 bit field (e.g. in kvm_regs and kvm_vcpu_arch) and in most places it is accessed as such. This patch corrects

[PATCH v2 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-05-25 Thread Sam Bobroff
instruction which, depending on endianness, will cause either the lower or upper 32 bits to be missed. In another case it is cast as a u32, causing the upper 32 bits to be cleared. This patch corrects those places by extending the access methods to 64 bits. Signed-off-by: Sam Bobroff sam.bobr...@au1

Re: [1/1] powerpc/xmon: Paged output for paca display

2015-08-19 Thread Sam Bobroff
On Tue, Aug 18, 2015 at 04:26:32PM +1000, Michael Ellerman wrote: On Fri, 2015-14-08 at 02:55:14 UTC, Sam bobroff wrote: The paca display is already more than 24 lines, which can be problematic if you have an old school 80x24 terminal, or more likely you are on a virtual terminal which does

[PATCH v2 2/2] powerpc/xmon: Paginate kernel log buffer display

2015-08-20 Thread Sam Bobroff
The kernel log buffer is often much longer than the size of a terminal so paginate it's output. Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- arch/powerpc/xmon/xmon.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc

[PATCH v2 0/2] powerpc/xmon: Paged output for paca display

2015-08-20 Thread Sam Bobroff
and is less invasive to the command code. * Added a patch to paginate the kernel log buffer display. Sam Bobroff (2): powerpc/xmon: Paged output for paca display powerpc/xmon: Paginate kernel log buffer display arch/powerpc/xmon/xmon.c | 89 +++- 1 file

[PATCH v2 1/2] powerpc/xmon: Paged output for paca display

2015-08-20 Thread Sam Bobroff
-by: Sam Bobroff sam.bobr...@au1.ibm.com --- arch/powerpc/xmon/xmon.c | 86 +++- 1 file changed, 71 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index e599259..9ce9e7d 100644 --- a/arch/powerpc/xmon/xmon.c

Re: [PATCH v3 1/1] KVM: PPC: Book3S: correct width in XER handling

2015-08-05 Thread Sam Bobroff
Ping? I think I've addressed all the comments in this version. Is there anything else I need to look at? Cheers, Sam. On Wed, May 27, 2015 at 09:56:57AM +1000, Sam Bobroff wrote: In 64 bit kernels, the Fixed Point Exception Register (XER) is a 64 bit field (e.g. in kvm_regs and kvm_vcpu_arch

Re: [PATCH] book3s_hv_rmhandlers:Pass the correct trap argument to kvmhv_commence_exit

2015-08-13 Thread Sam Bobroff
. Fix this by copying r12 into r3 before calling kvmhv_commence_exit as r12 contains the trap number Signed-off-by: Gautham R. Shenoy e...@linux.vnet.ibm.com Hi Gautham, I agree with your logic: r3 is quite clearly corrupted in that path. So: Reviewed-by: Sam Bobroff sam.bobr...@au1

[PATCH 1/1] powerpc/xmon: Paged output for paca display

2015-08-13 Thread Sam Bobroff
(0x2be) 0:mon (Based on a similar patch by Michael Ellerman m...@ellerman.id.au [v2] powerpc/xmon: Allow limiting the size of the paca display. This patch is an alternative and cannot coexist with the original.) Signed-off-by: Sam Bobroff sam.bobr...@au1.ibm.com --- arch/powerpc/xmon

Re: [PATCH v2] powerpc/xmon: Allow limiting the size of the paca display

2015-08-13 Thread Sam Bobroff
On Wed, Aug 12, 2015 at 09:55:25PM +1000, Michael Ellerman wrote: The paca display is already more than 24 lines, which can be problematic if you have an old school 80x24 terminal, or more likely you are on a virtual terminal which does not scroll for whatever reason. We'd like to expand the

Re: [PATCH v3] powerpc: Add an inline function to update POWER8 HID0

2015-08-13 Thread Sam Bobroff
-by: Sam Bobroff sam.bobr...@au1.ibm.com Tested-by: Sam Bobroff sam.bobr...@au1.ibm.com ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [v2,1/1] powerpc: Individual System V IPC system calls

2015-10-14 Thread Sam Bobroff
On Tue, Oct 13, 2015 at 08:38:42PM +1100, Michael Ellerman wrote: > On Tue, 2015-13-10 at 01:49:28 UTC, Sam bobroff wrote: > > This patch provides individual system call numbers for the following > > System V IPC system calls, on PowerPC, so that they do not need to be > > mul

Re: [PATCH v3 1/2] powerpc/xmon: Paged output for paca display

2015-10-14 Thread Sam Bobroff
On Wed, Oct 14, 2015 at 08:39:09PM +1100, Michael Ellerman wrote: > On Thu, 2015-10-08 at 11:50 +1100, Sam Bobroff wrote: > > The paca display is already more than 24 lines, which can be problematic > > if you have an old school 80x24 terminal, or more likely you are on a >

Re: [v2,1/1] powerpc: Individual System V IPC system calls

2015-10-14 Thread Sam Bobroff
On Wed, Oct 14, 2015 at 08:38:15PM +1100, Michael Ellerman wrote: > On Wed, 2015-10-14 at 18:00 +1100, Sam Bobroff wrote: > > On Tue, Oct 13, 2015 at 08:38:42PM +1100, Michael Ellerman wrote: > > > On Tue, 2015-13-10 at 01:49:28 UTC, Sam bobroff wrote: > > > > This pa

[PATCH v3 0/2] powerpc/xmon: Paged output for paca display

2015-10-07 Thread Sam Bobroff
sition in the command buffer to using some globals. Saves some memory and is less invasive to the command code. * Added a patch to paginate the kernel log buffer display. Sam Bobroff (2): powerpc/xmon: Paged output for paca display powerpc/xmon: Paginate kernel log buffer display arch/powerp

[PATCH v3 2/2] powerpc/xmon: Paginate kernel log buffer display

2015-10-07 Thread Sam Bobroff
The kernel log buffer is often much longer than the size of a terminal so paginate it's output. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- arch/powerpc/xmon/xmon.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerp

Re: [v2,1/2] powerpc/xmon: Paged output for paca display

2015-10-07 Thread Sam Bobroff
On Tue, Oct 06, 2015 at 10:05:38PM +1100, Michael Ellerman wrote: > On Fri, 2015-21-08 at 04:24:27 UTC, Sam bobroff wrote: > > The paca display is already more than 24 lines, which can be problematic > > if you have an old school 80x24 terminal, or more likely you are on a >

[PATCH v3 1/2] powerpc/xmon: Paged output for paca display

2015-10-07 Thread Sam Bobroff
ze of the paca display". This patch is an alternative and cannot coexist with the original.) Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- arch/powerpc/xmon/nonstdio.c | 57 ++-- arch/powerpc/xmon/nonstdio.h | 3 +++ arch/powerpc/xmo

[PATCH v2 1/1] powerpc: Individual System V IPC system calls

2015-10-12 Thread Sam Bobroff
This patch provides individual system call numbers for the following System V IPC system calls, on PowerPC, so that they do not need to be multiplexed: * semop, semget, semctl, semtimedop * msgsnd, msgrcv, msgget, msgctl * shmat, shmdt, shmget, shmctl Signed-off-by: Sam Bobroff <sam.bobr...@

[PATCH 1/1] powerpc: Individual System V IPC system calls

2015-09-24 Thread Sam Bobroff
This patch provides individual system call numbers for the following System V IPC system calls, on PowerPC, so that they do not need to be multiplexed: * semop, semget, semctl, semtimedop * msgsnd, msgrcv, msgget, msgctl * shmat, shmdt, shmget, shmctl Signed-off-by: Sam Bobroff <sam.bobr...@

Re: [PATCH 1/1] powerpc: Individual System V IPC system calls

2015-09-24 Thread Sam Bobroff
On Fri, Sep 25, 2015 at 10:33:37AM +1000, Michael Ellerman wrote: > On Thu, 2015-09-24 at 15:39 +1000, Sam Bobroff wrote: > > This patch provides individual system call numbers for the following > > System V IPC system calls, on PowerPC, so that they do not need to be > > mul

Re: [PATCH v5 08/11] powerpc/powernv: Add platform support for stop instruction

2016-06-08 Thread Sam Bobroff
On Thu, Jun 02, 2016 at 07:38:58AM -0500, Shreyas B. Prabhu wrote: ... > +/* Power Management - PSSCR Fields */ It might be nice to give the full name of the register, as below with the FPSCR. > +#define PSSCR_RL_MASK0x000F > +#define PSSCR_MTL_MASK 0x00F0

Re: [PATCH 1/1] powerpc: Detect broken or mismatched toolchains

2016-02-22 Thread Sam Bobroff
On Mon, Feb 22, 2016 at 08:05:01PM -0600, Scott Wood wrote: > On Mon, 2016-02-22 at 16:13 +1100, Sam Bobroff wrote: > > It can currently be difficult to diagnose a build that fails due to > > the compiler, linker or other parts of the toolchain being unable to > > build

[PATCH 1/1] powerpc: Detect broken or mismatched toolchains

2016-02-21 Thread Sam Bobroff
option '-maltivec' This patch adds a basic compile test and error message to arch/powerpc/Makefile so that the above error becomes: *** Sorry, your toolchain seems to be broken or incorrect. *** Make sure it supports your kernel configuration (ppc64). Signed-off-by: Sam Bobroff <sam.bobr...@

Re: [1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-18 Thread Sam Bobroff
On Fri, Jul 08, 2016 at 08:49:49PM +1000, Michael Ellerman wrote: > On Wed, 2016-06-07 at 06:05:54 UTC, Sam bobroff wrote: > > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > > index 02416fe..06d79bc 100644 > > --- a/arch/powerpc/kvm/powerpc.c >

[PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-19 Thread Sam Bobroff
Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to determine if a PowerPC KVM guest should use HTM (Hardware Transactional Memory). This will be used by QEMU to populate the pa-features bits in the guest's device tree. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.

[PATCH 1/3] spapr: Disable ibm, pa-features HTM bit

2016-07-04 Thread Sam Bobroff
. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 78ebd9e..704aae7 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -635,7 +635,7 @@ static void spapr_populate_

[PATCH 2/3] Add KVM_CAP_PPC_HTM to linux/kvm.h

2016-07-04 Thread Sam Bobroff
Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- linux-headers/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index e60e21b..37cb3e8 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@

[PATCH 3/3] spapr: Set ibm, pa-features HTM from KVM_CAP_PPC_HTM

2016-07-04 Thread Sam Bobroff
based on KVM being KVM-HV and HTM being available to the QEMU process. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- hw/ppc/spapr.c | 3 ++- target-ppc/kvm.c | 27 +++ target-ppc/kvm_ppc.h | 6 ++ 3 files changed, 35 insertions(+), 1 de

[PATCH 0/3] Rework spapr: Better handling of ibm, pa-features TM bit

2016-07-04 Thread Sam Bobroff
e possible in an attempt to be consistent. Sam Bobroff (3): spapr: Disable ibm, pa-features HTM bit Add KVM_CAP_PPC_HTM to linux/kvm.h spapr: Set ibm, pa-features HTM from KVM_CAP_PPC_HTM hw/ppc/spapr.c| 3 ++- linux-headers/linux/kvm.h | 1 + target-ppc/kvm.c

[PATCH v2 3/3] spapr: Set ibm, pa-features HTM from KVM_CAP_PPC_HTM

2016-07-05 Thread Sam Bobroff
based on KVM being KVM-HV and HTM being available to the QEMU process. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- v2: * Improve readability of HTM bit set code. * Move the test for KVM into kvmppc_get_htm_support(). hw/ppc/spapr.c | 3 +++ target-ppc/kvm.c

Re: [PATCH 2/3] Add KVM_CAP_PPC_HTM to linux/kvm.h

2016-07-05 Thread Sam Bobroff
On Tue, Jul 05, 2016 at 04:05:58PM +1000, David Gibson wrote: > On Tue, Jul 05, 2016 at 03:19:23PM +1000, Sam Bobroff wrote: > > Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> > > Ok, so the usual procedure for updates to linux-headers is this: >1. Get the cha

[PATCH v2 2/3] Add KVM_CAP_PPC_HTM to linux/kvm.h

2016-07-05 Thread Sam Bobroff
Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- linux-headers/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index e60e21b..37cb3e8 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@

[PATCH v2 0/3] Rework spapr: Better handling of ibm, pa-features TM bit

2016-07-05 Thread Sam Bobroff
Here's version 2. Changes v1 -> v2: Patch 2/3: spapr: Set ibm, pa-features HTM from KVM_CAP_PPC_HTM * Improve readability of HTM bit set code. * Move the test for KVM into kvmppc_get_htm_support(). Sam Bobroff (3): spapr: Disable ibm, pa-features HTM bit Add KVM_CAP_PPC_HTM to li

[PATCH v2 1/3] spapr: Disable ibm, pa-features HTM bit

2016-07-05 Thread Sam Bobroff
. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- hw/ppc/spapr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 78ebd9e..704aae7 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -635,7 +635,7 @@ static void spapr_populate_

[PATCH 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM

2016-07-06 Thread Sam Bobroff
Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to determine if a PowerPC KVM guest should use HTM (Hardware Transactional Memory). This will be used by QEMU to populate the pa-features bits in the guest's device tree. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.

Re: [PATCH 0/6] kvm: powerpc halt polling updates

2016-10-13 Thread Sam Bobroff
d a repetitive wakeup, using a nanosleep loop in guest userspace (with real time prio), and I was able to cause halt polling to switch on and off as I adjusted halt_poll_ns. I think the new default value is much better: halt polling started (e.g. CPU utilization rose to 100%) once CPU utilization had already risen to about 75%. Cheers, Sam. Tested-by: Sam Bobroff <sam.bobr...@au1.ibm.com>

Re: [PATCH 01/12] powerpc: Disable HFSCR:TM if TM not supported

2017-03-27 Thread Sam Bobroff
On Mon, Mar 20, 2017 at 05:49:03PM +1100, Benjamin Herrenschmidt wrote: > Otherwise KVM guests might mess with it even when told not > to causing bad thing interrupts in the host > > Signed-off-by: Benjamin Herrenschmidt I've tested this on a P8, with a kernel and QEMU

[PATCH 1/1] selftests/powerpc: Improve tm-resched-dscr

2017-08-16 Thread Sam Bobroff
duce large amounts of unnecessary output. Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- tools/testing/selftests/powerpc/tm/Makefile | 1 + tools/testing/selftests/powerpc/tm/tm-resched-dscr.c | 12 2 files changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH 1/1] KVM: PPC: Book3S: Fix server always zero from kvmppc_xive_get_xive()

2017-09-26 Thread Sam Bobroff
0a ("KVM: PPC: Book3S HV: Native usage of the XIVE interrupt controller") Cc: sta...@vger.kernel.org Signed-off-by: Sam Bobroff <sam.bobr...@au1.ibm.com> --- The other obvious way to patch this would be to set state->guest_server in kvmppc_xive_set_xive() and that does also work bec

Re: [PATCH] powerpc/kernel: Change retrieval of pci_dn

2017-08-29 Thread Sam Bobroff
> > Signed-off-by: Bryant G. Ly <b...@us.ibm.com> Reviewed-by: Sam Bobroff <sam.bobr...@au1.ibm.com> I don't know this area but I tested it using a patched kernel with the old and new code together. My test kernel booted fine (in QEMU+KVM) and I saw 26 reads and 4 writes, all of whi

Re: [PATCH 13/13] powerpc/eeh: Refactor report functions

2018-05-06 Thread Sam Bobroff
On Thu, May 03, 2018 at 11:27:12PM +1000, Michael Ellerman wrote: > Sam Bobroff <sbobr...@linux.ibm.com> writes: > > diff --git a/arch/powerpc/kernel/eeh_driver.c > > b/arch/powerpc/kernel/eeh_driver.c > > index eb4feee81ff4..1c4336dcf9f5 100644 > > --- a

Re: [PATCH 03/13] powerpc/eeh: Fix use-after-release of EEH driver

2018-05-06 Thread Sam Bobroff
On Fri, May 04, 2018 at 12:56:55PM +1000, Michael Ellerman wrote: > Sam Bobroff <sbobr...@linux.ibm.com> writes: > > > Correct two cases where eeh_pcid_get() is used to reference the driver's > > module but the reference is dropped before the driver pointer is used. &

Re: [PATCH 02/13] powerpc/eeh: Add final message for successful recovery

2018-05-06 Thread Sam Bobroff
On Fri, May 04, 2018 at 12:55:42PM +1000, Michael Ellerman wrote: > Sam Bobroff <sbobr...@linux.ibm.com> writes: > > > Add a single log line at the end of successful EEH recovery, so that > > it's clear that event processing has finished. > > > > Signed-off-by:

Re: [PATCH 02/13] powerpc/eeh: Add final message for successful recovery

2018-05-06 Thread Sam Bobroff
On Fri, May 04, 2018 at 04:08:28PM +1000, Russell Currey wrote: > On Fri, 2018-05-04 at 12:55 +1000, Michael Ellerman wrote: > > Sam Bobroff <sbobr...@linux.ibm.com> writes: > > > > > Add a single log line at the end of successful EEH recovery, so > > > that

Re: [PATCH 11/13] powerpc/eeh: Introduce eeh_set_irq_state()

2018-05-07 Thread Sam Bobroff
On Fri, May 04, 2018 at 01:02:32PM +1000, Michael Ellerman wrote: > Sam Bobroff <sbobr...@linux.ibm.com> writes: > > > diff --git a/arch/powerpc/kernel/eeh_driver.c > > b/arch/powerpc/kernel/eeh_driver.c > > index f63a01d336ee..b3edd0df04b8 100644 > > --

Re: [PATCH 07/13] powerpc/eeh: Clean up pci_ers_result handling

2018-05-07 Thread Sam Bobroff
On Fri, May 04, 2018 at 04:58:01PM +1000, Russell Currey wrote: > On Wed, 2018-05-02 at 16:36 +1000, Sam Bobroff wrote: > > As EEH event handling progresses, a cumulative result of type > > pci_ers_result is built up by (some of) the eeh_report_*() functions > > using e

[PATCH v2 1/1] powerpc/pseries: fix EEH recovery of some IOV devices

2018-05-24 Thread Sam Bobroff
s missing. Correct this by zeroing the resource flags for IOV BARs when they can't be configured. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- Hi, This is a fix to allow EEH recovery to succeed in a specific situation, which I've tried to explain in the commit message. As with the

[PATCH v2 03/13] powerpc/eeh: Fix use-after-release of EEH driver

2018-05-24 Thread Sam Bobroff
if it wasn't needed. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh_driver.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 07e0a4

[PATCH v2 01/13] powerpc/eeh: Add eeh_max_freezes to initial EEH log line

2018-05-24 Thread Sam Bobroff
. Also remove the embedded newline from the existing message to make it easier to grep for. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh_driver.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c

[PATCH v2 00/13] EEH refactoring 2

2018-05-24 Thread Sam Bobroff
eh: Introduce eeh_for_each_pe() Patch 9/13: powerpc/eeh: Introduce eeh_edev_actionable() Patch 10/13: powerpc/eeh: Introduce eeh_set_channel_state() Patch 11/13: powerpc/eeh: Introduce eeh_set_irq_state() Patch 12/13: powerpc/eeh: Cleaner handling of EEH_DEV_NO_HANDLER Patch 13/13: powerpc/eeh: Refactor report f

[PATCH v2 09/13] powerpc/eeh: Introduce eeh_edev_actionable()

2018-05-24 Thread Sam Bobroff
The same test is done in every EEH report function, so factor it out. Since eeh_dev_removed() needs to be moved higher up in the file, simplify it a little while we're at it. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh_driver.

[PATCH v2 13/13] powerpc/eeh: Refactor report functions

2018-05-24 Thread Sam Bobroff
The EEH report functions now share a fair bit of code around the start and end of each function. So factor out as much as possible, and move the traversal into a custom function. This also allows accurate debug to be generated more easily. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.

[PATCH v2 02/13] powerpc/eeh: Add final message for successful recovery

2018-05-24 Thread Sam Bobroff
Add a single log line at the end of successful EEH recovery, so that it's clear that event processing has finished. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/eeh_driver.c

[PATCH v2 04/13] powerpc/eeh: Remove unused eeh_pcid_name()

2018-05-24 Thread Sam Bobroff
Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh_driver.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c index 54333f6c9d67..ca9a73fe9cc5 100644 --- a/arch/powerpc/

[PATCH v2 06/13] powerpc/eeh: Add message when PE processing at parent

2018-05-24 Thread Sam Bobroff
To aid debugging, add a message to show when EEH processing for a PE will be done at the device's parent, rather than directly at the device. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH v2 12/13] powerpc/eeh: Cleaner handling of EEH_DEV_NO_HANDLER

2018-05-24 Thread Sam Bobroff
, some of the drivers EEH handers are not called. To correct this, clear the flag unconditionally after EEH processing is complete. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh_driver.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH v2 10/13] powerpc/eeh: Introduce eeh_set_channel_state()

2018-05-24 Thread Sam Bobroff
To ease future refactoring, extract setting of the channel state from the report functions out into their own functions. This increases the amount of code that is identical across all of the report functions. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/

[PATCH v2 05/13] powerpc/eeh: Strengthen types of eeh traversal functions

2018-05-24 Thread Sam Bobroff
The traversal functions eeh_pe_traverse() and eeh_pe_dev_traverse() both provide their first argument as void * but every single user casts it to the expected type. Change the type of the first parameter from void * to the appropriate type, and clean up all uses. Signed-off-by: Sam Bobroff

[PATCH v2 08/13] powerpc/eeh: Introduce eeh_for_each_pe()

2018-05-24 Thread Sam Bobroff
Add a for_each-style macro for iterating through PEs without the boilerplate required by a traversal function. eeh_pe_next() is now exported, as it is now used directly in place. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/include/asm/eeh.h | 4 arch/powerpc/

[PATCH v2 07/13] powerpc/eeh: Clean up pci_ers_result handling

2018-05-24 Thread Sam Bobroff
ependent. Address this by assigning a priority to each result value, and always merging to the highest priority. This renders the intent clear, and provides a stable value for all orderings. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- == v1 -> v2: == * Added the v

[PATCH v2 11/13] powerpc/eeh: Introduce eeh_set_irq_state()

2018-05-24 Thread Sam Bobroff
To ease future refactoring, extract calls to eeh_enable_irq() and eeh_disable_irq() from the various report functions. This makes the report functions initial sequences more similar, as well as making the IRQ changes visible when reading eeh_handle_normal_event(). Signed-off-by: Sam Bobroff

Re: [PATCH v2 07/13] powerpc/eeh: Clean up pci_ers_result handling

2018-06-03 Thread Sam Bobroff
On Sat, Jun 02, 2018 at 01:40:46AM +1000, Michael Ellerman wrote: > Sam Bobroff writes: > > > As EEH event handling progresses, a cumulative result of type > > pci_ers_result is built up by (some of) the eeh_report_*() functions > > using either: > > if (rc == P

[PATCH 06/13] powerpc/eeh: Add message when PE processing at parent

2018-05-02 Thread Sam Bobroff
To aid debugging, add a message to show when EEH processing for a PE will be done at the device's parent, rather than directly at the device. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH 07/13] powerpc/eeh: Clean up pci_ers_result handling

2018-05-02 Thread Sam Bobroff
ependent. Address this by assigning a priority to each result value, and always merging to the highest priority. This renders the intent clear, and provides a stable value for all orderings. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh

[PATCH 13/13] powerpc/eeh: Refactor report functions

2018-05-02 Thread Sam Bobroff
The EEH report functions now share a fair bit of code around the start and end of each function. So factor out as much as possible, and move the traversal into a custom function. This also allows accurate debug to be generated more easily. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.

[PATCH 01/13] powerpc/eeh: Add eeh_max_freezes to initial EEH log line

2018-05-02 Thread Sam Bobroff
. Also remove the embedded newline from the existing message to make it easier to grep for. Signed-off-by: Sam Bobroff <sbobr...@linux.ibm.com> --- arch/powerpc/kernel/eeh_driver.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c

  1   2   3   4   >