On 09/15/2017 03:31 AM, Gerd Hoffmann wrote:
Hi,
+static void
+virtio_gpu_ctrl_hdr_bswap_cpu(struct virtio_gpu_ctrl_hdr *hdr)
+{
+hdr->type = le32_to_cpu(hdr->type);
+hdr->flags = le32_to_cpu(hdr->flags);
+hdr->fence_id = le64_to_cpu(hdr->fence_id);
+hdr->ctx_id =
Hi,
> +static void
> +virtio_gpu_ctrl_hdr_bswap_cpu(struct virtio_gpu_ctrl_hdr *hdr)
> +{
> +hdr->type = le32_to_cpu(hdr->type);
> +hdr->flags = le32_to_cpu(hdr->flags);
> +hdr->fence_id = le64_to_cpu(hdr->fence_id);
> +hdr->ctx_id = le32_to_cpu(hdr->ctx_id);
> +
Virtio GPU code currently only supports litte endian format,
and so using the Virtio GPU device on a big endian machine
does not work.
Let's fix it by supporting the correct host cpu byte order.
Signed-off-by: Farhan Ali
---
hw/display/virtio-gpu.c | 75