Re: [PATCH 08/16] virtio_net: drop config_enable

2014-10-07 Thread Michael S. Tsirkin
On Mon, Oct 06, 2014 at 03:02:38PM -0400, David Miller wrote: From: Michael S. Tsirkin m...@redhat.com Date: Sun, 5 Oct 2014 19:07:13 +0300 Now that virtio core ensures config changes don't arrive during probing, drop config_enable flag in virtio net. On removal, flush is now sufficient

Re: [PATCH v2 01/15] virtio_pci: fix virtio spec compliance on restore

2014-10-07 Thread Amit Shah
On (Mon) 06 Oct 2014 [18:10:40], Michael S. Tsirkin wrote: On restore, virtio pci does the following: + set features + init vqs etc - device can be used at this point! + set ACKNOWLEDGE,DRIVER and DRIVER_OK status bits This is in violation of the virtio spec, which requires the following

Re: [PATCH v2 01/15] virtio_pci: fix virtio spec compliance on restore

2014-10-07 Thread Michael S. Tsirkin
On Tue, Oct 07, 2014 at 05:35:13PM +0530, Amit Shah wrote: On (Mon) 06 Oct 2014 [18:10:40], Michael S. Tsirkin wrote: On restore, virtio pci does the following: + set features + init vqs etc - device can be used at this point! + set ACKNOWLEDGE,DRIVER and DRIVER_OK status bits This

Re: [PATCH v2 01/15] virtio_pci: fix virtio spec compliance on restore

2014-10-07 Thread Michael S. Tsirkin
On Mon, Oct 06, 2014 at 06:10:40PM +0300, Michael S. Tsirkin wrote: On restore, virtio pci does the following: + set features + init vqs etc - device can be used at this point! + set ACKNOWLEDGE,DRIVER and DRIVER_OK status bits This is in violation of the virtio spec, which requires the

Re: [PATCH 08/16] virtio_net: drop config_enable

2014-10-07 Thread Michael S. Tsirkin
On Tue, Oct 07, 2014 at 11:36:43AM -0400, David Miller wrote: From: Michael S. Tsirkin m...@redhat.com Date: Tue, 7 Oct 2014 09:49:15 +0300 On Mon, Oct 06, 2014 at 03:02:38PM -0400, David Miller wrote: From: Michael S. Tsirkin m...@redhat.com Date: Sun, 5 Oct 2014 19:07:13 +0300

Re: [PATCH v2 01/15] virtio_pci: fix virtio spec compliance on restore

2014-10-07 Thread Amit Shah
On (Tue) 07 Oct 2014 [15:53:55], Michael S. Tsirkin wrote: On Mon, Oct 06, 2014 at 06:10:40PM +0300, Michael S. Tsirkin wrote: On restore, virtio pci does the following: + set features + init vqs etc - device can be used at this point! + set ACKNOWLEDGE,DRIVER and DRIVER_OK status bits

[PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-07 Thread Cornelia Huck
This patchset aims to get us some way to implement virtio-1 compliant and transitional devices in qemu. Branch available at git://github.com/cohuck/qemu virtio-1 I've mainly focused on: - endianness handling - extended feature bits - virtio-ccw new/changed commands Thanks go to Thomas for some

[PATCH RFC 01/11] virtio: use u32, not bitmap for struct virtio_device's features

2014-10-07 Thread Cornelia Huck
From: Rusty Russell ru...@rustcorp.com.au It seemed like a good idea, but it's actually a pain when we get more than 32 feature bits. Just change it to a u32 for now. Cc: Brian Swetland swetl...@google.com Cc: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Rusty Russell

[PATCH RFC 05/11] virtio_config: endian conversion for v1.0.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell ru...@rustcorp.com.au Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/linux/virtio_config.h |9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH RFC 06/11] virtio: allow virtio-1 queue layout

2014-10-07 Thread Cornelia Huck
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: Cornelia Huck cornelia.h...@de.ibm.com --- hw/virtio/virtio.c

[PATCH RFC 10/11] KVM: s390: virtio-ccw revision 1 SET_VQ

2014-10-07 Thread Cornelia Huck
The CCW_CMD_SET_VQ command has a different format for revision 1+ devices, allowing to specify a more complex virtqueue layout. For now, we stay however with the old layout and simply use the new command format for virtio-1 devices. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com ---

[PATCH RFC 09/11] s390x/virtio-ccw: add virtio set-revision call

2014-10-07 Thread Cornelia Huck
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 gets disabled, we have to revert to the legacy behavior in case the

[PATCH RFC 02/11] virtio: cull virtio_bus_set_vdev_features

