aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVivek Kasireddy <vivek.kasireddy@intel.com>2021-05-26 16:14:24 -0700
committerGerd Hoffmann <kraxel@redhat.com>2021-05-27 12:07:37 +0200
commite0933d91b1cdde2828955b02042e100dffd27399 (patch)
treec0909c1ac5a54e5cfa34a0127493659172df8e41 /include
parentcce386e19ebb44cdb3517b6969af558c6edd2090 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-gpu-bswap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-gpu-bswap.h b/include/hw/virtio/virtio-gpu-bswap.h
index 203f9e1718..d23ac5cc4a 100644
--- a/include/hw/virtio/virtio-gpu-bswap.h
+++ b/include/hw/virtio/virtio-gpu-bswap.h
@@ -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