Re: PowerNV PCI & SR-IOV cleanups

2020-07-10 Thread Christoph Hellwig
On Fri, Jul 10, 2020 at 03:23:25PM +1000, Oliver O'Halloran wrote: > This is largely prep work for supporting VFs in the 32bit MMIO window. > This is an unfortunate necessity due to how the Linux BAR allocator > handles BARs marked as non-prefetchable. The distinction > between prefetch and

Re: [RFC PATCH 7/7] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2020-07-10 Thread Peter Zijlstra
On Fri, Jul 10, 2020 at 11:56:46AM +1000, Nicholas Piggin wrote: > On big systems, the mm refcount can become highly contented when doing > a lot of context switching with threaded applications (particularly > switching between the idle thread and an application thread). > > Abandoning lazy tlb

Re: [PATCH] powerpc/perf: Add kernel support for new MSR[HV PR] bits in trace-imc.

2020-07-10 Thread Madhavan Srinivasan
On 7/3/20 12:06 PM, Anju T Sudhakar wrote: IMC trace-mode record has MSR[HV PR] bits added in the third DW. These bits can be used to set the cpumode for the instruction pointer captured in each sample. Add support

Re: [PATCH v6 0/5] clean up redundant 'kvm_run' parameters

2020-07-10 Thread Tianjia Zhang
Hi Paolo, Any opinion on this series patches? Can I help with this patchset ? Thanks and best, Tianjia On 2020/6/23 21:14, Tianjia Zhang wrote: In the current kvm version, 'kvm_run' has been included in the 'kvm_vcpu' structure. For historical reasons, many kvm-related function parameters

Re: [PATCH v2 02/12] powerpc/kexec_file: mark PPC64 specific code

2020-07-10 Thread Laurent Dufour
Le 02/07/2020 à 21:54, Hari Bathini a écrit : Some of the kexec_file_load code isn't PPC64 specific. Move PPC64 specific code from kexec/file_load.c to kexec/file_load_64.c. Also, rename purgatory/trampoline.S to purgatory/trampoline_64.S in the same spirit. FWIW and despite a minor comment

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-10 Thread Peter Zijlstra
On Fri, Jul 10, 2020 at 11:56:43AM +1000, Nicholas Piggin wrote: > And get rid of the generic sync_core_before_usermode facility. > > This helper is the wrong way around I think. The idea that membarrier > state requires a core sync before returning to user is the easy one > that does not need

Re: [RFC PATCH 5/7] lazy tlb: introduce lazy mm refcount helper functions

