[RFC PATCH v2 1/4] kvmppc: HMM backend driver to manage pages of secure guest

2018-11-20 Thread Bharata B Rao
HMM driver for KVM PPC to manage page transitions of secure guest via H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. H_SVM_PAGE_IN: Move the content of a normal page to secure page H_SVM_PAGE_OUT: Move the content of a secure page to normal page Signed-off-by: Bharata B Rao ---

[RFC PATCH v2 4/4] kvmppc: Handle memory plug/unplug to secure VM

2018-11-20 Thread Bharata B Rao
Register the new memslot with UV during plug and unregister the memslot during unplug. This needs addition of kvm_mr_change argument to kvm_ops->commit_memory_region() Signed-off-by: Bharata B Rao --- arch/powerpc/include/asm/kvm_ppc.h | 6 -- arch/powerpc/include/asm/ucall-api.h | 5

[RFC PATCH v2 3/4] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2018-11-20 Thread Bharata B Rao
H_SVM_INIT_START: Initiate securing a VM H_SVM_INIT_DONE: Conclude securing a VM During early guest init, these hcalls will be issued by UV. As part of these hcalls, [un]register memslots with UV. Signed-off-by: Bharata B Rao --- arch/powerpc/include/asm/hvcall.h| 2 ++

[RFC PATCH v2 2/4] kvmppc: Add support for shared pages in HMM driver

2018-11-20 Thread Bharata B Rao
A secure guest will share some of its pages with hypervisor (Eg. virtio bounce buffers etc). Support shared pages in HMM driver. Signed-off-by: Bharata B Rao --- arch/powerpc/include/asm/hvcall.h | 3 ++ arch/powerpc/kvm/book3s_hv_hmm.c | 58 +-- 2 files changed,

[RFC PATCH v2 0/4] kvmppc: HMM backend driver to manage pages of secure guest

2018-11-20 Thread Bharata B Rao
Hi, A pseries guest can be run as a secure guest on Ultravisor-enabled POWER platforms. On such platforms, this driver will be used to manage the movement of guest pages between the normal memory managed by hypervisor (HV) and secure memory managed by Ultravisor (UV). This is an early post of

Re: [PATCH v2] cpufreq: powernv: add of_node_put()

2018-11-20 Thread Viresh Kumar
On 20-11-18, 11:05, Yangtao Li wrote: > The of_find_node_by_path() returns a node pointer with refcount > incremented,but there is the lack of use of the of_node_put() when > done.Add the missing of_node_put() to release the refcount. > > Signed-off-by: Yangtao Li > --- > Changes in v2 > -update

Re: [PATCH] cpufreq: pmac64: add of_node_put()

2018-11-20 Thread Viresh Kumar
On 20-11-18, 07:54, Yangtao Li wrote: > use of_node_put to release the refcount of node. > > Signed-off-by: Yangtao Li > --- > drivers/cpufreq/pmac64-cpufreq.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/cpufreq/pmac64-cpufreq.c > b/drivers/cpufreq/pmac64-cpufreq.c >

[PATCH v2] Powerpc/perf: Wire up PMI throttling

2018-11-20 Thread Ravi Bangoria
Commit 14c63f17b1fde ("perf: Drop sample rate when sampling is too slow") introduced a way to throttle PMU interrupts if we're spending too much time just processing those. Wire up powerpc PMI handler to use this infrastructure. We have throttling of the *rate* of interrupts, but this adds

Re: [RFC PATCH v1 5/6] powerpc/mm: Add a framework for Kernel Userspace Access Protection

2018-11-20 Thread Russell Currey
On Wed, 2018-11-07 at 16:56 +, Christophe Leroy wrote: > This patch implements a framework for Kernel Userspace Access > Protection. > > Then subarches will have to possibility to provide their own > implementation > by providing setup_kuap(), and lock/unlock_user_rd/wr_access > > We

RE: [PATCH 1/2 v3] powerpc/fsl: Use new clockgen binding

2018-11-20 Thread Andy Tang
Hi Scott, Any comments on this patch set? BR, Andy > -Original Message- > From: Yuantian Tang > Sent: 2018年10月31日 14:58 > To: o...@buserror.net > Cc: mturque...@baylibre.com; sb...@kernel.org; robh...@kernel.org; > mark.rutl...@arm.com; b...@kernel.crashing.org; pau...@samba.org; >

[PATCH v2 16/15] syscall_get_arch: add "struct task_struct *" argument

