[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250423023922-mutt-send-email-mst@kernel.org>
Date: Wed, 23 Apr 2025 02:45:08 -0400
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Eric Auger <eric.auger@...hat.com>
Cc: Gerd Hoffmann <kraxel@...hat.com>, linux-kernel@...r.kernel.org,
Eric Auger <eauger@...hat.com>,
Jocelyn Falempe <jfalempe@...hat.com>,
David Airlie <airlied@...hat.com>,
Gurchetan Singh <gurchetansingh@...omium.org>,
Chia-I Wu <olvaffe@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
Simona Vetter <simona@...ll.ch>, Jason Wang <jasowang@...hat.com>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>,
dri-devel@...ts.freedesktop.org, virtualization@...ts.linux.dev
Subject: Re: [PATCH v2] virtgpu: don't reset on shutdown
On Tue, Apr 22, 2025 at 06:49:04PM +0200, Eric Auger wrote:
> Hi Gerd, Michael,
>
> On 4/16/25 3:57 PM, Gerd Hoffmann wrote:
> > On Tue, Apr 15, 2025 at 10:00:48AM -0400, Michael S. Tsirkin wrote:
> >> On Tue, Apr 15, 2025 at 01:16:32PM +0200, Gerd Hoffmann wrote:
> >>> Hi,
> >>>
> >>>> +static void virtio_gpu_shutdown(struct virtio_device *vdev)
> >>>> +{
> >>>> + /*
> >>>> + * drm does its own synchronization on shutdown.
> >>>> + * Do nothing here, opt out of device reset.
> >>>> + */
> >>> I think a call to 'drm_dev_unplug()' is what you need here.
> >>>
> >>> take care,
> >>> Gerd
> >> My patch reverts the behaviour back to what it was, so pls go
> >> ahead and send a patch on top? I won't be able to explain
> >> what it does and why it's needed.
> > See below. Untested.
> >
> > Eric, can you give this a spin?
> >
> > thanks,
> > Gerd
> >
> > ----------------------- cut here -------------------------------
> > From f3051dd52cb2004232941e6d2cbc0c694e290534 Mon Sep 17 00:00:00 2001
> > From: Gerd Hoffmann <kraxel@...hat.com>
> > Date: Wed, 16 Apr 2025 15:53:04 +0200
> > Subject: [PATCH] drm/virtio: implement virtio_gpu_shutdown
> >
> > Calling drm_dev_unplug() is the drm way to say the device
> > is gone and can not be accessed any more.
> >
> > Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
> > ---
> > drivers/gpu/drm/virtio/virtgpu_drv.c | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
> > index e32e680c7197..71c6ccad4b99 100644
> > --- a/drivers/gpu/drm/virtio/virtgpu_drv.c
> > +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
> > @@ -130,10 +130,10 @@ static void virtio_gpu_remove(struct virtio_device *vdev)
> >
> > static void virtio_gpu_shutdown(struct virtio_device *vdev)
> > {
> > - /*
> > - * drm does its own synchronization on shutdown.
> > - * Do nothing here, opt out of device reset.
> > - */
> > + struct drm_device *dev = vdev->priv;
> > +
> > + /* stop talking to the device */
> > + drm_dev_unplug(dev);
> I have tested this patch on top of Michael's v2 and I don't see any
> splat on guest.
>
> Feel free to add my
>
> Reviewed-by: Eric Auger <eric.auger@...hat.com>
> Tested-by: Eric Auger <eric.auger@...hat.com>
>
> Thanks
>
> Eric
Thanks, Eric!
Gerd, do you want to post a patch officially?
I just sent the dependency to Linus, maybe mention this for the
maintainers.
> > }
> >
> > static void virtio_gpu_config_changed(struct virtio_device *vdev)
Powered by blists - more mailing lists