[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/48] virtio-gpu: Add definition for resource_uuid feature
From: |
Michael S. Tsirkin |
Subject: |
[PULL 01/48] virtio-gpu: Add definition for resource_uuid feature |
Date: |
Wed, 15 Jan 2025 13:08:28 -0500 |
From: Dorinda Bassey <dbassey@redhat.com>
Add the VIRTIO_GPU_F_RESOURCE_UUID feature to enable the assignment
of resources UUIDs for export to other virtio devices.
Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
Message-Id: <20241007070013.3350752-1-dbassey@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/virtio/virtio-gpu.h | 3 +++
hw/display/vhost-user-gpu.c | 8 ++++++++
hw/display/virtio-gpu-base.c | 3 +++
3 files changed, 14 insertions(+)
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index bd93672185..a42957c4e2 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -98,6 +98,7 @@ enum virtio_gpu_base_conf_flags {
VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED,
VIRTIO_GPU_FLAG_RUTABAGA_ENABLED,
VIRTIO_GPU_FLAG_VENUS_ENABLED,
+ VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED,
};
#define virtio_gpu_virgl_enabled(_cfg) \
@@ -114,6 +115,8 @@ enum virtio_gpu_base_conf_flags {
(_cfg.flags & (1 << VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED))
#define virtio_gpu_rutabaga_enabled(_cfg) \
(_cfg.flags & (1 << VIRTIO_GPU_FLAG_RUTABAGA_ENABLED))
+#define virtio_gpu_resource_uuid_enabled(_cfg) \
+ (_cfg.flags & (1 << VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED))
#define virtio_gpu_hostmem_enabled(_cfg) \
(_cfg.hostmem > 0)
#define virtio_gpu_venus_enabled(_cfg) \
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 12d5c37ee5..2aed6243f6 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -631,6 +631,14 @@ vhost_user_gpu_device_realize(DeviceState *qdev, Error
**errp)
error_report("EDID requested but the backend doesn't support it.");
g->parent_obj.conf.flags &= ~(1 << VIRTIO_GPU_FLAG_EDID_ENABLED);
}
+ if (virtio_has_feature(g->vhost->dev.features,
+ VIRTIO_GPU_F_RESOURCE_UUID)) {
+ g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED;
+ }
+ if (virtio_has_feature(g->vhost->dev.features,
+ VIRTIO_GPU_F_RESOURCE_UUID)) {
+ g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED;
+ }
if (!virtio_gpu_base_device_realize(qdev, NULL, NULL, errp)) {
return;
diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
index 4fc7ef8896..7827536ac4 100644
--- a/hw/display/virtio-gpu-base.c
+++ b/hw/display/virtio-gpu-base.c
@@ -235,6 +235,9 @@ virtio_gpu_base_get_features(VirtIODevice *vdev, uint64_t
features,
if (virtio_gpu_context_init_enabled(g->conf)) {
features |= (1 << VIRTIO_GPU_F_CONTEXT_INIT);
}
+ if (virtio_gpu_resource_uuid_enabled(g->conf)) {
+ features |= (1 << VIRTIO_GPU_F_RESOURCE_UUID);
+ }
return features;
}
--
MST
- [PULL 00/48] virtio,pc,pci: features, fixes, cleanups, Michael S. Tsirkin, 2025/01/15
- [PULL 01/48] virtio-gpu: Add definition for resource_uuid feature,
Michael S. Tsirkin <=
- [PULL 02/48] pci: ensure valid link status bits for downstream ports, Michael S. Tsirkin, 2025/01/15
- [PULL 04/48] cpuhp: make sure that remove events are handled within the same SCI, Michael S. Tsirkin, 2025/01/15
- [PULL 03/48] tests: acpi: whitelist expected blobs, Michael S. Tsirkin, 2025/01/15
- [PULL 05/48] tests: acpi: update expected blobs, Michael S. Tsirkin, 2025/01/15
- [PULL 06/48] intel_iommu: Use the latest fault reasons defined by spec, Michael S. Tsirkin, 2025/01/15
- [PULL 07/48] intel_iommu: Make pasid entry type check accurate, Michael S. Tsirkin, 2025/01/15
- [PULL 08/48] intel_iommu: Add a placeholder variable for scalable mode stage-1 translation, Michael S. Tsirkin, 2025/01/15
- [PULL 09/48] intel_iommu: Flush stage-2 cache in PASID-selective PASID-based iotlb invalidation, Michael S. Tsirkin, 2025/01/15
- [PULL 11/48] intel_iommu: Implement stage-1 translation, Michael S. Tsirkin, 2025/01/15
- [PULL 10/48] intel_iommu: Rename slpte to pte, Michael S. Tsirkin, 2025/01/15