Re: [PATCH] powerpc/kvmbook3s_hv: propagate H_SET_MODE to the host

2013-09-25 Thread Greg Kurz
...@linux.vnet.ibm.com Tested-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kvm/book3s_hv.c |8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 998cad3..4a47c74 100644 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch

[PATCH] [RFC] powerpc/vphn: fix endian issue in NUMA device node code

2014-10-02 Thread Greg Kurz
from the packed array with shifts, in order to be endian neutral - convert the resulting values to be32 as expected Suggested-by: Anton Blanchard an...@samba.org Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- I could test this code in a userland program and obtain the same result

Re: [PATCH] [RFC] powerpc/vphn: fix endian issue in NUMA device node code

2014-10-03 Thread Greg Kurz
On Thu, 2 Oct 2014 16:43:41 -0700 Nishanth Aravamudan n...@linux.vnet.ibm.com wrote: On 02.10.2014 [23:59:15 +0200], Greg Kurz wrote: The associativity domain numbers are obtained from the hypervisor through registers and written into memory by the guest: the packed array passed

[PATCH v2] powerpc/vphn: fix endian issue in NUMA device node code

2014-10-03 Thread Greg Kurz
from the packed array with shifts, in order to be endian neutral - convert the resulting values to be32 as expected Suggested-by: Anton Blanchard an...@samba.org Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes in v2: - removed the left out __be16 *field declaration - removed

Re: [v2] powerpc/vphn: fix endian issue in NUMA device node code

2014-10-10 Thread Greg Kurz
On Tue, 7 Oct 2014 20:28:23 +1100 (EST) Michael Ellerman m...@ellerman.id.au wrote: On Fri, 2014-03-10 at 09:13:17 UTC, Greg Kurz wrote: The associativity domain numbers are obtained from the hypervisor through registers and written into memory by the guest: the packed array passed

[PATCH v3] powerpc/vphn: NUMA node code expects big-endian

2014-10-15 Thread Greg Kurz
(). Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Changes in v3: - dropped the complicated bit-shift based solution as requested by Michael Ellerman arch/powerpc/mm/numa.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 649666d

[PATCH] hwrng: pseries - port to new read API and fix stack corruption

2014-10-31 Thread Greg Kurz
: - pass an intermediate well sized buffer to plpar_hcall(). This is acceptalbe since we're not on a hot path. - move to the new read API so that we know the return buffer size for sure. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Cc'ing stable as I could reproduce back to 3.15.10

Re: [PATCH] hwrng: pseries - port to new read API and fix stack corruption

2014-10-31 Thread Greg Kurz
On Fri, 31 Oct 2014 18:00:12 +1100 Michael Ellerman m...@ellerman.id.au wrote: On Fri, 2014-10-31 at 07:50 +0100, Greg Kurz wrote: The add_early_randomness() function in drivers/char/hw_random/core.c passes a 16-byte buffer to pseries_rng_data_read(). Unfortunately, plpar_hcall() returns

[PATCH 0/3] VPHN parsing fixes

2014-11-12 Thread Greg Kurz
The following commit fixed an endianness issue in the VPHN code: commit 5c9fb1899400096c6818181c525897a31d57e488 Author: Greg Kurz gk...@linux.vnet.ibm.com Date: Wed Oct 15 12:42:58 2014 +0200 powerpc/vphn: NUMA node code expects big-endian It was discussed at the time that we should

[PATCH 3/3] powerpc/vphn: move endianness fixing to vphn_unpack_associativity()

2014-11-12 Thread Greg Kurz
. It requires extra checking to know when fixing is needed though. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/numa.c | 42 +- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c

[PATCH REPOST 0/3] VPHN parsing fixes

2014-11-17 Thread Greg Kurz
Repost with Cc: for Michael and Ben... The following commit fixed an endianness issue in the VPHN code: commit 5c9fb1899400096c6818181c525897a31d57e488 Author: Greg Kurz gk...@linux.vnet.ibm.com Date: Wed Oct 15 12:42:58 2014 +0200 powerpc/vphn: NUMA node code expects big-endian

[PATCH REPOST 1/3] powerpc/vphn: clarify the H_HOME_NODE_ASSOCIATIVITY API

2014-11-17 Thread Greg Kurz
The number of values returned by the H_HOME_NODE_ASSOCIATIVITY h_call deserves to be explicitly defined, for a better understanding of the code. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/numa.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[PATCH REPOST 2/3] powerpc/vphn: simplify the parsing code

2014-11-17 Thread Greg Kurz
with ones and no code in arch/powerpc/mm/numa.c seems to expect the associativity array to be padded either. This patch simply ends the parsing when we reach the first unused field. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/numa.c | 20 1 file

[PATCH] powerpc: drop useless warning in eeh_init()

2014-11-25 Thread Greg Kurz
hitting an error, it is not needed to print more (especially such an uninformative message). Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kernel/eeh.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel

