On 11/20/25 18:02, Dmitry Osipenko wrote:
> On 11/20/25 17:54, Dmitry Osipenko wrote:
>> On 11/20/25 08:07, Akihiko Odaki wrote:
>>>> +int virtio_gpu_virgl_reset(VirtIOGPU *g)
>>>> {
>>>> + struct virtio_gpu_simple_resource *res, *tmp;
>>>> +
>>>> + QTAILQ_FOREACH_SAFE(res, &g->reslist, next, tmp) {
>>>> + virtio_gpu_virgl_resource_destroy(g, res, NULL);
>>>> + }
>>>> +
>>>> + if (!QTAILQ_EMPTY(&g->reslist)) {
>>>> + error_report("failed to reset virgl resources");
>>>> + return -1;
>>>
>>> It shouldn't report an error if suspended.
>>
>> Could you please expand on what you're meaning by "suspended"?
>>
>> Suppose you're talking about guest's kernel suspension. There was a
>> discussion on [1] RE a need to use `x-pcie-pm-no-soft-reset=true` option
>> to avoid virtio-gpu resetting across S3 suspend-resume. This option
>> works with virtio-vga, but not with virtio-vga-gl device where VM hangs
>> on startup. So currently S3 doesn't work for virgl and needs further fixing.
>>
>> [1]
>> https://lore.kernel.org/dri-devel/[email protected]/
>
> Correction: `x-pcie-pm-no-soft-reset=true` works with virgl without
> enabled hostmem. It's hostmem that doesn't work with the additional PCI bus.
I'll add a clarifying comment to the code in v4 telling that virgl shall
not be reset at runtime.
--
Best regards,
Dmitry