qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 1/2] virtio_gpu: Handle endian conversion


From: Farhan Ali
Subject: Re: [Qemu-devel] [PATCH v1 1/2] virtio_gpu: Handle endian conversion
Date: Wed, 13 Sep 2017 11:53:15 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0



On 09/13/2017 04:13 AM, Gerd Hoffmann wrote:
Please move this to a helper function, maybe by updating the
VIRTIO_GPU_FILL_CMD macro.

The header fields should be byteswapped too.  As most structs have
32bit fields only (with the exception of hdr.fence_id) you should be
able to create a generic byteswap function which only needs the struct
size as argument and handles all structs without addresses/offsets
(which are 64bit fields).

I am not sure if I understand what you mean here. Since struct virtio_gpu_ctrl_hdr is part of every struct, so any such function
would also need to handle the case of hdr.fence_id, right?


The conversion looks incomplete, at least virtio_gpu_ctrl_response will
need adaptions too.  It probably works by luck because the guest driver
uses fences only in virgl (3d) mode.


Oh right, I need to handle the conversion there as well. Thanks for catching that.

Also I believe this conversion patch isn't comprehensive, it's mostly the changes I made to get a display working on S390. So I appreciate
you reviewing the changes.

cheers,
  Gerd

Thanks
Farhan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]