Userptr-backed blobs can require a very large number of virtio_gpu_mem_entry elements when their pages are not contiguous. The guest virtio-gpu frontend forwards that entry count and does not impose the 16384-entry cap previously enforced by virtio_gpu_create_mapping_iov().
Drop that QEMU-only limit so these larger userptr iovecs can be mapped. Keep the existing allocation, copy-size, and DMA mapping checks. Signed-off-by: Honglei Huang <[email protected]> --- hw/display/virtio-gpu.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 5d43ffb9918..3df7e3507f4 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -990,13 +990,6 @@ int virtio_gpu_create_mapping_iov(VirtIOGPU *g, size_t esize, s; int e, v; - if (nr_entries > 16384) { - qemu_log_mask(LOG_GUEST_ERROR, - "%s: nr_entries is too big (%d > 16384)\n", - __func__, nr_entries); - return -1; - } - esize = sizeof(*ents) * nr_entries; ents = g_try_malloc(esize); if (!ents && esize) { -- 2.34.1
