Thread (42 messages) 42 messages, 6 authors, 2021-03-12

RE: [PATCH 08/10] vfio: Make vfio_device_ops pass a 'struct vfio_device *' instead of 'void *'

From: Liu, Yi L <hidden>
Date: 2021-03-12 13:43:40
Also in: linux-doc

Hi Jason,
From: Jason Gunthorpe <jgg@nvidia.com>
Sent: Wednesday, March 10, 2021 5:39 AM
[...]
-Each function is passed the device_data that was originally registered
+Each function is passed the vdev that was originally registered
 in the vfio_register_group_dev() call above.  This allows the bus driver
-an easy place to store its opaque, private data.  The open/release
+to obtain its private data using container_of().  The open/release
I think the is to let VFIO device drivers (e.g. vfio_pci driver) to obtain
its private data by using container_of instead of let the bus driver.
right?

Regards,
Yi Liu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help