mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
virtio-gpu: Add virtio_gpu_resource_create_blob
This API allows Qemu to register the blob allocated by the Guest as a new resource and map its backing storage. Based-on-patch-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Message-Id: <20210526231429.1045476-10-vivek.kasireddy@intel.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
cce386e19e
commit
e0933d91b1
3 changed files with 80 additions and 3 deletions
|
@ -59,4 +59,13 @@ virtio_gpu_t2d_bswap(struct virtio_gpu_transfer_to_host_2d *t2d)
|
|||
le32_to_cpus(&t2d->padding);
|
||||
}
|
||||
|
||||
static inline void
|
||||
virtio_gpu_create_blob_bswap(struct virtio_gpu_resource_create_blob *cblob)
|
||||
{
|
||||
virtio_gpu_ctrl_hdr_bswap(&cblob->hdr);
|
||||
le32_to_cpus(&cblob->resource_id);
|
||||
le32_to_cpus(&cblob->blob_flags);
|
||||
le64_to_cpus(&cblob->size);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue