lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f7yzgdhzc4w7j5zt74muisvh3efpvlag7es23c6nvsg25q5puu@o37kylmbkfad>
Date: Tue, 22 Apr 2025 08:21:27 +0200
From: Gerd Hoffmann <kraxel@...hat.com>
To: Thomas Zimmermann <tzimmermann@...e.de>
Cc: "Michael S. Tsirkin" <mst@...hat.com>, linux-kernel@...r.kernel.org, 
	Eric Auger <eric.auger@...hat.com>, 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>, 
	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

> > 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);
> >   }
> 
> It's the correct approach but also requires drm_dev_enter() and
> drm_dev_exit() around all of the driver's hardware access.

The functions adding requests to the virtio rings use
drm_dev_enter+drm_dev_exit already.

take care,
  Gerd


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