[PATCH kernel v4 3/4] vfio/spapr: Reference mm in tce_container

2016-10-23 Thread Alexey Kardashevskiy
In some situations the userspace memory context may live longer than the userspace process itself so if we need to do proper memory context cleanup, we better have tce_container take a reference to mm_struct and use it later when the process is gone (@current or @current->mm is NULL). This referen

[PATCH kernel v4 2/4] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-10-23 Thread Alexey Kardashevskiy
This changes mm_iommu_xxx helpers to take mm_struct as a parameter instead of getting it from @current which in some situations may not have a valid reference to mm. This changes helpers to receive @mm and moves all references to @current to the caller, including checks for !current and !current->

[PATCH kernel v4 4/4] powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown

2016-10-23 Thread Alexey Kardashevskiy
At the moment the userspace tool is expected to request pinning of the entire guest RAM when VFIO IOMMU SPAPR v2 driver is present. When the userspace process finishes, all the pinned pages need to be put; this is done as a part of the userspace memory context (MM) destruction which happens on the

[PATCH kernel v4 1/4] powerpc/iommu: Pass mm_struct to init/cleanup helpers

2016-10-23 Thread Alexey Kardashevskiy
We are going to get rid of @current references in mmu_context_boos3s64.c and cache mm_struct in the VFIO container. Since mm_context_t does not have reference counting, we will be using mm_struct which does have the reference counter. This changes mm_iommu_init/mm_iommu_cleanup to receive mm_struc

[PATCH kernel v4 0/4] powerpc/spapr/vfio: Put pages on VFIO container shutdown

2016-10-23 Thread Alexey Kardashevskiy
These patches are to fix a bug when pages stay pinned hours after QEMU which requested pinning exited. Please comment. Thanks. Alexey Kardashevskiy (4): powerpc/iommu: Pass mm_struct to init/cleanup helpers powerpc/iommu: Stop using @current in mm_iommu_xxx vfio/spapr: Reference mm in tce_c

Re: [PATCH] powerpc/mm: Use tlbiel only if we ever ran on the current cpu

2016-10-23 Thread Aneesh Kumar K.V
Balbir Singh writes: > On 24/10/16 14:20, Aneesh Kumar K.V wrote: >> Before this patch, we used tlbiel, if we ever ran only on this core. >> That was mostly derived from the nohash usage of the same. But the >> ISA 3.0 clarifies tlbiel such that >> >> "All TLB entries that have all of the follow

Re: [PATCH kernel v3 3/4] vfio/spapr: Cache mm in tce_container

2016-10-23 Thread Nicholas Piggin
On Mon, 24 Oct 2016 15:25:34 +1100 Alexey Kardashevskiy wrote: > On 20/10/16 18:31, Nicholas Piggin wrote: > > On Thu, 20 Oct 2016 14:03:49 +1100 > > Alexey Kardashevskiy wrote: > > > >> In some situations the userspace memory context may live longer than > >> the userspace process itself so

Re: [PATCH kernel v3 3/4] vfio/spapr: Cache mm in tce_container

2016-10-23 Thread Alexey Kardashevskiy
On 20/10/16 18:31, Nicholas Piggin wrote: > On Thu, 20 Oct 2016 14:03:49 +1100 > Alexey Kardashevskiy wrote: > >> In some situations the userspace memory context may live longer than >> the userspace process itself so if we need to do proper memory context >> cleanup, we better cache @mm and use

Re: [PATCH] powerpc/mm: Use tlbiel only if we ever ran on the current cpu

2016-10-23 Thread Balbir Singh
On 24/10/16 14:20, Aneesh Kumar K.V wrote: > Before this patch, we used tlbiel, if we ever ran only on this core. > That was mostly derived from the nohash usage of the same. But the > ISA 3.0 clarifies tlbiel such that > > "All TLB entries that have all of the following properties are made > in

[PATCH] powerpc/mm: Use tlbiel only if we ever ran on the current cpu

2016-10-23 Thread Aneesh Kumar K.V
Before this patch, we used tlbiel, if we ever ran only on this core. That was mostly derived from the nohash usage of the same. But the ISA 3.0 clarifies tlbiel such that "All TLB entries that have all of the following properties are made invalid on the thread executing the tlbiel instruction" He

RE: [PATCH v2 3/6] arm64: dts: lg1313: DT fix s/#interrupts-cells/#interrupt-cells/

2016-10-23 Thread Chanho Min
> > Signed-off-by: Geert Uytterhoeven > --- > v2: > - New. > --- Acked-by: Chanho Min

