aboutsummaryrefslogtreecommitdiff
path: root/include/hw
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2023-03-12 17:22:28 +0800
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-10-16 11:29:56 +0400
commitba62dfa7075c72ec9506ea461a41e8e2a545c692 (patch)
tree51bf11d34dbe642b446117e158c9a42485769922 /include/hw
parent17b98f46b97037d7390057bc0dc5d2c579599c12 (diff)
downloadqemu-ba62dfa7075c72ec9506ea461a41e8e2a545c692.zip
qemu-ba62dfa7075c72ec9506ea461a41e8e2a545c692.tar.gz
qemu-ba62dfa7075c72ec9506ea461a41e8e2a545c692.tar.bz2
virtio-gpu: hostmem
Use VIRTIO_GPU_SHM_ID_HOST_VISIBLE as id for virtio-gpu. Signed-off-by: Antonio Caggiano <antonio.caggiano@collabora.com> Tested-by: Alyssa Ross <hi@alyssa.is> Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Huang Rui <ray.huang@amd.com> Acked-by: Huang Rui <ray.huang@amd.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Diffstat (limited to 'include/hw')
-rw-r--r--include/hw/virtio/virtio-gpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 8377c36..de4f624 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -108,12 +108,15 @@ enum virtio_gpu_base_conf_flags {
(_cfg.flags & (1 << VIRTIO_GPU_FLAG_BLOB_ENABLED))
#define virtio_gpu_context_init_enabled(_cfg) \
(_cfg.flags & (1 << VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED))
+#define virtio_gpu_hostmem_enabled(_cfg) \
+ (_cfg.hostmem > 0)
struct virtio_gpu_base_conf {
uint32_t max_outputs;
uint32_t flags;
uint32_t xres;
uint32_t yres;
+ uint64_t hostmem;
};
struct virtio_gpu_ctrl_command {
@@ -137,6 +140,8 @@ struct VirtIOGPUBase {
int renderer_blocked;
int enable;
+ MemoryRegion hostmem;
+
struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUTS];
int enabled_output_bitmask;