search for: virtio_f_version_1

Displaying 20 results from an estimated 987 matches for "virtio_f_version_1".

2014 Nov 27
1
[PATCH v6 29/46] vhost: add memory access wrappers
...,35 @@ static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { return vq->acked_features & (1ULL << bit); } + +/* Memory accessors */ +static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val) +{ + return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); +} + +static inline __virtio16 cpu_to_vhost16(struct vhost_virtqueue *vq, u16 val) +{ + return __cpu_to_virtio16(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); +} + +static inline u32 vhost32_to_cpu(struct vhost_virtqueue *vq, __virtio32 val) +{ + return __virtio32_to_cpu(vhost_has_featur...
2014 Nov 27
1
[PATCH v6 29/46] vhost: add memory access wrappers
...,35 @@ static inline int vhost_has_feature(struct vhost_virtqueue *vq, int bit) { return vq->acked_features & (1ULL << bit); } + +/* Memory accessors */ +static inline u16 vhost16_to_cpu(struct vhost_virtqueue *vq, __virtio16 val) +{ + return __virtio16_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); +} + +static inline __virtio16 cpu_to_vhost16(struct vhost_virtqueue *vq, u16 val) +{ + return __cpu_to_virtio16(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); +} + +static inline u32 vhost32_to_cpu(struct vhost_virtqueue *vq, __virtio32 val) +{ + return __virtio32_to_cpu(vhost_has_featur...
2014 Dec 01
0
[PATCH v8 49/50] virtio: make VIRTIO_F_VERSION_1 a transport bit
Activate VIRTIO_F_VERSION_1 automatically unless legacy_only is set. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/uapi/linux/virtio_config.h | 4 ++-- drivers/virtio/virtio.c | 6 +++++- drivers/virtio/virtio_ring.c | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --...
2014 Dec 01
0
[PATCH v8 49/50] virtio: make VIRTIO_F_VERSION_1 a transport bit
Activate VIRTIO_F_VERSION_1 automatically unless legacy_only is set. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/uapi/linux/virtio_config.h | 4 ++-- drivers/virtio/virtio.c | 6 +++++- drivers/virtio/virtio_ring.c | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --...
2020 Jul 02
2
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...>> drivers/virtio/virtio.c | 22 ++++++++++++++++++++++ >>> include/linux/virtio.h | 2 ++ >>> 3 files changed, 30 insertions(+) > >>> @@ -179,6 +194,13 @@ int virtio_finalize_features(struct virtio_device *dev) >>> if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) >>> return 0; >>> >>> + if (arch_needs_virtio_iommu_platform(dev) && >>> + !virtio_has_feature(dev, VIRTIO_F_IOMMU_PLATFORM)) { >>> + dev_warn(&dev->dev, >>> + "virtio: device must provide VIRTIO_F_IOMMU_PLATFOR...
2020 Jul 02
2
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...>> drivers/virtio/virtio.c | 22 ++++++++++++++++++++++ >>> include/linux/virtio.h | 2 ++ >>> 3 files changed, 30 insertions(+) > >>> @@ -179,6 +194,13 @@ int virtio_finalize_features(struct virtio_device *dev) >>> if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) >>> return 0; >>> >>> + if (arch_needs_virtio_iommu_platform(dev) && >>> + !virtio_has_feature(dev, VIRTIO_F_IOMMU_PLATFORM)) { >>> + dev_warn(&dev->dev, >>> + "virtio: device must provide VIRTIO_F_IOMMU_PLATFOR...
2020 Jul 06
1
[PATCH v3 1/1] s390: virtio: let arch accept devices without IOMMU feature
...t;>> ? include/linux/virtio.h? |? 2 ++ > >>>> ? 3 files changed, 30 insertions(+) > >> > >>>> @@ -179,6 +194,13 @@ int virtio_finalize_features(struct > >>>> virtio_device *dev) > >>>> ????? if (!virtio_has_feature(dev, VIRTIO_F_VERSION_1)) > >>>> ????????? return 0; > >>>> +??? if (arch_needs_virtio_iommu_platform(dev) && > >>>> +??????? !virtio_has_feature(dev, VIRTIO_F_IOMMU_PLATFORM)) { > >>>> +??????? dev_warn(&dev->dev, > >>>> +??????????...
2015 Jan 20
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...t; > > Spec says explicitly it's an illegal configuration. > > > > What part of the spec exactly? The closest I can think of are 2.2.3, 6.2 > > and 6.3. Both legacy and spec-complaint MMIO transports will satisfy all > > requirements from those paragraphs, whether VIRTIO_F_VERSION_1 is > > negotiated or not. > > The parts that say VIRTIO_F_VERSION_1 MUST be set. > I'll look up the chapter and verse later if you like. That would be: "6.1 Driver Requirements: Reserved Feature Bits A driver MUST accept VIRTIO_F_VERSION_1 if it is offered. A driver MAY f...
2015 Jan 20
2
[RFC] virtio-mmio: Update the device to OASIS spec version
...t; > > Spec says explicitly it's an illegal configuration. > > > > What part of the spec exactly? The closest I can think of are 2.2.3, 6.2 > > and 6.3. Both legacy and spec-complaint MMIO transports will satisfy all > > requirements from those paragraphs, whether VIRTIO_F_VERSION_1 is > > negotiated or not. > > The parts that say VIRTIO_F_VERSION_1 MUST be set. > I'll look up the chapter and verse later if you like. That would be: "6.1 Driver Requirements: Reserved Feature Bits A driver MUST accept VIRTIO_F_VERSION_1 if it is offered. A driver MAY f...
2014 Dec 01
0
[PATCH v8 50/50] virtio: drop VIRTIO_F_VERSION_1 from drivers
...it a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 1f8b111..1fb9e09 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -836,7 +836,6 @@ static unsigned int features[] = { VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_MQ, - VIRTIO_F_VERSION_1, }; static struct virtio_driver virtio_blk = { diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 775c898..6cc832b 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2130,7 +2130,6 @@ static struct virtio_device_id id_table[] = { st...
2014 Dec 04
0
[PATCH RFC 3/3] virtio_ccw: rev 1 devices set VIRTIO_F_VERSION_1
What does it mean if rev 1 device does not set VIRTIO_F_VERSION_1? E.g. is it native endian? Let's not even try to drive such devices: skip attempts to finalize features or set status. virtio core will detect this and bail out. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/s390/kvm/virtio_ccw.c | 15 +++++++++++++++ 1 file changed...
2014 Dec 01
0
[PATCH v8 50/50] virtio: drop VIRTIO_F_VERSION_1 from drivers
...it a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 1f8b111..1fb9e09 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -836,7 +836,6 @@ static unsigned int features[] = { VIRTIO_BLK_F_RO, VIRTIO_BLK_F_BLK_SIZE, VIRTIO_BLK_F_TOPOLOGY, VIRTIO_BLK_F_MQ, - VIRTIO_F_VERSION_1, }; static struct virtio_driver virtio_blk = { diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 775c898..6cc832b 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2130,7 +2130,6 @@ static struct virtio_device_id id_table[] = { st...
2014 Dec 04
0
[PATCH RFC 3/3] virtio_ccw: rev 1 devices set VIRTIO_F_VERSION_1
What does it mean if rev 1 device does not set VIRTIO_F_VERSION_1? E.g. is it native endian? Let's not even try to drive such devices: skip attempts to finalize features or set status. virtio core will detect this and bail out. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/s390/kvm/virtio_ccw.c | 15 +++++++++++++++ 1 file changed...
2020 Jul 07
4
[PATCH v4 2/2] s390: virtio: PV needs VIRTIO I/O device protection
On Tue, 7 Jul 2020 10:44:37 +0200 Pierre Morel <pmorel at linux.ibm.com> wrote: > S390, protecting the guest memory against unauthorized host access > needs to enforce VIRTIO I/O device protection through the use of > VIRTIO_F_VERSION_1 and VIRTIO_F_IOMMU_PLATFORM. Hm... what about: "If protected virtualization is active on s390, the virtio queues are not accessible to the host, unless VIRTIO_F_IOMMU_PLATFORM has been negotiated. Use the new arch_validate_virtio_features() interface to enforce this." > > Signed...
2020 Jul 07
4
[PATCH v4 2/2] s390: virtio: PV needs VIRTIO I/O device protection
On Tue, 7 Jul 2020 10:44:37 +0200 Pierre Morel <pmorel at linux.ibm.com> wrote: > S390, protecting the guest memory against unauthorized host access > needs to enforce VIRTIO I/O device protection through the use of > VIRTIO_F_VERSION_1 and VIRTIO_F_IOMMU_PLATFORM. Hm... what about: "If protected virtualization is active on s390, the virtio queues are not accessible to the host, unless VIRTIO_F_IOMMU_PLATFORM has been negotiated. Use the new arch_validate_virtio_features() interface to enforce this." > > Signed...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...01ea 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -24,6 +24,9 @@ static uint32_t virtio_9p_get_features(VirtIODevice *vdev, unsigned int index, uint32_t features) { + if (index == 1) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 0d843fe..07a7a6f 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -472,6 +472,9 @@ static uint32_t get_features(VirtIODe...
2014 Oct 24
5
[PATCH RFC 00/11] qemu: towards virtio-1 host support
...01ea 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -24,6 +24,9 @@ static uint32_t virtio_9p_get_features(VirtIODevice *vdev, unsigned int index, uint32_t features) { + if (index == 1) { + features &= ~(1 << (VIRTIO_F_VERSION_1 - 32)); + } if (index > 0) { return features; } diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index 0d843fe..07a7a6f 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -472,6 +472,9 @@ static uint32_t get_features(VirtIODe...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
Clang warns several times when building for 32-bit ARM along the lines of: drivers/vdpa/mlx5/net/mlx5_vnet.c:1462:31: warning: shift count >= width of type [-Wshift-count-overflow] ndev->mvdev.mlx_features |= BIT(VIRTIO_F_VERSION_1); ^~~~~~~~~~~~~~~~~~~~~~~ This is related to the BIT macro, which uses an unsigned long literal, which is 32-bit on ARM so having a shift equal to or larger than 32 will cause this warning, such as the above, where VIRTIO_F_VERSION_1 is 32. To avoid this...
2020 Aug 21
3
[PATCH] vdpa/mlx5: Avoid warnings about shifts on 32-bit platforms
Clang warns several times when building for 32-bit ARM along the lines of: drivers/vdpa/mlx5/net/mlx5_vnet.c:1462:31: warning: shift count >= width of type [-Wshift-count-overflow] ndev->mvdev.mlx_features |= BIT(VIRTIO_F_VERSION_1); ^~~~~~~~~~~~~~~~~~~~~~~ This is related to the BIT macro, which uses an unsigned long literal, which is 32-bit on ARM so having a shift equal to or larger than 32 will cause this warning, such as the above, where VIRTIO_F_VERSION_1 is 32. To avoid this...
2015 Apr 23
16
[PATCH v5 0/8] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. It is compatible with modern virtio and can be fully compiled out through kernel config. FWIW, I could flawlessly kexec/reboot guests from ppc64 to ppc64le and back. I could also migrate from a ppc64 to a ppc64le host and back. No regressions on x86 as expected. My experimental QEMU tree