2020-07-10 Thread Peter Zijlstra
On Fri, Jul 10, 2020 at 11:56:44AM +1000, Nicholas Piggin wrote: > diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c > index 73199470c265..ad95812d2a3f 100644 > --- a/arch/powerpc/kernel/smp.c > +++ b/arch/powerpc/kernel/smp.c > @@ -1253,7 +1253,7 @@ void start_secondary(void

Re: [PATCH v6 1/5] KVM: s390: clean up redundant 'kvm_run' parameters

2020-07-10 Thread Paolo Bonzini
On 23/06/20 17:31, Christian Borntraeger wrote: > > I have trouble seeing value in this particular patch. We add LOCs > without providing any noticable benefit. All other patches in this series at > least reduce the amount of code. So I would defer this to Paolo if he prefers > to have this way

Re: [PATCH v6 0/5] clean up redundant 'kvm_run' parameters

2020-07-10 Thread Paolo Bonzini
On 10/07/20 09:32, Tianjia Zhang wrote: > Hi Paolo, > > Any opinion on this series patches? Can I help with this patchset ? I was hoping to have some Tested-by, for now I'm queuing patches 1 and 2. Thanks, Paolo > Thanks and best, > Tianjia > > On 2020/6/23 21:14, Tianjia Zhang wrote: >> In

Re: [PATCH v5 2/2] powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show cpumask

2020-07-10 Thread Madhavan Srinivasan
On 7/9/20 10:48 AM, Kajol Jain wrote: Patch here adds a cpumask attr to hv_24x7 pmu along with ABI documentation. Primary use to expose the cpumask is for the perf tool which has the capability to parse the driver sysfs folder and understand the cpumask file. Having cpumask file will reduce

Re: [mm/debug_vm_pgtable] a97a171093: BUG:unable_to_handle_page_fault_for_address

2020-07-10 Thread Anshuman Khandual
On 07/09/2020 11:41 AM, kernel test robot wrote: > [ 94.349598] BUG: unable to handle page fault for address: ed10a7ffddff > [ 94.351039] #PF: supervisor read access in kernel mode > [ 94.352172] #PF: error_code(0x) - not-present page > [ 94.353256] PGD 43ffed067 P4D 43ffed067

Re: [PATCH v6 3/5] KVM: PPC: clean up redundant kvm_run parameters in assembly

2020-07-10 Thread Paolo Bonzini
On 23/06/20 15:14, Tianjia Zhang wrote: > > /* Load non-volatile guest state from the vcpu */ > - VCPU_LOAD_NVGPRS(r4) > + VCPU_LOAD_NVGPRS(r3) > > kvm_start_lightweight: > /* Copy registers into shadow vcpu so we can access them in real mode */ > - mr r3, r4 >

Re: [PATCH] powerpc/rtas: Restrict RTAS requests from userspace

2020-07-10 Thread Sasha Levin
Hi [This is an automated email] This commit has been processed because it contains a -stable tag. The stable tag indicates that it's relevant for the following trees: all The bot has tested the following trees: v5.7.7, v5.4.50, v4.19.131, v4.14.187, v4.9.229, v4.4.229. v5.7.7: Build OK!

Re: [PATCH 0/2] ASoC: fsl_spdif: Clear the validity bit for TX

2020-07-10 Thread Mark Brown
On Tue, 7 Jul 2020 16:54:24 +0800, Shengjiu Wang wrote: > Clear the validity bit for TX > Add kctl for configuring TX validity bit > > Shengjiu Wang (2): > ASoC: fsl_spdif: Clear the validity bit for TX > ASoC: fsl_spdif: Add kctl for configuring TX validity bit > > [...] Applied to

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-10 Thread Mathieu Desnoyers
- On Jul 9, 2020, at 9:56 PM, Nicholas Piggin npig...@gmail.com wrote: > And get rid of the generic sync_core_before_usermode facility. > > This helper is the wrong way around I think. The idea that membarrier > state requires a core sync before returning to user is the easy one > that does

Re: PowerNV PCI & SR-IOV cleanups

2020-07-10 Thread Oliver O'Halloran
On Fri, Jul 10, 2020 at 4:45 PM Christoph Hellwig wrote: > > On Fri, Jul 10, 2020 at 03:23:25PM +1000, Oliver O'Halloran wrote: > > This is largely prep work for supporting VFs in the 32bit MMIO window. > > This is an unfortunate necessity due to how the Linux BAR allocator > > handles BARs

Re: [PATCH v5] ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime

2020-07-10 Thread Bruno Meneguele
On Fri, Jul 10, 2020 at 01:23:24PM -0400, Mimi Zohar wrote: > On Thu, 2020-07-09 at 13:46 -0300, Bruno Meneguele wrote: > > APPRAISE_BOOTPARAM has been marked as dependent on !ARCH_POLICY in compile > > time, enforcing the appraisal whenever the kernel had the arch policy option > > enabled. > >

Re: [PATCH v5] ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime

2020-07-10 Thread Mimi Zohar
On Fri, 2020-07-10 at 15:34 -0300, Bruno Meneguele wrote: > On Fri, Jul 10, 2020 at 03:03:38PM -0300, Bruno Meneguele wrote: > > On Fri, Jul 10, 2020 at 01:23:24PM -0400, Mimi Zohar wrote: > > > On Thu, 2020-07-09 at 13:46 -0300, Bruno Meneguele wrote: > > > > APPRAISE_BOOTPARAM has been marked as

Re: [PATCH v5] ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime

2020-07-10 Thread Bruno Meneguele
On Fri, Jul 10, 2020 at 03:03:38PM -0300, Bruno Meneguele wrote: > On Fri, Jul 10, 2020 at 01:23:24PM -0400, Mimi Zohar wrote: > > On Thu, 2020-07-09 at 13:46 -0300, Bruno Meneguele wrote: > > > APPRAISE_BOOTPARAM has been marked as dependent on !ARCH_POLICY in compile > > > time, enforcing the

Re: [PATCH] powerpc/numa: Restrict possible nodes based on platform

2020-07-10 Thread Nathan Lynch
Srikar Dronamraju writes: > * Michael Ellerman [2020-07-07 15:02:17]: > >> Srikar Dronamraju writes: >> > $ lsprop /proc/device-tree/rtas/ibm,*associ*-domains >> > /proc/device-tree/rtas/ibm,current-associativity-domains >> > 0005 0001 0002 0002 0002 0010 >>

Re: [RFC PATCH 4/7] x86: use exit_lazy_tlb rather than membarrier_mm_sync_core_before_usermode

2020-07-10 Thread Andy Lutomirski
On Thu, Jul 9, 2020 at 6:57 PM Nicholas Piggin wrote: > > And get rid of the generic sync_core_before_usermode facility. > > This helper is the wrong way around I think. The idea that membarrier > state requires a core sync before returning to user is the easy one > that does not need hiding

Re: [PATCH v5] ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime

2020-07-10 Thread Bruno Meneguele
On Fri, Jul 10, 2020 at 02:54:48PM -0400, Mimi Zohar wrote: > On Fri, 2020-07-10 at 15:34 -0300, Bruno Meneguele wrote: > > On Fri, Jul 10, 2020 at 03:03:38PM -0300, Bruno Meneguele wrote: > > > On Fri, Jul 10, 2020 at 01:23:24PM -0400, Mimi Zohar wrote: > > > > On Thu, 2020-07-09 at 13:46 -0300,

Re: [PATCH v5] ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime

2020-07-10 Thread Mimi Zohar
On Thu, 2020-07-09 at 13:46 -0300, Bruno Meneguele wrote: > APPRAISE_BOOTPARAM has been marked as dependent on !ARCH_POLICY in compile > time, enforcing the appraisal whenever the kernel had the arch policy option > enabled. > However it breaks systems where the option is set but the system

[PATCH 14/14 v3] PCI: Remove '*val = 0' from pcie_capability_read_*()

2020-07-10 Thread Saheed Olayemi Bolarinwa
From: Bolarinwa Olayemi Saheed There are several reasons why a PCI capability read may fail whether the device is present or not. If this happens, pcie_capability_read_*() will return -EINVAL/PCIBIOS_BAD_REGISTER_NUMBER or PCIBIOS_DEVICE_NOT_FOUND and *val is set to 0. This behaviour if further

[PATCH v2] powerpc/pseries: detect secure and trusted boot state of the system.

2020-07-10 Thread Nayna Jain
The device-tree property to check secure and trusted boot state is different for guests(pseries) compared to baremetal(powernv). This patch updates the existing is_ppc_secureboot_enabled() and is_ppc_trustedboot_enabled() function to add support for pseries. Signed-off-by: Nayna Jain

Re: generic DMA bypass flag v4

2020-07-10 Thread Jesper Dangaard Brouer
On Wed, 8 Jul 2020 17:24:44 +0200 Christoph Hellwig wrote: > Note that as-is this breaks the XSK buffer pool, which unfortunately > poked directly into DMA internals. A fix for that is already queued > up in the netdev tree. > > Jesper and XDP gang: this should not regress any performance as

[PATCH 0/14 v3] PCI: Remove '*val = 0' from pcie_capability_read_*()

2020-07-10 Thread Saheed Olayemi Bolarinwa
From: Bolarinwa Olayemi Saheed v3 CHANGES: - Split previous PATCH 6/13 into two : PATCH 6/14 and PATCH 7/14 - Fix commit message of PATCH 5/14 - Update Patch numbering and Commit messages - Add 'Acked by Greg KH' to PATCH 2/14 - Add PATCH version v2 CHANGES: - Fix missing comma, causing the

[PATCH V2 1/2] powerpc/vas: Report proper error code for address translation failure

2020-07-10 Thread Haren Myneni
P9 DD2 NX workbook (Table 4-36) says DMA controller uses CC=5 internally for translation fault handling. NX reserves CC=250 for OS to notify user space when NX encounters address translation failure on the request buffer. Not an issue in earlier releases as NX does not get faults on kernel

[PATCH V2 2/2] selftests/powerpc: Use proper error code to check fault address

2020-07-10 Thread Haren Myneni
ERR_NX_TRANSLATION(CSB.CC=5) is for internal to VAS for fault handling and should not used by OS. ERR_NX_AT_FAULT(CSB.CC=250) is the proper error code should be reported by OS when NX encounters address translation failure. This patch uses CC=250 to determine the fault address when the request