Re: [V9fs-developer] [PATCH] net/9p: fix error path of p9_virtio_probe

2018-05-24 Thread Greg Kurz
off-by: Jean-Philippe Brucker <jean-philippe.bruc...@arm.com> > --- Reviewed-by: Greg Kurz <gr...@kaod.org> > net/9p/trans_virtio.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c > ind

Re: [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-10 Thread Greg Kurz
Hi Andrew, Thank you very much for taking care of this. Please find my answers to your remarks below. On Fri, 9 Mar 2018 14:12:52 -0800 Andrew Morton <a...@linux-foundation.org> wrote: > On Fri, 09 Mar 2018 21:41:38 +0100 Greg Kurz <gr...@kaod.org> wrote: > > &g

[PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-03-09 Thread Greg Kurz
functions with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Signed-off-by: Greg Kurz <gr...@kaod.org> --- net/9p/client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c

Re: [V9fs-developer] [PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-02-20 Thread Greg Kurz
Hi Al, It's been two years without any sign of life from 9p maintainers... :-\ Would you apply (or nack) this patch ? Thanks, -- Greg PS: in the case you apply it, probable Cc sta...@vger.kernel.org as well On Thu, 08 Feb 2018 18:38:49 +0100 Greg Kurz <gr...@kaod.org>

Re: [V9fs-developer] [PATCH] 9p/trans_virtio: discard zero-length reply

2018-02-08 Thread Greg Kurz
Ping ? Michael, Since this is virtio code and you have acked the QEMU part of the fix already, would you be kind enough to take this through your tree ? Cheers, -- Greg On Mon, 22 Jan 2018 22:02:05 +0100 Greg Kurz <gr...@kaod.org> wrote: > When a 9p request is successfull

[PATCH] net/9p: avoid -ERESTARTSYS leak to userspace

2018-02-08 Thread Greg Kurz
with a trivial label+goto. Thanks to Laurent Dufour for his help and suggestions on how to find the root cause and how to fix it. Signed-off-by: Greg Kurz <gr...@kaod.org> --- net/9p/client.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/9p/client.c b/

[PATCH] 9p/trans_virtio: discard zero-length reply

2018-01-22 Thread Greg Kurz
the client will erroneously assume the request has not been flushed. Signed-off-by: Greg Kurz <gr...@kaod.org> --- net/9p/trans_virtio.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 0845aad4ba51..ca08c72ef4de 100644 ---

Re: [BUG/RFC] vhost: net: big endian viring access despite virtio 1

2017-01-27 Thread Greg Kurz
On Fri, 27 Jan 2017 13:24:13 +0100 Halil Pasic wrote: > On 01/26/2017 08:20 PM, Michael S. Tsirkin wrote: > > On Thu, Jan 26, 2017 at 06:39:14PM +0100, Halil Pasic wrote: > >> > >> Hi! > >> > >> Recently I have been investigating some strange migration problems on >

Re: [PATCH V4 0/3] basic busy polling support for vhost_net

2016-03-09 Thread Greg Kurz
On Fri, 4 Mar 2016 06:24:50 -0500 Jason Wang wrote: > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx/rx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of > time

Re: [PATCH v2 0/3] vhost: cross-endian code cleanup

2016-02-16 Thread Greg Kurz
On Tue, 16 Feb 2016 17:34:13 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Tue, Feb 16, 2016 at 03:54:18PM +0100, Greg Kurz wrote: > > This series is a new tentative to have cleaner cross-endian code. > > > > Patches 1/3 is new: it fixes a side-e

[PATCH v2 2/3] vhost: rename cross-endian helpers

2016-02-16 Thread Greg Kurz
e is started. The cross-endian mode is disabled when the device is stopped. The current names of the helpers that manipulate vq->user_be are unclear. This patch renames those helpers to clearly show that this is cross-endian stuff and with explicit enable/disable semantics. No behaviour change. Sign

[PATCH v2 3/3] vhost: rename vhost_init_used()

2016-02-16 Thread Greg Kurz
n't related to the vq used ring. This patch simply renames vhost_init_used() to vhost_vq_init_access() as suggested by Michael. No behaviour change. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- drivers/vhost/net.c |2 +- drivers/vhost/scsi.c |2 +- drivers/vhost/test.

[PATCH v2 0/3] vhost: cross-endian code cleanup

2016-02-16 Thread Greg Kurz
This series is a new tentative to have cleaner cross-endian code. Patches 1/3 is new: it fixes a side-effect in case vhost_init_used() fails. Patch 2/3 comes from v1: it renames cross-endian helpers Patch 3/3 is new: it simply renames vhost_init_used() as suggested by Michael. --- Greg Kurz

[PATCH v2 1/3] vhost: fix error path in vhost_init_used()

2016-02-16 Thread Greg Kurz
We don't want side effects. If something fails, we rollback vq->is_le to its previous value. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- drivers/vhost/vhost.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/vhost.c b/driv

Re: [PATCH 1/2] vhost: helpers to enable/disable vring endianness

2016-02-10 Thread Greg Kurz
On Wed, 10 Feb 2016 17:08:52 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Wed, Feb 10, 2016 at 01:11:34PM +0100, Greg Kurz wrote: > > On Wed, 10 Feb 2016 13:21:22 +0200 > > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > >

Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-02-10 Thread Greg Kurz
On Wed, 10 Feb 2016 14:23:33 +0100 Cornelia Huck <cornelia.h...@de.ibm.com> wrote: > On Wed, 10 Feb 2016 14:08:43 +0100 > Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > > > But you are right, there is a bug: we should rollback if vhost_init_used() >

Re: [PATCH 1/2] vhost: helpers to enable/disable vring endianness

2016-02-10 Thread Greg Kurz
On Wed, 10 Feb 2016 13:21:22 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Wed, Jan 13, 2016 at 06:09:41PM +0100, Greg Kurz wrote: > > The default use case for vhost is when the host and the vring have the > > same endianness (default native endiann

Re: [PATCH 2/2] vhost: disentangle vring endianness stuff from the core code

2016-02-10 Thread Greg Kurz
On Wed, 10 Feb 2016 13:48:09 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Wed, Jan 13, 2016 at 06:09:47PM +0100, Greg Kurz wrote: > > The way vring endianness is being handled currently obfuscates > > the code in vhost_init_used(). > > >

Re: [PATCH 0/2] vhost: cross-endian code cleanup

2016-01-27 Thread Greg Kurz
On Wed, 13 Jan 2016 18:09:34 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > This series is a respin of the following patch: > > http://patchwork.ozlabs.org/patch/565921/ > > Patch 1 is preliminary work: it gives better names to the helpers that are > involved

Re: [PATCH] vhost: move is_le setup to the backend

2015-12-16 Thread Greg Kurz
On Thu, 12 Nov 2015 15:28:19 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > On Thu, 12 Nov 2015 15:46:30 +0200 > "Michael S. Tsirkin" <m...@redhat.com> wrote: > > > On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote: > > > The vq->is_

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Greg Kurz
On Fri, 30 Oct 2015 12:42:35 +0100 Greg Kurz <gk...@linux.vnet.ibm.com> wrote: > The vq->is_le field is used to fix endianness when accessing the vring via > the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases: > > 1) host is big endian and device is

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Greg Kurz
On Thu, 12 Nov 2015 15:46:30 +0200 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote: > > The vq->is_le field is used to fix endianness when accessing the vring via > > the cpu_to_vhost16() and vhost16_to_cp

[PATCH] vhost: move is_le setup to the backend

2015-10-30 Thread Greg Kurz
ur change. Signed-off-by: Greg Kurz <gk...@linux.vnet.ibm.com> --- drivers/vhost/net.c |6 ++ drivers/vhost/scsi.c |3 +++ drivers/vhost/test.c |2 ++ drivers/vhost/vhost.c | 12 +++- drivers/vhost/vhost.h |1 + 5 files changed, 19 insertions(+), 5 deleti

Re: [PATCH] vhost: fix performance on LE hosts

2015-10-27 Thread Greg Kurz
on LE host, vhost_is_little_endian is > checking is_le flag so there's always a branch. > > To fix, simply check virtio_legacy_is_little_endian first. > > Cc: Greg Kurz <gk...@linux.vnet.ibm.com> > Signed-off-by: Michael S. Tsirkin <m...@redhat.com> Oops my bad for th

Re: [PATCH v2] Fix AF_PACKET ABI breakage in 4.2

2015-09-25 Thread Greg Kurz
On Thu, 24 Sep 2015 12:50:59 +0300 "Michael S. Tsirkin" <m...@redhat.com> wrote: > On Thu, Sep 24, 2015 at 09:25:45AM +0200, Greg Kurz wrote: > > On Wed, 23 Sep 2015 19:45:08 +0100 > > David Woodhouse <dw...@infradead.org> wrote: > > > > > C

Re: [PATCH v2] Fix AF_PACKET ABI breakage in 4.2

2015-09-24 Thread Greg Kurz
On Wed, 23 Sep 2015 19:45:08 +0100 David Woodhouse wrote: > Commit 7d82410950aa ("virtio: add explicit big-endian support to memory > accessors") accidentally changed the virtio_net header used by > AF_PACKET with PACKET_VNET_HDR from host-endian to big-endian. > Hi David,

Re: [PATCH] KVM: Add Kconfig option to signal cross-endian guests

2015-07-13 Thread Greg Kurz
On Thu, 9 Jul 2015 09:49:05 +0200 Thomas Huth th...@redhat.com wrote: The option for supporting cross-endianness legacy guests in the vhost and tun code should only be available on systems that support cross-endian guests. Signed-off-by: Thomas Huth th...@redhat.com Acked-by: Greg Kurz gk

Re: [PULL] virtio/vhost: cross endian support

2015-07-02 Thread Greg Kurz
On Thu, 2 Jul 2015 08:01:28 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jul 01, 2015 at 12:02:50PM -0700, Linus Torvalds wrote: On Wed, Jul 1, 2015 at 2:31 AM, Michael S. Tsirkin m...@redhat.com wrote: virtio/vhost: cross endian support Ugh. Does this really have to be