Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2015 at 01:11:02PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:46:57 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 12:31:06PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:13:58 +0100 Michael S. Tsirkin m...@redhat.com wrote

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Michael S. Tsirkin
On Mon, Mar 02, 2015 at 12:31:06PM +0100, Cornelia Huck wrote: On Mon, 2 Mar 2015 12:13:58 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: On Thu, 26 Feb 2015 11:50:42 +1030

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-26 Thread Michael S. Tsirkin
On Thu, Feb 26, 2015 at 06:08:49PM +0100, Peter Zijlstra wrote: On Thu, Feb 26, 2015 at 09:30:31AM +0100, Michael S. Tsirkin wrote: On Thu, Feb 26, 2015 at 11:50:42AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-26 Thread Michael S. Tsirkin
On Thu, Feb 26, 2015 at 06:27:43PM +0100, Michael S. Tsirkin wrote: On Thu, Feb 26, 2015 at 06:08:49PM +0100, Peter Zijlstra wrote: On Thu, Feb 26, 2015 at 09:30:31AM +0100, Michael S. Tsirkin wrote: On Thu, Feb 26, 2015 at 11:50:42AM +1030, Rusty Russell wrote: Thomas Huth th

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-26 Thread Michael S. Tsirkin
On Thu, Feb 26, 2015 at 11:50:42AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon enabled: The deeper problem is that virtio_ccw_get_config just

Re: [PATCH] vhost: drop hard-coded num_buffers size

2015-02-26 Thread Michael S. Tsirkin
On Wed, Feb 25, 2015 at 04:56:52PM -0500, David Miller wrote: From: Michael S. Tsirkin m...@redhat.com Date: Tue, 24 Feb 2015 17:31:10 +0100 The 2 that we use for copy_to_iter comes from sizeof(u16), it used to be that way before the iov iter update. Fix it up, making it obvious the size

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-26 Thread Michael S. Tsirkin
On Thu, Feb 26, 2015 at 11:50:42AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon enabled: The deeper problem is that virtio_ccw_get_config just

[PATCH] vhost: cleanup iterator update logic

2015-02-25 Thread Michael S. Tsirkin
this obvious. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index afa06d2..ca70434 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c

