diff options
author | Igor Torrente <igor.torrente@collabora.com> | 2025-08-07 09:41:45 -0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2025-08-26 03:38:10 -0400 |
commit | ced17ee32a9988b8a260628e7c31a100d7dc082e (patch) | |
tree | 275c042cd47dc442c119b7ddc006b98f8e87aa4f /scripts/lib/kdoc/kdoc_parser.py | |
parent | dd54bcf86c91a4455b1f95cbc8e9ac91205f3193 (diff) |
Revert "virtio: reject shm region if length is zero"
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.
To fix, revert the offending commit.
Fixes: 206cc44588f7 ("virtio: reject shm region if length is zero")
Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
Message-Id: <20250807124145.81816-1-igor.torrente@collabora.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions