Re: [PATCH v2 0/4] Remove 32-bit Xen PV guest support

2020-07-02 Thread Brian Gerst
On Wed, Jul 1, 2020 at 7:07 AM Juergen Gross wrote: > > The long term plan has been to replace Xen PV guests by PVH. The first > victim of that plan are now 32-bit PV guests, as those are used only > rather seldom these days. Xen on x86 requires 64-bit support and with > Grub2 now supporting PVH

Re: [PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature

2020-07-02 Thread Pierre Morel
On 2020-06-29 18:05, Cornelia Huck wrote: On Mon, 29 Jun 2020 11:57:14 -0400 "Michael S. Tsirkin" wrote: On Wed, Jun 17, 2020 at 12:43:57PM +0200, Pierre Morel wrote: An architecture protecting the guest memory against unauthorized host access may want to enforce VIRTIO I/O device

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Arnd Bergmann
On Thu, Jul 2, 2020 at 1:18 PM Will Deacon wrote: > On Thu, Jul 02, 2020 at 12:08:41PM +0200, Arnd Bergmann wrote: > > On Thu, Jul 2, 2020 at 11:48 AM Will Deacon wrote: > > > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > Not sure I follow you here, but I can confirm that what

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Will Deacon
Hi Joel, On Thu, Jul 02, 2020 at 10:43:55AM -0400, Joel Fernandes wrote: > On Tue, Jun 30, 2020 at 1:38 PM Will Deacon wrote: > > diff --git a/arch/alpha/include/asm/barrier.h > > b/arch/alpha/include/asm/barrier.h > > index 92ec486a4f9e..2ecd068d91d1 100644 > > ---

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Will Deacon
On Thu, Jul 02, 2020 at 12:08:41PM +0200, Arnd Bergmann wrote: > On Thu, Jul 2, 2020 at 11:48 AM Will Deacon wrote: > > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > > > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > > > -#define read_barrier_depends() __asm__

Re: [PATCH 6/8] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

2020-07-02 Thread kernel test robot
Hi Nicholas, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on tip/locking/core v5.8-rc3 next-20200702] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented

Re: [PATCH v2 0/4] Remove 32-bit Xen PV guest support

2020-07-02 Thread Jürgen Groß
On 02.07.20 16:48, Brian Gerst wrote: On Wed, Jul 1, 2020 at 7:07 AM Juergen Gross wrote: The long term plan has been to replace Xen PV guests by PVH. The first victim of that plan are now 32-bit PV guests, as those are used only rather seldom these days. Xen on x86 requires 64-bit support

Re: [PATCH 6/8] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

2020-07-02 Thread Waiman Long
On 7/2/20 3:48 AM, Nicholas Piggin wrote: Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 23 arch/powerpc/include/asm/qspinlock.h | 55 +++ arch/powerpc/include/asm/qspinlock_paravirt.h | 5 ++

Re: [PATCH 6/8] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

2020-07-02 Thread Waiman Long
On 7/2/20 12:15 PM, kernel test robot wrote: Hi Nicholas, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on tip/locking/core v5.8-rc3 next-20200702] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
Excerpts from Will Deacon's message of July 2, 2020 6:02 pm: > On Thu, Jul 02, 2020 at 05:48:36PM +1000, Nicholas Piggin wrote: >> diff --git a/arch/powerpc/include/asm/qspinlock.h >> b/arch/powerpc/include/asm/qspinlock.h >> new file mode 100644 >> index ..f84da77b6bb7 >> ---

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Will Deacon
On Thu, Jul 02, 2020 at 08:25:43PM +1000, Nicholas Piggin wrote: > Excerpts from Will Deacon's message of July 2, 2020 6:02 pm: > > On Thu, Jul 02, 2020 at 05:48:36PM +1000, Nicholas Piggin wrote: > >> diff --git a/arch/powerpc/include/asm/qspinlock.h > >> b/arch/powerpc/include/asm/qspinlock.h >

Re: [PATCH 2/8] powerpc/pseries: use smp_rmb() in H_CONFER spin yield