Re: [PATCH REPOST 3/3] powerpc/vphn: move endianness fixing to vphn_unpack_associativity()

2014-11-27 Thread Greg Kurz
On Thu, 27 Nov 2014 10:39:23 +1100 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Mon, 2014-11-17 at 18:42 +0100, Greg Kurz wrote: The first argument to vphn_unpack_associativity() is a const long *, but the parsing code expects __be64 values actually. This is inconsistent. We

Re: [PATCH REPOST 3/3] powerpc/vphn: move endianness fixing to vphn_unpack_associativity()

2014-11-28 Thread Greg Kurz
On Fri, 28 Nov 2014 12:49:08 +1100 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Thu, 2014-11-27 at 10:28 +0100, Greg Kurz wrote: On Thu, 27 Nov 2014 10:39:23 +1100 Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Mon, 2014-11-17 at 18:42 +0100, Greg Kurz wrote

[PATCH] powerpc/le: fix endianness of the arguments passed to the ppc_rtas() syscall

2014-03-05 Thread Greg Kurz
RTAS manipulates its input and output arguments in big endian order. I have looked at factoring some lines with rtas_call() but it is not really worth it because of the variable arguments. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kernel/rtas.c | 15 +-- 1

[PATCH] powerpc/le: big endian arguments for ppc_rtas()

2014-03-19 Thread Greg Kurz
to RTAS, it is far better to stick with a simple rationale: ppc_rtas() should be called with a big endian rtas_args structure. With this patch, it is now up to userspace to forge big endian arguments, as expected by RTAS. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Ben, The chunk

[PATCH] powerpc/le: enable RTAS events support

2014-03-28 Thread Greg Kurz
The current kernel code assumes big endian and parses RTAS events all wrong. The most visible effect is that we cannot honor EPOW events, meaning, for example, we cannot shut down a guest properly from the hypervisor. This patch fixes that. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-28 Thread Greg Kurz
On Fri, 28 Mar 2014 09:29:22 +0100 Laurent Dufour laurent.duf...@fr.ibm.com wrote: On 28/03/2014 08:33, Greg Kurz wrote: The current kernel code assumes big endian and parses RTAS events all wrong. The most visible effect is that we cannot honor EPOW events, meaning, for example, we cannot

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-28 Thread Greg Kurz
where the scope variable is not originally big endian. -Nathan Nathan, rtas_call() in arch/powerpc/kernel/rtas.c already does the conversion for us. Thanks. On 03/28/2014 02:33 AM, Greg Kurz wrote: The current kernel code assumes big endian and parses RTAS events all wrong. The most

Re: [PATCH] powerpc/le: enable RTAS events support

