aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-08 16:50:26 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-10-14 17:34:09 +0400
commit5f899c34af1dbb0f621287faf9bcfb60fa237543 (patch)
treeaaa5a0d45fc120308187ac66afe735e5508df787 /include
parent48b7ef0f0fc3c3033797b67d1554987a516488f9 (diff)
virtio-gpu: allocate shareable 2d resources on !win32
Similar to what was done in commit 9462ff46 ("virtio-gpu/win32: allocate shareable 2d resources/images") for win32, allocate resource memory with memfd, so the associated display surface memory can be shared with a different process. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20241008125028.1177932-18-marcandre.lureau@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/virtio/virtio-gpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 7a59379f5a..7509d13265 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -53,6 +53,8 @@ struct virtio_gpu_simple_resource {
pixman_image_t *image;
#ifdef WIN32
HANDLE handle;
+#else
+ int shmfd;
#endif
uint64_t hostmem;