Re: [Qemu-devel] [PATCH v2 1/2] virtio-gpu: Handle endian conversion

2017-09-15 Thread Farhan Ali
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 =

Re: [Qemu-devel] [PATCH v2 1/2] virtio-gpu: Handle endian conversion

2017-09-15 Thread Gerd Hoffmann
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); > +

[Qemu-devel] [PATCH v2 1/2] virtio-gpu: Handle endian conversion

2017-09-14 Thread Farhan Ali
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