The open-coded computation of the used size doesn't take the event
into account when the VIRTIO_RING_F_EVENT_IDX feature is present.
Fix that by using vhost_get_used_size().
Signed-off-by: Greg Kurz
---
drivers/vhost/vhost.c |3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
the used structure when there isn't an IOTLB device around.
Signed-off-by: Greg Kurz
---
drivers/vhost/vhost.c | 23 ++-
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 9d2c225fb518..9ad45e1d27f0 100644
t.com
CC: sta...@vger.kernel.org # 4.14+
Signed-off-by: Greg Kurz
Acked-by: Jason Wang
---
drivers/vhost/vhost.c |9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index b45519ca66a7..c3b49975dc28 100644
--- a/drivers/vhost/
tch 2 from v2
v2:
- patch 1: move the (vq->ioltb) check from vhost_vq_access_ok() to
vq_access_ok() as suggested by MST
- patch 2: new patch
---
Greg Kurz (3):
vhost: Don't call access_ok() when using IOTLB
vhost: Use vhost_get_used_size() in vhost_vring_set_
On Sat, 3 Oct 2020 09:58:59 +0800
Jason Wang wrote:
>
> On 2020/9/30 上午12:30, Greg Kurz wrote:
> > When the IOTLB device is enabled, the log_guest_addr that is passed by
> > userspace to the VHOST_SET_VRING_ADDR ioctl, and which is then written
> > to vq->log_addr
t.com
CC: sta...@vger.kernel.org # 4.14+
Signed-off-by: Greg Kurz
---
drivers/vhost/vhost.c |9 +
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index b45519ca66a7..c3b49975dc28 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/
the used structure when there isn't an IOTLB device around.
Signed-off-by: Greg Kurz
---
drivers/vhost/vhost.c | 23 +++
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index c3b49975dc28..5996e32fa818 100644
0ULL).
https://patchwork.ozlabs.org/project/qemu-devel/patch/160105498386.68108.2145229309875282336.st...@bahia.lan/
v2:
- patch 1: move the (vq->ioltb) check from vhost_vq_access_ok() to
vq_access_ok() as suggested by MST
- patch 2: new patch
---
Greg Kurz (2):
vhost: Don't call a
On Tue, 29 Sep 2020 03:45:28 -0400
"Michael S. Tsirkin" wrote:
> On Mon, Sep 28, 2020 at 02:35:04PM +0200, Greg Kurz wrote:
> > When the IOTLB device is enabled, the vring addresses we get from
> > userspace are GIOVAs. It is thus wrong to pass them to vq_access_ok()
ed at IOTLB prefetch time anyway.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1883084
Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API")
Cc: jasow...@redhat.com
CC: sta...@vger.kernel.org # 4.14+
Signed-off-by: Greg Kurz
---
drivers/vhost/vhost.c |5 -
1 file change
On Wed, 29 Jul 2020 09:50:21 +1000
Alexey Kardashevskiy wrote:
>
>
> On 29/07/2020 03:42, Greg Kurz wrote:
> > Hi Alexey,
> >
> > Working on 9p now ?!? ;-)
>
> No, I am running syzkaller and seeing things :)
>
:)
>
> > Cc'ing Dominique Ma
On Wed, 29 Jul 2020 08:14:49 +0200
Dominique Martinet wrote:
> Greg Kurz wrote on Tue, Jul 28, 2020:
> > > The "fd" transport layer uses 2 file descriptors passed externally
> > > and calls kernel_write()/kernel_read() on these. If files were opened
>
Hi Alexey,
Working on 9p now ?!? ;-)
Cc'ing Dominique Martinet who appears to be the person who takes care of 9p
these days.
On Tue, 28 Jul 2020 22:41:29 +1000
Alexey Kardashevskiy wrote:
> The "fd" transport layer uses 2 file descriptors passed externally
> and calls kernel_write()/kernel_rea
; ---
Reviewed-by: Greg Kurz
> 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 4d0372263e5d..1c87eee522b7 100644
> --- a/net/9p/trans_virtio.c
> +++ b/net/9p/trans_vi
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 wrote:
> On Fri, 09 Mar 2018 21:41:38 +0100 Greg Kurz wrote:
>
> > If it was interrupted by a signal, the 9p client may need
both 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
---
net/9p/client.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/9p/client.c b/net/9p/cli
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 wrote:
> If it was interrup
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 wrote:
> When a 9p request is successfully flushed, the server is expected
tions 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
---
net/9p/client.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/9p/client.c b/net/9p/client.c
client will erroneously assume the request has not been flushed.
Signed-off-by: Greg Kurz
---
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
--- a/net/9p/trans_virtio.c
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
> >> s390x.
> >>
> >> It turne
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 (in us) could be spent
On Tue, 16 Feb 2016 17:34:13 +0200
"Michael S. Tsirkin" 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-effect in case vhost_init
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.
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
---
drivers/vhost/net.c |2 +-
drivers/vhost/scsi.c |2 +-
drivers/vhost/test.c |2 +-
drivers/vhost
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
We don't want side effects. If something fails, we rollback vq->is_le to
its previous value.
Signed-off-by: Greg Kurz
---
drivers/vhost/vhost.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index ad21
On Wed, 10 Feb 2016 17:08:52 +0200
"Michael S. Tsirkin" 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" wrote:
> >
> > > On Wed, Jan 13, 2016 at 06:09:41PM
On Wed, 10 Feb 2016 14:23:33 +0100
Cornelia Huck wrote:
> On Wed, 10 Feb 2016 14:08:43 +0100
> Greg Kurz wrote:
>
> > But you are right, there is a bug: we should rollback if vhost_init_used()
> > fails. Something like below:
> >
> > err_used:
>
On Wed, 10 Feb 2016 13:48:09 +0200
"Michael S. Tsirkin" 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().
> >
> > This patch tri
On Wed, 10 Feb 2016 13:21:22 +0200
"Michael S. Tsirkin" 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 endianness). But there are cases
On Wed, 13 Jan 2016 18:09:34 +0100
Greg Kurz 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 in cross-endian support.
>
>
On Thu, 12 Nov 2015 15:28:19 +0100
Greg Kurz wrote:
> On Thu, 12 Nov 2015 15:46:30 +0200
> "Michael S. Tsirkin" 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 t
On Thu, 12 Nov 2015 15:46:30 +0200
"Michael S. Tsirkin" 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_cpu() helpers in the
On Fri, 30 Oct 2015 12:42:35 +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_cpu() helpers in the following cases:
>
> 1) host is big endian and device is modern virtio
>
> 2)
ur change.
Signed-off-by: Greg Kurz
---
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 deletions(-)
diff --git a/drivers/vhost
le_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
> Signed-off-by: Michael S. Tsirkin
Oops my bad for this oversight...
Reviewed-by: Greg Kurz
> ---
> drivers
On Thu, 24 Sep 2015 12:50:59 +0300
"Michael S. Tsirkin" 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 wrote:
> >
> > > Commit 7d82410950aa ("virtio: add explicit
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,
Oops my bad... I obv
On Thu, 9 Jul 2015 09:49:05 +0200
Thomas Huth 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
Acked-by: Greg Kurz
--
To unsubs
On Thu, 2 Jul 2015 08:01:28 +0200
"Michael S. Tsirkin" 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 wrote:
> > > virtio/vhost: cross endian support
> >
> > Ugh. Does this really have to be dynamic?
> >
> > Can't
41 matches
Mail list logo