Re: [Xen-devel] [Qemu-devel] [PATCH] x86: Skip check apic_id_limit for Xen

2017-10-26 Thread Michael S. Tsirkin
de and so skip the check in Qemu to avoid blocking > > Xen creating >255 vcpus. > > We may make Qemu have knowledge of the vIOMMU device if it's > > necessary when adding new function. > > I was expecting it to go through the PC tree, but I will queue it

[Xen-devel] [PULL 18/26] pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices

2017-10-14 Thread Michael S. Tsirkin
hn Snow <js...@redhat.com> Acked-by: Anthony PERARD <anthony.per...@citrix.com> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> Reviewed-by: David Gibson <da...@gibson.dropbear.id.au> Acked-by: David Gibson <da...@gibson.dropbear.id.au> Reviewed-by: Marcel Ap

[Xen-devel] [PULL 19/26] xen/pt: Mark TYPE_XEN_PT_DEVICE as hybrid

2017-10-14 Thread Michael S. Tsirkin
ewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- hw/xen/xen_pt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 01df341..9bba717 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -966,6 +

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-14 Thread Michael S. Tsirkin
On Fri, Oct 13, 2017 at 03:53:26PM +0800, Haozhong Zhang wrote: > On 10/12/17 17:45 +0200, Paolo Bonzini wrote: > > On 12/10/2017 14:45, Haozhong Zhang wrote: > > > Basically, QEMU builds two ROMs for guest, /rom@etc/acpi/tables and > > > /rom@etc/table-loader. The former is unstructured to guest,

Re: [Xen-devel] [Qemu-devel] [RFC QEMU PATCH v3 00/10] Implement vNVDIMM for Xen HVM guest

2017-10-14 Thread Michael S. Tsirkin
On Fri, Oct 13, 2017 at 03:46:39PM -0700, Stefano Stabellini wrote: > On Fri, 13 Oct 2017, Jan Beulich wrote: > > >>> On 13.10.17 at 13:13, wrote: > > > To Jan, Andrew, Stefano and Anthony, > > > > > > what do you think about allowing QEMU to build the entire guest ACPI

Re: [Xen-devel] [PATCH for-2.10 v3 2/3] hw/acpi: Move acpi_set_pci_info to pcihp

2017-08-18 Thread Michael S. Tsirkin
On Fri, Aug 18, 2017 at 05:00:18PM +0100, Anthony PERARD wrote: > > > > > > > > > > Clean it up after 2.10. > > > > > > > > > > > So is the v2 good enough or do I need to resend it? > > Do you really need it in 2.10? > > it's only 2 days left till release so unless it's blocker > > I'd wait

Re: [Xen-devel] [PATCH for-2.10 v3 2/3] hw/acpi: Move acpi_set_pci_info to pcihp

2017-08-18 Thread Michael S. Tsirkin
On Fri, Aug 18, 2017 at 04:19:57PM +0200, Igor Mammedov wrote: > > > > > > > > Clean it up after 2.10. > > > > > > > > So is the v2 good enough or do I need to resend it? > Do you really need it in 2.10? > it's only 2 days left till release so unless it's blocker > I'd wait till after release

Re: [Xen-devel] [PATCH for-2.10 v3 2/3] hw/acpi: Move acpi_set_pci_info to pcihp

2017-08-17 Thread Michael S. Tsirkin
On Thu, Aug 17, 2017 at 05:23:46PM +0100, Anthony PERARD wrote: > This means that the function will be call and the property > acpi-pcihp-bsel will be set even if ACPI build is disable. > > To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be > set, but this was done only when

