@samitouri / QOSamiQemu / commits / 5c9ef661a6

hw/display/virtio-gpu: Block Rutabaga migration

The migration stream encoding is not defined for Rutabaga yet. Fixes: 1dcc6adbc168 ("gfxstream + rutabaga: add initial support for gfxstream") Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20260725-rutabaga-v1-1-4832b56e679d@rsg.ci.i.u-tokyo.ac.jp>

Akihiko Odaki committed Jul 25, 2026 at 16:15 UTC 5c9ef661a60ad737c61f4a872226376b5f2d424a
1 file changed +15 -2
hw/display/virtio-gpu-rutabaga.c
+15 -2
@@ -9,6 +9,7 @@
9 #include "hw/virtio/virtio-gpu.h"
10 #include "hw/virtio/virtio-gpu-pixman.h"
11 #include "hw/virtio/virtio-iommu.h"
12 +#include "migration/blocker.h"
13
14 #include <glib/gmem.h>
15 #include <rutabaga_gfx/rutabaga_gfx_ffi.h>
@@ -1078,6 +1079,7 @@ static void virtio_gpu_rutabaga_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
1079
1080 static void virtio_gpu_rutabaga_realize(DeviceState *qdev, Error **errp)
1081 {
1082 + ERRP_GUARD();
1083 uint32_t num_capsets;
1084 VirtIOGPUBase *bdev = VIRTIO_GPU_BASE(qdev);
1085 VirtIOGPU *gpudev = VIRTIO_GPU(qdev);
@@ -1087,12 +1089,17 @@ static void virtio_gpu_rutabaga_realize(DeviceState *qdev, Error **errp)
1089 return;
1090 #endif
1091
1090 - if (!virtio_gpu_rutabaga_init(gpudev, errp)) {
1092 + error_setg(&bdev->migration_blocker, "rutabaga is not yet migratable");
1093 + if (migrate_add_blocker(&bdev->migration_blocker, errp) < 0) {
1094 return;
1095 }
1096
1097 + if (!virtio_gpu_rutabaga_init(gpudev, errp)) {
1098 + goto fail;
1099 + }
1100 +
1101 if (!virtio_gpu_rutabaga_get_num_capsets(gpudev, &num_capsets, errp)) {
1095 - return;
1102 + goto fail;
1103 }
1104
1105 bdev->conf.flags |= (1 << VIRTIO_GPU_FLAG_RUTABAGA_ENABLED);
@@ -1101,6 +1108,12 @@ static void virtio_gpu_rutabaga_realize(DeviceState *qdev, Error **errp)
1108
1109 bdev->virtio_config.num_capsets = num_capsets;
1110 virtio_gpu_device_realize(qdev, errp);
1111 + if (!*errp) {
1112 + return;
1113 + }
1114 +
1115 +fail:
1116 + migrate_del_blocker(&bdev->migration_blocker);
1117 }
1118
1119 static const Property virtio_gpu_rutabaga_properties[] = {