2018-11-20 Thread Dmitry V. Levin
This argument is required to extend the generic ptrace API with PTRACE_GET_SYSCALL_INFO request: syscall_get_arch() is going to be called from ptrace_request() along with other syscall_get_* functions with a tracee as their argument. This change partially reverts commit 5e937a9ae913

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Alex_Gagniuc
On 11/20/2018 04:08 PM, Sinan Kaya wrote: > One version is: > "if HEST table is present, ignore _OSC" > or > Another version is: > "if HEST table is present, make sure that FW sets _OSC bit for AER to > false. Otherwise, warn like crazy that this BIOS is broken and needs > an update and can cause

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Alex G.
On 11/20/2018 04:28 PM, Sinan Kaya wrote: On 11/20/2018 4:42 PM, Keith Busch wrote: How does that work? If the OS takes control, it sets up MSIs that FW don't react to, and disables system errors through PCIe Root Control. Aren't those sys errs the mechanism FW knows it has something to do,

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Sinan Kaya
On 11/20/2018 4:42 PM, Keith Busch wrote: How does that work? If the OS takes control, it sets up MSIs that FW don't react to, and disables system errors through PCIe Root Control. Aren't those sys errs the mechanism FW knows it has something to do, which means the OS can effectively fence it

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Sinan Kaya
On 11/20/2018 4:46 PM, alex_gagn...@dellteam.com wrote: Now, let's assume, for the sake of argument, that the firmware on those system's is broken, and it didn't intend to give the OS control of AER. OSPM checking HEST instead of _OSC is still wrong, according to the spec. Two wrongs don't make

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Alex_Gagniuc
On 11/20/2018 03:02 PM, Sinan Kaya wrote: > On 11/20/2018 3:44 PM, alex_gagn...@dellteam.com wrote: >> I'd prefer "sure" instead of "think". "I think it breaks some system I'm >> not telling you about" doesn't help much in figuring out how not to >> break said system(s).:) > > Sorry, I thought I

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Keith Busch
On Tue, Nov 20, 2018 at 04:02:21PM -0500, Sinan Kaya wrote: > On 11/20/2018 3:44 PM, alex_gagn...@dellteam.com wrote: > > I'd prefer "sure" instead of "think". "I think it breaks some system I'm > > not telling you about" doesn't help much in figuring out how not to > > break said system(s).:) >

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Sinan Kaya
On 11/20/2018 3:44 PM, alex_gagn...@dellteam.com wrote: I'd prefer "sure" instead of "think". "I think it breaks some system I'm not telling you about" doesn't help much in figuring out how not to break said system(s).:) Sorry, I thought I mentioned why it would break but let me repeat. The

Re: [PATCH 0/2] PCI/AER: Consistently use _OSC to determine who owns AER

2018-11-20 Thread Alex_Gagniuc
On 11/19/2018 07:54 PM, Sinan Kaya wrote: > On 11/19/2018 6:49 PM, alex_gagn...@dellteam.com wrote: >> On 11/19/2018 02:33 PM, Sinan Kaya wrote: >>> However; table assumes governance about for which entities firmware first >>> should be enabled. There is no cross reference to _OSC or permission

Re: [PATCH v2] powerpc/math-emu: Update macros from gmp-6.1.2

2018-11-20 Thread Segher Boessenkool
On Tue, Nov 20, 2018 at 10:45:19AM -0800, Nick Desaulniers wrote: > On Tue, Nov 20, 2018 at 10:20 AM Segher Boessenkool > wrote: > > > Segher, which tree contains the One True Upstream for longlong.h? > > > > You should probably get your updates from the same place as was used to > > get the file

Re: [PATCH v2] powerpc/math-emu: Update macros from gmp-6.1.2

2018-11-20 Thread Segher Boessenkool
On Tue, Nov 20, 2018 at 09:45:33AM +1030, Joel Stanley wrote: > On Tue, 20 Nov 2018 at 05:24, Nick Desaulniers > wrote: > > > > > > The only functional change I noticed was this in udiv_qrnnd. > > > > > > __r1 = (n1) % __d1; > > > __q1 = (n1) / __d1; > > > > > > Becomes this: > > > > > >

Re: [PATCHv4 0/3] dts: Add the property of IB and OB

2018-11-20 Thread Lorenzo Pieralisi
On Fri, Nov 10, 2017 at 11:48:44AM +0800, Bao Xiaowei wrote: > Depend on http://patchwork.ozlabs.org/patch/815382/ > > Bao Xiaowei (3): > ARMv8: dts: ls1046a: add the property of IB and OB > ARMv8: layerscape: add the pcie ep function support > ARMv8: pcie: make the DWC EP driver support

[PATCH v2] cpufreq: powernv: add of_node_put()