Re: [Xen-devel] [PATCH for-2.10 v2 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed

2017-08-15 Thread Michael S. Tsirkin
On Tue, Aug 15, 2017 at 02:07:51PM +0200, Igor Mammedov wrote: > On Tue, 15 Aug 2017 12:15:48 +0100 > Anthony PERARD wrote: > > > To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be > > set, but this was done only when ACPI tables are built which

Re: [Xen-devel] [PATCH for-2.10 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed

2017-08-14 Thread Michael S. Tsirkin
On Mon, Aug 14, 2017 at 05:45:02PM +0100, Anthony PERARD wrote: > On Mon, Aug 14, 2017 at 06:53:14PM +0300, Michael S. Tsirkin wrote: > > On Mon, Aug 14, 2017 at 03:55:50PM +0100, Anthony PERARD wrote: > > > On Fri, Aug 11, 2017 at 08:18:28PM +0300, Michael S. Tsirkin wrote: >

Re: [Xen-devel] [PATCH for-2.10 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed

2017-08-14 Thread Michael S. Tsirkin
On Mon, Aug 14, 2017 at 03:55:50PM +0100, Anthony PERARD wrote: > On Fri, Aug 11, 2017 at 08:18:28PM +0300, Michael S. Tsirkin wrote: > > On Fri, Aug 11, 2017 at 04:11:37PM +0100, Anthony PERARD wrote: > > > To do PCI passthrough with Xen, the property acpi-pcihp-bsel nee

Re: [Xen-devel] [PATCH for-2.10 1/2] hw/acpi: Call acpi_set_pci_info when no ACPI tables needed

2017-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2017 at 04:11:37PM +0100, Anthony PERARD wrote: > To do PCI passthrough with Xen, the property acpi-pcihp-bsel needs to be > set, but this was done only when ACPI tables are built which is not > needed for a Xen guest. The need for the property starts with commit > "pc: pcihp:

[Xen-devel] [PULL v2 01/30] xen: fix ram init regression

2016-07-05 Thread Michael S. Tsirkin
s, also this way xen_ram_init can actually see whenever max-ram-below-4g is zero or not. Reported-by: Anthony PERARD <anthony.per...@citrix.com> Tested-by: Anthony PERARD <anthony.per...@citrix.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Reviewed-by: Michael S. Tsirkin <m...

[Xen-devel] [PULL 01/36] xen: fix ram init regression

2016-07-04 Thread Michael S. Tsirkin
s, also this way xen_ram_init can actually see whenever max-ram-below-4g is zero or not. Reported-by: Anthony PERARD <anthony.per...@citrix.com> Tested-by: Anthony PERARD <anthony.per...@citrix.com> Signed-off-by: Gerd Hoffmann <kra...@redhat.com> Reviewed-by: Michael S. Tsirkin <m...

[Xen-devel] [PULL v2 17/51] msi_supported -> msi_nonbroken

2016-03-15 Thread Michael S. Tsirkin
Rename controller flag to make it clearer what it means. Add some documentation as well. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include/hw/pci/msi.h | 2 +- hw/i386/kvm/apic.c | 2 +- hw/i386/xen/xen_apic.c | 2 +- hw/intc/

[Xen-devel] [PULL 17/53] msi_supported -> msi_nonbroken

2016-03-11 Thread Michael S. Tsirkin
Rename controller flag to make it clearer what it means. Add some documentation as well. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include/hw/pci/msi.h | 2 +- hw/i386/kvm/apic.c | 2 +- hw/i386/xen/xen_apic.c | 2 +- hw/intc/

Re: [Xen-devel] [PATCH v7 0/9] virtio DMA API, yet again

2016-02-17 Thread Michael S. Tsirkin
On Tue, Feb 16, 2016 at 09:48:58PM -0800, Andy Lutomirski wrote: > On Tue, Feb 2, 2016 at 9:46 PM, Andy Lutomirski wrote: > > This switches virtio to use the DMA API on Xen and if requested by > > module option. > > Michael, any update on this? > > --Andy I was hoping for an

[Xen-devel] [PULL v2 44/45] fix MSI injection on Xen

2016-02-06 Thread Michael S. Tsirkin
. Fix the issue by ignoring the masking bit for MSI and MSI-X which have been remapped into pirqs. Signed-off-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include

[Xen-devel] [PULL 44/49] fix MSI injection on Xen

2016-02-04 Thread Michael S. Tsirkin
. Fix the issue by ignoring the masking bit for MSI and MSI-X which have been remapped into pirqs. Signed-off-by: Stefano Stabellini <stefano.stabell...@eu.citrix.com> Reviewed-by: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include

Re: [Xen-devel] [PATCH RESEND] fix MSI injection on Xen

2016-02-04 Thread Michael S. Tsirkin
On Thu, Feb 04, 2016 at 05:05:46PM +, Stefano Stabellini wrote: > Hi Michael, > > do you have any comments on this? I dislike how it spreads xen specific stuff around, but I don't have a better idea at the moment, so I applied this. > On Wed, 13 Jan 2016, Stefano Stabellini wrote: > > On

Re: [Xen-devel] [PATCH v7 5/9] virtio_ring: Support DMA APIs

2016-02-03 Thread Michael S. Tsirkin
On Tue, Feb 02, 2016 at 09:46:36PM -0800, Andy Lutomirski wrote: > virtio_ring currently sends the device (usually a hypervisor) > physical addresses of its I/O buffers. This is okay when DMA > addresses and physical addresses are the same thing, but this isn't > always the case. For example,

Re: [Xen-devel] [PATCH v6 6/9] virtio: Add improved queue allocation API

2016-02-02 Thread Michael S. Tsirkin
On Mon, Feb 01, 2016 at 10:00:56AM -0800, Andy Lutomirski wrote: > This leaves vring_new_virtqueue alone for compatbility, but it > adds two new improved APIs: > > vring_create_virtqueue: Creates a virtqueue backed by automatically > allocated coherent memory. (Some day it this could be extended

Re: [Xen-devel] [PATCH v5 04/10] vring: Introduce vring_use_dma_api()

2016-02-01 Thread Michael S. Tsirkin
On Mon, Feb 01, 2016 at 11:22:03AM +, David Woodhouse wrote: > On Thu, 2016-01-28 at 18:31 -0800, Andy Lutomirski wrote: > > This is a kludge, but no one has come up with a a better idea yet. > > We'll introduce DMA API support guarded by vring_use_dma_api(). > > Eventually we may be able to

Re: [Xen-devel] [PATCH v5 09/10] vring: Use the DMA API on Xen

2016-01-31 Thread Michael S. Tsirkin
On Sun, Jan 31, 2016 at 12:13:58PM -0800, Andy Lutomirski wrote: > On Sun, Jan 31, 2016 at 12:09 PM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Fri, Jan 29, 2016 at 10:34:59AM +, David Vrabel wrote: > >> On 29/01/16 02:31, Andy Lutomirski wrote: > >> &g

Re: [Xen-devel] [PATCH v5 00/10] virtio DMA API, yet again

2016-01-31 Thread Michael S. Tsirkin
On Thu, Jan 28, 2016 at 06:31:13PM -0800, Andy Lutomirski wrote: > This switches virtio to use the DMA API on Xen and if requested by > module option. > > This fixes virtio on Xen, and it should break anything because it's > off by default on everything except Xen PV on x86. > > To the Xen

Re: [Xen-devel] [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-14 Thread Michael S. Tsirkin
On Wed, Jan 13, 2016 at 02:26:16PM -0800, Leonid Yegoshin wrote: > And all that is out-of-topic here in my mind. I just want to be sure that > this patchset still provides a use of a specific lightweight SYNCs on MIPS > vs bold and heavy generalized "SYNC 0" in any case. > > - Leonid. Of course

Re: [Xen-devel] [Qemu-devel] [PATCH v4] igd-passthrough-i440FX: convert to realize()

2016-01-12 Thread Michael S. Tsirkin
ell...@eu.citrix.com>; Lars Kurth > > <lars.ku...@citrix.com>; xen-de...@lists.xensource.com; Michael S. Tsirkin > > <m...@redhat.com>; Lars Kurth <lars.kurth@gmail.com>; qemu- > > de...@nongnu.org; Cao jin <caoj.f...@cn.fujitsu.com>; Stefano Stabellini > >

Re: [Xen-devel] [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-12 Thread Michael S. Tsirkin
On Mon, Jan 11, 2016 at 05:14:14PM -0800, Leonid Yegoshin wrote: > On 01/10/2016 06:18 AM, Michael S. Tsirkin wrote: > >On mips dma_rmb, dma_wmb, smp_store_mb, read_barrier_depends, > >smp_read_barrier_depends, smp_store_release and smp_load_acquire match > >the asm-generic v

Re: [Xen-devel] [PATCH v3 01/41] lcoking/barriers, arch: Use smp barriers in smp_store_release()

2016-01-12 Thread Michael S. Tsirkin
On Tue, Jan 12, 2016 at 08:28:44AM -0800, Paul E. McKenney wrote: > On Sun, Jan 10, 2016 at 04:16:32PM +0200, Michael S. Tsirkin wrote: > > From: Davidlohr Bueso <d...@stgolabs.net> > > > > With commit b92b8b35a2e ("locking/arch: Rename set_mb() to smp_st

[Xen-devel] [PATCH v4 2/3] checkpatch: check for __smp outside barrier.h

2016-01-11 Thread Michael S. Tsirkin
ch test so it will trigger a warning. Reported-by: Russell King <li...@arm.linux.org.uk> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9

[Xen-devel] [PATCH v4 3/3] checkpatch: add virt barriers

2016-01-11 Thread Michael S. Tsirkin
Add virt_ barriers to list of barriers to check for presence of a comment. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 25476c2..c

[Xen-devel] [PATCH v4 1/3] checkpatch.pl: add missing memory barriers

2016-01-11 Thread Michael S. Tsirkin
SMP-only barriers were missing in checkpatch.pl Refactor code slightly to make adding more variants easier. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/s

Re: [Xen-devel] [PATCH v3 3/3] checkpatch: add virt barriers

2016-01-11 Thread Michael S. Tsirkin
On Mon, Jan 11, 2016 at 09:40:18PM +1100, Julian Calaby wrote: > Hi Michael, > > On Mon, Jan 11, 2016 at 9:35 PM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Sun, Jan 10, 2016 at 02:52:16PM -0800, Joe Perches wrote: > >> On Mon, 2016-01-11 at 09:13 +1100, Juli

Re: [Xen-devel] [PATCH v4] igd-passthrough-i440FX: convert to realize()

2016-01-11 Thread Michael S. Tsirkin
..@eu.citrix.com>; Lars Kurth > > > <lars.kurth@gmail.com>; Lars Kurth <lars.ku...@citrix.com>; Cao jin > > > <caoj.f...@cn.fujitsu.com>; xen-de...@lists.xensource.com; Stefano > > > Stabellini > > > <stefano.stabell...@citrix.com>; qemu-de...@nong

Re: [Xen-devel] [PATCH v3 3/3] checkpatch: add virt barriers

2016-01-11 Thread Michael S. Tsirkin
On Sun, Jan 10, 2016 at 02:52:16PM -0800, Joe Perches wrote: > On Mon, 2016-01-11 at 09:13 +1100, Julian Calaby wrote: > > On Mon, Jan 11, 2016 at 6:31 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > > Add virt_ barriers to list of barriers to check for >

[Xen-devel] [PATCH v4 0/3] checkpatch: handling of memory barriers

2016-01-11 Thread Michael S. Tsirkin
unnecessary capture groups rename smp_barriers to smp_barrier_stems for clarity add barriers before/after atomic Changes from v1: catch optional\s* before () in barriers rewrite using qr{} instead of map Michael S. Tsirkin (3): checkpatch.pl: add missing memory

Re: [Xen-devel] [PATCH v4 0/3] checkpatch: handling of memory barriers

2016-01-11 Thread Michael S. Tsirkin
On Mon, Jan 11, 2016 at 12:59:25PM +0200, Michael S. Tsirkin wrote: > As part of memory barrier cleanup, this patchset > extends checkpatch to make it easier to stop > incorrect memory barrier usage. > > This replaces the checkpatch patches in my series > arch: barrier

Re: [Xen-devel] [PATCH v2 20/32] metag: define __smp_xxx

2016-01-11 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:09:30AM +, James Hogan wrote: > Hi Michael, > > On Thu, Dec 31, 2015 at 09:08:22PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for metag, > > for use by virtualization. > > > > smp_xxx barriers are removed

[Xen-devel] [PATCH v2 3/3] checkpatch: add virt barriers

2016-01-10 Thread Michael S. Tsirkin
Add virt_ barriers to list of barriers to check for presence of a comment. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a96adcb..5

[Xen-devel] [PATCH v2 2/3] checkpatch: check for __smp outside barrier.h

2016-01-10 Thread Michael S. Tsirkin
ch test so it will trigger a warning. Reported-by: Russell King <li...@arm.linux.org.uk> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9

[Xen-devel] [PATCH v2 0/3] checkpatch: handling of memory barriers

2016-01-10 Thread Michael S. Tsirkin
optional\s* before () in barriers rewrite using qr{} instead of map Michael S. Tsirkin (3): checkpatch.pl: add missing memory barriers checkpatch: check for __smp outside barrier.h checkpatch: add virt barriers scripts/checkpatch.pl | 31 ++- 1 file

[Xen-devel] [PATCH v2 1/3] checkpatch.pl: add missing memory barriers

2016-01-10 Thread Michael S. Tsirkin
SMP-only barriers were missing in checkpatch.pl Refactor code slightly to make adding more variants easier. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/s

Re: [Xen-devel] [PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-10 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:15:50PM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 22:45 +0200, Michael S. Tsirkin wrote: > > On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > > > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > > >

[Xen-devel] [PATCH v3 14/41] asm-generic: add __smp_xxx wrappers

2016-01-10 Thread Michael S. Tsirkin
ones or barrier() depending on SMP, identically for all architectures. We keep ifndef guards around them for now - once/if all architectures are converted to use the generic code, we'll be able to remove these. Suggested-by: Peter Zijlstra <pet...@infradead.org> Signed-off-by: Michael S. Tsir

[Xen-devel] [PATCH v3 11/41] mips: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/mips/include/asm/barrier.h | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/arch/mips/include/asm/barrier.h b/arch/mips/include/asm/barrier.h i

[Xen-devel] [PATCH v3 15/41] powerpc: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for powerpc for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h This reduces the amount of arch-specific boiler-plate code. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Be

[Xen-devel] [PATCH v3 10/41] metag: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/metag/include/asm/barrier.h | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/arch/metag/include/asm/barrier.h b/arch/metag/include/asm/bar

[Xen-devel] [PATCH v3 13/41] x86: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
As on most architectures, on x86 read_barrier_depends and smp_read_barrier_depends are empty. Drop the local definitions and pull the generic ones from asm-generic/barrier.h instead: they are identical. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin &l

[Xen-devel] [PATCH v3 26/41] xtensa: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for xtensa, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/xtensa/include/asm/b

[Xen-devel] [PATCH v3 24/41] sparc: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for sparc, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> Acked-by: David S. Miller <da..

[Xen-devel] [PATCH v3 27/41] x86: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for x86, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/x86/include/asm/ba

[Xen-devel] [PATCH v3 29/41] Revert "virtio_ring: Update weak barriers to use dma_wmb/rmb"

2016-01-10 Thread Michael S. Tsirkin
for !SMP. We switch to __smp_XXX barriers in the next patch. Cc: Peter Zijlstra <pet...@infradead.org> Cc: Alexander Duyck <alexander.du...@gmail.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include/linux/virtio_ring.h | 23 +++ 1 file changed, 1

[Xen-devel] [PATCH v3 34/41] checkpatch.pl: add missing memory barriers

2016-01-10 Thread Michael S. Tsirkin
SMP-only barriers were missing in checkpatch.pl Refactor code slightly to make adding more variants easier. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/s

[Xen-devel] [PATCH v3 30/41] virtio_ring: update weak barriers to use virt_xxx

2016-01-10 Thread Michael S. Tsirkin
gt; Cc: Alexander Duyck <alexander.du...@gmail.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include/linux/virtio_ring.h | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h inde

[Xen-devel] [PATCH v3 31/41] sh: support 1 and 2 byte xchg

2016-01-10 Thread Michael S. Tsirkin
. Suggested-by: Rich Felker <dal...@libc.org> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- arch/sh/include/asm/cmpxchg-grb.h | 22 +++ arch/sh/include/asm/cmpxchg-irq.h | 11 arch/sh/include/asm/cmpxchg-llsc.h | 58 +++--- arc

[Xen-devel] [PATCH v3 32/41] sh: move xchg_cmpxchg to a header by itself

2016-01-10 Thread Michael S. Tsirkin
_H + +/* + * Copyright (C) 2016 Red Hat, Inc. + * Author: Michael S. Tsirkin <m...@redhat.com> + * + * This work is licensed under the terms of the GNU GPL, version 2. See the + * file "COPYING" in the main directory of this archive for more details. + */ +#include +#include + +/*

[Xen-devel] [PATCH v3 33/41] virtio_ring: use virt_store_mb

2016-01-10 Thread Michael S. Tsirkin
. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include/linux/virtio_ring.h | 11 +++ drivers/virtio/virtio_ring.c | 15 +-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/include/linux/virtio_ring.h b/include/linux/virtio_ring.h index f3fa55b..a

[Xen-devel] [PATCH v3 28/41] asm-generic: implement virt_xxx memory barriers

2016-01-10 Thread Michael S. Tsirkin
-by: David Miller <da...@davemloft.net> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- include/asm-generic/barrier.h | 11 +++ Documentation/memory-barriers.txt | 28 +++- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/include

[Xen-devel] [PATCH v3 25/41] tile: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for tile, for use by virtualization. Some smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: for 32 bit, keep smp_mb__after_atomic around since it's faster than the generic implementation. Signed-off-by: Michael S. Tsirkin

[Xen-devel] [PATCH v3 36/41] checkpatch: add virt barriers

2016-01-10 Thread Michael S. Tsirkin
Add virt_ barriers to list of barriers to check for presence of a comment. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a96adcb..5

[Xen-devel] [PATCH v3 06/41] s390: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/s390/include/asm/barrier.h | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h index 7ffd0b1..c358c31 10064

[Xen-devel] [PATCH v3 01/41] lcoking/barriers, arch: Use smp barriers in smp_store_release()

2016-01-10 Thread Michael S. Tsirkin
From: Davidlohr Bueso With commit b92b8b35a2e ("locking/arch: Rename set_mb() to smp_store_mb()") it was made clear that the context of this call (and thus set_mb) is strictly for CPU ordering, as opposed to IO. As such all archs should use the smp variant of mb(), respecting

[Xen-devel] [PATCH v3 03/41] ia64: rename nop->iosapic_nop

2016-01-10 Thread Michael S. Tsirkin
asm-generic/barrier.h defines a nop() macro. To be able to use this header on ia64, we shouldn't call local functions/variables nop(). There's one instance where this breaks on ia64: rename the function to iosapic_nop to avoid the conflict. Signed-off-by: Michael S. Tsirkin <m...@redhat.

[Xen-devel] [PATCH v3 04/41] ia64: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
On ia64 smp_rmb, smp_wmb, read_barrier_depends, smp_read_barrier_depends and smp_store_mb() match the asm-generic variants exactly. Drop the local definitions and pull in asm-generic/barrier.h instead. This is in preparation to refactoring this code area. Signed-off-by: Michael S. Tsirkin &l

[Xen-devel] [PATCH v3 05/41] powerpc: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/powerpc/include/asm/barrier.h | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/include/asm/barrier.h b/arch/powerpc/include/asm/barrier.h index a7af5fb..98

[Xen-devel] [PATCH v3 02/41] asm-generic: guard smp_store_release/load_acquire

2016-01-10 Thread Michael S. Tsirkin
Allow architectures to override smp_store_release and smp_load_acquire by guarding the defines in asm-generic/barrier.h with ifndef directives. This is in preparation to reusing asm-generic/barrier.h on architectures which have their own definition of these macros. Signed-off-by: Michael S

[Xen-devel] [PATCH v3 08/41] arm: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
to refactoring this code area. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> Acked-by: Russell King <rmk+ker...@arm.linux.org.uk> --- arch/arm/include/asm/barrier.h | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-)

[Xen-devel] [PATCH v3 07/41] sparc: reuse asm-generic/barrier.h

2016-01-10 Thread Michael S. Tsirkin
to the generic version, drop that as well. This is in preparation to refactoring this code area. Note: nop() was in processor.h and not in barrier.h as on other architectures. Nothing seems to depend on it being there though. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Be

[Xen-devel] [PATCH v3 00/41] arch: barrier cleanup + barriers for virt

2016-01-10 Thread Michael S. Tsirkin
d only (by intel 0-day infrastructure) -. Patch 40 makes some smp barriers on s390 more efficient included here to avoid merge conflicts, at maintainer's request tested on x86 Davidlohr Bueso (1): lcoking/barriers, arch: Use smp barriers in smp_store_release() Michael S. Tsirkin (40):

[Xen-devel] [PATCH v3 17/41] arm: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for arm, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h This reduces the amount of arch-specific boiler-plate code. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Be

[Xen-devel] [PATCH v3 16/41] arm64: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for arm64, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: arm64 does not support !SMP config, so smp_xxx and __smp_xxx are always equivalent. Signed-off-by: Michael S. Tsirkin <m...@redhat.

[Xen-devel] [PATCH v3 20/41] metag: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
between SMP and !SMP. For this reason, this patch introduces a wrapper metag_fence() that doesn't depend on CONFIG_SMP. fence() is then defined using that, depending on CONFIG_SMP. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/metag

[Xen-devel] [PATCH v3 19/41] ia64: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for ia64, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h This reduces the amount of arch-specific boiler-plate code. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Tony Luck &

[Xen-devel] [PATCH v3 21/41] mips: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
/barriers.h) and smp_mb__before_llsc (for use elsewhere on this architecture). Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/mips/include/asm/barrier.h | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-)

[Xen-devel] [PATCH v3 18/41] blackfin: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for blackfin, for use by virtualization. smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: Arnd Bergmann <a...@arndb.de> --- arch/blackfin/include/asm/b

[Xen-devel] [PATCH v3 22/41] s390: define __smp_xxx

2016-01-10 Thread Michael S. Tsirkin
This defines __smp_xxx barriers for s390, for use by virtualization. Some smp_xxx barriers are removed as they are defined correctly by asm-generic/barriers.h Note: smp_mb, smp_rmb and smp_wmb are defined as full barriers unconditionally on this architecture. Signed-off-by: Michael S. Tsirkin

[Xen-devel] [PATCH v3 41/41] s390: more efficient smp barriers

2016-01-10 Thread Michael S. Tsirkin
org> Suggested-by: Martin Schwidefsky <schwidef...@de.ibm.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- arch/s390/include/asm/barrier.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h index 4d26f

[Xen-devel] [PATCH v3 38/41] xen/io: use virt_xxx barriers

2016-01-10 Thread Michael S. Tsirkin
this exact purpose. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: David Vrabel <david.vra...@citrix.com> --- include/xen/interface/io/ring.h | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/xen/interface/io/ring.h b/include/xen/

[Xen-devel] [PATCH v3 35/41] checkpatch: check for __smp outside barrier.h

2016-01-10 Thread Michael S. Tsirkin
ch test so it will trigger a warning. Reported-by: Russell King <li...@arm.linux.org.uk> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9

[Xen-devel] [PATCH v3 39/41] xen/events: use virt_xxx barriers

2016-01-10 Thread Michael S. Tsirkin
/barrier.h here to make sure the file is self-contained. Suggested-by: David Vrabel <david.vra...@citrix.com> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- drivers/xen/events/events_fifo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/events/eve

[Xen-devel] [PATCH v3 40/41] s390: use generic memory barriers

2016-01-10 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- arch/s390/include/asm/barrier.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/s390/include/asm/barrier.h b/arch/s390/include/asm/barrier.h index fbd25b2..4d26fa4 100644 --- a/arch/s390/include/asm/barrier.h +++ b/arch/s390

[Xen-devel] [PATCH v3 37/41] xenbus: use virt_xxx barriers

2016-01-10 Thread Michael S. Tsirkin
this exact purpose. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Acked-by: David Vrabel <david.vra...@citrix.com> --- drivers/xen/xenbus/xenbus_comms.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/xen/xenbus/xenbus_comms.c b/driver

Re: [Xen-devel] [PATCH v2 1/3] checkpatch.pl: add missing memory barriers

2016-01-10 Thread Michael S. Tsirkin
On Sun, Jan 10, 2016 at 07:17:31AM -0800, Joe Perches wrote: > On Sun, 2016-01-10 at 07:07 -0800, Joe Perches wrote: > > On Sun, 2016-01-10 at 13:56 +0200, Michael S. Tsirkin wrote: > > > SMP-only barriers were missing in checkpatch.pl > > > > > > Refact

[Xen-devel] [PATCH v3 0/3] checkpatch: handling of memory barriers

2016-01-10 Thread Michael S. Tsirkin
{} instead of map Michael S. Tsirkin (3): checkpatch.pl: add missing memory barriers checkpatch: check for __smp outside barrier.h checkpatch: add virt barriers scripts/checkpatch.pl | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) -- MST

[Xen-devel] [PATCH v3 2/3] checkpatch: check for __smp outside barrier.h

2016-01-10 Thread Michael S. Tsirkin
ch test so it will trigger a warning. Reported-by: Russell King <li...@arm.linux.org.uk> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 1

[Xen-devel] [PATCH v3 3/3] checkpatch: add virt barriers

2016-01-10 Thread Michael S. Tsirkin
Add virt_ barriers to list of barriers to check for presence of a comment. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 15cfca4..4

Re: [Xen-devel] [PATCH v2 1/3] checkpatch.pl: add missing memory barriers

2016-01-10 Thread Michael S. Tsirkin
On Sun, Jan 10, 2016 at 07:07:05AM -0800, Joe Perches wrote: > On Sun, 2016-01-10 at 13:56 +0200, Michael S. Tsirkin wrote: > > SMP-only barriers were missing in checkpatch.pl > > > > Refactor code slightly to make adding more variants easier. > [] > > diff --git a/s

Re: [Xen-devel] [PATCH 3/3] checkpatch: add virt barriers

2016-01-08 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:11:37PM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 23:07 +0200, Michael S. Tsirkin wrote: > > On Mon, Jan 04, 2016 at 08:47:53AM -0800, Joe Perches wrote: > > > On Mon, 2016-01-04 at 13:37 +0200, Michael S. Tsirkin wrote: > > > &

Re: [Xen-devel] [PATCH v2 15/32] powerpc: define __smp_xxx

2016-01-06 Thread Michael S. Tsirkin
On Wed, Jan 06, 2016 at 09:51:52AM +0800, Boqun Feng wrote: > On Tue, Jan 05, 2016 at 06:16:48PM +0200, Michael S. Tsirkin wrote: > [snip] > > > > > Another thing is that smp_lwsync() may have a third user(other than > > > > > smp_load_acquire() and smp_store_r

Re: [Xen-devel] [PATCH v2 15/32] powerpc: define __smp_xxx

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 09:36:55AM +0800, Boqun Feng wrote: > Hi Michael, > > On Thu, Dec 31, 2015 at 09:07:42PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for powerpc > > for use by virtualization. > > > > smp_xxx barriers are removed

Re: [Xen-devel] [PATCH v2 22/32] s390: define __smp_xxx

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 09:13:19AM +0100, Martin Schwidefsky wrote: > On Mon, 4 Jan 2016 22:18:58 +0200 > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > On Mon, Jan 04, 2016 at 02:45:25PM +0100, Peter Zijlstra wrote: > > > On Thu, Dec 31, 2015 at 09

Re: [Xen-devel] [PATCH v2 15/32] powerpc: define __smp_xxx

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 05:53:41PM +0800, Boqun Feng wrote: > On Tue, Jan 05, 2016 at 10:51:17AM +0200, Michael S. Tsirkin wrote: > > On Tue, Jan 05, 2016 at 09:36:55AM +0800, Boqun Feng wrote: > > > Hi Michael, > > > > > > On Thu, Dec 31, 2015 at 09:07:

Re: [Xen-devel] [PATCH v2 22/32] s390: define __smp_xxx

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 04:39:37PM +0100, Christian Borntraeger wrote: > On 01/05/2016 10:30 AM, Michael S. Tsirkin wrote: > > > > > arch/s390/kernel/vdso.c:smp_mb(); > > > > Looking at > > Author: Christian Borntraeger <borntrae...@de.ibm.c

Re: [Xen-devel] [PATCH v2 17/32] arm: define __smp_xxx

2016-01-05 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 01:59:34PM +, Russell King - ARM Linux wrote: > On Mon, Jan 04, 2016 at 02:54:20PM +0100, Peter Zijlstra wrote: > > On Mon, Jan 04, 2016 at 02:36:58PM +0100, Peter Zijlstra wrote: > > > On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wro

Re: [Xen-devel] [PATCH v2 22/32] s390: define __smp_xxx

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 01:08:52PM +0100, Martin Schwidefsky wrote: > On Tue, 5 Jan 2016 11:30:19 +0200 > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > On Tue, Jan 05, 2016 at 09:13:19AM +0100, Martin Schwidefsky wrote: > > > On Mon, 4 Jan 2016 22:1

Re: [Xen-devel] [PATCH v3 00/11] igd passthrough chipset tweaks

2016-01-05 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:41:27PM +0100, Gerd Hoffmann wrote: > Hi, > > We have some code in our tree to support pci passthrough of intel > graphics devices (igd) on xen, which requires some chipset tweaks > for (a) the host bridge and (b) the lpc/isa-bridge to meat the > expectations of the

Re: [Xen-devel] [PATCH v2 06/32] s390: reuse asm-generic/barrier.h

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 04:03:39PM +0100, Martin Schwidefsky wrote: > On Mon, 4 Jan 2016 14:20:42 +0100 > Peter Zijlstra <pet...@infradead.org> wrote: > > > On Thu, Dec 31, 2015 at 09:06:30PM +0200, Michael S. Tsirkin wrote: > > > On s390 read_barrier_dep

Re: [Xen-devel] [PATCH 3/3] checkpatch: add virt barriers

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 08:47:53AM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 13:37 +0200, Michael S. Tsirkin wrote: > > Add virt_ barriers to list of barriers to check for > > presence of a comment. > > Are these virt_ barriers used anywhere? > > I see som

Re: [Xen-devel] [PATCH v2 17/32] arm: define __smp_xxx

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:54:20PM +0100, Peter Zijlstra wrote: > On Mon, Jan 04, 2016 at 02:36:58PM +0100, Peter Zijlstra wrote: > > On Sun, Jan 03, 2016 at 11:12:44AM +0200, Michael S. Tsirkin wrote: > > > On Sat, Jan 02, 2016 at 11:24:38AM +, Russell King - ARM Linux wrot

Re: [Xen-devel] [PATCH v2 22/32] s390: define __smp_xxx

2016-01-04 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:45:25PM +0100, Peter Zijlstra wrote: > On Thu, Dec 31, 2015 at 09:08:38PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for s390, > > for use by virtualization. > > > > Some smp_xxx barriers are removed as they are &

  1   2   >