2014-03-31 Thread Greg Kurz
On Mon, 31 Mar 2014 09:27:16 +1100 Stewart Smith stew...@linux.vnet.ibm.com wrote: Greg Kurz gk...@linux.vnet.ibm.com writes: struct rtas_error_log { +#ifdef __BIG_ENDIAN__ + /* Byte 0 */ unsigned long version:8;/* Architectural version */ + /* Byte 1 */ I

Re: [RFC PATCH] powerpc/le: enable RTAS events support

2014-04-02 Thread Greg Kurz
On Tue, 1 Apr 2014 12:26:32 +0200 Geert Uytterhoeven ge...@linux-m68k.org wrote: On Mon, Mar 31, 2014 at 5:02 PM, Nathan Fontenot nf...@linux.vnet.ibm.com wrote: struct rtas_error_log { - unsigned long version:8;/* Architectural version */ - unsigned long

[PATCH v2] powerpc/le: enable RTAS events support

2014-04-04 Thread Greg Kurz
fields in the RTAS event structures (even the unused ones, for consistency). We also introduce endian safe accessors for the fields used by the kernel (trivial rtas_error_type() accessor added for consistency). Cc: Nathan Fontenot nf...@linux.vnet.ibm.com Signed-off-by: Greg Kurz gk

Re: [PATCH V2] powerpc/kvm/book3s_hv: propagate H_SET_MODE_RESOURCE_LE to the host

2013-09-27 Thread Greg Kurz
-by: Laurent Dufour lduf...@linux.vnet.ibm.com --- Tested-by: Greg Kurz gk...@linux.vnet.ibm.com arch/powerpc/kvm/book3s_hv.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c index 998cad3..be0af39 100644

[PATCH] powerpc: remove the smt-enabled kernel parameter

2014-12-03 Thread Greg Kurz
simplification like killing the cpu_bootable hook. Please give advice anyone. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kernel/setup_64.c | 51 +--- 1 file changed, 12 insertions(+), 39 deletions(-) diff --git a/arch/powerpc/kernel

Re: [PATCH] powerpc: drop useless warning in eeh_init()

2014-12-03 Thread Greg Kurz
On Wed, 26 Nov 2014 09:28:47 +1100 Gavin Shan gws...@linux.vnet.ibm.com wrote: On Tue, Nov 25, 2014 at 05:10:06PM +0100, Greg Kurz wrote: This is what we get in dmesg when booting a pseries guest and the hypervisor doesn't provide EEH support. [0.166655] EEH functionality not supported

Re: [PATCH] powerpc: drop useless warning in eeh_init()

2014-12-04 Thread Greg Kurz
On Thu, 04 Dec 2014 11:32:45 +1100 Michael Ellerman m...@ellerman.id.au wrote: On Thu, 2014-12-04 at 09:14 +1100, Gavin Shan wrote: On Wed, Dec 03, 2014 at 03:20:46PM +0100, Greg Kurz wrote: On Wed, 26 Nov 2014 09:28:47 +1100 Gavin Shan gws...@linux.vnet.ibm.com wrote: On Tue, Nov 25

[PATCH 2 0/4] powerpc: don't mess with SMT at boot time

2014-12-05 Thread Greg Kurz
As requested by mpe, this series now covers both the smt-enabled kernel parameter and the ibm,smt-enabled property. The cleanup was split into 3 separate patches to ease review, but I guess they could be folded into a single patch as well. --- Greg Kurz (4): powerpc: drop the ability

[PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-05 Thread Greg Kurz
is to start all hw threads. That leaves /sys the only supported API to change SMT settings. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- v2: also drop ibm,smt-enabled arch/powerpc/kernel/setup_64.c | 46 1 file changed, 46 deletions(-) diff --git

[PATCH 2 2/4] powerpc: drop smt_enabled_at_boot

2014-12-05 Thread Greg Kurz
| if (smt_enabled_at_boot It appears that smt_enabled_at_boot is just a duplicate of threads_per_core. Let's drop it. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |2 -- arch/powerpc/kernel

[PATCH 2 3/4] powerpc: drop smp_generic_cpu_bootable()

2014-12-05 Thread Greg Kurz
The following assertions are always true: - threads_per_core 0 - cpu (threads_per_core - 1) threads_per_core It means smp_generic_cpu_bootable() always returns true. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/kernel/smp.c | 11 --- 1 file changed, 11

[PATCH 2 4/4] powerpc: drop the cpu_bootable hook

2014-12-05 Thread Greg Kurz
All powerpc platforms share the same cpu_bootable hook, which does nothing but { return 1 }. It is not needed anymore. Let's drop it at last. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/include/asm/smp.h |1 - arch/powerpc/kernel/smp.c|3 +-- arch

Re: [PATCH 2 3/4] powerpc: drop smp_generic_cpu_bootable()

2014-12-05 Thread Greg Kurz
Subject should read powerpc: drop useless code in smp_generic_cpu_bootable() actually... On Fri, 05 Dec 2014 16:15:12 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: The following assertions are always true: - threads_per_core 0 - cpu (threads_per_core - 1) threads_per_core It means

[PATCH] powerpc: drop the cpu_bootable hook

2014-12-05 Thread Greg Kurz
All powerpc platforms share the same cpu_bootable hook, which does nothing but { return 1 }. It is not needed anymore. Let's drop it at last. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- v3: drop smp_generic_cpu_bootable() as well I knew that posting a few minutes before leaving is bad

Re: [PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-08 Thread Greg Kurz
On Fri, 5 Dec 2014 12:52:45 -0600 Scott Wood scottw...@freescale.com wrote: On Fri, 2014-12-05 at 16:14 +0100, Greg Kurz wrote: The smt-enabled kernel parameter basically leaves unwanted cpus executing in firmware or wherever they happen to be. The very same applies to the ibm,smt-enabled

Re: [PATCH 2 1/4] powerpc: drop the ability to tweak SMT mode at boot time

2014-12-09 Thread Greg Kurz
On Tue, 09 Dec 2014 15:11:02 +1100 Michael Ellerman m...@ellerman.id.au wrote: On Fri, 2014-12-05 at 12:52 -0600, Scott Wood wrote: On Fri, 2014-12-05 at 16:14 +0100, Greg Kurz wrote: The smt-enabled kernel parameter basically leaves unwanted cpus executing in firmware or wherever

[PATCH] powerpc/powernv: force all CPUs to be bootable

2014-12-12 Thread Greg Kurz
The subcore logic needs all the CPUs declared in the DT to be bootable, otherwise the kernel hangs at boot time. Since subcore support starts with POWER8, we can keep the current behaviour for older CPUs. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- Since smt-enabled is still needed

[PATCH v2 3/4] powerpc/vphn: move VPHN parsing logic to a separate file

2014-12-17 Thread Greg Kurz
The goal behind this patch is to be able to write userland tests for the VPHN parsing code. Suggested-by: Michael Ellerman m...@ellerman.id.au Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/Makefile |1 + arch/powerpc/mm/numa.c | 61

[PATCH v2 0/4] VPHN parsing fixes

2014-12-17 Thread Greg Kurz
); print_unpacked(unpacked); } return 0; } --- Greg Kurz (4): powerpc/vphn: clarify the H_HOME_NODE_ASSOCIATIVITY API powerpc/vphn: move endianness fixing to vphn_unpack_associativity() powerpc/vphn: move VPHN parsing logic to a separate file powerpc/vphn: parsing

[PATCH v2 1/4] powerpc/vphn: clarify the H_HOME_NODE_ASSOCIATIVITY API

2014-12-17 Thread Greg Kurz
The number of values returned by the H_HOME_NODE_ASSOCIATIVITY h_call deserves to be explicitly defined, for a better understanding of the code. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- No changes in v2. arch/powerpc/mm/numa.c |8 ++-- 1 file changed, 6 insertions(+), 2

[PATCH v2 4/4] powerpc/vphn: parsing code rewrite

2014-12-17 Thread Greg Kurz
packed into 6 64-bit registers. According to PAPR+, the domain identifiers may be streamed as 16-bit values. Let's increase the number of expected numbers to 24. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/vphn.c | 54

[PATCH v2 2/4] powerpc/vphn: move endianness fixing to vphn_unpack_associativity()

2014-12-17 Thread Greg Kurz
The first argument to vphn_unpack_associativity() is a const long *, but the parsing code expects __be64 values actually. Let's move the endian fixing down for consistency. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- v2: only move the endian fixing. The logic is reworked in another

Re: [PATCH] powerpc/powernv: force all CPUs to be bootable

2014-12-19 Thread Greg Kurz
On Fri, 12 Dec 2014 12:37:40 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: The subcore logic needs all the CPUs declared in the DT to be bootable, otherwise the kernel hangs at boot time. Since subcore support starts with POWER8, we can keep the current behaviour for older CPUs. Signed

Re: [PATCH v2 0/4] VPHN parsing fixes

2015-02-02 Thread Greg Kurz
On Tue, 03 Feb 2015 13:47:35 +1100 Michael Ellerman m...@ellerman.id.au wrote: On Thu, 2015-01-29 at 19:03 +0100, Greg Kurz wrote: On Wed, 17 Dec 2014 10:40:46 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: Hi, This series addresses remarks from Ben and Michael (see individual

Re: [PATCH v2 0/4] VPHN parsing fixes

2015-01-29 Thread Greg Kurz
On Wed, 17 Dec 2014 10:40:46 +0100 Greg Kurz gk...@linux.vnet.ibm.com wrote: Hi, This series addresses remarks from Ben and Michael (see individual patches). The most notable changes are: - the parsing code being pull out into a separate file in patch 3/4. This allows to write userland

Re: [PATCH v3 4/5] powerpc/vphn: parsing code rewrite

2015-03-17 Thread Greg Kurz
On Tue, 17 Mar 2015 15:20:50 +0530 Anshuman Khandual khand...@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/mm/vphn.h b/arch/powerpc/mm/vphn.h index 96af9a4..fe8b780 100644 --- a/arch/powerpc/mm/vphn.h +++ b/arch/powerpc/mm/vphn.h @@ -6,10 +6,10 @@ #define VPHN_REGISTER_COUNT 6

Re: [PATCH v4 5/5] selftests/powerpc: Add test for VPHN

2015-03-17 Thread Greg Kurz
On Tue, 17 Mar 2015 15:21:29 +1100 Michael Ellerman m...@ellerman.id.au wrote: From: Greg Kurz gk...@linux.vnet.ibm.com The goal is to verify vphn_unpack_associativity() parses VPHN numbers correctly. We feed it with a variety of input values and compare with expected results. PAPR+ does

[PATCH v3 1/5] powerpc/vphn: clarify the H_HOME_NODE_ASSOCIATIVITY API

2015-02-23 Thread Greg Kurz
The number of values returned by the H_HOME_NODE_ASSOCIATIVITY h_call deserves to be explicitly defined, for a better understanding of the code. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/numa.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff

[PATCH v3 0/5] VPHN parsing fixes

2015-02-23 Thread Greg Kurz
Michael, As suggested in... https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-February/124647.html ... I repost the whole series with an extra patch to implement selftests for VPHN (this is the only change between v2 and v3). Please review. --- Greg Kurz (5): powerpc/vphn: clarify

[PATCH v3 3/5] powerpc/vphn: move VPHN parsing logic to a separate file

2015-02-23 Thread Greg Kurz
The goal behind this patch is to be able to write userland tests for the VPHN parsing code. Suggested-by: Michael Ellerman m...@ellerman.id.au Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/Makefile |1 + arch/powerpc/mm/numa.c | 61

[PATCH v3 2/5] powerpc/vphn: move endianness fixing to vphn_unpack_associativity()

2015-02-23 Thread Greg Kurz
The first argument to vphn_unpack_associativity() is a const long *, but the parsing code expects __be64 values actually. Let's move the endian fixing down for consistency. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/numa.c | 10 ++ 1 file changed, 6

[PATCH v3 5/5] selftests, powerpc: Add test for VPHN

2015-02-23 Thread Greg Kurz
dare to say the list is exhaustive though. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- tools/testing/selftests/powerpc/Makefile |2 tools/testing/selftests/powerpc/utils.h |1 tools/testing/selftests/powerpc/vphn/.gitignore |1 tools/testing/selftests

[PATCH v3 4/5] powerpc/vphn: parsing code rewrite

2015-02-23 Thread Greg Kurz
packed into 6 64-bit registers. According to PAPR+, the domain identifiers may be streamed as 16-bit values. Let's increase the number of expected numbers to 24. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- arch/powerpc/mm/vphn.c | 54

Re: [PATCH] fbuffer: improve toggle cursor performance

2015-05-27 Thread Greg Kurz
On Wed, 27 May 2015 10:41:06 +0530 Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: Greg Kurz gk...@linux.vnet.ibm.com writes: SLOF currently calls hv-logical-load and hv-logical-store for every pixel when enabling or disabling the cursor. This is suboptimal when writing one char

Re: [PATCH] fbuffer: improve toggle cursor performance

2015-05-27 Thread Greg Kurz
On Wed, 27 May 2015 07:59:34 +0200 Thomas Huth th...@redhat.com wrote: On Wed, 27 May 2015 02:11:13 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: SLOF currently calls hv-logical-load and hv-logical-store for every pixel when enabling or disabling the cursor. This is suboptimal when

[PATCH] fbuffer: improve toggle cursor performance

2015-05-26 Thread Greg Kurz
a menu entry... the result is an incredibly slow and barely usable interface. The inner loop in fb8-toggle-cursor handles a contiguous region: it can be converted to hv-logical-memop. The result is 32 times less hcalls per char and a serious improvement in grub usability. Signed-off-by: Greg Kurz gk

[PATCH 0/3] fbuffer: performance improvement + code cleanup

2015-05-28 Thread Greg Kurz
board-qemu already uses hv-logical-memop, but it allows to unify hcall-invert-screen and fb8-invert-screen again. Please comment. --- Greg Kurz (3): fbuffer: simplify address computations in fb8-toggle-cursor fbuffer: introduce the invert-region helper fbuffer: introduce

[PATCH 2/3] fbuffer: introduce the invert-region helper

2015-05-28 Thread Greg Kurz
graphical settings on board-qemu, we go from 512 hcall invocations per character down to 16. Suggested-by: Thomas Huth th...@redhat.com Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- board-js2x/slof/helper.fs |4 board-qemu/slof/helper.fs |3 +++ slof/fs/fbuffer.fs|2

[PATCH 1/3] fbuffer: simplify address computations in fb8-toggle-cursor

2015-05-28 Thread Greg Kurz
-width screen-depth * - address adjustment. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- slof/fs/fbuffer.fs |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slof/fs/fbuffer.fs b/slof/fs/fbuffer.fs index 756f05a..faae6a9 100644 --- a/slof/fs/fbuffer.fs +++ b/slof/fs

[PATCH 3/3] fbuffer: introduce the invert-region-x helper

2015-05-28 Thread Greg Kurz
This patch simply moves the slow RX based logic from fb8-invert-screen to board-js2x helpers and implement a fast hv-logical-memop based helper for board-qemu. And we can drop hcall-invert-screen ! Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- board-js2x/slof/helper.fs

Re: powerpc/pseries: start rtasd before PCI probing

2016-06-10 Thread Greg Kurz
On Fri, 10 Jun 2016 15:18:32 +1000 (AEST) Michael Ellerman <m...@ellerman.id.au> wrote: > On Mon, 2016-23-05 at 08:28:28 UTC, Greg Kurz wrote: > > A strange behaviour is observed when comparing PCI hotplug in QEMU, between > > x86 and pseries. If you consider the following st

Re: [Qemu-ppc] [PATCH] powerpc/pseries: start rtasd before PCI probing

2016-05-30 Thread Greg Kurz
On Mon, 23 May 2016 10:28:28 +0200 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > A strange behaviour is observed when comparing PCI hotplug in QEMU, between > x86 and pseries. If you consider the following steps: > - start a VM > - add a PCI device via the QEMU monitor be

Re: [Qemu-ppc] [PATCH v2] powerpc/pseries: start rtasd before PCI probing

2016-06-21 Thread Greg Kurz
On Wed, 15 Jun 2016 22:26:41 +0200 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > A strange behaviour is observed when comparing PCI hotplug in QEMU, between > x86 and pseries. If you consider the following steps: > - start a VM > - add a PCI device via the QEMU monitor be

[PATCH v2] powerpc/pseries: start rtasd before PCI probing

2016-06-15 Thread Greg Kurz
they cannot be run before fs_initcall. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- v2: - avoid behaviour change: don't create the proc entry if early init failed Michael, This was also tested under PowerVM: it doesn't fix anything there because the HMC tells it won't honor DLPAR fe

Re: powerpc/pseries: start rtasd before PCI probing

2016-05-23 Thread Greg Kurz
On Mon, 23 May 2016 20:23:19 +0200 Thomas Huth <th...@redhat.com> wrote: > On 23.05.2016 10:28, Greg Kurz wrote: > > A strange behaviour is observed when comparing PCI hotplug in QEMU, between > > x86 and pseries. If you consider the following steps: > > - start a VM

[PATCH] powerpc/pseries: start rtasd before PCI probing

2016-05-23 Thread Greg Kurz
they cannot be run before fs_initcall. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- arch/powerpc/kernel/rtasd.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index e864b7

[PATCH] powerpc/pseries: fix trivial typo in function name

2016-05-21 Thread Greg Kurz
Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- arch/powerpc/kernel/rtasd.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c index 5a2c049c1c61..b6e7a935d8b0 100644 --- a/arch/powerpc/kernel/r

Re: [Qemu-ppc] [PATCH v2] powerpc/pseries: start rtasd before PCI probing

2016-07-07 Thread Greg Kurz
Ping ? On Tue, 21 Jun 2016 11:02:01 +0200 Greg Kurz <gr...@kaod.org> wrote: > On Wed, 15 Jun 2016 22:26:41 +0200 > Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > > > A strange behaviour is observed when comparing PCI hotplug in QEMU, between > > x86 and pseri

Re: [PATCH] cxl: drop unused header asm/pnv-pci.h

2017-01-24 Thread Greg Kurz
On Tue, 24 Jan 2017 20:57:06 +1100 Michael Ellerman <m...@ellerman.id.au> wrote: > Greg Kurz <gr...@kaod.org> writes: > > > The kernel API does not use anything from this header file. > > That's actually hard to prove in general, because pnv-pci.h includes >

[PATCH] cxl: drop unused header asm/pnv-pci.h

2017-01-19 Thread Greg Kurz
The kernel API does not use anything from this header file. Signed-off-by: Greg Kurz <gr...@kaod.org> --- drivers/misc/cxl/api.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/misc/cxl/api.c b/drivers/misc/cxl/api.c index 1b35e33d2434..bcc030eacab7 100644 --- a/drivers/mi

[PATCH] mail: improve bash completion

2016-11-28 Thread Greg Kurz
This adds completion of the --to, --cc and --bcc options based on the content of the [mail "alias"] section of GIT configuration files. Signed-off-by: Greg Kurz <gr...@kaod.org> --- stgit/argparse.py |1 + stgit/commands/mail.py |6 +++--- stgit/completion.py|

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-09-15 Thread Greg Kurz
On Fri, 15 Sep 2017 07:52:49 +0200 Greg Kurz <gr...@kaod.org> wrote: > Dang! The mail relay at OVH has blacklisted Paul's address :-\ > > <pau...@samba.org>: host smtp.samba.org[144.76.82.148] said: 550-blacklisted > at > zen.spamhaus.org 550 https://www.spamh

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-09-14 Thread Greg Kurz
017 10:48:39 +1000 David Gibson <da...@gibson.dropbear.id.au> wrote: > On Thu, Sep 14, 2017 at 11:56:25PM +0200, Greg Kurz wrote: > > The following program causes a kernel oops: > > > > #include > > #include > > #include > > #include > > #i

[PATCH] KVM: PPC: Book3S PR: only call slbmte for valid SLB entries

2017-09-22 Thread Greg Kurz
its SLB array and only restore valid ones, but the 0th one is now gone and we cannot access the corresponding memory anymore: (qemu) x/x $pc c00b742c: Cannot access memory To avoid this, let's filter out non-valid SLB entries, like we already do for Book3S HV. Signed-off-by: Greg Kurz <

[PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-09-14 Thread Greg Kurz
C_HTM") Cc: sta...@vger.kernel.org # v4.7+ Signed-off-by: Greg Kurz <gr...@kaod.org> --- arch/powerpc/kvm/powerpc.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 3480faaf1ef8..ee279c7f4802 100644 --- a/arch/powerp

[PATCH v3] KVM: PPC: Book3S PR: only install valid SLBs during KVM_SET_SREGS

2017-10-16 Thread Greg Kurz
entries. Since SLB is for 64-bit only, we now build this path conditionally to avoid a build break on 32-bit, which doesn't define SLB_ESID_V. Signed-off-by: Greg Kurz <gr...@kaod.org> --- v3: - build SLB path for 64-bit only [*] - add blank line after declaration of rb and rs to s

Re: [PATCH v2] KVM: PPC: Book3S PR: only install valid SLBs during KVM_SET_SREGS

2017-10-13 Thread Greg Kurz
Ping ? On Mon, 02 Oct 2017 10:40:22 +0200 Greg Kurz <gr...@kaod.org> wrote: > Userland passes an array of 64 SLB descriptors to KVM_SET_SREGS, > some of which are valid (ie, SLB_ESID_V is set) and the rest are > likely all-zeroes (with QEMU at least). > > Each o

[PATCH v2] KVM: PPC: Book3S PR: only install valid SLBs during KVM_SET_SREGS

2017-10-02 Thread Greg Kurz
entries. Signed-off-by: Greg Kurz <gr...@kaod.org> --- v2: - flush SLB before installing new entries --- arch/powerpc/kvm/book3s_pr.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c index 3beb4f

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-10-12 Thread Greg Kurz
On Thu, 12 Oct 2017 22:27:54 +1100 Michael Ellerman <m...@ellerman.id.au> wrote: > Greg Kurz <gr...@kaod.org> writes: > > The following program causes a kernel oops: > > > > #include > > #include > > #include > > #include > > #incl

Re: [PATCH] KVM: PPC: fix oops when checking KVM_CAP_PPC_HTM

2017-10-12 Thread Greg Kurz
Ping ? On Thu, 14 Sep 2017 23:56:25 +0200 Greg Kurz <gr...@kaod.org> wrote: > The following program causes a kernel oops: > > #include > #include > #include > #include > #include > > main() > { > int fd = open("/dev/kvm", O_RDWR); >

Re: [RFC PATCH kernel] KVM: PPC: Book3S PR: Fix WIMG handling under pHyp

2017-11-23 Thread Greg Kurz
ical page number else H_Parameter return. (For System Memory pages WIMG=0010, or, 1110 if the SAO option is enabled, and for IO pages WIMG=01**.) I'm not aware we care for SAO so HPTE_R_M looks like the only sensible choice, or I'm missing something ? Anyway, this patch allows to start a PR g

Re: [PATCH] KVM: PPC: Book3S: Add capabilities for Meltdown/Spectre workarounds

2018-01-09 Thread Greg Kurz
On Tue, 9 Jan 2018 23:44:56 +1100 Alexey Kardashevskiy wrote: > On 09/01/18 19:39, Suraj Jitindar Singh wrote: [...] > >> + rc = plpar_get_cpu_characteristics(); > >> + if (rc == H_SUCCESS) { > >> + if (!(c.behavior & > > > > s/behavior/behaviour > > Why? >

Re: [PATCH] KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-22 Thread Greg Kurz
On Fri, 22 Dec 2017 22:22:08 +1100 Michael Ellerman wrote: > Paul Mackerras writes: > > > On Fri, Dec 22, 2017 at 03:34:20PM +1100, Michael Ellerman wrote: > >> Laurent Vivier writes: > >> > >> > On 12/12/2017 13:02, Cédric Le

Re: [PATCH] KVM: PPC: Book3S: fix XIVE migration of pending interrupts

2017-12-22 Thread Greg Kurz
On Fri, 22 Dec 2017 12:58:47 +0100 Greg Kurz <gr...@kaod.org> wrote: > On Fri, 22 Dec 2017 22:22:08 +1100 > Michael Ellerman <m...@ellerman.id.au> wrote: > > > Paul Mackerras <pau...@ozlabs.org> writes: [...] > > > > > > Thanks for doing that.

Re: [PATCH] ocxl: Fix endiannes bug in ocxl_link_update_pe()

2018-12-20 Thread Greg Kurz
On Mon, 17 Dec 2018 11:38:51 +1100 "Alastair D'Silva" wrote: > On Sun, 2018-12-16 at 22:28 +0100, Greg Kurz wrote: > > All fields in the PE are big-endian. Use cpu_to_be32() like > > everywhere > > else something is written to the PE. Otherwise a wrong TID

Re: [PATCH v2] ocxl: Fix endiannes bug in read_afu_name()

2018-12-20 Thread Greg Kurz
On Wed, 12 Dec 2018 13:26:10 +1100 Andrew Donnellan wrote: > On 12/12/18 4:58 am, Greg Kurz wrote: > > The AFU Descriptor Template in the PCI config space has a Name Space > > field which is a 24 Byte ASCII character string of descriptive name > > space for the AFU.

Re: [PATCH] ocxl/afu_irq: Don't include

2018-12-20 Thread Greg Kurz
On Tue, 11 Dec 2018 11:09:39 +1100 Andrew Donnellan wrote: > Acked-by: Andrew Donnellan > Friendly ping before Xmas break :) > On 11/12/18 2:13 am, Greg Kurz wrote: > > The AFU irq code doesn't need to reach out to the platform. > > > > Signed-off-by: Greg Kurz

Re: [PATCH] ocxl: Clarify error path in setup_xsl_irq()

2018-12-20 Thread Greg Kurz
On Tue, 11 Dec 2018 11:19:55 +1100 Andrew Donnellan wrote: > On 11/12/18 2:18 am, Greg Kurz wrote: > > Implementing rollback with goto and labels is a common practice that > > leads to prettier and more maintainable code. FWIW, this design pattern > > is already being used

Re: [PATCH] ocxl: Simplify free_spa()

2018-12-11 Thread Greg Kurz
On Tue, 11 Dec 2018 20:13:21 +1100 Andrew Donnellan wrote: > On 11/12/18 7:57 pm, Greg Kurz wrote: > > I now realize that I should have mentioned the real motivation for this > > change. I'm working on refactoring the code so that we can use ocxl in a > > KVM guest. Th

Re: [PATCH] ocxl: Fix endiannes bug in read_afu_name()

2018-12-11 Thread Greg Kurz
On Tue, 11 Dec 2018 11:24:08 +1100 Andrew Donnellan wrote: > On 11/12/18 11:05 am, Andrew Donnellan wrote: > > On 11/12/18 2:10 am, Greg Kurz wrote: > >> The double word returned by read_afu_info(OCXL_DVSEC_TEMPL_NAME) contains > >> four characters of the AFU nam

Re: [PATCH] ocxl: Simplify free_spa()

2018-12-11 Thread Greg Kurz
On Tue, 11 Dec 2018 12:05:49 +1100 Andrew Donnellan wrote: > On 11/12/18 2:15 am, Greg Kurz wrote: > > The only users of free_spa() are alloc_link() and free_link(), and > > in both cases: > > > > - link->spa != NULL > > > > - free_spa(

[PATCH v2] ocxl: Fix endiannes bug in read_afu_name()

2018-12-11 Thread Greg Kurz
# v4.16 Signed-off-by: Greg Kurz Acked-by: Frederic Barrat --- v2: - silence sparse with (__force __le32) cast - new changelog --- drivers/misc/ocxl/config.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/config.c b/drivers/misc/ocxl/config.c index

[PATCH] ocxl: Fix endiannes bug in ocxl_link_update_pe()

2018-12-16 Thread Greg Kurz
. The likely outcome of this is the NPU not finding the target thread and forcing the AFU into sending an interrupt, which userspace is supposed to handle anyway. Fixes: e948e06fc63a ("ocxl: Expose the thread_id needed for wait on POWER9") Cc: sta...@vger.kernel.org # v4.18 Signed-off-by:

[PATCH] ocxl: Fix endiannes bug in read_afu_name()

2018-12-10 Thread Greg Kurz
this with le32_to_cpu(). Signed-off-by: Greg Kurz --- drivers/misc/ocxl/config.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ocxl/config.c b/drivers/misc/ocxl/config.c index 57a6bb1fd3c9..b76198ba8630 100644 --- a/drivers/misc/ocxl/config.c +++ b/drivers

[PATCH] ocxl: Clarify error path in setup_xsl_irq()

2018-12-10 Thread Greg Kurz
Implementing rollback with goto and labels is a common practice that leads to prettier and more maintainable code. FWIW, this design pattern is already being used in alloc_link() a few lines below in this file. Do the same in setup_xsl_irq(). Signed-off-by: Greg Kurz --- drivers/misc/ocxl

[PATCH] ocxl: Simplify free_spa()

2018-12-10 Thread Greg Kurz
The only users of free_spa() are alloc_link() and free_link(), and in both cases: - link->spa != NULL - free_spa(link) is immediatly followed by kfree(link) The check isn't needed, and it doesn't bring much to clear the link->spa pointer. Drop both. Signed-off-by: Greg Kurz --- driver

[PATCH] ocxl/afu_irq: Don't include

2018-12-10 Thread Greg Kurz
The AFU irq code doesn't need to reach out to the platform. Signed-off-by: Greg Kurz --- drivers/misc/ocxl/afu_irq.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c index e70cfa24577f..11ab996657a2 100644 --- a/drivers/misc/ocxl

Re: [PATCH] powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group()

2019-01-10 Thread Greg Kurz
On Thu, 10 Jan 2019 23:25:11 +1100 Michael Ellerman wrote: > Greg Kurz writes: > > On Wed, 9 Jan 2019 17:45:53 +0100 > > Frederic Barrat wrote: > > > >> Le 09/01/2019 à 17:25, Greg Kurz a écrit : > >> > On Wed, 9 Jan 2019 16

Re: [PATCH] powerpc/powernv/npu: Fix oops in pnv_try_setup_npu_table_group()

2019-01-09 Thread Greg Kurz
t; > Fixes: 0bd971676e68 ("powerpc/powernv/npu: Add compound IOMMU groups") > Signed-off-by: Frederic Barrat > --- Reviewed-by: Greg Kurz and Cc: sta...@vger.kernel.org # v4.20 > arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++- > 1 file changed, 2 insertions(+), 1 de

  1   2   3   >