Re: [PATCH 05/11] KVM: PPC: add GPR RA update skeleton for MMIO emulation

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:38PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > To optimize kvm emulation code with analyse_instr, adds new > mmio_update_ra flag to aid with GPR RA update. > > This patch arms RA update at load/store emulation path for

Re: [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:43PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > This patch reconstructs LOAD_VMX/STORE_VMX instruction MMIO emulation with > analyse_intr() input. When emulating the store, the VMX reg will need to > be flushed so that the

Re: [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:44PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > This patch reconstructs LOAD_VSX/STORE_VSX instruction MMIO emulation with > analyse_intr() input. It utilizes VSX_FPCONV/VSX_SPLAT/SIGNEXT exported > by analyse_instr() and

Re: [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:42PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > This patch reconstructs LOAD_FP/STORE_FP instruction MMIO emulation with > analyse_intr() input. It utilizes the FPCONV/UPDATE properties exported by > analyse_instr() and

Re: [PATCH 02/11] KVM: PPC: mov nip/ctr/lr/xer registers to pt_regs in kvm_vcpu_arch

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:35PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > This patch moves nip/ctr/lr/xer registers from scattered places in > kvm_vcpu_arch to pt_regs structure. > > cr register is "unsigned long" in pt_regs and u32 in vcpu->arch. >

Re: [PATCH 01/11] KVM: PPC: add pt_regs into kvm_vcpu_arch and move vcpu->arch.gpr[] into it

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:34PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > Current regs are scattered at kvm_vcpu_arch structure and it will > be more neat to organize them into pt_regs structure. > > Also it will enable reconstruct MMIO emulation

Re: [PATCH 03/11] KVM: PPC: Fix a mmio_host_swabbed uninitialized usage issue when VMX store

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:36PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > When KVM emulates VMX store, it will invoke kvmppc_get_vmx_data() to > retrieve VMX reg val. kvmppc_get_vmx_data() will check mmio_host_swabbed > to decide which double word of

Re: [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:40PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > This patch reconstructs non-SIMD LOAD/STORE instruction MMIO emulation > with analyse_intr() input. It utilizes the BYTEREV/UPDATE/SIGNEXT > properties exported by

Re: [PATCH 06/11] KVM: PPC: add KVMPPC_VSX_COPY_WORD_LOAD_DUMP type support for mmio emulation

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:39PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > Some VSX instruction like lxvwsx will splat word into VSR. This patch > adds VSX copy type KVMPPC_VSX_COPY_WORD_LOAD_DUMP to support this. > > Signed-off-by: Simon Guo

Re: [PATCH 04/11] KVM: PPC: fix incorrect element_size for stxsiwx in analyse_instr

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:37PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > stwsiwx will place contents of word element 1 of VSR into word > storage of EA. So the element size of stwsiwx should be 4. > > This patch correct the size from 8 to 4. > >

Re: [PATCH 08/11] KVM: PPC: add giveup_ext() hook for PPC KVM ops

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:41PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > Currently HV will save math regs(FP/VEC/VSX) when trap into host. But > PR KVM will only save math regs when qemu task switch out of CPU. > > To emulate FP/VEC/VSX load, PR

Re: [PATCH 00/11] KVM: PPC: reconstruct mmio emulation with analyse_instr()

2018-05-03 Thread Paul Mackerras
On Wed, Apr 25, 2018 at 07:54:33PM +0800, wei.guo.si...@gmail.com wrote: > From: Simon Guo > > We already have analyse_instr() which analyzes instructions for the > instruction > type, size, addtional flags, etc. What kvmppc_emulate_loadstore() did is > somehow >

Re: [PATCH 00/11] KVM: PPC: reconstruct mmio emulation with analyse_instr()

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 03:31:17PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:33PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > We already have analyse_instr() which analyzes instructions for the > > instruction > > type, size,

Re: [PATCH 01/11] KVM: PPC: add pt_regs into kvm_vcpu_arch and move vcpu->arch.gpr[] into it

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 03:34:01PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:34PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > Current regs are scattered at kvm_vcpu_arch structure and it will > > be more neat to organize them into

Re: [PATCH 02/11] KVM: PPC: mov nip/ctr/lr/xer registers to pt_regs in kvm_vcpu_arch

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 03:46:01PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:35PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > This patch moves nip/ctr/lr/xer registers from scattered places in > > kvm_vcpu_arch to pt_regs

Re: [PATCH 03/11] KVM: PPC: Fix a mmio_host_swabbed uninitialized usage issue when VMX store

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 03:48:26PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:36PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > When KVM emulates VMX store, it will invoke kvmppc_get_vmx_data() to > > retrieve VMX reg val.

Re: [PATCH 05/11] KVM: PPC: add GPR RA update skeleton for MMIO emulation

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 03:58:14PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:38PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > To optimize kvm emulation code with analyse_instr, adds new > > mmio_update_ra flag to aid with GPR RA

Re: [PATCH 04/11] KVM: PPC: fix incorrect element_size for stxsiwx in analyse_instr

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 03:50:47PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:37PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > stwsiwx will place contents of word element 1 of VSR into word > > storage of EA. So the element size of

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-05-03 Thread Akshay Adiga
On Tue, May 01, 2018 at 01:47:23PM +1000, Nicholas Piggin wrote: > On Mon, 30 Apr 2018 14:42:08 +0530 > Akshay Adiga wrote: > > > Powersaving for stop0_lite and stop1_lite is observed to be quite similar > > and both states resume without state loss. Using

Re: [PATCH 07/11] KVM: PPC: reconstruct non-SIMD LOAD/STORE instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 04:03:46PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:40PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > This patch reconstructs non-SIMD LOAD/STORE instruction MMIO emulation > > with analyse_intr() input. It

Re: [PATCH 08/11] KVM: PPC: add giveup_ext() hook for PPC KVM ops

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 04:08:17PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:41PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > Currently HV will save math regs(FP/VEC/VSX) when trap into host. But > > PR KVM will only save math

Re: [PATCH 09/11] KVM: PPC: reconstruct LOAD_FP/STORE_FP instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 04:10:49PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:42PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > This patch reconstructs LOAD_FP/STORE_FP instruction MMIO emulation with > > analyse_intr() input. It

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

2018-05-03 Thread Michael Ellerman
Sam Bobroff writes: > diff --git a/arch/powerpc/kernel/eeh_driver.c > b/arch/powerpc/kernel/eeh_driver.c > index eb4feee81ff4..1c4336dcf9f5 100644 > --- a/arch/powerpc/kernel/eeh_driver.c > +++ b/arch/powerpc/kernel/eeh_driver.c > @@ -54,6 +54,25 @@ static int

Re: [PATCH 1/6] powerpc/syscalls: Switch trivial cases to SYSCALL_DEFINE

2018-05-03 Thread Mathieu Malaterre
On Wed, May 2, 2018 at 3:20 PM, Michael Ellerman wrote: > From: Al Viro Maybe add: Link: https://github.com/linuxppc/linux/issues/131 For the series: compile, build without error (W=1), and works on my system. > Signed-off-by: Al Viro

Re: [PATCH v10 08/25] mm: VMA sequence count

2018-05-03 Thread Laurent Dufour
On 01/05/2018 15:16, Minchan Kim wrote: > On Mon, Apr 30, 2018 at 05:14:27PM +0200, Laurent Dufour wrote: >> >> >> On 23/04/2018 08:42, Minchan Kim wrote: >>> On Tue, Apr 17, 2018 at 04:33:14PM +0200, Laurent Dufour wrote: From: Peter Zijlstra Wrap the VMA

Re: [RFC][PATCH bpf] tools: bpftool: Fix tags for bpf-to-bpf calls

2018-05-03 Thread Naveen N. Rao
Alexei Starovoitov wrote: On 3/1/18 12:51 AM, Naveen N. Rao wrote: Daniel Borkmann wrote: Worst case if there's nothing better, potentially what one could do in bpf_prog_get_info_by_fd() is to dump an array of full addresses and have the imm part as the index pointing to one of them, just

Re: [PATCH v10 24/25] x86/mm: add speculative pagefault handling

2018-05-03 Thread Laurent Dufour
On 30/04/2018 20:43, Punit Agrawal wrote: > Hi Laurent, > > I am looking to add support for speculative page fault handling to > arm64 (effectively porting this patch) and had a few questions. > Apologies if I've missed an obvious explanation for my queries. I'm > jumping in bit late to the

Re: [PATCH] perf tools: allow overriding MAX_NR_CPUS at compile time

2018-05-03 Thread Arnaldo Carvalho de Melo
Em Fri, Sep 22, 2017 at 01:20:43PM +0200, Christophe Leroy escreveu: > After update of kernel, perf tool doesn't run anymore on my > 32MB RAM powerpc board, but still runs on a 128MB RAM board: Cleaning up my inbox, found this one, simple enough, still applies, applied. These all needs to be

Re: [PATCH v10 12/25] mm: cache some VMA fields in the vm_fault structure

2018-05-03 Thread Minchan Kim
On Thu, May 03, 2018 at 02:25:18PM +0200, Laurent Dufour wrote: > On 23/04/2018 09:42, Minchan Kim wrote: > > On Tue, Apr 17, 2018 at 04:33:18PM +0200, Laurent Dufour wrote: > >> When handling speculative page fault, the vma->vm_flags and > >> vma->vm_page_prot fields are read once the page table

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-05-03 Thread Michael Ellerman
Stewart Smith writes: ... > > Slightly stupid question: should we be disabling these here or should > Linux be better and deciding what states to use? > > I'm inclined to say this is a Linux problem as it should make the > decision of what hardware feature to used

Re: [PATCH 4/6] powerpc/64s: Enable barrier_nospec based on firmware settings

2018-05-03 Thread Michael Ellerman
Michal Suchánek writes: > On Tue, 01 May 2018 21:11:06 +1000 > Michael Ellerman wrote: >> Michal Suchánek writes: >> > On Tue, 24 Apr 2018 14:15:57 +1000 >> > Michael Ellerman wrote: >> > >> >> From: Michal

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

2018-05-03 Thread Michael Ellerman
Sam Bobroff 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: Sam Bobroff > --- > arch/powerpc/kernel/eeh_driver.c | 1 + > 1 file changed, 1

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

2018-05-03 Thread Michael Ellerman
Sam Bobroff 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. > > In eeh_rmv_device() also refactor a little so that only two calls to > eeh_pcid_put() are needed,

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

2018-05-03 Thread Michael Ellerman
Sam Bobroff writes: > diff --git a/arch/powerpc/kernel/eeh_driver.c > b/arch/powerpc/kernel/eeh_driver.c > index 188d15c4fe3a..f33dd68a9ca2 100644 > --- a/arch/powerpc/kernel/eeh_driver.c > +++ b/arch/powerpc/kernel/eeh_driver.c > @@ -39,6 +39,29 @@ struct eeh_rmv_data {

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

2018-05-03 Thread Michael Ellerman
Sam Bobroff writes: > diff --git a/arch/powerpc/kernel/eeh_driver.c > b/arch/powerpc/kernel/eeh_driver.c > index f63a01d336ee..b3edd0df04b8 100644 > --- a/arch/powerpc/kernel/eeh_driver.c > +++ b/arch/powerpc/kernel/eeh_driver.c > @@ -210,6 +206,23 @@ static void

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-05-03 Thread Nicholas Piggin
On Thu, 3 May 2018 14:36:47 +0530 Akshay Adiga wrote: > On Tue, May 01, 2018 at 01:47:23PM +1000, Nicholas Piggin wrote: > > On Mon, 30 Apr 2018 14:42:08 +0530 > > Akshay Adiga wrote: > > > > > Powersaving for stop0_lite and

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-05-03 Thread Stewart Smith
Nicholas Piggin writes: > On Thu, 3 May 2018 14:36:47 +0530 > Akshay Adiga wrote: > >> On Tue, May 01, 2018 at 01:47:23PM +1000, Nicholas Piggin wrote: >> > On Mon, 30 Apr 2018 14:42:08 +0530 >> > Akshay Adiga

Re: [Skiboot] [PATCH 1/2] SLW: Remove stop1_lite and stop0 stop states

2018-05-03 Thread Nicholas Piggin
On Thu, 03 May 2018 20:03:55 +1000 Stewart Smith wrote: > Nicholas Piggin writes: > > On Thu, 3 May 2018 14:36:47 +0530 > > Akshay Adiga wrote: > > > >> On Tue, May 01, 2018 at 01:47:23PM +1000, Nicholas Piggin

Re: [PATCH NEXT 1/4] powerpc/pasemi: Add PCI initialisation for Nemo board.

2018-05-03 Thread Michael Ellerman
Hi Darren, Thanks for the patch, sorry it's taken so long to get merged. Darren Stevens writes: > The A-Eon Amigaone X1000's Nemo motherboard has an AMD SB600 > connected to one of the PCI-e root ports on its PaSemi > Pwrficient 1628M SoC. Normally the SB600

Re: [PATCH 3/6] powerpc/64s: Patch barrier_nospec in modules

2018-05-03 Thread Michal Suchánek
On Tue, 24 Apr 2018 14:15:56 +1000 Michael Ellerman wrote: > From: Michal Suchanek > > Note that unlike RFI which is patched only in kernel the nospec state > reflects settings at the time the module was loaded. > > Iterating all modules and re-patching

Re: [PATCH v10 12/25] mm: cache some VMA fields in the vm_fault structure

2018-05-03 Thread Laurent Dufour
On 23/04/2018 09:42, Minchan Kim wrote: > On Tue, Apr 17, 2018 at 04:33:18PM +0200, Laurent Dufour wrote: >> When handling speculative page fault, the vma->vm_flags and >> vma->vm_page_prot fields are read once the page table lock is released. So >> there is no more guarantee that these fields

[PATCH 1/2] crypto: vmx - Remove overly verbose printk from AES init routines

2018-05-03 Thread Michael Ellerman
In the vmx AES init routines we do a printk(KERN_INFO ...) to report the fallback implementation we're using. However with a slow console this can significantly affect the speed of crypto operations. Using 'cryptsetup benchmark' the removal of the printk() leads to a ~5x speedup for aes-cbc

Re: [PATCH NEXT 2/4] powerpc/pasemi: Add Nemo board IRQ init routine

2018-05-03 Thread Michael Ellerman
Darren Stevens writes: > diff --git a/arch/powerpc/platforms/pasemi/setup.c > b/arch/powerpc/platforms/pasemi/setup.c > index c4a3e93..c583c17 100644 > --- a/arch/powerpc/platforms/pasemi/setup.c > +++ b/arch/powerpc/platforms/pasemi/setup.c > @@ -183,6 +184,99 @@

Re: [PATCH 11/11] KVM: PPC: reconstruct LOAD_VSX/STORE_VSX instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 04:26:12PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:44PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > This patch reconstructs LOAD_VSX/STORE_VSX instruction MMIO emulation with > > analyse_intr() input. It

[PATCH 2/2] crypto: vmx - Remove overly verbose printk from AES XTS init

2018-05-03 Thread Michael Ellerman
In p8_aes_xts_init() we do a printk(KERN_INFO ...) to report the fallback implementation we're using. However with a slow console this can significantly affect the speed of crypto operations. So remove it. Fixes: c07f5d3da643 ("crypto: vmx - Adding support for XTS") Cc: sta...@vger.kernel.org #

Re: [PATCH 10/11] KVM: PPC: reconstruct LOAD_VMX/STORE_VMX instruction mmio emulation with analyse_intr() input

2018-05-03 Thread Simon Guo
On Thu, May 03, 2018 at 04:17:15PM +1000, Paul Mackerras wrote: > On Wed, Apr 25, 2018 at 07:54:43PM +0800, wei.guo.si...@gmail.com wrote: > > From: Simon Guo > > > > This patch reconstructs LOAD_VMX/STORE_VMX instruction MMIO emulation with > > analyse_intr() input.

Re: [PATCH NEXT 3/4] powerpc/pasemi: Add Nemo board device init code.

2018-05-03 Thread Michael Ellerman
Darren Stevens writes: > diff --git a/arch/powerpc/platforms/pasemi/setup.c > b/arch/powerpc/platforms/pasemi/setup.c > index c583c17..8d3664f 100644 > --- a/arch/powerpc/platforms/pasemi/setup.c > +++ b/arch/powerpc/platforms/pasemi/setup.c > @@ -73,6 +73,19 @@ static

Re: [PATCH 04/15] powerpc/powernv: opal-kmsg use flush fallback from console code

2018-05-03 Thread Michael Ellerman
Nicholas Piggin writes: > Use the more refined and tested event polling loop from opal_put_chars > as the fallback console flush in the opal-kmsg path. This loop is used > by the console driver today, whereas the opal-kmsg fallback is not > likely to have been used for years.

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

2018-05-03 Thread Russell Currey
On Wed, 2018-05-02 at 16:34 +1000, Sam Bobroff wrote: > The current failure message includes the number of failures that have > occurred in the last hour (for a device) but it does not indicate > how many failures will be tolerated before the device is permanently > disabled. > > Include the

Re: [PATCH 04/15] powerpc/powernv: opal-kmsg use flush fallback from console code

2018-05-03 Thread Nicholas Piggin
On Fri, 04 May 2018 15:16:37 +1000 Michael Ellerman wrote: > Nicholas Piggin writes: > > > Use the more refined and tested event polling loop from opal_put_chars > > as the fallback console flush in the opal-kmsg path. This loop is used > > by the