search for: __cpu_to_virtio64

Displaying 20 results from an estimated 83 matches for "__cpu_to_virtio64".

Did you mean: __cpu_to_virtio16
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
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
2015 Dec 07
0
[PATCH RFC 3/3] xen/virtio_ring: introduce cpu_to_virtio_addr and virtio_addr_to_cpu
...hen running on Xen inside as virtual machine (nested virt scenario), addresses need to be translated from phys to machine to get the actual guest pseudo-physical address. Introduce a new pair of functions, cpu_to_virtio_addr and virtio_addr_to_cpu, which call the appriopriate __virtio64_to_cpu and __cpu_to_virtio64 functions after doing the phys_to_bus and bus_to_phys translations for Xen. No changes in behavior for the non-Xen case. Signed-off-by: Stefano Stabellini <stefano.stabellini at eu.citrix.com> --- I realize that this patch is not very nice, but at least it is easy to understand. I welcome...
2015 Apr 02
9
[PATCH v2 0/7] 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 a complete rework of my initial post. Patches 1 to 5 are preliminary work: we move the endianness check out of all memory accessors to separate functions. Patch 6 changes the semantics of the accessors so that they have explicit big endian support. Patch 7 brings the cross-endian
2015 Apr 02
9
[PATCH v2 0/7] 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 a complete rework of my initial post. Patches 1 to 5 are preliminary work: we move the endianness check out of all memory accessors to separate functions. Patch 6 changes the semantics of the accessors so that they have explicit big endian support. Patch 7 brings the cross-endian
2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...5,7 +49,7 @@ static inline u64 __virtio64_to_cpu(bool little_endian, __virtio64 val) > if (little_endian) > return le64_to_cpu((__force __le64)val); > else > - return (__force u64)val; > + return be64_to_cpu((__force __be64)val); > } > > static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > @@ -53,7 +57,7 @@ static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > if (little_endian) > return (__force __virtio64)cpu_to_le64(val); > else > - return (__force __virtio64)val; > + return (__force __virtio64)cpu_to_be...
2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...5,7 +49,7 @@ static inline u64 __virtio64_to_cpu(bool little_endian, __virtio64 val) > if (little_endian) > return le64_to_cpu((__force __le64)val); > else > - return (__force u64)val; > + return be64_to_cpu((__force __be64)val); > } > > static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > @@ -53,7 +57,7 @@ static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > if (little_endian) > return (__force __virtio64)cpu_to_le64(val); > else > - return (__force __virtio64)val; > + return (__force __virtio64)cpu_to_be...
2015 Apr 07
13
[PATCH v3 0/7] 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. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian()
2015 Apr 07
13
[PATCH v3 0/7] 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. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian()
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...5,7 +49,7 @@ static inline u64 __virtio64_to_cpu(bool little_endian, __virtio64 val) > if (little_endian) > return le64_to_cpu((__force __le64)val); > else > - return (__force u64)val; > + return be64_to_cpu((__force __be64)val); > } > > static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > @@ -53,7 +57,7 @@ static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > if (little_endian) > return (__force __virtio64)cpu_to_le64(val); > else > - return (__force __virtio64)val; > + return (__force __virtio64)cpu_to_be...
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...5,7 +49,7 @@ static inline u64 __virtio64_to_cpu(bool little_endian, __virtio64 val) > if (little_endian) > return le64_to_cpu((__force __le64)val); > else > - return (__force u64)val; > + return be64_to_cpu((__force __be64)val); > } > > static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > @@ -53,7 +57,7 @@ static inline __virtio64 __cpu_to_virtio64(bool little_endian, u64 val) > if (little_endian) > return (__force __virtio64)cpu_to_le64(val); > else > - return (__force __virtio64)val; > + return (__force __virtio64)cpu_to_be...
2015 Apr 23
0
[PATCH v5 1/8] virtio: introduce virtio_is_little_endian() helper
...rtio64_to_cpu(struct virtio_device *vdev, __virtio64 val) { - return __virtio64_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); + return __virtio64_to_cpu(virtio_is_little_endian(vdev), val); } static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) { - return __cpu_to_virtio64(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val); } /* Config space accessors. */
2015 Apr 23
0
[PATCH v5 4/8] vringh: introduce vringh_is_little_endian() helper
...; } static inline u64 vringh64_to_cpu(const struct vringh *vrh, __virtio64 val) { - return __virtio64_to_cpu(vrh->little_endian, val); + return __virtio64_to_cpu(vringh_is_little_endian(vrh), val); } static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val) { - return __cpu_to_virtio64(vrh->little_endian, val); + return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); } #endif /* _LINUX_VRINGH_H */
2015 Apr 23
0
[PATCH v5 5/8] vhost: introduce vhost_is_little_endian() helper
...e u64 vhost64_to_cpu(struct vhost_virtqueue *vq, __virtio64 val) { - return __virtio64_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __virtio64_to_cpu(vhost_is_little_endian(vq), val); } static inline __virtio64 cpu_to_vhost64(struct vhost_virtqueue *vq, u64 val) { - return __cpu_to_virtio64(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __cpu_to_virtio64(vhost_is_little_endian(vq), val); } #endif
2015 Apr 24
0
[PATCH v6 1/8] virtio: introduce virtio_is_little_endian() helper
...rtio64_to_cpu(struct virtio_device *vdev, __virtio64 val) { - return __virtio64_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); + return __virtio64_to_cpu(virtio_is_little_endian(vdev), val); } static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) { - return __cpu_to_virtio64(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val); } /* Config space accessors. */
2015 Apr 24
0
[PATCH v6 4/8] vringh: introduce vringh_is_little_endian() helper
...; } static inline u64 vringh64_to_cpu(const struct vringh *vrh, __virtio64 val) { - return __virtio64_to_cpu(vrh->little_endian, val); + return __virtio64_to_cpu(vringh_is_little_endian(vrh), val); } static inline __virtio64 cpu_to_vringh64(const struct vringh *vrh, u64 val) { - return __cpu_to_virtio64(vrh->little_endian, val); + return __cpu_to_virtio64(vringh_is_little_endian(vrh), val); } #endif /* _LINUX_VRINGH_H */
2015 Apr 24
0
[PATCH v6 5/8] vhost: introduce vhost_is_little_endian() helper
...e u64 vhost64_to_cpu(struct vhost_virtqueue *vq, __virtio64 val) { - return __virtio64_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __virtio64_to_cpu(vhost_is_little_endian(vq), val); } static inline __virtio64 cpu_to_vhost64(struct vhost_virtqueue *vq, u64 val) { - return __cpu_to_virtio64(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __cpu_to_virtio64(vhost_is_little_endian(vq), val); } #endif
2015 Dec 04
0
[PATCH] tools/virtio: fix byteswap logic
..., __virtio64 val) > { > - return __virtio64_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); > + return __virtio64_to_cpu(virtio_is_little_endian(vdev), val); > } > > static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) > { > - return __cpu_to_virtio64(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); > + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val); > } Tested patch with vring-bench. (I did something similar when reviving it). Tested-by: Venkatesh Srinivas <venkateshs at google.com> -- vs;
2015 Dec 04
0
[PATCH] tools/virtio: fix byteswap logic
..., __virtio64 val) > { > - return __virtio64_to_cpu(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); > + return __virtio64_to_cpu(virtio_is_little_endian(vdev), val); > } > > static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) > { > - return __cpu_to_virtio64(virtio_has_feature(vdev, VIRTIO_F_VERSION_1), val); > + return __cpu_to_virtio64(virtio_is_little_endian(vdev), val); > } Tested patch with vring-bench. (I did something similar when reviving it). Tested-by: Venkatesh Srinivas <venkateshs at google.com> -- vs;
2015 Feb 20
0
[PATCH 2/3] vhost: add support for legacy virtio
...e u64 vhost64_to_cpu(struct vhost_virtqueue *vq, __virtio64 val) { - return __virtio64_to_cpu(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __virtio64_to_cpu(vhost_is_little_endian(vq), val); } static inline __virtio64 cpu_to_vhost64(struct vhost_virtqueue *vq, u64 val) { - return __cpu_to_virtio64(vhost_has_feature(vq, VIRTIO_F_VERSION_1), val); + return __cpu_to_virtio64(vhost_is_little_endian(vq), val); } #endif