Re: [PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Michael S. Tsirkin
On Wed, Feb 25, 2015 at 03:32:08PM +0100, Cornelia Huck wrote: On Wed, 25 Feb 2015 15:14:36 +0100 Michael S. Tsirkin m...@redhat.com wrote: virtio balloon has this code: wait_event_interruptible(vb-config_change, (diff = towards_target(vb)) != 0

[PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Michael S. Tsirkin
http://article.gmane.org/gmane.linux.kernel.virtualization/24846 for a fuller explanation. To fix, rewrite using wait_woken. Cc: sta...@vger.kernel.org Reported-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- changes from v1: remove

[PATCH] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Michael S. Tsirkin
http://article.gmane.org/gmane.linux.kernel.virtualization/24846 for a fuller explanation. To fix, rewrite using wait_woken. Cc: sta...@vger.kernel.org Reported-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_balloon.c | 14

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Michael S. Tsirkin
On Wed, Feb 25, 2015 at 11:13:18AM +0100, Thomas Huth wrote: Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon enabled: [0.839687] do not call blocking ops when !TASK_RUNNING; state=1 set at

[PATCH] vhost: drop hard-coded num_buffers size

2015-02-25 Thread Michael S. Tsirkin
The 2 that we use for copy_to_iter comes from sizeof(u16), it used to be that way before the iov iter update. Fix it up, making it obvious the size of stack access is right. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH] vhost: drop hard-coded num_buffers size

2015-02-24 Thread Michael S. Tsirkin
The 2 that we use for copy_to_iter comes from sizeof(u16), it used to be that way before the iov iter update. Fix it up, making it obvious the size of stack access is right. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1

[PATCH] vhost: cleanup iterator update logic

2015-02-24 Thread Michael S. Tsirkin
this obvious. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index afa06d2..ca70434 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c

Re: [PATCH 2/3] vhost: add support for legacy virtio

2015-02-22 Thread Michael S. Tsirkin
On Fri, Feb 20, 2015 at 11:14:47AM +0100, Greg Kurz wrote: Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com --- drivers/vhost/vhost.h | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Michael, The vhost_is_little_endian() helper adds unconditionnal overhead

Re: [PATCH 0/3] vhost_net: support for cross endian guests

2015-02-22 Thread Michael S. Tsirkin
On Fri, Feb 20, 2015 at 11:07:24AM +0100, Greg Kurz wrote: Hi, This patchset allows vhost_net to be used with legacy virtio when guest and host have a different endianness. It is based on previous work by Cédric Le Goater: https://www.mail-archive.com/kvm-ppc@vger.kernel.org/msg09848.html

Re: [PATCH 1/3] vhost: add VHOST_VRING_F_LEGACY_BIG_ENDIAN flag

2015-02-22 Thread Michael S. Tsirkin
On Fri, Feb 20, 2015 at 11:07:39AM +0100, Greg Kurz wrote: The VHOST_VRING_F_LEGACY_BIG_ENDIAN flag informs the kernel that the associated device is big endian. Of course, this only makes sense for legacy virtio devices since modern virtio devices are always little endian. It will be used

Re: [PATCH 3/3] vhost_net: fix virtio_net header endianness

2015-02-22 Thread Michael S. Tsirkin
On Fri, Feb 20, 2015 at 11:15:05AM +0100, Greg Kurz wrote: Without this patch, packets are being silently dropped by the tap backend. Signed-off-by: Greg Kurz gk...@linux.vnet.ibm.com I think it's the wrong place to fix this. You want a tun/macvtap ioctl to enable legacy big endian stuff.

Re: [PATCH] vhost: support upto 509 memory regions

2015-02-17 Thread Michael S. Tsirkin
On Tue, Feb 17, 2015 at 04:53:45PM -0800, Eric Northup wrote: On Tue, Feb 17, 2015 at 4:32 AM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Feb 17, 2015 at 11:59:48AM +0100, Paolo Bonzini wrote: On 17/02/2015 10:02, Michael S. Tsirkin wrote: Increasing VHOST_MEMORY_MAX_NREGIONS

Re: [PATCH] vhost: support upto 509 memory regions

2015-02-17 Thread Michael S. Tsirkin
On Tue, Feb 17, 2015 at 02:11:37PM +0100, Paolo Bonzini wrote: On 17/02/2015 13:32, Michael S. Tsirkin wrote: On Tue, Feb 17, 2015 at 11:59:48AM +0100, Paolo Bonzini wrote: On 17/02/2015 10:02, Michael S. Tsirkin wrote: Increasing VHOST_MEMORY_MAX_NREGIONS from 65 to 509 to match

Re: [PATCH] vhost: support upto 509 memory regions

2015-02-17 Thread Michael S. Tsirkin
On Fri, Feb 13, 2015 at 03:49:59PM +, Igor Mammedov wrote: since commit 1d4e7e3 kvm: x86: increase user memory slots to 509 it became possible to use a bigger amount of memory slots, which is used by memory hotplug for registering hotplugged memory. However QEMU aborts if it's used

Re: [PATCH] vhost: support upto 509 memory regions

2015-02-17 Thread Michael S. Tsirkin
On Tue, Feb 17, 2015 at 11:59:48AM +0100, Paolo Bonzini wrote: On 17/02/2015 10:02, Michael S. Tsirkin wrote: Increasing VHOST_MEMORY_MAX_NREGIONS from 65 to 509 to match KVM_USER_MEM_SLOTS fixes issue for vhost-net. Signed-off-by: Igor Mammedov imamm...@redhat.com

Re: [PATCH v3 16/18] vhost: don't bother with copying iovec in handle_tx()

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 06:40:07AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk just advance the msg.msg_iter and be done with that. Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Al Viro v

Re: [PATCH-v3 6/9] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 01:13:58AM -0800, Nicholas A. Bellinger wrote: On Tue, 2015-02-03 at 11:40 +0200, Michael S. Tsirkin wrote: On Tue, Feb 03, 2015 at 06:30:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Signal support

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 01:40:25AM -0800, Nicholas A. Bellinger wrote: + /* + * Any associated T10_PI bytes for the outgoing / incoming + * payloads are included in calculation of exp_data_len here. + */ + if (out_size req_size) { +

Re: [PATCH v3 15/18] vhost: switch vhost get_indirect() to iov_iter, kill memcpy_fromiovec()

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 06:40:06AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Acked-by: Michael S. Tsirkin m

Re: [PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 06:40:08AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Acked-by: Michael S. Tsirkin m

Re: [PATCH v3 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 06:40:09AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk it has just verified that it asks no more than the length of the first segment of iovec. And with that the last user of stuff in lib/iovec.c is gone. RIP. Cc: Michael S. Tsirkin m

Re: [PATCH v3 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-04 Thread Michael S. Tsirkin
if (likely(mergeable) - memcpy_toiovecend(nvq-hdr, (unsigned char *)headcount, - offsetof(typeof(hdr), num_buffers), - sizeof hdr.num_buffers)) { + copy_to_iter(headcount, 2,

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 02:11:20AM -0800, Nicholas A. Bellinger wrote: On Tue, 2015-02-03 at 23:56 +, Al Viro wrote: On Tue, Feb 03, 2015 at 06:29:59AM +, Nicholas A. Bellinger wrote: + * Copy over the virtio-scsi request header, which when + * ANY_LAYOUT is

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 02:41:07AM -0800, Nicholas A. Bellinger wrote: On Wed, 2015-02-04 at 10:42 +0100, Michael S. Tsirkin wrote: On Wed, Feb 04, 2015 at 01:40:25AM -0800, Nicholas A. Bellinger wrote: + /* + * Any associated T10_PI bytes for the outgoing

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 02:55:12AM -0800, Nicholas A. Bellinger wrote: On Wed, 2015-02-04 at 02:41 -0800, Nicholas A. Bellinger wrote: On Wed, 2015-02-04 at 10:42 +0100, Michael S. Tsirkin wrote: On Wed, Feb 04, 2015 at 01:40:25AM -0800, Nicholas A. Bellinger wrote

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-04 Thread Michael S. Tsirkin
On Wed, Feb 04, 2015 at 02:41:07AM -0800, Nicholas A. Bellinger wrote: On Wed, 2015-02-04 at 10:42 +0100, Michael S. Tsirkin wrote: On Wed, Feb 04, 2015 at 01:40:25AM -0800, Nicholas A. Bellinger wrote: + /* + * Any associated T10_PI bytes for the outgoing

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 11:56:16PM +, Al Viro wrote: On Tue, Feb 03, 2015 at 06:29:59AM +, Nicholas A. Bellinger wrote: +* Copy over the virtio-scsi request header, which when +* ANY_LAYOUT is enabled may span multiple iovecs, or a +* single iovec

Re: [PATCH v2 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Michael S. Tsirkin
Hmm having second thoughts here. Will this modify the iov in vq-iov? If yes, how will recvmsg fill it? OK that was just me misunderstanding what the function does. As it doesn't modify the iovec itself, I think there's no issue, my ack stands. -- To unsubscribe from this list: send the line

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-03 Thread Michael S. Tsirkin
+ * copy_from_iter() is modifying the iovecs as copies over + * req_size bytes into req, so the returned out_iter.iov[0] + * will contain the correct start + offset of the outgoing + * WRITE payload, if DMA_TO_DEVICE is set. +

Re: [PATCH v2 18/18] vhost: vhost_scsi_handle_vq() should just use copy_from_user()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:37AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk it has just verified that it asks no more than the length of the first segment of iovec. And with that the last user of stuff in lib/iovec.c is gone. RIP. Cc: Michael S. Tsirkin m

Re: [PATCH v2 15/18] vhost: switch vhost get_indirect() to iov_iter, kill memcpy_fromiovec()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:34AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Acked-by: Michael S. Tsirkin m...@redhat.com But, can you pls copy virtualizat

Re: [PATCH-v3 1/9] vhost/scsi: Convert completion path to use copy_to_iser

2015-02-03 Thread Michael S. Tsirkin
existing code to save cmd-tvc_resp_iov instead of the first single iovec base pointer from vq-iov[out]. Typo in subject: should be copy_to_iter. v3 changes: - Convert memcpy_toiovecend - copy_to_iser usage This belongs after --- Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz

Re: [PATCH-v3 7/9] vhost/scsi: Drop legacy pre virtio v1.0 !ANY_LAYOUT logic

2015-02-03 Thread Michael S. Tsirkin
and drop the pre virtio 1.0 logic in vhost_scsi_handle_vq() and associated helpers. Will probably be easier to review if you smash this with patch 5, this way we see both old and new code side by side. Also, let's rename _vqal to _vq in this patch? Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo

Re: [PATCH-v3 8/9] vhost/scsi: Drop left-over scsi_tcq.h include

2015-02-03 Thread Michael S. Tsirkin
: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org Acked-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/scsi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c

Re: [PATCH-v3 9/9] vhost/scsi: Global tcm_vhost - vhost_scsi rename

2015-02-03 Thread Michael S. Tsirkin
the usage consistent. Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org Yes, I've been wondering about that. Acked-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/scsi.c | 662

Re: [PATCH-v3 5/9] vhost/scsi: Add ANY_LAYOUT vhost_virtqueue callback

2015-02-03 Thread Michael S. Tsirkin
- Drop vhost_skip_iovec_bytes in favour of iov_iter Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/vhost/scsi.c | 260 +++ 1 file changed

Re: [PATCH-v3 0/9] vhost/scsi: Add ANY_LAYOUT + VERSION_1 support

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:29:54AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi MST, Paolo, Al Co, Here is -v3 for adding vhost/scsi ANY_LAYOUT + VERSION_1 host feature bit support. It adds a new vhost_virtqueue -handle_kick() callback to

[PATCH for-3.19] vhost/net: fix up num_buffers endian-ness

2015-02-03 Thread Michael S. Tsirkin
In virtio 1.0 mode, when mergeable buffers are enabled on a big-endian host, num_buffers wasn't byte-swapped correctly, so large incoming packets got corrupted. To fix, fill it in within hdr - this also makes sure it gets the correct type. Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [PATCH v2 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:36AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- So this made me notice a bug in vhost introduced in 3.19. I sent a patch

Re: [PATCH v2 16/18] vhost: don't bother with copying iovec in handle_tx()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:35AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk just advance the msg.msg_iter and be done with that. Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk Nice. Acked-by: Michael S

Re: [PATCH-v3 4/9] vhost/scsi: Add ANY_LAYOUT iov - sgl mapping prerequisites

2015-02-03 Thread Michael S. Tsirkin
not to assume this, and put changelog after ---. Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/vhost/scsi.c | 93 1 file changed, 93

Re: [PATCH-v3 6/9] vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits

2015-02-03 Thread Michael S. Tsirkin
On Tue, Feb 03, 2015 at 06:30:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Signal support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits required for virtio-scsi 1.0 spec layout requirements. Cc: Michael S. Tsirkin m...@redhat.com Cc

Re: [PATCH v2 17/18] vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()

2015-02-03 Thread Michael S. Tsirkin
On Mon, Feb 02, 2015 at 07:59:36AM +, Al Viro wrote: From: Al Viro v...@zeniv.linux.org.uk Cc: Michael S. Tsirkin m...@redhat.com Cc: kvm@vger.kernel.org Signed-off-by: Al Viro v...@zeniv.linux.org.uk --- drivers/vhost/net.c | 79

Re: [PATCH 4/8] vhost/scsi: Change vhost_scsi_map_to_sgl to accept iov ptr + len

2015-01-30 Thread Michael S. Tsirkin
allow the same parameters as well. Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/vhost/scsi.c | 37 +++-- 1 file changed, 15 insertions(+), 22 deletions

Re: vhost-scsi support for ANY_LAYOUT

2015-01-27 Thread Michael S. Tsirkin
On Tue, Jan 27, 2015 at 09:42:22AM +0100, Paolo Bonzini wrote: On 27/01/2015 07:35, Nicholas A. Bellinger wrote: Hi MST Paolo, So I'm currently working on vhost-scsi support for ANY_LAYOUT, and wanted to verify some assumptions based upon your earlier emails.. *) When

Re: vhost-scsi support for ANY_LAYOUT

2015-01-27 Thread Michael S. Tsirkin
On Mon, Jan 26, 2015 at 10:35:17PM -0800, Nicholas A. Bellinger wrote: Hi MST Paolo, So I'm currently working on vhost-scsi support for ANY_LAYOUT, and wanted to verify some assumptions based upon your earlier emails.. *) When ANY_LAYOUT is negotiated by vhost-scsi, it's expected that

Re: Fw: Benchmarking for vhost polling patch

2015-01-14 Thread Michael S. Tsirkin
On Wed, Jan 14, 2015 at 05:01:05PM +0200, Razya Ladelsky wrote: Michael S. Tsirkin m...@redhat.com wrote on 12/01/2015 12:36:13 PM: From: Michael S. Tsirkin m...@redhat.com To: Razya Ladelsky/Haifa/IBM@IBMIL Cc: Alex Glikson/Haifa/IBM@IBMIL, Eran Raichstein/Haifa/IBM@IBMIL, Yossi

[PULL] uaccess: fix sparse warning on get/put_user for bitwise types

2015-01-14 Thread Michael S. Tsirkin
put_user(x, p); and get_user(x, p); should be safe, but produce warnings on some architectures. While there, I noticed that a bunch of architectures violated coding style rules within uaccess macros. Included patches to fix them up. Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: Fw: Benchmarking for vhost polling patch

2015-01-12 Thread Michael S. Tsirkin
On Sun, Jan 11, 2015 at 02:44:17PM +0200, Razya Ladelsky wrote: Hi Razya, Thanks for the update. So that's reasonable I think, and I think it makes sense to keep working on this in isolation - it's more manageable at this size. The big questions in my mind: - What happens if

Re: [PATCH] vhost/net: length miscalculation

2015-01-08 Thread Michael S. Tsirkin
On Wed, Jan 07, 2015 at 11:58:00PM +0300, Sergei Shtylyov wrote: Hello. On 01/07/2015 11:55 AM, Michael S. Tsirkin wrote: commit 8b38694a2dc8b18374310df50174f1e4376d6824 vhost/net: virtio 1.0 byte swap had this chunk: - heads[headcount - 1].len += datalen; + heads

Re: [PATCH v8 34/50] vhost/net: virtio 1.0 byte swap

2015-01-07 Thread Michael S. Tsirkin
On Wed, Jan 07, 2015 at 09:31:05AM +0100, Greg Kurz wrote: On Tue, 06 Jan 2015 16:55:30 -0700 Alex Williamson alex.william...@redhat.com wrote: On Mon, 2014-12-01 at 18:05 +0200, Michael S. Tsirkin wrote: I had to add an explicit tag to suppress compiler warning: gcc isn't smart enough

[PATCH] vhost/net: length miscalculation

2015-01-07 Thread Michael S. Tsirkin
: 8b38694a2dc8b18374310df50174f1e4376d6824 Reported-by: Alex Williamson alex.william...@redhat.com Suggested-by: Greg Kurz gk...@linux.vnet.ibm.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Alex, could you please confirm this fixes the crash for you? drivers/vhost/net.c | 2 +- 1 file changed, 1

Re: Fw: Benchmarking for vhost polling patch

2015-01-05 Thread Michael S. Tsirkin
Hi Razya, Thanks for the update. So that's reasonable I think, and I think it makes sense to keep working on this in isolation - it's more manageable at this size. The big questions in my mind: - What happens if system is lightly loaded? E.g. a ping/pong benchmark. How much extra CPU are we

[PULL] vhost: cleanups and fixes

2015-01-01 Thread Michael S. Tsirkin
too strict. Cc: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Michael S. Tsirkin m...@redhat.com Michael S. Tsirkin (2): virtio_ring: document alignment requirements vhost: relax used address alignment include/uapi

[PATCH v2 2/2] vhost: relax used address alignment

2014-12-25 Thread Michael S. Tsirkin
to make that clearer. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/vhost.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index ed71b53..cb807d0 100644 --- a/drivers/vhost/vhost.c +++ b/drivers

[PATCH] vhost: relax used address alignment

2014-12-20 Thread Michael S. Tsirkin
to make that clearer. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/vhost.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index ed71b53..97996fc 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost

[PULL] vhost: cleanups and fixes

2014-12-18 Thread Michael S. Tsirkin
on all arches that don't already have it (many do), when that's merged these warnings will go away. Cc: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Michael S. Tsirkin m...@redhat.com Herbert Xu (1): virtio_pci: restore

[PATCH 2/3] vringh: initial virtio 1.0 support

2014-12-15 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/linux/vringh.h | 33 ++ drivers/vhost/vringh.c | 121 ++--- 2 files changed, 107 insertions(+), 47 deletions(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h

[PATCH 1/3] vringh: 64 bit features

2014-12-15 Thread Michael S. Tsirkin
Pass u64 everywhere. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/linux/vringh.h | 4 ++-- drivers/vhost/vringh.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/vringh.h b/include/linux/vringh.h index 749cde2..f696dd0 100644 --- a/include

[PULL] virtio: virtio 1.0 support, misc patches

2014-12-11 Thread Michael S. Tsirkin
...@davemloft.net Cc: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Michael S. Tsirkin m...@redhat.com Cornelia Huck (4): virtio: allow transports to get avail/used addresses KVM: s390: virtio-ccw revision 1 SET_VQ

Re: [PULL] virtio: virtio 1.0 support, misc patches

2014-12-11 Thread Michael S. Tsirkin
On Thu, Dec 11, 2014 at 02:02:48PM +0200, Michael S. Tsirkin wrote: The following changes since commit b2776bf7149bddd1f4161f14f79520f17fc1d71d: Linux 3.18 (2014-12-07 14:21:05 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git

Re: [PULL] virtio: virtio 1.0 support, misc patches

2014-12-11 Thread Michael S. Tsirkin
On Fri, Dec 12, 2014 at 08:07:05AM +1100, Stephen Rothwell wrote: Hi Michael, On Thu, 11 Dec 2014 14:02:48 +0200 Michael S. Tsirkin m...@redhat.com wrote: The following changes since commit b2776bf7149bddd1f4161f14f79520f17fc1d71d: Linux 3.18 (2014-12-07 14:21:05 -0800) hmmm

Re: [PULL] virtio: virtio 1.0 support, misc patches

2014-12-11 Thread Michael S. Tsirkin
On Fri, Dec 12, 2014 at 10:24:26AM +1100, Stephen Rothwell wrote: Hi Michael, On Fri, 12 Dec 2014 00:01:57 +0200 Michael S. Tsirkin m...@redhat.com wrote: It was on linux next for a while, then I wanted to tweak the commit log for some messages a bit. So since I rewrote the history

Re: [PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0

2014-12-09 Thread Michael S. Tsirkin
this for virtio 1 devices. The following should fix it I think: Signed-off-by: Michael S. Tsirkin m...@redhat.com diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index d40e3be..f5a1d3e 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -69,9 +69,6 @@ typedef struct

Re: [PATCH] uio/uio_pci_generic: don't return zero on failure path in probe()

2014-12-07 Thread Michael S. Tsirkin
(linuxtesting.org). Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru Acked-by: Michael S. Tsirkin m...@redhat.com --- drivers/uio/uio_pci_generic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/uio/uio_pci_generic.c b/drivers/uio/uio_pci_generic.c index

Re: [PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call

2014-12-04 Thread Michael S. Tsirkin
On Tue, Dec 02, 2014 at 02:00:18PM +0100, Cornelia Huck wrote: From: Thomas Huth th...@linux.vnet.ibm.com Handle the virtio-ccw revision according to what the guest sets. When revision 1 is selected, we have a virtio-1 standard device with byteswapping for the virtio rings. When a channel

Re: [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Michael S. Tsirkin
On Wed, Dec 03, 2014 at 10:50:04AM +0100, Cornelia Huck wrote: On Wed, 3 Dec 2014 10:27:36 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Tue, 2 Dec 2014 21:03:45 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote

Re: [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-03 Thread Michael S. Tsirkin
On Wed, Dec 03, 2014 at 12:14:10PM +0100, Cornelia Huck wrote: On Wed, 3 Dec 2014 12:52:51 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Dec 03, 2014 at 10:50:04AM +0100, Cornelia Huck wrote: diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 43b7e02

Re: [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Michael S. Tsirkin
On Tue, Dec 02, 2014 at 02:00:15PM +0100, Cornelia Huck wrote: For virtio-1 devices, we allow a more complex queue layout that doesn't require descriptor table and rings on a physically-contigous memory area: add virtio_queue_set_rings() to allow transports to set this up. Signed-off-by:

Re: [PATCH RFC v5 07/19] virtio: allow virtio-1 queue layout

2014-12-02 Thread Michael S. Tsirkin
On Tue, Dec 02, 2014 at 04:41:36PM +0100, Cornelia Huck wrote: void virtio_queue_set_num(VirtIODevice *vdev, int n, int num) { +/* + * For virtio-1 devices, the number of buffers may only be + * updated if the ring addresses have not yet been set up. Where does it say that? +

Re: [PATCH net-next] vhost: remove unnecessary forward declarations in vhost.h

2014-12-01 Thread Michael S. Tsirkin
On Thu, Nov 27, 2014 at 02:41:21PM +0800, Jason Wang wrote: Signed-off-by: Jason Wang jasow...@redhat.com Applied, thanks. --- drivers/vhost/vhost.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..7d039ef 100644 ---

Re: [PATCH v7 28/46] vhost: make features 64 bit

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 04:12:37AM +, Ben Hutchings wrote: On Sun, 2014-11-30 at 18:44 +0300, Sergei Shtylyov wrote: Hello. On 11/30/2014 6:11 PM, Michael S. Tsirkin wrote: We need to use bit 32 for virtio 1.0 Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed

Re: [PATCH net] Revert drivers/net: Disable UFO through virtio in macvtap and tun

2014-12-01 Thread Michael S. Tsirkin
apply, please Acked-by: Michael S. Tsirkin m...@redhat.com --- Compile-tested only. Ben. drivers/net/macvtap.c | 13 - drivers/net/tun.c | 19 --- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers/net

Re: [PATCH v7 30/46] vhost/net: force len for TX to host endian

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 01:20:51PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:11:44 +0200 Michael S. Tsirkin m...@redhat.com wrote: vhost/net keeps a copy of some used ring but (ab)uses length field for internal house-keeping. This works because for tx used length is always 0

Re: [PATCH v7 31/46] vhost: virtio 1.0 endian-ness support

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 01:33:53PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:11:49 +0200 Michael S. Tsirkin m...@redhat.com wrote: Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/vhost.c | 93 +++ 1 file

Re: [PATCH v7 31/46] vhost: virtio 1.0 endian-ness support

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 01:42:47PM +0100, Cornelia Huck wrote: On Mon, 1 Dec 2014 14:37:01 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Dec 01, 2014 at 01:33:53PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:11:49 +0200 Michael S. Tsirkin m...@redhat.com wrote

Re: [PATCH v7 36/46] vhost/net: suppress compiler warning

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 01:37:40PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:12:13 +0200 Michael S. Tsirkin m...@redhat.com wrote: len is always initialized since function is called with size 0. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 2

Re: [PATCH v7 36/46] vhost/net: suppress compiler warning

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 03:21:03PM +0100, Cornelia Huck wrote: On Mon, 1 Dec 2014 15:48:39 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Dec 01, 2014 at 01:37:40PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:12:13 +0200 Michael S. Tsirkin m...@redhat.com wrote

Re: [PATCH v7 31/46] vhost: virtio 1.0 endian-ness support

2014-12-01 Thread Michael S. Tsirkin
On Mon, Dec 01, 2014 at 01:33:53PM +0100, Cornelia Huck wrote: On Sun, 30 Nov 2014 17:11:49 +0200 Michael S. Tsirkin m...@redhat.com wrote: Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/vhost.c | 93 +++ 1 file

[PATCH v8 36/50] vhost/net: enable virtio 1.0

2014-12-01 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 8ff4a6d..a935c25 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -61,7 +61,8

[PATCH v8 32/50] vhost: switch to __get/__put_user exclusively

2014-12-01 Thread Michael S. Tsirkin
everywhere in vhost. There's one exception - for consistency switch that as well, and add an explicit access_ok check. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/vhost.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c b

[PATCH v8 45/50] vhost/scsi: partial virtio 1.0 support

2014-12-01 Thread Michael S. Tsirkin
Include all endian conversions as required by virtio 1.0. Don't set virtio 1.0 yet, since that requires ANY_LAYOUT which we don't yet support. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com --- drivers/vhost/scsi.c | 22 -- 1

[PATCH v8 29/50] vhost: make features 64 bit

2014-12-01 Thread Michael S. Tsirkin
We need to use bit 32 for virtio 1.0. Make vhost_has_feature bool to avoid discarding high bits. Cc: Sergei Shtylyov sergei.shtyl...@cogentembedded.com Cc: Ben Hutchings b...@decadent.org.uk Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com --- drivers

[PATCH v8 31/50] vhost/net: force len for TX to host endian

2014-12-01 Thread Michael S. Tsirkin
to guests. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 8dae2f7..dce5c58 100644 --- a/drivers/vhost

[PATCH v8 30/50] vhost: add memory access wrappers

2014-12-01 Thread Michael S. Tsirkin
Add guest memory access wrappers to handle virtio endianness conversions. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/vhost/vhost.h | 31 +++ 1 file

[PATCH v8 33/50] vhost: virtio 1.0 endian-ness support

2014-12-01 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/vhost.c | 86 +-- 1 file changed, 49 insertions(+), 37 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 6a40837..ed71b53 100644 --- a/drivers/vhost

[PATCH v8 35/50] vhost/net: larger header for virtio 1.0

2014-12-01 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index c218188

[PATCH v8 34/50] vhost/net: virtio 1.0 byte swap

2014-12-01 Thread Michael S. Tsirkin
I had to add an explicit tag to suppress compiler warning: gcc isn't smart enough to notice that len is always initialized since function is called with size 0. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/vhost/net.c | 15

[PATCH v7 45/46] vhost/scsi: partial virtio 1.0 support

2014-11-30 Thread Michael S. Tsirkin
Include all endian conversions as required by virtio 1.0. Don't set virtio 1.0 yet, since that requires ANY_LAYOUT which we don't yet support. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Paolo Bonzini pbonz...@redhat.com --- drivers/vhost/scsi.c | 22 -- 1

[PATCH v7 36/46] vhost/net: suppress compiler warning

2014-11-30 Thread Michael S. Tsirkin
len is always initialized since function is called with size 0. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 984242e..54ffbb0 100644 --- a/drivers

[PATCH v7 35/46] vhost/net: enable virtio 1.0

2014-11-30 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 1ac58d0..984242e 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -61,7 +61,8

[PATCH v7 33/46] vhost/net: larger header for virtio 1.0

2014-11-30 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index cae22f9..1ac58d0 100644 --- a/drivers/vhost/net.c +++ b

<    1   2   3   4   5   6   7   8   9   10   >