Re: [PATCH v2] virtgpu: don't reset on shutdown

2025-04-22 Thread Eric Auger
@ 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_devic

Re: [PATCH RFC] virtgpu: don't reset on shutdown

2025-04-10 Thread Eric Auger
> trace_virtio_gpu_cmd_queue(vq, virtio_gpu_vbuf_ctrl_hdr(vbuf), > vbuf->seqno); > > atomic_inc(&vgdev->pending_commands); > > return 0; > } > > > Add an option for drivers to bypass the common break+reset handling. > As DRM

Re: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Eric Auger
On 9/8/22 11:17, Yi Liu wrote: > On 2022/9/8 17:06, Eric Auger wrote: >> Hi Kevin, >> >> On 9/1/22 16:37, Kevin Tian wrote: >>> From: Yi Liu >>> >>> and replace kref. With it a 'vfio-dev/vfioX' node is created under the >>>

Re: [PATCH v2 01/15] vfio: Add helpers for unifying vfio_device life cycle

2022-09-08 Thread Eric Auger
Hi Kevin, On 9/8/22 08:19, Tian, Kevin wrote: >> From: Eric Auger >> Sent: Thursday, September 8, 2022 3:28 AM >>> +/* >>> + * Alloc and initialize vfio_device so it can be registered to vfio >>> + * core. >>> + * >>> + * Drivers

Re: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Eric Auger
Hi Kevin, On 9/1/22 16:37, Kevin Tian wrote: > From: Yi Liu > > and replace kref. With it a 'vfio-dev/vfioX' node is created under the > sysfs path of the parent, indicating the device is bound to a vfio > driver, e.g.: > > /sys/devices/pci\:6f/\:6f\:01.0/vfio-dev/vfio0 > > It is also a p

Re: [PATCH v2 14/15] vfio: Rename vfio_device_put() and vfio_device_try_get()

2022-09-07 Thread Eric Auger
ce. > > Now rename them: > > - vfio_device_put() -> vfio_device_put_registration() > - vfio_device_try_get() -> vfio_device_try_get_registration() > > Signed-off-by: Kevin Tian > Reviewed-by: Jason Gunthorpe Reviewed-by: Eric Auger Eric > --- > drivers/vfi

Re: [PATCH v2 12/15] vfio/amba: Use the new device life cycle helpers

2022-09-07 Thread Eric Auger
_device *vdev) > -{ > - vfio_unregister_group_dev(&vdev->vdev); > - > - pm_runtime_disable(vdev->device); > - vfio_platform_put_reset(vdev); > - vfio_uninit_group_dev(&vdev->vdev); > -} > -EXPORT_SYMBOL_GPL(vfio_platform_remove_common); > - > void __vfio_platform_register_reset(struct vfio_platform_reset_node *node) > { > mutex_lock(&driver_lock); > diff --git a/drivers/vfio/platform/vfio_platform_private.h > b/drivers/vfio/platform/vfio_platform_private.h > index a769d649fb97..8d8fab516849 100644 > --- a/drivers/vfio/platform/vfio_platform_private.h > +++ b/drivers/vfio/platform/vfio_platform_private.h > @@ -78,9 +78,6 @@ struct vfio_platform_reset_node { > vfio_platform_reset_fn_t of_reset; > }; > > -int vfio_platform_probe_common(struct vfio_platform_device *vdev, > -struct device *dev); > -void vfio_platform_remove_common(struct vfio_platform_device *vdev); > int vfio_platform_init_common(struct vfio_platform_device *vdev); > void vfio_platform_release_common(struct vfio_platform_device *vdev); > Reviewed-by: Eric Auger Eric

Re: [PATCH v2 01/15] vfio: Add helpers for unifying vfio_device life cycle

2022-09-07 Thread Eric Auger
struct dev_struct, member)), > \ > + dev, ops), > \ > + struct dev_struct, member) > + > +int vfio_init_device(struct vfio_device *device, struct device *dev, > + const struct vfio_device_ops *ops); > +void vfio_free_device(struct vfio_device *device); > +void vfio_device_release(struct kref *kref); > +static inline void vfio_put_device(struct vfio_device *device) > +{ > + kref_put(&device->kref, vfio_device_release); > +} > + > void vfio_init_group_dev(struct vfio_device *device, struct device *dev, >const struct vfio_device_ops *ops); > void vfio_uninit_group_dev(struct vfio_device *device); Besides Reviewed-by: Eric Auger Eric

Re: [PATCH v2 11/15] vfio/platform: Use the new device life cycle helpers

2022-09-07 Thread Eric Auger
rm_device *vdev); > +int vfio_platform_init_common(struct vfio_platform_device *vdev); > +void vfio_platform_release_common(struct vfio_platform_device *vdev); > + > +int vfio_platform_open_device(struct vfio_device *core_vdev); > +void vfio_platform_close_device(struct vfio_device *core_vdev); > +long vfio_platform_ioctl(struct vfio_device *core_vdev, > + unsigned int cmd, unsigned long arg); > +ssize_t vfio_platform_read(struct vfio_device *core_vdev, > +char __user *buf, size_t count, > +loff_t *ppos); > +ssize_t vfio_platform_write(struct vfio_device *core_vdev, > + const char __user *buf, > + size_t count, loff_t *ppos); > +int vfio_platform_mmap(struct vfio_device *core_vdev, > +struct vm_area_struct *vma); > > int vfio_platform_irq_init(struct vfio_platform_device *vdev); > void vfio_platform_irq_cleanup(struct vfio_platform_device *vdev); Looks good to me. I also ran basic non regression testing Reviewed-by: Eric Auger Tested-by: Eric Auger Eric

Re: [PATCH v3 07/14] vfio/platform: Use open_device() instead of open coding a refcnt scheme

2021-08-05 Thread Eric Auger
> Signed-off-by: Jason Gunthorpe > Signed-off-by: Yishai Hadas > Reviewed-by: Cornelia Huck > Reviewed-by: Christoph Hellwig Reviewed-by: Eric Auger Thanks Eric > --- > drivers/vfio/platform/vfio_platform_common.c | 79 --- > drivers/vfio/platform/vfio_