2018-11-20 Thread Yangtao Li
The of_find_node_by_path() returns a node pointer with refcount incremented,but there is the lack of use of the of_node_put() when done.Add the missing of_node_put() to release the refcount. Signed-off-by: Yangtao Li --- Changes in v2 -update changelog --- drivers/cpufreq/powernv-cpufreq.c | 17

Re: [PATCH] cpufreq: powernv: add of_node_put()

2018-11-20 Thread Rafael J. Wysocki
On Tue, Nov 20, 2018 at 1:57 PM Yangtao Li wrote: > > use of_node_put() to release the refcount. Again, this changelog is as good as no changelog at all. If you are adding a missing of_node_put(), please say that and explain why it is necessary. Thanks, Rafael

[PATCH] powerpc/fsl-rio: fix spelling mistake "reserverd" -> "reserved"

2018-11-20 Thread Alexandre Belloni
Fix a spelling mistake in a register description. Signed-off-by: Alexandre Belloni --- arch/powerpc/sysdev/fsl_rio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/fsl_rio.h b/arch/powerpc/sysdev/fsl_rio.h index 12dd18fd4795..6c13d9a7b7b2 100644 ---

Re: [PATCH 10/10] perf/doc: update design.txt for exclude_{host|guest} flags

2018-11-20 Thread Andrew Murray
On Tue, Nov 20, 2018 at 10:31:36PM +1100, Michael Ellerman wrote: > Andrew Murray writes: > > > Update design.txt to reflect the presence of the exclude_host > > and exclude_guest perf flags. > > > > Signed-off-by: Andrew Murray > > --- > > tools/perf/design.txt | 4 > > 1 file changed, 4

[PATCH] ide: pmac: add of_node_put()

2018-11-20 Thread Yangtao Li
use of_node_put() to release the refcount. Signed-off-by: Yangtao Li --- drivers/ide/pmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index c5b902b86b44..203ed4adc04a 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c @@ -920,6 +920,7 @@

[PATCH] cpufreq: powernv: add of_node_put()

2018-11-20 Thread Yangtao Li
use of_node_put() to release the refcount. Signed-off-by: Yangtao Li --- drivers/cpufreq/powernv-cpufreq.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index

[PATCH] cpufreq: pmac64: add of_node_put()

2018-11-20 Thread Yangtao Li
use of_node_put to release the refcount of node. Signed-off-by: Yangtao Li --- drivers/cpufreq/pmac64-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c index be623dd7b9f2..1d32a863332d 100644 ---

Re: [PATCH 10/10] perf/doc: update design.txt for exclude_{host|guest} flags

2018-11-20 Thread Michael Ellerman
Andrew Murray writes: > Update design.txt to reflect the presence of the exclude_host > and exclude_guest perf flags. > > Signed-off-by: Andrew Murray > --- > tools/perf/design.txt | 4 > 1 file changed, 4 insertions(+) > > diff --git a/tools/perf/design.txt b/tools/perf/design.txt >

Re: [PATCH 01/10] perf/core: Add macro to test for event exclusion flags

2018-11-20 Thread Michael Ellerman
Andrew Murray writes: > Add a macro that tests if any of the perf event exclusion flags > are set on a given event. > > Signed-off-by: Andrew Murray > --- > include/linux/perf_event.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/include/linux/perf_event.h

Re: [PATCH 04/10] powerpc: perf/core: generalise event exclusion checking with perf macro

2018-11-20 Thread Michael Ellerman
Andrew Murray writes: > Replace checking of perf event exclusion flags with perf macro. > > Signed-off-by: Andrew Murray > --- > arch/powerpc/perf/hv-24x7.c | 7 +-- > arch/powerpc/perf/hv-gpci.c | 7 +-- > arch/powerpc/perf/imc-pmu.c | 14 ++ > 3 files changed, 4

Re: [PATCH kernel] powerpc/powernv/eeh/npu: Fix uninitialized variables in opal_pci_eeh_freeze_status

2018-11-20 Thread Michael Ellerman
Russell Currey writes: > On Tue, 2018-11-20 at 17:55 +1100, Alexey Kardashevskiy wrote: >> >> On 20/11/2018 14:51, Sam Bobroff wrote: >> > On Tue, Nov 20, 2018 at 01:51:06PM +1100, Michael Ellerman wrote: >> > > Alexey Kardashevskiy writes: >> > > >> > > > The current implementation of the

Re: [PATCH] powerpc/tm: Set MSR[TS] just prior to recheckpoint

2018-11-20 Thread Michael Ellerman
Hi Breno, Thanks for chasing this one down. Breno Leitao writes: > On a signal handler return, the user could set a context with MSR[TS] bits > set, and these bits would be copied to task regs->msr. > > At restore_tm_sigcontexts(), after current task regs->msr[TS] bits are set, > several