search for: virtio_default_endian

Displaying 20 results from an estimated 33 matches for "virtio_default_endian".

2014 Oct 28
2
[Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices
...t; --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) > VirtIODevice *vdev = opaque; > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > - return vdev->device_endian != virtio_default_endian(); > + if (virtio_device_is_legacy(vdev)) { > + return vdev->device_endian != virtio_default_endian(); > + } > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; > } > Shoul...
2014 Oct 28
2
[Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices
...t; --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) > VirtIODevice *vdev = opaque; > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > - return vdev->device_endian != virtio_default_endian(); > + if (virtio_device_is_legacy(vdev)) { > + return vdev->device_endian != virtio_default_endian(); > + } > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; > } > Shoul...
2014 Oct 30
1
[Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices
...irtio.c > > > @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) > > > VirtIODevice *vdev = opaque; > > > > > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > > > - return vdev->device_endian != virtio_default_endian(); > > > + if (virtio_device_is_legacy(vdev)) { > > > + return vdev->device_endian != virtio_default_endian(); > > > + } > > > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > > > + return vdev->device_endian !=...
2014 Oct 30
1
[Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices
...irtio.c > > > @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) > > > VirtIODevice *vdev = opaque; > > > > > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > > > - return vdev->device_endian != virtio_default_endian(); > > > + if (virtio_device_is_legacy(vdev)) { > > > + return vdev->device_endian != virtio_default_endian(); > > > + } > > > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > > > + return vdev->device_endian !=...
2014 Nov 26
1
[Qemu-devel] [PATCH RFC v3 05/12] virtio: introduce legacy virtio devices
...t; --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) > VirtIODevice *vdev = opaque; > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > - return vdev->device_endian != virtio_default_endian(); > + if (virtio_device_is_legacy(vdev)) { > + return vdev->device_endian != virtio_default_endian(); > + } > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; > } > Sorry...
2014 Nov 26
1
[Qemu-devel] [PATCH RFC v3 05/12] virtio: introduce legacy virtio devices
...t; --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) > VirtIODevice *vdev = opaque; > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > - return vdev->device_endian != virtio_default_endian(); > + if (virtio_device_is_legacy(vdev)) { > + return vdev->device_endian != virtio_default_endian(); > + } > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; > } > Sorry...
2015 Jan 22
1
[Qemu-devel] [PATCH RFC v6 06/20] virtio: endianness checks for virtio 1.0 devices
...; --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -881,7 +881,11 @@ static bool virtio_device_endian_needed(void *opaque) > VirtIODevice *vdev = opaque; > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > - return vdev->device_endian != virtio_default_endian(); > + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { > + return vdev->device_endian != virtio_default_endian(); > + } > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; Thi...
2015 Jan 22
1
[Qemu-devel] [PATCH RFC v6 06/20] virtio: endianness checks for virtio 1.0 devices
...; --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -881,7 +881,11 @@ static bool virtio_device_endian_needed(void *opaque) > VirtIODevice *vdev = opaque; > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > - return vdev->device_endian != virtio_default_endian(); > + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { > + return vdev->device_endian != virtio_default_endian(); > + } > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; Thi...
2014 Oct 07
0
[PATCH RFC 05/11] virtio: introduce legacy virtio devices
...c index 7aaa953..e6ae3a0 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) VirtIODevice *vdev = opaque; assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); - return vdev->device_endian != virtio_default_endian(); + if (virtio_device_is_legacy(vdev)) { + return vdev->device_endian != virtio_default_endian(); + } + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; } static const VMStateDescription vmstate...
2014 Oct 30
0
[Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices
...t; > +++ b/hw/virtio/virtio.c > > @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) > > VirtIODevice *vdev = opaque; > > > > assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); > > - return vdev->device_endian != virtio_default_endian(); > > + if (virtio_device_is_legacy(vdev)) { > > + return vdev->device_endian != virtio_default_endian(); > > + } > > + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ > > + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LIT...
2014 Nov 26
0
[PATCH RFC v3 05/12] virtio: introduce legacy virtio devices
...c index 2eb5d3c..4149f45 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) VirtIODevice *vdev = opaque; assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); - return vdev->device_endian != virtio_default_endian(); + if (virtio_device_is_legacy(vdev)) { + return vdev->device_endian != virtio_default_endian(); + } + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; } static const VMStateDescription vmstate...
2014 Dec 11
0
[PATCH RFC v6 06/20] virtio: endianness checks for virtio 1.0 devices
...c index 7f74ae5..8f69ffa 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -881,7 +881,11 @@ static bool virtio_device_endian_needed(void *opaque) VirtIODevice *vdev = opaque; assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); - return vdev->device_endian != virtio_default_endian(); + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { + return vdev->device_endian != virtio_default_endian(); + } + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; } static const VMStateDes...
2015 Mar 11
0
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...reak x86 ? Ie, > shouldn't we swap only if TARGET_BIG_ENDIAN and !virtio_is_big_endian ? > Or better, "fixed target endian" ^ "virtio endian" to cover all cases ? > Yeah you're right, it's a mess :) To avoid virtio-pci.o being built per target, we can use virtio_default_endian() instead (to be exported from virtio.c): return vdev->device_endian() != virtio_default_endian() ? val : bswap16(val); I shall test on x86 and post a v2. Thanks. -- G > Cheers, > Ben. > > > > > static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, &...
2014 Oct 07
0
[PATCH RFC 05/11] virtio: introduce legacy virtio devices
...c index 7aaa953..e6ae3a0 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) VirtIODevice *vdev = opaque; assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); - return vdev->device_endian != virtio_default_endian(); + if (virtio_device_is_legacy(vdev)) { + return vdev->device_endian != virtio_default_endian(); + } + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; } static const VMStateDescription vmstate...
2014 Nov 26
0
[PATCH RFC v3 05/12] virtio: introduce legacy virtio devices
...c index 2eb5d3c..4149f45 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -883,7 +883,11 @@ static bool virtio_device_endian_needed(void *opaque) VirtIODevice *vdev = opaque; assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); - return vdev->device_endian != virtio_default_endian(); + if (virtio_device_is_legacy(vdev)) { + return vdev->device_endian != virtio_default_endian(); + } + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; } static const VMStateDescription vmstate...
2014 Dec 11
0
[PATCH RFC v6 06/20] virtio: endianness checks for virtio 1.0 devices
...c index 7f74ae5..8f69ffa 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -881,7 +881,11 @@ static bool virtio_device_endian_needed(void *opaque) VirtIODevice *vdev = opaque; assert(vdev->device_endian != VIRTIO_DEVICE_ENDIAN_UNKNOWN); - return vdev->device_endian != virtio_default_endian(); + if (!virtio_has_feature(vdev, VIRTIO_F_VERSION_1)) { + return vdev->device_endian != virtio_default_endian(); + } + /* Devices conforming to VIRTIO 1.0 or later are always LE. */ + return vdev->device_endian != VIRTIO_DEVICE_ENDIAN_LITTLE; } static const VMStateDes...
2015 Mar 11
0
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
...reak x86 ? Ie, > shouldn't we swap only if TARGET_BIG_ENDIAN and !virtio_is_big_endian ? > Or better, "fixed target endian" ^ "virtio endian" to cover all cases ? > Yeah you're right, it's a mess :) To avoid virtio-pci.o being built per target, we can use virtio_default_endian() instead (to be exported from virtio.c): return vdev->device_endian() != virtio_default_endian() ? val : bswap16(val); I shall test on x86 and post a v2. Thanks. -- G > Cheers, > Ben. > > > > > static int virtio_pci_set_host_notifier_internal(VirtIOPCIProxy *proxy, &...
2015 Mar 11
1
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
On Wed, 2015-03-11 at 23:03 +0100, Greg Kurz wrote: > /* The host notifier will be swapped in adjust_endianness() according to the > * target default endianness. We need to negate this swap if the device uses > * an endianness that is not the default (ppc64le for example). > */ > > > > +static uint16_t cpu_to_host_notifier16(VirtIODevice *vdev, uint16_t val) > >
2015 Mar 11
1
[Qemu-ppc] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
On Wed, 2015-03-11 at 23:03 +0100, Greg Kurz wrote: > /* The host notifier will be swapped in adjust_endianness() according to the > * target default endianness. We need to negate this swap if the device uses > * an endianness that is not the default (ppc64le for example). > */ > > > > +static uint16_t cpu_to_host_notifier16(VirtIODevice *vdev, uint16_t val) > >
2015 Mar 11
4
[PATCH] virtio-pci: fix host notifiers on bi-endian architectures
On Wed, 11 Mar 2015 21:06:05 +0100 "Michael S. Tsirkin" <mst at redhat.com> wrote: > On Wed, Mar 11, 2015 at 07:04:38PM +0100, Greg Kurz wrote: > > vhost is seriously broken with ppc64le guests, even in the supposedly > > supported case where the host is ppc64le and we don't need cross-endian > > support. > > > > The TX virtqueue fails to be