2014-10-07 Thread Cornelia Huck
The only user of this function was virtio-ccw, and it should use virtio_set_features() like everybody else: We need to make sure that bad features are masked out properly, which this function did not do. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck

[PATCH RFC 07/11] dataplane: allow virtio-1 devices

2014-10-07 Thread Cornelia Huck
Handle endianness conversion for virtio-1 virtqueues correctly. Note that dataplane now needs to be built per-target. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/block/dataplane/virtio-blk.c |3 +- hw/scsi/virtio-scsi-dataplane.c |2 +- hw/virtio/Makefile.objs

[PATCH RFC 07/11] virtio_net: use v1.0 endian.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell ru...@rustcorp.com.au [Cornelia Huck: converted some missed fields] Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/net/virtio_net.c | 31 +++ 1 file changed, 19 insertions(+),

[PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-10-07 Thread Cornelia Huck
Introduce a helper function to indicate whether a virtio device is operating in legacy or virtio standard mode. It may be used to make decisions about the endianess of virtio accesses and other virtio-1 specific changes, enabling us to support transitional devices. Reviewed-by: Thomas Huth

[PATCH RFC 02/11] virtio: add support for 64 bit features.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell ru...@rustcorp.com.au Change the u32 to a u64, and make sure to use 1ULL everywhere! Cc: Brian Swetland swetl...@google.com Cc: Christian Borntraeger borntrae...@de.ibm.com [Thomas Huth: fix up virtio-ccw get_features] Signed-off-by: Rusty Russell ru...@rustcorp.com.au

[PATCH RFC 03/11] virtio: endianess conversion helpers

2014-10-07 Thread Cornelia Huck
Provide helper functions that convert from/to LE for virtio devices that are not operating in legacy mode. We check for the VERSION_1 feature bit to determine that. Based on original patches by Rusty Russell and Thomas Huth. Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by:

[PATCH RFC 04/11] virtio_ring: implement endian reversal based on VERSION_1 feature.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell ru...@rustcorp.com.au [Cornelia Huck: we don't need the vq-vring.num - vq-ring_mask change] Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/virtio/virtio_ring.c | 195

[PATCH RFC 10/11] s390x/virtio-ccw: support virtio-1 set_vq format

2014-10-07 Thread Cornelia Huck
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com ---

[PATCH RFC 08/11] virtio_blk: use virtio v1.0 endian

2014-10-07 Thread Cornelia Huck
Note that we care only about the fields still in use for virtio v1.0. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- drivers/block/virtio_blk.c |4 1 file changed, 4

[PATCH RFC 09/11] KVM: s390: Set virtio-ccw transport revision

2014-10-07 Thread Cornelia Huck
From: Thomas Huth th...@linux.vnet.ibm.com With the new SET-VIRTIO-REVISION command of the virtio 1.0 standard, we can now negotiate the virtio-ccw revision after setting a channel online. Note that we don't negotiate version 1 yet. [Cornelia Huck: reworked revision loop a bit] Reviewed-by:

[PATCH RFC 11/11] s390x/virtio-ccw: enable virtio 1.0

2014-10-07 Thread Cornelia Huck
virtio-ccw should now have everything in place to operate virtio 1.0 devices, so let's enable revision 1. Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/virtio-ccw.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h

[PATCH RFC 03/11] virtio: support more feature bits

2014-10-07 Thread Cornelia Huck
With virtio-1, we support more than 32 feature bits. Let's make vdev-guest_features depend on the number of supported feature bits, allowing us to grow the feature bits automatically. We also need to enhance the internal functions dealing with getting and setting features with an additional index

[PATCH RFC 04/11] s390x/virtio-ccw: fix check for WRITE_FEAT

2014-10-07 Thread Cornelia Huck
We need to check guest feature size, not host feature size to find out whether we should call virtio_set_features(). This check is possible now that vdev-guest_features is an array. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com ---

[PATCH RFC 08/11] s390x/css: Add a callback for when subchannel gets disabled

2014-10-07 Thread Cornelia Huck
From: Thomas Huth th...@linux.vnet.ibm.com We need a possibility to run code when a subchannel gets disabled. This patch adds the necessary infrastructure. Signed-off-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/s390x/css.c | 12

Re: [PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-07 Thread Andy Lutomirski
On 10/07/2014 07:39 AM, Cornelia Huck wrote: This patchset aims to get us some way to implement virtio-1 compliant and transitional devices in qemu. Branch available at git://github.com/cohuck/qemu virtio-1 I've mainly focused on: - endianness handling - extended feature bits -