[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <19880aa3804.3aa8c0311540629.5527706858754550702@collabora.com>
Date: Wed, 06 Aug 2025 15:34:55 -0300
From: Igor Torrente <igor.torrente@...labora.com>
To: "mst" <mst@...hat.com>, "samimdko" <sami.md.ko@...il.com>
Cc: "virtualization" <virtualization@...ts.linux.dev>,
"linux-kernel" <linux-kernel@...r.kernel.org>,
"eperezma" <eperezma@...hat.com>,
"xuanzhuo" <xuanzhuo@...ux.alibaba.com>,
"jasowang" <jasowang@...hat.com>,
"Dmitrii Osipenko" <dmitry.osipenko@...labora.com>
Subject: `virtio: reject shm region if length is zero` breaks virtio-gpu
host_visible feature
Hello,
The commit `206cc44588f7 virtio: reject shm region if length is zero` breaks the Virtio-gpu `host_visible` feature.
As you can see in the snippet below, host_visible_region is zero because of the `kzalloc`.
It's using the `vm_get_shm_region` (drivers/virtio/virtio_mmio.c:536) to read the `addr` and `len` from qemu/crosvm.
```
drivers/gpu/drm/virtio/virtgpu_kms.c
132 vgdev = drmm_kzalloc(dev, sizeof(struct virtio_gpu_device), GFP_KERNEL);
[...]
177 if (virtio_get_shm_region(vgdev->vdev, &vgdev->host_visible_region,
178 VIRTIO_GPU_SHM_ID_HOST_VISIBLE)) {
```
Now it always fails.
I don't know exactly what issue this patch is trying to solve, but right now Virtio-gpu relies upon the previous behavior.
Can we just revert it?
BR,
----
Igor Torrente
Powered by blists - more mailing lists