[PATCH v2 0/2] virtio-gpu: fix blob scanout post-load

marcandre.lureau@redhat.com posted 2 patches 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240228122323.962826-1-marcandre.lureau@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
include/hw/virtio/virtio-gpu.h |  1 +
hw/display/virtio-gpu.c        | 58 ++++++++++++++++++++++++----------
2 files changed, 42 insertions(+), 17 deletions(-)
[PATCH v2 0/2] virtio-gpu: fix blob scanout post-load
Posted by marcandre.lureau@redhat.com 9 months ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

The current post-loading code for scanout has a FIXME: it doesn't take the
resource region/rect into account. But there is more, when adding blob migration
support in commit f66767f75c9, I didn't realize that blob resources could be
used for scanouts. This situationn leads to a crash during post-load, as they
don't have an associated res->image.

virtio_gpu_do_set_scanout() handle all cases, but requires the associated
virtio_gpu_framebuffer, which is currently not saved during migration.

Add a v2 of "virtio-gpu-one-scanout" with the framebuffer fields, so we can
restore blob scanouts, as well as fixing the existing FIXME.

v2:
- modify first patch to get rid of another needless check (Sebastian Ott)

Marc-André Lureau (2):
  virtio-gpu: remove needless condition
  virtio-gpu: fix scanout migration post-load

 include/hw/virtio/virtio-gpu.h |  1 +
 hw/display/virtio-gpu.c        | 58 ++++++++++++++++++++++++----------
 2 files changed, 42 insertions(+), 17 deletions(-)

-- 
2.43.2