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

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

2015-01-07 Thread Greg Kurz
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 to notice that len is always initialized since function is

[PATCH] vhost/net: length miscalculation

2015-01-07 Thread Michael S. Tsirkin
commit 8b38694a2dc8b18374310df50174f1e4376d6824 vhost/net: virtio 1.0 byte swap had this chunk: - heads[headcount - 1].len += datalen; + heads[headcount - 1].len = cpu_to_vhost32(vq, len - datalen); This adds datalen with the wrong sign, causing guest panics. Fixes:

[PULL] vhost: cleanups and fixes

2015-01-07 Thread Michael S. Tsirkin
The following changes since commit b1940cd21c0f4abdce101253e860feff547291b0: Linux 3.19-rc3 (2015-01-05 17:05:20 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes up to

Re: [PATCH RFC v6 13/20] virtio: allow to fail setting status

2015-01-07 Thread Cornelia Huck
On Wed, 7 Jan 2015 21:08:21 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jan 07, 2015 at 05:13:32PM +0100, Cornelia Huck wrote: On Tue, 30 Dec 2014 14:25:37 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:15PM +0100, Cornelia Huck wrote:

Re: [PATCH] vhost/net: length miscalculation

2015-01-07 Thread Sergei Shtylyov
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[headcount - 1].len = cpu_to_vhost32(vq, len - datalen); This adds datalen

Re: [PATCH] vhost/net: length miscalculation

2015-01-07 Thread Alex Williamson
On Wed, 2015-01-07 at 10:55 +0200, Michael S. Tsirkin wrote: commit 8b38694a2dc8b18374310df50174f1e4376d6824 vhost/net: virtio 1.0 byte swap had this chunk: - heads[headcount - 1].len += datalen; + heads[headcount - 1].len = cpu_to_vhost32(vq, len - datalen); This adds

Re: [PATCH RFC v6 13/20] virtio: allow to fail setting status

2015-01-07 Thread Cornelia Huck
On Tue, 30 Dec 2014 14:25:37 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:15PM +0100, Cornelia Huck wrote: virtio-1 allow setting of the FEATURES_OK status bit to fail if the negotiated feature bits are inconsistent: let's fail virtio_set_status() in that

Re: [PATCH RFC v6 18/20] virtio: support revision-specific features

2015-01-07 Thread Cornelia Huck
On Sun, 28 Dec 2014 10:32:06 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:20PM +0100, Cornelia Huck wrote: Devices may support different sets of feature bits depending on which revision they're operating at. Let's give the transport a way to re-query the

Re: [PATCH RFC v6 19/20] virtio-blk: revision specific feature bits

2015-01-07 Thread Cornelia Huck
On Sun, 28 Dec 2014 12:24:46 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:21PM +0100, Cornelia Huck wrote: Wire up virtio-blk to provide different feature bit sets depending on whether legacy or v1.0 has been requested. Note that VERSION_1 is still

Re: [PATCH RFC v6 13/20] virtio: allow to fail setting status

2015-01-07 Thread Michael S. Tsirkin
On Wed, Jan 07, 2015 at 05:13:32PM +0100, Cornelia Huck wrote: On Tue, 30 Dec 2014 14:25:37 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:15PM +0100, Cornelia Huck wrote: virtio-1 allow setting of the FEATURES_OK status bit to fail if the negotiated

Re: [PATCH RFC v6 18/20] virtio: support revision-specific features

2015-01-07 Thread Michael S. Tsirkin
On Wed, Jan 07, 2015 at 05:22:32PM +0100, Cornelia Huck wrote: On Sun, 28 Dec 2014 10:32:06 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:20PM +0100, Cornelia Huck wrote: Devices may support different sets of feature bits depending on which revision

Re: [PATCH RFC v6 19/20] virtio-blk: revision specific feature bits

2015-01-07 Thread Michael S. Tsirkin
On Wed, Jan 07, 2015 at 05:29:49PM +0100, Cornelia Huck wrote: On Sun, 28 Dec 2014 12:24:46 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Thu, Dec 11, 2014 at 02:25:21PM +0100, Cornelia Huck wrote: Wire up virtio-blk to provide different feature bit sets depending on whether