From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Alyssa Ross <hi@alyssa.is>, Sergio Lopez <slp@redhat.com>,
Yiwei Zhang <zzyiwei@chromium.org>,
Sergi Blanch Torne <sergi@collabora.com>,
Valentine Burley <valentine.burley@collabora.com>
Cc: "Chia-I Wu" <olvaffe@gmail.com>,
"Jason Wang" <jasowang@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
linux-kernel@vger.kernel.org, "Simona Vetter" <simona@ffwll.ch>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@redhat.com>,
"Gurchetan Singh" <gurchetansingh@chromium.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
virtualization@lists.linux.dev, dri-devel@lists.freedesktop.org,
"Maxime Ripard" <mripard@kernel.org>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>
Subject: Re: [PATCH v2 2/3] drm/virtio: honor blob_alignment requirements
Date: Mon, 13 Jul 2026 17:34:56 +0300 [thread overview]
Message-ID: <17764937-21dc-4b4a-8def-e738b361bcd1@collabora.com> (raw)
In-Reply-To: <87v7ajyw5j.fsf@alyssa.is>
On 7/13/26 14:19, Alyssa Ross wrote:
> Dmitry Osipenko <dmitry.osipenko@collabora.com> writes:
>
>> On 7/1/26 14:10, Alyssa Ross wrote:
>>> On Tue, Apr 28, 2026 at 09:44:49PM +0200, Sergio Lopez wrote:
>>>> If VIRTIO_GPU_F_BLOB_ALIGNMENT has been negotiated, blob size must be
>>>> aligned to blob_alignment. Validate this in verify_blob() so that
>>>> invalid requests are rejected early.
>>>>
>>>> Signed-off-by: Sergio Lopez <slp@redhat.com>
>>>
>>> FYI: this change breaks crosvm, which is squatting the 5 and 6 values
>>> of VIRTIO_GPU_F_* with different meanings. I've reported it as a
>>> crosvm bug, so hopefully it can be taken care of there.
>>>
>>> https://issuetracker.google.com/issues/529852979
>>>
>>>> ---
>>>> drivers/gpu/drm/virtio/virtgpu_ioctl.c | 5 +++++
>>>> 1 file changed, 5 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
>>>> index c33c057365f8..d0c4edf1eaf4 100644
>>>> --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
>>>> +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
>>>> @@ -489,6 +489,11 @@ static int verify_blob(struct virtio_gpu_device *vgdev,
>>>> params->size = rc_blob->size;
>>>> params->blob = true;
>>>> params->blob_flags = rc_blob->blob_flags;
>>>> +
>>>> + if (vgdev->has_blob_alignment &&
>>>> + !IS_ALIGNED(params->size, vgdev->blob_alignment))
>>>> + return -EINVAL;
>>>> +
>>>> return 0;
>>>> }
>>>>
>>>> --
>>>> 2.53.0
>>>>
>>
>> Thanks for the report. Indeed, crosvm will need to fix its experimental
>> caps. CI will likely run into this problem first once it will update
>> guest to 7.2+ kernel.
>
> I sent
> https://chromium-review.googlesource.com/c/crosvm/crosvm/+/8064741 last
> week but still waiting to hear anything. Do you have any insight into
> whether it's still used / being pursued?
The GUEST_HANDLE should be used by Android [1]. The FENCE_PASSING
shouldn't be used in production, though don't know for sure.
Crosvm should bump its experimental defines by +10 to prevent clash with
upstream in future.
[1]
https://github.com/google/gfxstream/blob/main/host/vulkan/vk_decoder_global_state.cpp#L107
--
Best regards,
Dmitry
next prev parent reply other threads:[~2026-07-13 14:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 19:44 [PATCH v2 0/3] drm/virtio: introduce F_BLOB_ALIGNMENT support Sergio Lopez
2026-04-28 19:44 ` [PATCH v2 1/3] drm/virtio: support VIRTIO_GPU_F_BLOB_ALIGNMENT Sergio Lopez
2026-04-28 19:44 ` [PATCH v2 2/3] drm/virtio: honor blob_alignment requirements Sergio Lopez
2026-07-01 11:10 ` Alyssa Ross
2026-07-02 4:03 ` Michael S. Tsirkin
2026-07-02 8:53 ` Alyssa Ross
2026-07-07 15:25 ` Dmitry Osipenko
2026-07-13 11:19 ` Alyssa Ross
2026-07-13 14:34 ` Dmitry Osipenko [this message]
2026-04-28 19:44 ` [PATCH v2 3/3] drm/virtio: add VIRTGPU_PARAM_BLOB_ALIGNMENT to params Sergio Lopez
2026-05-20 15:05 ` [PATCH v2 0/3] drm/virtio: introduce F_BLOB_ALIGNMENT support Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17764937-21dc-4b4a-8def-e738b361bcd1@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eperezma@redhat.com \
--cc=gurchetansingh@chromium.org \
--cc=hi@alyssa.is \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=mst@redhat.com \
--cc=olvaffe@gmail.com \
--cc=sergi@collabora.com \
--cc=simona@ffwll.ch \
--cc=slp@redhat.com \
--cc=tzimmermann@suse.de \
--cc=valentine.burley@collabora.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.com \
--cc=zzyiwei@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox