[PATCH v9 3/3] KVM: PPC: Exit guest upon MCE when FWNMI capability is enabled

2017-05-10 Thread Mahesh J Salgaonkar
From: Aravinda Prasad Enhance KVM to cause a guest exit with KVM_EXIT_NMI exit reason upon a machine check exception (MCE) in the guest address space if the KVM_CAP_PPC_FWNMI capability is enabled (instead of delivering a 0x200 interrupt to guest). This enables QEMU to build error log and deliver

[PATCH v9 2/3] powerpc/book3s: EXPORT_SYMBOL machine_check_print_event_info

2017-05-10 Thread Mahesh J Salgaonkar
From: Mahesh Salgaonkar It will be used in arch/powerpc/kvm/book3s_hv.c KVM module. Signed-off-by: Mahesh Salgaonkar Acked-by: Michael Ellerman --- arch/powerpc/kernel/mce.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c index 5f9e

[PATCH v9 1/3] KVM: PPC: Add new capability to control MCE behaviour

2017-05-10 Thread Mahesh J Salgaonkar
From: Aravinda Prasad This patch introduces a new KVM capability to control how KVM behaves on machine check exception (MCE). Without this capability, KVM redirects machine check exceptions to guest's 0x200 vector, if the address in error belongs to the guest. With this capability KVM causes a gu

[PATCH v9 0/3] KVM: PPC: Add FWNMI support for KVM guests on POWER

2017-05-10 Thread Mahesh J Salgaonkar
From: Aravinda Prasad This series of patches add FWNMI support for KVM guests on POWER. Memory errors such as bit flips that cannot be corrected by hardware is passed on to the kernel for handling by raising machine check exception (an NMI). Upon such machine check exceptions, if the address in

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-10 Thread Stephen Rothwell
Hi, On Wed, 10 May 2017 14:09:53 +0200 (CEST) Thomas Gleixner wrote: > > > +static void nest_change_cpu_context(int old_cpu, int new_cpu) > > +{ > > + int i; > > + > > + for (i = 0; > > +(per_nest_pmu_arr[i] != NULL) && (i < IMC_MAX_PMUS); i++) > > + perf_pmu_migrate_contex

Re: [v8,12/12] powerpc: rewrite local_t using soft_irq

2017-05-10 Thread Steven Roberts
On Mon, Apr 17, 2017 at 06:47:37AM +0530, Madhavan Srinivasan wrote: > Local atomic operations are fast and highly reentrant per CPU counters. > Used for percpu variable updates. Local atomic operations only guarantee > variable modification atomicity wrt the CPU which owns the data and > these nee

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread Matthew Wilcox
On Wed, May 10, 2017 at 02:00:26PM -0400, David Miller wrote: > From: Matthew Wilcox > Date: Wed, 10 May 2017 10:17:03 -0700 > > On Wed, May 10, 2017 at 11:19:43AM -0400, David Miller wrote: > >> I guess it might be clearer if you understand what the block > >> initializing stores do on sparc64.

Re: [PATCH v5 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-05-10 Thread Hari Bathini
Hello Michal, On Wednesday 10 May 2017 09:31 PM, Michal Suchánek wrote: Hello, On Wed, 03 May 2017 23:52:52 +0530 Hari Bathini wrote: With the introduction of 'fadump_append=' parameter to pass additional parameters to fadump (capture) kernel, update documentation about it. Signed-off-by: H

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread David Miller
From: Matthew Wilcox Date: Wed, 10 May 2017 10:17:03 -0700 > On Wed, May 10, 2017 at 11:19:43AM -0400, David Miller wrote: >> From: Michal Hocko >> Date: Wed, 10 May 2017 16:57:26 +0200 >> >> > Have you measured that? I do not think it would be super hard to >> > measure. I would be quite surpr

Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500

2017-05-10 Thread Christoph Hellwig
Hi Abdul, can you test the patch below? I'll try to create a way to inject short WRITE SAME commands using qemu next, but I thought I'd give you a chance to try it as well. --- diff --git a/block/blk-core.c b/block/blk-core.c index c580b0138a7f..c7068520794b 100644 --- a/block/blk-core.c +++ b/b

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread Matthew Wilcox
On Wed, May 10, 2017 at 11:19:43AM -0400, David Miller wrote: > From: Michal Hocko > Date: Wed, 10 May 2017 16:57:26 +0200 > > > Have you measured that? I do not think it would be super hard to > > measure. I would be quite surprised if this added much if anything at > > all as the whole struct p

Re: [PATCH v5 2/2] powerpc/fadump: update documentation about 'fadump_append=' parameter

2017-05-10 Thread Michal Suchánek
Hello, On Wed, 03 May 2017 23:52:52 +0530 Hari Bathini wrote: > With the introduction of 'fadump_append=' parameter to pass additional > parameters to fadump (capture) kernel, update documentation about it. > > Signed-off-by: Hari Bathini > --- > > Changes from v4: > * Based on top of patchse

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread David Miller
From: Pasha Tatashin Date: Wed, 10 May 2017 11:01:40 -0400 > Perhaps you are right, and I will measure on x86. But, I suspect hit > can become unacceptable on some platfoms: there is an overhead of > calling a function, even if it is leaf-optimized, and there is an > overhead in memset() to check

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread David Miller
From: Michal Hocko Date: Wed, 10 May 2017 16:57:26 +0200 > Have you measured that? I do not think it would be super hard to > measure. I would be quite surprised if this added much if anything at > all as the whole struct page should be in the cache line already. We do > set reference count and o

Re: [PATCH v4 RFT 1/2] powerpc/fadump: reduce memory consumption for capture kernel

2017-05-10 Thread Hari Bathini
On Wednesday 10 May 2017 08:28 PM, Michal Suchánek wrote: On Wed, 3 May 2017 12:43:33 +0530 Hari Bathini wrote: On Tuesday 02 May 2017 09:26 PM, Michal Suchanek wrote: With fadump (dump capture) kernel booting like a regular kernel, it almost needs the same amount of memory to boot as the p

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread Pasha Tatashin
On 05/10/2017 10:57 AM, Michal Hocko wrote: On Wed 10-05-17 09:42:22, Pasha Tatashin wrote: Well, I didn't object to this particular part. I was mostly concerned about http://lkml.kernel.org/r/1494003796-748672-4-git-send-email-pasha.tatas...@oracle.com and the "zero" argument for other funct

Re: [PATCH v4 RFT 1/2] powerpc/fadump: reduce memory consumption for capture kernel

2017-05-10 Thread Michal Suchánek
On Wed, 3 May 2017 12:43:33 +0530 Hari Bathini wrote: > On Tuesday 02 May 2017 09:26 PM, Michal Suchanek wrote: > > With fadump (dump capture) kernel booting like a regular kernel, it > > almost needs the same amount of memory to boot as the production > > kernel, which is unwarranted for a dump

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread Michal Hocko
On Wed 10-05-17 09:42:22, Pasha Tatashin wrote: > > > >Well, I didn't object to this particular part. I was mostly concerned > >about > >http://lkml.kernel.org/r/1494003796-748672-4-git-send-email-pasha.tatas...@oracle.com > >and the "zero" argument for other functions. I guess we can do without >

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread Pasha Tatashin
Well, I didn't object to this particular part. I was mostly concerned about http://lkml.kernel.org/r/1494003796-748672-4-git-send-email-pasha.tatas...@oracle.com and the "zero" argument for other functions. I guess we can do without that. I _think_ that we should simply _always_ initialize the pa

Re: [PATCH v8 05/10] powerpc/perf: IMC pmu cpumask and cpuhotplug support

2017-05-10 Thread Thomas Gleixner
On Thu, 4 May 2017, Anju T Sudhakar wrote: > +/* > + * nest_init : Initializes the nest imc engine for the current chip. > + * by default the nest engine is disabled. > + */ > +static void nest_init(int *cpu_opal_rc) > +{ > + int rc; > + > + /* > + * OPAL figures out which CPU to start

Re: [kernel-hardening] [PATCH] add the option of fortified string.h functions

2017-05-10 Thread Michael Ellerman
Daniel Axtens writes: > Hi Daniel and ppc people, > > (ppc people: this does some compile and run time bounds checking on > string functions. It's cool - currently it picks up a lot of random > things so it will require some more work across the tree, but hopefully > it will eventually hit mainli

Re: [PATCH] macintosh: move mac_hid driver to input/mouse.

2017-05-10 Thread Michal Suchánek
On 2017-05-10 02:43, Dmitry Torokhov wrote: Hi Michal, On Tue, May 09, 2017 at 09:14:18PM +0200, Michal Suchanek wrote: There is nothing mac-specific about this driver. Non-mac hardware with suboptimal built-in pointer devices exists. This makes it possible to use this emulation not only on x8

Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500

2017-05-10 Thread Abdul Haleem
On Wed, 2017-05-10 at 09:56 +0200, Christoph Hellwig wrote: > On Tue, May 09, 2017 at 08:48:21PM +0530, Abdul Haleem wrote: > > A bisection for the above suspects resulted a bad commit; > > > > c20cfc27a47307e811346f85959cf3cc07ae42f9 is the first bad commit > > commit c20cfc27a47307e811346f85959c

Re: [PATCH] powerpc/modules: If mprofile-kernel is enabled add it to vermagic

2017-05-10 Thread Balbir Singh
On Wed, May 10, 2017 at 4:57 PM, Michael Ellerman wrote: > On powerpc we can build the kernel with two different ABIs for mcount(), which > is used by ftrace. Kernels built with one ABI do not know how to load modules > built with the other ABI. The new style ABI is called "mprofile-kernel", for >

Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500

2017-05-10 Thread Christoph Hellwig
On Tue, May 09, 2017 at 08:48:21PM +0530, Abdul Haleem wrote: > A bisection for the above suspects resulted a bad commit; > > c20cfc27a47307e811346f85959cf3cc07ae42f9 is the first bad commit > commit c20cfc27a47307e811346f85959cf3cc07ae42f9 > Author: Christoph Hellwig > Date: Wed Apr 5 19:21:07

Re: [v3 0/9] parallelized "struct page" zeroing

2017-05-10 Thread Michal Hocko
On Tue 09-05-17 14:54:50, Pasha Tatashin wrote: [...] > >The implementation just looks too large to what I would expect. E.g. do > >we really need to add zero argument to the large part of the memblock > >API? Wouldn't it be easier to simply export memblock_virt_alloc_internal > >(or its tiny wrapp