search for: virtio_ccw_rev_max

Displaying 20 results from an estimated 40 matches for "virtio_ccw_rev_max".

2014 Dec 09
1
[PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0
...rtio-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 VirtIOCCWDeviceClass { int (*exit)(VirtioCcwDevice *dev); } VirtIOCCWDeviceClass; -/* The maximum virtio revision we support. */ -#define VIRTIO_CCW_REV_MAX 1 - /* Performance improves when virtqueue kick processing is decoupled from the * vcpu thread using ioeventfd for some devices. */ #define VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT 1 @@ -104,6 +101,12 @@ struct VirtioCcwDevice { uint64_t ind_bit; }; +/* The maximum virtio revision we support....
2014 Dec 09
1
[PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0
...rtio-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 VirtIOCCWDeviceClass { int (*exit)(VirtioCcwDevice *dev); } VirtIOCCWDeviceClass; -/* The maximum virtio revision we support. */ -#define VIRTIO_CCW_REV_MAX 1 - /* Performance improves when virtqueue kick processing is decoupled from the * vcpu thread using ioeventfd for some devices. */ #define VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT 1 @@ -104,6 +101,12 @@ struct VirtioCcwDevice { uint64_t ind_bit; }; +/* The maximum virtio revision we support....
2015 Jan 20
2
[PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...> + break; > + } > + if (!ccw.cda) { > + ret = -EFAULT; > + break; > + } > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > + if (dev->revision >= 0 || > + revinfo.revision > virtio_ccw_rev_max(dev)) { In the next patch virtio_ccw_handle_set_vq() uses big-endian memory access functions to load a struct from guest memory. Here you just copy the struct in without byteswaps. Are the byteswaps missing here? (I guess this normally runs big-endian guests on big-endian hosts so it's not...
2015 Jan 20
2
[PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...> + break; > + } > + if (!ccw.cda) { > + ret = -EFAULT; > + break; > + } > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > + if (dev->revision >= 0 || > + revinfo.revision > virtio_ccw_rev_max(dev)) { In the next patch virtio_ccw_handle_set_vq() uses big-endian memory access functions to load a struct from guest memory. Here you just copy the struct in without byteswaps. Are the byteswaps missing here? (I guess this normally runs big-endian guests on big-endian hosts so it's not...
2014 Oct 07
0
[PATCH RFC 11/11] KVM: s390: enable virtio-ccw revision 1
...deletion(-) diff --git a/drivers/s390/kvm/virtio_ccw.c b/drivers/s390/kvm/virtio_ccw.c index f97d3fb..a2e0c33 100644 --- a/drivers/s390/kvm/virtio_ccw.c +++ b/drivers/s390/kvm/virtio_ccw.c @@ -103,7 +103,7 @@ struct virtio_rev_info { }; /* the highest virtio-ccw revision we support */ -#define VIRTIO_CCW_REV_MAX 0 +#define VIRTIO_CCW_REV_MAX 1 struct virtio_ccw_vq_info { struct virtqueue *vq; -- 1.7.9.5
2014 Dec 02
0
[PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0
...1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index fe5c782..d40e3be 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -70,7 +70,7 @@ typedef struct VirtIOCCWDeviceClass { } VirtIOCCWDeviceClass; /* The maximum virtio revision we support. */ -#define VIRTIO_CCW_REV_MAX 0 +#define VIRTIO_CCW_REV_MAX 1 /* Performance improves when virtqueue kick processing is decoupled from the * vcpu thread using ioeventfd for some devices. */ -- 1.7.9.5
2014 Dec 02
0
[PATCH RFC v5 14/19] s390x/virtio-ccw: enable virtio 1.0
...1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index fe5c782..d40e3be 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -70,7 +70,7 @@ typedef struct VirtIOCCWDeviceClass { } VirtIOCCWDeviceClass; /* The maximum virtio revision we support. */ -#define VIRTIO_CCW_REV_MAX 0 +#define VIRTIO_CCW_REV_MAX 1 /* Performance improves when virtqueue kick processing is decoupled from the * vcpu thread using ioeventfd for some devices. */ -- 1.7.9.5
2014 Oct 07
0
[PATCH RFC 09/11] KVM: s390: Set virtio-ccw transport revision
...ision */ wait_queue_head_t wait_q; spinlock_t lock; struct list_head virtqueues; @@ -86,6 +87,15 @@ struct virtio_thinint_area { u8 isc; } __packed; +struct virtio_rev_info { + __u16 revision; + __u16 length; + __u8 data[]; +}; + +/* the highest virtio-ccw revision we support */ +#define VIRTIO_CCW_REV_MAX 0 + struct virtio_ccw_vq_info { struct virtqueue *vq; int num; @@ -122,6 +132,7 @@ static struct airq_info *airq_areas[MAX_AIRQ_AREAS]; #define CCW_CMD_WRITE_STATUS 0x31 #define CCW_CMD_READ_VQ_CONF 0x32 #define CCW_CMD_SET_IND_ADAPTER 0x73 +#define CCW_CMD_SET_VIRTIO_REV 0x83 #define VI...
2015 Jan 21
1
[Qemu-devel] [PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...!ccw.cda) { > > > + ret = -EFAULT; > > > + break; > > > + } > > > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > > > + if (dev->revision >= 0 || > > > + revinfo.revision > virtio_ccw_rev_max(dev)) { > > > > In the next patch virtio_ccw_handle_set_vq() uses big-endian memory > > access functions to load a struct from guest memory. > > > > Here you just copy the struct in without byteswaps. > > > > Are the byteswaps missing here? (I guess thi...
2015 Jan 21
1
[Qemu-devel] [PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...!ccw.cda) { > > > + ret = -EFAULT; > > > + break; > > > + } > > > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > > > + if (dev->revision >= 0 || > > > + revinfo.revision > virtio_ccw_rev_max(dev)) { > > > > In the next patch virtio_ccw_handle_set_vq() uses big-endian memory > > access functions to load a struct from guest memory. > > > > Here you just copy the struct in without byteswaps. > > > > Are the byteswaps missing here? (I guess thi...
2014 Dec 11
0
[PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...ount > len)) { + ret = -EINVAL; + break; + } + if (!ccw.cda) { + ret = -EFAULT; + break; + } + cpu_physical_memory_read(ccw.cda, &revinfo, len); + if (dev->revision >= 0 || + revinfo.revision > virtio_ccw_rev_max(dev)) { + ret = -ENOSYS; + break; + } + ret = 0; + dev->revision = revinfo.revision; + break; default: ret = -ENOSYS; break; @@ -615,6 +657,13 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw) return ret; } +stat...
2014 Dec 11
0
[PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...ount > len)) { + ret = -EINVAL; + break; + } + if (!ccw.cda) { + ret = -EFAULT; + break; + } + cpu_physical_memory_read(ccw.cda, &revinfo, len); + if (dev->revision >= 0 || + revinfo.revision > virtio_ccw_rev_max(dev)) { + ret = -ENOSYS; + break; + } + ret = 0; + dev->revision = revinfo.revision; + break; default: ret = -ENOSYS; break; @@ -615,6 +657,13 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw) return ret; } +stat...
2014 Dec 02
0
[PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call
...ount > len)) { + ret = -EINVAL; + break; + } + if (!ccw.cda) { + ret = -EFAULT; + break; + } + cpu_physical_memory_read(ccw.cda, &revinfo, len); + if (dev->revision >= 0 || + revinfo.revision > VIRTIO_CCW_REV_MAX) { + ret = -ENOSYS; + break; + } + ret = 0; + dev->revision = revinfo.revision; + break; default: ret = -ENOSYS; break; @@ -615,6 +657,13 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw) return ret; } +static vo...
2014 Dec 02
0
[PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call
...ount > len)) { + ret = -EINVAL; + break; + } + if (!ccw.cda) { + ret = -EFAULT; + break; + } + cpu_physical_memory_read(ccw.cda, &revinfo, len); + if (dev->revision >= 0 || + revinfo.revision > VIRTIO_CCW_REV_MAX) { + ret = -ENOSYS; + break; + } + ret = 0; + dev->revision = revinfo.revision; + break; default: ret = -ENOSYS; break; @@ -615,6 +657,13 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw) return ret; } +static vo...
2014 Dec 04
1
[PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call
...> + break; > + } > + if (!ccw.cda) { > + ret = -EFAULT; > + break; > + } > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > + if (dev->revision >= 0 || > + revinfo.revision > VIRTIO_CCW_REV_MAX) { > + ret = -ENOSYS; > + break; > + } > + ret = 0; > + dev->revision = revinfo.revision; > + break; > default: > ret = -ENOSYS; > break; > @@ -615,6 +657,13 @@ static int virtio_ccw_cb(SubchDe...
2014 Dec 04
1
[PATCH RFC v5 10/19] s390x/virtio-ccw: add virtio set-revision call
...> + break; > + } > + if (!ccw.cda) { > + ret = -EFAULT; > + break; > + } > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > + if (dev->revision >= 0 || > + revinfo.revision > VIRTIO_CCW_REV_MAX) { > + ret = -ENOSYS; > + break; > + } > + ret = 0; > + dev->revision = revinfo.revision; > + break; > default: > ret = -ENOSYS; > break; > @@ -615,6 +657,13 @@ static int virtio_ccw_cb(SubchDe...
2014 Dec 11
0
[PATCH RFC v6 14/20] s390x/virtio-ccw: enable virtio 1.0
...ile changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 778ccb9..37a9840 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -104,7 +104,7 @@ struct VirtioCcwDevice { /* The maximum virtio revision we support. */ static inline int virtio_ccw_rev_max(VirtioCcwDevice *dev) { - return 0; + return dev->host_features & (1ULL << VIRTIO_F_VERSION_1) ? 1 : 0; } /* virtual css bus type */ -- 1.7.9.5
2015 Jan 21
0
[PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...} > > + if (!ccw.cda) { > > + ret = -EFAULT; > > + break; > > + } > > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > > + if (dev->revision >= 0 || > > + revinfo.revision > virtio_ccw_rev_max(dev)) { > > In the next patch virtio_ccw_handle_set_vq() uses big-endian memory > access functions to load a struct from guest memory. > > Here you just copy the struct in without byteswaps. > > Are the byteswaps missing here? (I guess this normally runs big-endian > gue...
2014 Dec 11
0
[PATCH RFC v6 14/20] s390x/virtio-ccw: enable virtio 1.0
...ile changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 778ccb9..37a9840 100644 --- a/hw/s390x/virtio-ccw.h +++ b/hw/s390x/virtio-ccw.h @@ -104,7 +104,7 @@ struct VirtioCcwDevice { /* The maximum virtio revision we support. */ static inline int virtio_ccw_rev_max(VirtioCcwDevice *dev) { - return 0; + return dev->host_features & (1ULL << VIRTIO_F_VERSION_1) ? 1 : 0; } /* virtual css bus type */ -- 1.7.9.5
2015 Jan 21
0
[PATCH RFC v6 10/20] s390x/virtio-ccw: add virtio set-revision call
...} > > + if (!ccw.cda) { > > + ret = -EFAULT; > > + break; > > + } > > + cpu_physical_memory_read(ccw.cda, &revinfo, len); > > + if (dev->revision >= 0 || > > + revinfo.revision > virtio_ccw_rev_max(dev)) { > > In the next patch virtio_ccw_handle_set_vq() uses big-endian memory > access functions to load a struct from guest memory. > > Here you just copy the struct in without byteswaps. > > Are the byteswaps missing here? (I guess this normally runs big-endian > gue...