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

RE: [PATCH 02/10] vfio: Split creation of a vfio_device into init and register ops

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

Hi Jason,
From: Jason Gunthorpe <jgg@nvidia.com>
Sent: Wednesday, March 10, 2021 5:39 AM
[...]
quoted hunk ↗ jump to hunk
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index b7e18bde5aa8b3..ad8b579d67d34a 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -15,6 +15,18 @@
 #include <linux/poll.h>
 #include <uapi/linux/vfio.h>

+struct vfio_device {
+	struct device *dev;
+	const struct vfio_device_ops *ops;
+	struct vfio_group *group;
+
+	/* Members below here are private, not for driver use */
+	refcount_t refcount;
+	struct completion comp;
+	struct list_head group_next;
+	void *device_data;
A dumb question. If these fields are not supposed to be used by
"external modules" like vfio_pci driver, how about defining a private
struct vfio_dev_prive within vfio.c and embed here?

Other parts look good to me.

Reviewed-by: Liu Yi L <redacted>

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