Virtio blob resources may be created without backing and may also have a
zero size. These valid cases currently reach UDMABUF_CREATE_LIST or
mmap() with empty inputs, producing EINVAL warnings even though no host
mapping is required.
Skip udmabuf setup for deferred backing and avoid mmap() for an empty
blob. Also make udmabuf initialization report construction or mapping
failures. Blob creation and attach-backing commands then reject the
operation and unwind their mappings, while incoming migration fails
before publishing an incomplete resource.
Signed-off-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
---
Akihiko Odaki (3):
hw/display/virtio-gpu: Avoid creating empty udmabuf
hw/display/virtio-gpu: Avoid mmap() for empty blob
hw/display/virtio-gpu: Propagate udmabuf errors
include/hw/virtio/virtio-gpu.h | 2 +-
hw/display/virtio-gpu-udmabuf-stubs.c | 3 +-
hw/display/virtio-gpu-udmabuf.c | 10 ++--
hw/display/virtio-gpu.c | 108 +++++++++++++++++++---------------
4 files changed, 70 insertions(+), 53 deletions(-)
---
base-commit: 3e3ccab106f879b1512f8e0d51a827dd4de30e22
change-id: 20260806-dmabuf-8945c9b42004
Best regards,
--
Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>