mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07: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:
committed by
Gerd Hoffmann
parent
cce386e19e
commit
e0933d91b1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user