[PATCH] fbuffer: improve toggle cursor performance

2015-05-26 Thread Greg Kurz
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

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 wrote: > Greg Kurz 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 at a time to the cons

Re: [PATCH] fbuffer: improve toggle cursor performance

2015-05-27 Thread Greg Kurz
On Wed, 27 May 2015 07:59:34 +0200 Thomas Huth wrote: > On Wed, 27 May 2015 02:11:13 +0200 > Greg Kurz wrote: > > > 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 >

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

2015-05-28 Thread Greg Kurz
since 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

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

2015-05-28 Thread Greg Kurz
"char-width screen-depth * -" address adjustment. Signed-off-by: Greg Kurz --- 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/fbuf

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

2015-05-28 Thread Greg Kurz
ndard graphical settings on board-qemu, we go from 512 hcall invocations per character down to 16. Suggested-by: Thomas Huth Signed-off-by: Greg Kurz --- board-js2x/slof/helper.fs |4 board-qemu/slof/helper.fs |3 +++ slof/fs/fbuffer.fs|2 +- 3 files changed, 8 insertions(

[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 --- board-js2x/slof/helper.fs |5 + board-qemu

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

2014-10-02 Thread Greg Kurz
array with shifts, in order to be endian neutral - convert the resulting values to be32 as expected Suggested-by: Anton Blanchard Signed-off-by: Greg Kurz --- I could test this code in a userland program and obtain the same result in little and big endian. If the 64-bit packed values are

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

2014-10-02 Thread Greg Kurz
On Thu, 2 Oct 2014 16:43:41 -0700 Nishanth Aravamudan 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

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

2014-10-03 Thread Greg Kurz
array with shifts, in order to be endian neutral - convert the resulting values to be32 as expected Suggested-by: Anton Blanchard Signed-off-by: Greg Kurz --- Changes in v2: - removed the left out __be16 *field declaration - removed the left out be16_to_cpup() call - updated the comment of the

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 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

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

2014-10-15 Thread Greg Kurz
do the 64-bit loads, but this requires some more brain storming. In the meantime, let's go for a suboptimal and temporary bug fix: this patch converts each 64-bit value of the packed array to big endian, as expected by the current parsing code in vphn_unpack_associativity(). Signed-off-by:

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

2014-10-30 Thread Greg Kurz
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 --- Cc'ing stable as I could reproduce back to 3.15.10 drivers/char/hw_random/pseries-rn

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 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() > >

[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 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 the parsing code

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

2014-11-12 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 --- arch/powerpc/mm/numa.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm

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

2014-11-12 Thread Greg Kurz
erty in the DT isn't padded 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 --- arch/powerpc/mm/numa.c | 20 1 f

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

2014-11-12 Thread Greg Kurz
s kept. It requires extra checking to know when fixing is needed though. Signed-off-by: Greg Kurz --- 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 index e30c46

[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 Date: Wed Oct 15 12:42:58 2014 +0200 powerpc/vphn: NUMA node code expects big-endian It was discussed at the time

[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 --- arch/powerpc/mm/numa.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm

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

2014-11-17 Thread Greg Kurz
erty in the DT isn't padded 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 --- arch/powerpc/mm/numa.c | 20 1 f

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

2014-11-17 Thread Greg Kurz
s kept. It requires extra checking to know when fixing is needed though. Signed-off-by: Greg Kurz --- 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 index e30c46

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

2014-11-25 Thread Greg Kurz
when hitting an error, it is not needed to print more (especially such an uninformative message). Signed-off-by: Greg Kurz --- 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/eeh.c index 22

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 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 should

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 wrote: > On Thu, 2014-11-27 at 10:28 +0100, Greg Kurz wrote: > > On Thu, 27 Nov 2014 10:39:23 +1100 > > Benjamin Herrenschmidt wrote: > > > > > On Mon, 2014-11-17 at 18:42 +0100, Greg Kurz wrote:

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

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

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 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 functionalit

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 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 wrote: > > >> On Tue,

[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 to

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

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

[PATCH 2 2/4] powerpc: drop smt_enabled_at_boot

2014-12-05 Thread Greg Kurz
oot | 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 --- arch/powerpc/include/asm/smp.h |2 -- arch/powerpc/kernel/setup_64.

[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 --- arch/powerpc/kernel/smp.c | 11 --- 1 file changed, 11 deletions(-) di

[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 --- arch/powerpc/include/asm/smp.h |1 - arch/powerpc/kernel/smp.c|3 +-- arch/powerpc/platforms

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 wrote: > The following assertions are always true: > - threads_per_core > 0 > - cpu & (threads_per_core - 1) < t

[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 --- v3: drop smp_generic_cpu_bootable() as well I knew that posting a few minutes before leaving is bad idea on fr

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 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,sm

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 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

[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 --- Since smt-enabled is still needed by Freescale, the choice

[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 Signed-off-by: Greg Kurz --- arch/powerpc/mm/Makefile |1 + arch/powerpc/mm/numa.c | 61 ++ arch/powerpc/mm/vphn.c

[PATCH v2 0/4] VPHN parsing fixes

2014-12-17 Thread Greg Kurz
printf("\n==\n"); print_packed(data[i].packed); vphn_unpack_associativity(data[i].packed, unpacked); print_unpacked(unpacked); } return 0; } --- Greg Kurz (

[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 --- No changes in v2. arch/powerpc/mm/numa.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git

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

2014-12-17 Thread Greg Kurz
rns 12 32-bit values 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 --- 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 --- v2: only move the endian fixing. The logic is reworked in another patch. arch/power

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 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-of

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

2013-09-25 Thread Greg Kurz
On Wed, 25 Sep 2013 14:10:27 +0200 Laurent Dufour wrote: > Follow-up to Anton's H_SET_MODE patch, the host should be taken aware of > guest endianess change. > > The hcall H_SET_MODE is processed in kvm then in the host. > > Signed-off-by: Laurent Dufour Tested-by: Gr

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

2013-09-27 Thread Greg Kurz
the host. > > Signed-off-by: Laurent Dufour > --- Tested-by: Greg Kurz > 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

[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 --- arch/powerpc/kernel/rtas.c | 15 +-- 1 file changed, 13

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

2014-03-19 Thread Greg Kurz
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 --- Ben, The chunk with the -1 return code check may

[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 --- arch/powerpc/include/asm

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 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 can

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

2014-03-28 Thread Greg Kurz
e called > other places 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

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 wrote: > Greg Kurz writes: > > struct rtas_error_log { > > +#ifdef __BIG_ENDIAN__ > > + /* Byte 0 */ > > unsigned long version:8;/* Architectural version */ > > + /* Byte 1 */ > >

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 wrote: > On Mon, Mar 31, 2014 at 5:02 PM, Nathan Fontenot > wrote: > > struct rtas_error_log { > > - unsigned long version:8;/* Architectural version */ > > - unsigned long severity:3; /* Severity lev

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

2014-04-04 Thread Greg Kurz
e bit 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 Signed-off-by: Greg Kurz --- Changes since v2: - kill al

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 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 v2 0/4] VPHN parsing fixes

2015-02-02 Thread Greg Kurz
On Tue, 03 Feb 2015 13:47:35 +1100 Michael Ellerman wrote: > On Thu, 2015-01-29 at 19:03 +0100, Greg Kurz wrote: > > On Wed, 17 Dec 2014 10:40:46 +0100 > > Greg Kurz wrote: > > > Hi, > > > > > > This series addresses remarks from Ben and Michael (see

[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 --- arch/powerpc/mm/numa.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm

[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 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 --- arch/powerpc/mm/numa.c | 10 ++ 1 file changed, 6 insertions(+), 4 dele

[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 Signed-off-by: Greg Kurz --- arch/powerpc/mm/Makefile |1 + arch/powerpc/mm/numa.c | 61 ++ arch/powerpc/mm/vphn.c

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

2015-02-23 Thread Greg Kurz
x27;t dare to say the list is exhaustive though. Signed-off-by: Greg Kurz --- tools/testing/selftests/powerpc/Makefile |2 tools/testing/selftests/powerpc/utils.h |1 tools/testing/selftests/powerpc/vphn/.gitignore |1 tools/testing/selftests/powerpc/vphn/Mak

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

2015-02-23 Thread Greg Kurz
rns 12 32-bit values 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 --- arch/powerpc/mm/vphn.c | 54 +---

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 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 wrote: > From: Greg Kurz > > 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 not say much

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
esday, 27 February 2019 6:55 PM > >>> To: Alastair D'Silva ; 'Alastair D'Silva' > >>> > >>> Cc: 'Greg Kurz' ; 'Frederic Barrat' > >>> ; 'Arnd Bergmann' ; 'Greg Kroah- > >>> Hartman

Re: [PATCH 1/5] ocxl: Rename struct link to ocxl_link

2019-02-27 Thread Greg Kurz
On Wed, 27 Feb 2019 15:57:37 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The term 'link' is ambiguous (especially when the struct is used for a > list), so rename it for clarity. > > Signed-off-by: Alastair D'Silva > R

Re: [PATCH 4/5] ocxl: Remove superfluous 'extern' from headers

2019-03-13 Thread Greg Kurz
On Wed, 13 Mar 2019 15:07:00 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The 'extern' keyword adds no value here. > > Signed-off-by: Alastair D'Silva > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/ocxl_interna

Re: [PATCH 5/5] ocxl: Remove some unused exported symbols

2019-03-13 Thread Greg Kurz
On Wed, 13 Mar 2019 15:07:01 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > Remove some unused exported symbols. > > Signed-off-by: Alastair D'Silva > --- > drivers/misc/ocxl/config.c| 2 -- > drivers/misc/ocxl/ocxl_internal.h | 23 +++ > include/mi

Re: [PATCH 2/5] ocxl: Clean up printf formats

2019-03-13 Thread Greg Kurz
On Wed, 13 Mar 2019 15:06:58 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > Use %# instead of using a literal '0x' > > Signed-off-by: Alastair D'Silva > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/config.c | 6

Re: [PATCH 5/5] ocxl: Remove some unused exported symbols

2019-03-14 Thread Greg Kurz
On Thu, 14 Mar 2019 13:23:21 +1100 "Alastair D'Silva" wrote: > On Wed, 2019-03-13 at 10:10 +0100, Greg Kurz wrote: > > On Wed, 13 Mar 2019 15:07:01 +1100 > > "Alastair D'Silva" wrote: > > > > > From: Alastair D'Silva > >

Re: [PATCH 6/7] ocxl: afu_irq only deals with IRQ IDs, not offsets

2019-03-15 Thread Greg Kurz
On Wed, 13 Mar 2019 15:15:21 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The use of offsets is required only in the frontend, so alter > the IRQ API to only work with IRQ IDs in the backend. > > Signed-off-by: Alastair D'Silva > --- > drivers/misc/ocxl/afu_irq.c | 31 +

Re: [PATCH v4 3/4] ocxl: Remove superfluous 'extern' from headers

2019-03-25 Thread Greg Kurz
On Mon, 25 Mar 2019 16:34:54 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > The 'extern' keyword adds no value here. > > Signed-off-by: Alastair D'Silva > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/ocxl_interna

Re: [PATCH v4 0/4] ocxl: OpenCAPI Cleanup

2019-03-25 Thread Greg Kurz
Hi Alastair, I forgot to mention it during v3 but please don't link new version of a patchset to the previous one with --in-reply-to. This is to ensure I can see them in my email client without having to scroll back many days in the past (which likely means a fair number of e-mails on linuxppc-dev

Re: [PATCH v4 4/4] ocxl: Remove some unused exported symbols

2019-03-25 Thread Greg Kurz
On Mon, 25 Mar 2019 16:34:55 +1100 "Alastair D'Silva" wrote: > From: Alastair D'Silva > > Remove some unused exported symbols. > > Signed-off-by: Alastair D'Silva > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/config.c| 4

[PATCH] powerpc/powernv/npu: Fix reference leak

2019-04-19 Thread Greg Kurz
: 902bdc57451c ("powerpc/powernv/idoa: Remove unnecessary pcidev from pci_dn") Cc: sta...@vger.kernel.org # v4.16 Signed-off-by: Greg Kurz --- arch/powerpc/platforms/powernv/npu-dma.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powernv

[PATCH] vfio-pci/nvlink2: Fix potential VMA leak

2019-04-19 Thread Greg Kurz
If vfio_pci_register_dev_region() fails then we should rollback previous changes, ie. unmap the ATSD registers. Signed-off-by: Greg Kurz --- drivers/vfio/pci/vfio_pci_nvlink2.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci_nvlink2.c b/drivers/vfio/pci

Re: [RFC PATCH v1] powerpc/prom_init: disable XIVE in Secure VM.

2020-03-02 Thread Greg Kurz
lists.ozlabs.org > Cc: Michael Ellerman > Cc: Thiago Jung Bauermann > Cc: Michael Anderson > Cc: Sukadev Bhattiprolu > Cc: Alexey Kardashevskiy > Cc: Paul Mackerras > Cc: Greg Kurz > Cc: Cedric Le Goater > Cc: David Gibson > Signed-off-by: Ram Pai > --- > arch

Re: [RFC PATCH v1] powerpc/prom_init: disable XIVE in Secure VM.

2020-03-03 Thread Greg Kurz
On Tue, 3 Mar 2020 09:02:05 -0800 Ram Pai wrote: > On Tue, Mar 03, 2020 at 07:50:08AM +0100, Cédric Le Goater wrote: > > On 3/3/20 12:32 AM, David Gibson wrote: > > > On Fri, Feb 28, 2020 at 11:54:04PM -0800, Ram Pai wrote: > > >> XIVE is not correctly enabled for Secure VM in the KVM Hypervisor

Re: [EXTERNAL] Re: [RFC PATCH v1] powerpc/prom_init: disable XIVE in Secure VM.

2020-03-04 Thread Greg Kurz
On Tue, 3 Mar 2020 20:18:18 +0100 Cédric Le Goater wrote: > >> BTW: I figured, I dont need this intermin patch to disable xive for > >> secure VM. Just doing "svm=on xive=off" on the kernel command line is > >> sufficient for now. * > >> > > > > No it is not. If the hypervisor doesn't

Re: [RFC PATCH v1] powerpc/prom_init: disable XIVE in Secure VM.

2020-03-04 Thread Greg Kurz
On Tue, 3 Mar 2020 10:56:45 -0800 Ram Pai wrote: > On Tue, Mar 03, 2020 at 06:45:20PM +0100, Greg Kurz wrote: > > On Tue, 3 Mar 2020 09:02:05 -0800 > > Ram Pai wrote: > > > > > On Tue, Mar 03, 2020 at 07:50:08AM +0100, Cédric Le Goater wrote: > > > &

Re: [PATCH 1/4] powerpc/xive: Use XIVE_BAD_IRQ instead of zero to catch non configured IPIs

2020-03-10 Thread Greg Kurz
On Fri, 6 Mar 2020 16:01:40 +0100 Cédric Le Goater wrote: > When a CPU is brought up, an IPI number is allocated and recorded > under the XIVE CPU structure. Invalid IPI numbers are tracked with > interrupt number 0x0. > > On the PowerNV platform, the interrupt number space starts at 0x10 and >

Re: [PATCH 3/4] powerpc/xmon: Add source flags to output of XIVE interrupts

2020-03-10 Thread Greg Kurz
On Fri, 6 Mar 2020 16:01:42 +0100 Cédric Le Goater wrote: > Some firmwares or hypervisors can advertise different source > characteristics. Track their value under XMON. What we are mostly > interested in is the StoreEOI flag. > > Signed-off-by: Cédric Le Goater > --- Revi

Re: [PATCH 2/4] powerpc/xive: Fix xmon support on the PowerNV platform

2020-03-10 Thread Greg Kurz
VE interrupts") > Cc: sta...@vger.kernel.org # v5.4+ > Signed-off-by: Cédric Le Goater > --- Reviewed-by: Greg Kurz > arch/powerpc/sysdev/xive/common.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/powerpc/sysdev/xive/common.c > b/arch/

[PATCH 0/3] KVM: PPC: Fix host kernel crash with PR KVM

2020-03-18 Thread Greg Kurz
early. And worse, most of the indirection isn't needed because only PR KVM has some MMU data to free when the vCPU is destroyed. Fix the issue (patch 1) and simplify the code (patch 2 and 3). -- Greg --- Greg Kurz (3): KVM: PPC: Fix kernel crash with PR KVM KVM: PPC: Move kvmpp

[PATCH 1/3] KVM: PPC: Fix kernel crash with PR KVM

2020-03-18 Thread Greg Kurz
called. Drop the line in the error path of kvm_arch_vcpu_create(). Fixes: ff030fdf5573 ("KVM: PPC: Move kvm_vcpu_init() invocation to common code") Signed-off-by: Greg Kurz --- arch/powerpc/kvm/book3s_pr.c |1 + arch/powerpc/kvm/powerpc.c |2 -- 2 files changed, 1 insertion(+),

[PATCH 2/3] KVM: PPC: Move kvmppc_mmu_init() PR KVM

2020-03-18 Thread Greg Kurz
This is only relevant to PR KVM. Make it obvious by moving the function declaration to the Book3s header and rename it with a _pr suffix. Signed-off-by: Greg Kurz --- arch/powerpc/include/asm/kvm_ppc.h|1 - arch/powerpc/kvm/book3s.h |1 + arch/powerpc/kvm

[PATCH 3/3] KVM: PPC: Kill kvmppc_ops::mmu_destroy() and kvmppc_mmu_destroy()

2020-03-18 Thread Greg Kurz
These are only used by HV KVM and BookE, and in both cases they are nops. Signed-off-by: Greg Kurz --- arch/powerpc/include/asm/kvm_ppc.h |2 -- arch/powerpc/kvm/book3s.c |5 - arch/powerpc/kvm/book3s_hv.c |6 -- arch/powerpc/kvm/book3s_pr.c |1

Re: [PATCH] KVM: PPC: Book3S HV: Skip kvmppc_uvmem_free if Ultravisor is not supported

2020-03-20 Thread Greg Kurz
8 > f8010010 f821ff81 486249a1 6000 7c7d1b78 712a0002 40820084 > ---[ end trace 5774ef4dc2c98279 ]--- > > So this patch checks if kvmppc_uvmem_init actually allocated anything > before running kvmppc_uvmem_free. > > Fixes: ca9f4942670c ("KVM: PPC: Book3S HV: Support

Re: [PATCH 1/2] KVM: PPC: Book3S HV: check caller of H_SVM_* Hcalls

2020-03-20 Thread Greg Kurz
On Fri, 20 Mar 2020 11:26:42 +0100 Laurent Dufour wrote: > The Hcall named H_SVM_* are reserved to the Ultravisor. However, nothing > prevent a malicious VM or SVM to call them. This could lead to weird result > and should be filtered out. > > Checking the Secure bit of the calling MSR ensure th

Re: [PATCH 1/2] KVM: PPC: Book3S HV: check caller of H_SVM_* Hcalls

2020-03-24 Thread Greg Kurz
On Tue, 24 Mar 2020 10:43:23 +1100 Paul Mackerras wrote: > On Fri, Mar 20, 2020 at 01:22:48PM +0100, Greg Kurz wrote: > > On Fri, 20 Mar 2020 11:26:42 +0100 > > Laurent Dufour wrote: > > > > > The Hcall named H_SVM_* are reserved to the Ultravisor. However, nothin

Re: [PATCH] powerpc/prom_init: Include the termination message in ibm,os-term RTAS call

2020-03-25 Thread Greg Kurz
On Wed, 25 Mar 2020 21:06:22 +1100 Michael Ellerman wrote: > Fabiano Rosas writes: > > > QEMU can now print the ibm,os-term message[1], so let's include it in > > the RTAS call. E.g.: > > > > qemu-system-ppc64: OS terminated: Switch to secure mode failed. > > > > 1- https://git.qemu.org/?p=qe

Re: [PATCH v2] powerpc/XIVE: SVM: share the event-queue page with the Hypervisor.

2020-03-26 Thread Greg Kurz
uot;kernel_irqchip=off" on the QEMU pseries > machine. > > Cc: kvm-...@vger.kernel.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: Michael Ellerman > Cc: Thiago Jung Bauermann > Cc: Michael Anderson > Cc: Sukadev Bhattiprolu > Cc: Alexey Kardashevskiy > Cc: Paul

Re: [PATCH v4 00/25] Add support for OpenCAPI Persistent Memory devices

2020-04-02 Thread Greg Kurz
On Thu, 02 Apr 2020 21:06:01 +1100 Michael Ellerman wrote: > "Oliver O'Halloran" writes: > > On Thu, Apr 2, 2020 at 2:42 PM Michael Ellerman wrote: > >> "Alastair D'Silva" writes: > >> >> -Original Message- > >> >> From: Dan Williams > >> >> > >> >> On Sun, Mar 29, 2020 at 10:23 PM Al

Re: [PATCH 2/4] ocxl: Access interrupt trigger page from xive directly

2020-04-03 Thread Greg Kurz
rat > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/afu_irq.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/misc/ocxl/afu_irq.c b/drivers/misc/ocxl/afu_irq.c > index 70f8f1c3929d..b30ec0ef7be7 100644 > --- a/drivers/misc

Re: [PATCH 3/4] ocxl: Don't return trigger page when allocating an interrupt

2020-04-03 Thread Greg Kurz
It also allows ocxl to use the xive native interface to allocate > interrupts, instead of its custom service. > > Signed-off-by: Frederic Barrat > --- Reviewed-by: Greg Kurz > drivers/misc/ocxl/Kconfig | 2 +- > drivers/misc/ocxl/afu_irq.c | 4 +--- >

Re: [PATCH 4/4] ocxl: Remove custom service to allocate interrupts

2020-04-03 Thread Greg Kurz
--- Nice diffstat :) Reviewed-by: Greg Kurz > 2 files changed, 33 deletions(-) > > diff --git a/arch/powerpc/include/asm/pnv-ocxl.h > b/arch/powerpc/include/asm/pnv-ocxl.h > index 7de82647e761..e90650328c9c 100644 > --- a/arch/powerpc/include/asm/pnv-ocxl.h > +++ b/arch/po

Re: [PATCH 0/2] vfio pci: Add support for OpenCAPI devices

2019-10-24 Thread Greg Kurz
Hi Christophe, Sorry, I didn't have time to look at your other series yet and likely the same for this one with the upcoming KVM Forum... :-\ Anyway, for any VFIO related patch, don't forget to Cc the maintainer, Alex Williamson . Cheers, -- Greg On Thu, 24 Oct 2019 15:28:03 +0200 christophe l

Re: [PATCH] powerpc/xive: Prevent page fault issues in the machine crash handler

2019-10-31 Thread Greg Kurz
> sequence on sPAPR guests. > > To fix, force the mapping of the ESB page when an interrupt is being > mapped in the Linux IRQ number space. This is done by setting the > initial state of the interrupt to OFF which is not necessarily the > case on PowerNV. > > Signed-off-by: Cédr

Re: [PATCH 3/3] powerpc/pseries: Fixup config space size of OpenCAPI devices

2019-11-09 Thread Greg Kurz
On Thu, 7 Nov 2019 09:46:25 +0100 christophe lombard wrote: > On 05/11/2019 06:01, Andrew Donnellan wrote: > > On 22/10/19 6:52 pm, christophe lombard wrote: > >> Fix up the pci config size of the OpenCAPI PCIe devices in the pseries > >> environment. > >> Most of OpenCAPI PCIe devices have 4096

[PATCH] KVM: PPC: Book3S HV: XIVE: Free previous EQ page when setting up a new one

2019-11-11 Thread Greg Kurz
since H_INT_SET_QUEUE_CONFIG isn't a hot path. Reported-by: Satheesh Rajendran Cc: sta...@vger.kernel.org # v5.2 Fixes: 13ce3297c576 ("KVM: PPC: Book3S HV: XIVE: Add controls for the EQ configuration") Signed-off-by: Greg Kurz --- arch/powerpc/kvm/book3s_xive_native.c | 21 +

  1   2   3   >