2020-07-02 Thread Nicholas Piggin
Excerpts from Peter Zijlstra's message of July 2, 2020 6:28 pm: > On Thu, Jul 02, 2020 at 05:48:33PM +1000, Nicholas Piggin wrote: >> There is no need for rmb(), this allows faster lwsync here. > > Since you determined this; I'm thinking you actually understand the > ordering here. How about

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
Excerpts from Will Deacon's message of July 2, 2020 8:35 pm: > On Thu, Jul 02, 2020 at 08:25:43PM +1000, Nicholas Piggin wrote: >> Excerpts from Will Deacon's message of July 2, 2020 6:02 pm: >> > On Thu, Jul 02, 2020 at 05:48:36PM +1000, Nicholas Piggin wrote: >> >> diff --git

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Will Deacon
On Thu, Jul 02, 2020 at 08:47:05PM +1000, Nicholas Piggin wrote: > Excerpts from Will Deacon's message of July 2, 2020 8:35 pm: > > On Thu, Jul 02, 2020 at 08:25:43PM +1000, Nicholas Piggin wrote: > >> Excerpts from Will Deacon's message of July 2, 2020 6:02 pm: > >> > On Thu, Jul 02, 2020 at

[PATCH 2/8] powerpc/pseries: use smp_rmb() in H_CONFER spin yield

2020-07-02 Thread Nicholas Piggin
There is no need for rmb(), this allows faster lwsync here. Signed-off-by: Nicholas Piggin --- arch/powerpc/lib/locks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c index 6440d5943c00..47a530de733e 100644 ---

[PATCH 4/8] powerpc: move spinlock implementation to simple_spinlock

2020-07-02 Thread Nicholas Piggin
To prepare for queued spinlocks. This is a simple rename except to update preprocessor guard name and a file reference. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/simple_spinlock.h| 292 ++ .../include/asm/simple_spinlock_types.h | 21 ++

[PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
These have shown significantly improved performance and fairness when spinlock contention is moderate to high on very large systems. [ Numbers hopefully forthcoming after more testing, but initial results look good ] Thanks to the fast path, single threaded performance is not noticably hurt.

[PATCH 0/8] powerpc: queued spinlocks and rwlocks

2020-07-02 Thread Nicholas Piggin
This series adds an option to use queued spinlocks for powerpc, and makes it the default for the Book3S-64 subarch. This effort starts with the generic code so it's very simple but still very performant. There are optimisations that can be made to slowpaths, but I think it's better to attack

[PATCH 1/8] powerpc/powernv: must include hvcall.h to get PAPR defines

2020-07-02 Thread Nicholas Piggin
An include goes away in future patches which breaks compilation without this. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/pci-ioda-tce.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/pci-ioda-tce.c

Re: [PATCH 5/8] powerpc/64s: implement queued spinlocks and rwlocks

2020-07-02 Thread Will Deacon
On Thu, Jul 02, 2020 at 05:48:36PM +1000, Nicholas Piggin wrote: > diff --git a/arch/powerpc/include/asm/qspinlock.h > b/arch/powerpc/include/asm/qspinlock.h > new file mode 100644 > index ..f84da77b6bb7 > --- /dev/null > +++ b/arch/powerpc/include/asm/qspinlock.h > @@ -0,0 +1,20 @@ >

Re: [PATCH v2 0/4] Remove 32-bit Xen PV guest support

2020-07-02 Thread Peter Zijlstra
On Wed, Jul 01, 2020 at 01:06:46PM +0200, Juergen Gross wrote: > The long term plan has been to replace Xen PV guests by PVH. The first > victim of that plan are now 32-bit PV guests, as those are used only > rather seldom these days. Xen on x86 requires 64-bit support and with > Grub2 now

Re: [PATCH 18/18] arm64: lto: Strengthen READ_ONCE() to acquire when CLANG_LTO=y

2020-07-02 Thread Will Deacon
On Wed, Jul 01, 2020 at 06:07:25PM +0100, Dave P Martin wrote: > On Tue, Jun 30, 2020 at 06:37:34PM +0100, Will Deacon wrote: > > When building with LTO, there is an increased risk of the compiler > > converting an address dependency headed by a READ_ONCE() invocation > > into a control dependency

[PATCH 8/8] powerpc/64s: remove paravirt from simple spinlocks (RFC only)

2020-07-02 Thread Nicholas Piggin
RFC until we settle on queued spinlocks for 64s and remove the option to go back to simple locks. If other sub-archs want to keep simple spinlocks, the code can be nicely simplified. --- arch/powerpc/include/asm/simple_spinlock.h | 61 +--- arch/powerpc/kvm/book3s_hv_rm_mmu.c

[PATCH 6/8] powerpc/pseries: implement paravirt qspinlocks for SPLPAR

2020-07-02 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 23 arch/powerpc/include/asm/qspinlock.h | 55 +++ arch/powerpc/include/asm/qspinlock_paravirt.h | 5 ++ arch/powerpc/platforms/pseries/Kconfig| 5 ++

[PATCH 7/8] powerpc/qspinlock: optimised atomic_try_cmpxchg_lock that adds the lock hint

2020-07-02 Thread Nicholas Piggin
This brings the behaviour of the uncontended fast path back to roughly equivalent to simple spinlocks -- a single atomic op with lock hint. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/atomic.h| 28 arch/powerpc/include/asm/qspinlock.h | 2 +- 2

[PATCH 3/8] powerpc/pseries: move some PAPR paravirt functions to their own file

2020-07-02 Thread Nicholas Piggin
Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/paravirt.h | 61 + arch/powerpc/include/asm/spinlock.h | 24 +--- arch/powerpc/lib/locks.c| 12 +++--- 3 files changed, 68 insertions(+), 29 deletions(-) create mode 100644

Re: [PATCH 2/8] powerpc/pseries: use smp_rmb() in H_CONFER spin yield

2020-07-02 Thread Peter Zijlstra
On Thu, Jul 02, 2020 at 05:48:33PM +1000, Nicholas Piggin wrote: > There is no need for rmb(), this allows faster lwsync here. Since you determined this; I'm thinking you actually understand the ordering here. How about recording this understanding in a comment? Also, should the lock->slock load

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Mark Rutland
On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > Rather then relying on the core code to use smp_read_barrier_depends() > as part of the READ_ONCE() definition, instead override __READ_ONCE() > in the Alpha code so that it is treated the same way as > smp_load_acquire(). > >

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Will Deacon
On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > -#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory") > > +#define __smp_load_acquire(p) > > \ > > +({

Re: [RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication

2020-07-02 Thread Michael S. Tsirkin
On Thu, Jul 02, 2020 at 01:51:21PM +0530, Kishon Vijay Abraham I wrote: > This series enhances Linux Vhost support to enable SoC-to-SoC > communication over MMIO. This series enables rpmsg communication between > two SoCs using both PCIe RC<->EP and HOST1-NTB-HOST2 > > 1) Modify vhost to use

Re: [PATCH 04/18] alpha: Override READ_ONCE() with barriered implementation

2020-07-02 Thread Arnd Bergmann
On Thu, Jul 2, 2020 at 11:48 AM Will Deacon wrote: > On Thu, Jul 02, 2020 at 10:32:39AM +0100, Mark Rutland wrote: > > On Tue, Jun 30, 2020 at 06:37:20PM +0100, Will Deacon wrote: > > > -#define read_barrier_depends() __asm__ __volatile__("mb": : :"memory") > > > +#define __smp_load_acquire(p)

Re: [RFC PATCH 00/22] Enhance VHOST to enable SoC-to-SoC communication

2020-07-02 Thread Jason Wang
On 2020/7/2 下午5:51, Michael S. Tsirkin wrote: On Thu, Jul 02, 2020 at 01:51:21PM +0530, Kishon Vijay Abraham I wrote: This series enhances Linux Vhost support to enable SoC-to-SoC communication over MMIO. This series enables rpmsg communication between two SoCs using both PCIe RC<->EP and

Re: [PATCH 0/5] drivers/char: Constify static variables

2020-07-02 Thread Arnd Bergmann
On Wed, Jul 1, 2020 at 11:48 PM Rikard Falkeborn wrote: > > Constify some static variables (mostly structs) that are not modified. > > Rikard Falkeborn (5): > hwrng: bcm2835 - Constify bcm2835_rng_devtype[] > hwrng: nomadik - Constify nmk_rng_ids[] > hwrng: virtio - Constify id_table[] >