* [PATCH v2] virtio-gpu: Add definition for resource_uuid feature
@ 2024-10-07 7:00 Dorinda Bassey
2024-10-07 7:03 ` Marc-André Lureau
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dorinda Bassey @ 2024-10-07 7:00 UTC (permalink / raw)
To: qemu-devel; +Cc: marcandre.lureau, mhrica, Dorinda Bassey
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>
---
hw/display/vhost-user-gpu.c | 4 ++++
hw/display/virtio-gpu-base.c | 3 +++
include/hw/virtio/virtio-gpu.h | 3 +++
3 files changed, 10 insertions(+)
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 14548f1a57..aa6c6416fa 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -631,6 +631,10 @@ 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_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;
}
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index 7a59379f5a..f12869376c 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -99,6 +99,7 @@ enum virtio_gpu_base_conf_flags {
VIRTIO_GPU_FLAG_BLOB_ENABLED,
VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED,
VIRTIO_GPU_FLAG_RUTABAGA_ENABLED,
+ VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED,
};
#define virtio_gpu_virgl_enabled(_cfg) \
@@ -115,6 +116,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)
--
2.46.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] virtio-gpu: Add definition for resource_uuid feature
2024-10-07 7:00 [PATCH v2] virtio-gpu: Add definition for resource_uuid feature Dorinda Bassey
@ 2024-10-07 7:03 ` Marc-André Lureau
2024-10-07 9:38 ` Manos Pitsidianakis
2024-11-07 13:09 ` Marc-André Lureau
2 siblings, 0 replies; 5+ messages in thread
From: Marc-André Lureau @ 2024-10-07 7:03 UTC (permalink / raw)
To: Dorinda Bassey; +Cc: qemu-devel, mhrica
Hi
On Mon, Oct 7, 2024 at 11:00 AM Dorinda Bassey <dbassey@redhat.com> wrote:
>
> 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>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> hw/display/vhost-user-gpu.c | 4 ++++
> hw/display/virtio-gpu-base.c | 3 +++
> include/hw/virtio/virtio-gpu.h | 3 +++
> 3 files changed, 10 insertions(+)
>
> diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
> index 14548f1a57..aa6c6416fa 100644
> --- a/hw/display/vhost-user-gpu.c
> +++ b/hw/display/vhost-user-gpu.c
> @@ -631,6 +631,10 @@ 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_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;
> }
> diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
> index 7a59379f5a..f12869376c 100644
> --- a/include/hw/virtio/virtio-gpu.h
> +++ b/include/hw/virtio/virtio-gpu.h
> @@ -99,6 +99,7 @@ enum virtio_gpu_base_conf_flags {
> VIRTIO_GPU_FLAG_BLOB_ENABLED,
> VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED,
> VIRTIO_GPU_FLAG_RUTABAGA_ENABLED,
> + VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED,
> };
>
> #define virtio_gpu_virgl_enabled(_cfg) \
> @@ -115,6 +116,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)
>
> --
> 2.46.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] virtio-gpu: Add definition for resource_uuid feature
2024-10-07 7:00 [PATCH v2] virtio-gpu: Add definition for resource_uuid feature Dorinda Bassey
2024-10-07 7:03 ` Marc-André Lureau
@ 2024-10-07 9:38 ` Manos Pitsidianakis
2024-11-07 13:09 ` Marc-André Lureau
2 siblings, 0 replies; 5+ messages in thread
From: Manos Pitsidianakis @ 2024-10-07 9:38 UTC (permalink / raw)
To: Dorinda Bassey, qemu-devel; +Cc: marcandre.lureau, mhrica, Dorinda Bassey
On Mon, 07 Oct 2024 10:00, Dorinda Bassey <dbassey@redhat.com> wrote:
>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>
>---
> hw/display/vhost-user-gpu.c | 4 ++++
> hw/display/virtio-gpu-base.c | 3 +++
> include/hw/virtio/virtio-gpu.h | 3 +++
> 3 files changed, 10 insertions(+)
>
>diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
>index 14548f1a57..aa6c6416fa 100644
>--- a/hw/display/vhost-user-gpu.c
>+++ b/hw/display/vhost-user-gpu.c
>@@ -631,6 +631,10 @@ 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_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;
> }
>diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
>index 7a59379f5a..f12869376c 100644
>--- a/include/hw/virtio/virtio-gpu.h
>+++ b/include/hw/virtio/virtio-gpu.h
>@@ -99,6 +99,7 @@ enum virtio_gpu_base_conf_flags {
> VIRTIO_GPU_FLAG_BLOB_ENABLED,
> VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED,
> VIRTIO_GPU_FLAG_RUTABAGA_ENABLED,
>+ VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED,
> };
>
> #define virtio_gpu_virgl_enabled(_cfg) \
>@@ -115,6 +116,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)
>
>--
>2.46.1
>
>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] virtio-gpu: Add definition for resource_uuid feature
2024-10-07 7:00 [PATCH v2] virtio-gpu: Add definition for resource_uuid feature Dorinda Bassey
2024-10-07 7:03 ` Marc-André Lureau
2024-10-07 9:38 ` Manos Pitsidianakis
@ 2024-11-07 13:09 ` Marc-André Lureau
2024-11-07 13:37 ` Michael S. Tsirkin
2 siblings, 1 reply; 5+ messages in thread
From: Marc-André Lureau @ 2024-11-07 13:09 UTC (permalink / raw)
To: Dorinda Bassey, Michael S. Tsirkin, Alex Bennée; +Cc: qemu-devel, mhrica
[-- Attachment #1: Type: text/plain, Size: 2812 bytes --]
Hi Michael, Alex,
Any of you could take this in the next virtio-related PR?
thanks
On Mon, Oct 7, 2024 at 11:01 AM Dorinda Bassey <dbassey@redhat.com> wrote:
> 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>
> ---
> hw/display/vhost-user-gpu.c | 4 ++++
> hw/display/virtio-gpu-base.c | 3 +++
> include/hw/virtio/virtio-gpu.h | 3 +++
> 3 files changed, 10 insertions(+)
>
> diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
> index 14548f1a57..aa6c6416fa 100644
> --- a/hw/display/vhost-user-gpu.c
> +++ b/hw/display/vhost-user-gpu.c
> @@ -631,6 +631,10 @@ 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_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;
> }
> diff --git a/include/hw/virtio/virtio-gpu.h
> b/include/hw/virtio/virtio-gpu.h
> index 7a59379f5a..f12869376c 100644
> --- a/include/hw/virtio/virtio-gpu.h
> +++ b/include/hw/virtio/virtio-gpu.h
> @@ -99,6 +99,7 @@ enum virtio_gpu_base_conf_flags {
> VIRTIO_GPU_FLAG_BLOB_ENABLED,
> VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED,
> VIRTIO_GPU_FLAG_RUTABAGA_ENABLED,
> + VIRTIO_GPU_FLAG_RESOURCE_UUID_ENABLED,
> };
>
> #define virtio_gpu_virgl_enabled(_cfg) \
> @@ -115,6 +116,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)
>
> --
> 2.46.1
>
>
>
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 3620 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] virtio-gpu: Add definition for resource_uuid feature
2024-11-07 13:09 ` Marc-André Lureau
@ 2024-11-07 13:37 ` Michael S. Tsirkin
0 siblings, 0 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2024-11-07 13:37 UTC (permalink / raw)
To: Marc-André Lureau
Cc: Dorinda Bassey, Alex Bennée, qemu-devel, mhrica
On Thu, Nov 07, 2024 at 05:09:28PM +0400, Marc-André Lureau wrote:
> Hi Michael, Alex,
>
> Any of you could take this in the next virtio-related PR?
>
> thanks
Sorry, we are past soft freeze. So not unless this is a bugfix.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-11-07 13:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 7:00 [PATCH v2] virtio-gpu: Add definition for resource_uuid feature Dorinda Bassey
2024-10-07 7:03 ` Marc-André Lureau
2024-10-07 9:38 ` Manos Pitsidianakis
2024-11-07 13:09 ` Marc-André Lureau
2024-11-07 13:37 ` Michael S. Tsirkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).