RE: [PATCH v2 2/6] arm64: dts: lg1312: DT fix s/#interrupts-cells/#interrupt-cells/

2016-10-23 Thread Chanho Min
> > Signed-off-by: Geert Uytterhoeven > Acked-by: Rob Herring > --- > v2: > - Add Acked-by, > - Rebased. > --- Acked-by: Chanho Min

Re: [PATCH v5 9/9] Documentation: virtual: kvm: Support vcpu preempted check

2016-10-23 Thread xinhui
On 2016年10月22日 02:39, rkrc...@redhat.com wrote: 2016-10-21 11:27+, David Laight: From: Pan Xinhui Sent: 20 October 2016 22:28 Commit ("x86, kvm: support vcpu preempted check") add one field "__u8 preempted" into struct kvm_steal_time. This field tells if one vcpu is running or not. It is

Re: [PATCH v5 9/9] Documentation: virtual: kvm: Support vcpu preempted check

2016-10-23 Thread xinhui
On 2016年10月21日 19:27, David Laight wrote: From: Pan Xinhui Sent: 20 October 2016 22:28 Commit ("x86, kvm: support vcpu preempted check") add one field "__u8 preempted" into struct kvm_steal_time. This field tells if one vcpu is running or not. It is zero if 1) some old KVM deos not support th

[PATCH] powerpc: fpr save/restore function cleanups (was Re: [powerpc:test 24/28] powerpc64-linux-gnu-ld: warning: orphan section `.text.save.restore' from `arch/powerpc/lib/built-in.o' being placed i

2016-10-23 Thread Nicholas Piggin
On Mon, 24 Oct 2016 12:57:34 +1100 Nicholas Piggin wrote: > On Sat, 22 Oct 2016 15:53:03 +0800 > kbuild test robot wrote: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > > test > > head: 8a4fd950c8ac67ad98135db4107ed6cae412606c > > commit: b09fa228be430ba274

Re: [powerpc:test 24/28] powerpc64-linux-gnu-ld: warning: orphan section `.text.save.restore' from `arch/powerpc/lib/built-in.o' being placed in section `.text.save.restore'.

2016-10-23 Thread Nicholas Piggin
On Sat, 22 Oct 2016 15:53:03 +0800 kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git test > head: 8a4fd950c8ac67ad98135db4107ed6cae412606c > commit: b09fa228be430ba2745102ac8e668ad869320bd9 [24/28] powerpc: link > warning for orphan sections >

[PATCH 3/3] corenet: Switch to of_platform_default_populate

2016-10-23 Thread Andy Fleming
Many of the embedded powerpc boards use an array of device names to register the devices from the device tree. Instead, we can use of_platform_default_populate(), which will iterate through all the root nodes and register them. Signed-off-by: Andy Fleming --- This is necessary to enable the gpio

[PATCH v2 1/3] cyrus: Add poweroff/reset support

2016-10-23 Thread Andy Fleming
Cyrus uses GPIOs to complete board shutdown/reset. Add nodes to indicate that support to the device tree. Signed-off-by: Andy Fleming --- v2: No changes arch/powerpc/boot/dts/fsl/cyrus_p5020.dts | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p50

[PATCH 2/3] 85xx: Enable gpio power/reset driver

2016-10-23 Thread Andy Fleming
These config changes build: drivers/power/reset/gpio-poweroff.c drivers/power/reset/gpio-restart.c Signed-off-by: Andy Fleming --- arch/powerpc/configs/fsl-emb-nonhw.config | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/configs/fsl-emb-nonhw.config b/arch/powerpc/configs

Re: [PATCH v2 2/2] PCI: Don't disable PF's memory decoding when enabling SRIOV

2016-10-23 Thread Gavin Shan
On Fri, Oct 21, 2016 at 11:50:34AM -0500, Bjorn Helgaas wrote: >Hi Gavin, > >On Fri, Sep 30, 2016 at 09:47:50AM +1000, Gavin Shan wrote: >> pci_update_resource() might be called to update (shift) IOV BARs >> in PPC PowerNV specific pcibios_sriov_enable() when enabling PF's >> SRIOV capability. At t

Linux 4.9: Reported regressions as of Sunday, 2016-10-23

2016-10-23 Thread Thorsten Leemhuis
Hi! Here is my first regression report for Linux 4.9. It lists 14 regressions I'm aware of. As always: Are you aware of any other regressions? Then please let me know (simply CC regressi...@leemhuis.info). And please tell me if there is anything in the report that shouldn't be there. Ciao, Thor