On 2019/11/2 上午4:11, Parav Pandit wrote:
-----Original Message-----
From: Jason Wang <[email protected]>
Sent: Wednesday, October 30, 2019 1:45 AM
To: [email protected]; [email protected]; linux-
[email protected]; [email protected]; intel-
[email protected]; [email protected];
[email protected]; [email protected]; [email protected];
[email protected]
Cc: [email protected]; [email protected];
[email protected]; [email protected];
[email protected]; [email protected];
[email protected]; [email protected];
[email protected]; [email protected]; [email protected];
[email protected]; [email protected];
[email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected];
[email protected]; [email protected]; [email protected];
[email protected]; Ido Shamay <[email protected]>;
[email protected]; [email protected]; Parav Pandit
<[email protected]>; [email protected];
[email protected]; [email protected]; Jason Wang
<[email protected]>
Subject: [PATCH V6 3/6] mdev: introduce device specific ops
Currently, except for the create and remove, the rest of mdev_parent_ops is
designed for vfio-mdev driver only and may not help for kernel mdev driver.
With the help of class id, this patch introduces device specific callbacks
inside
mdev_device structure. This allows different set of callback to be used by vfio-
mdev and virtio-mdev.
Signed-off-by: Jason Wang <[email protected]>
---
[ ..]
diff --git a/include/linux/vfio_mdev_ops.h b/include/linux/vfio_mdev_ops.h
new file mode 100644 index 000000000000..3907c5371c2b
--- /dev/null
+++ b/include/linux/vfio_mdev_ops.h
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * VFIO Mediated device definition
+ */
+
+#ifndef VFIO_MDEV_H
+#define VFIO_MDEV_H
+
I should have noticed this before. :-(
APIs exposed are by the mdev module and named with mdev_ prefix.
And file name is _ops.h,
We should name this file as mdev_vfio_ops.h
And #define should be MDEV_VFIO_OPS_H
+#include <linux/mdev.h>
+
+/**
+ * struct vfio_mdev_device_ops - Structure to be registered for each
s/vfio_mdev_device_ops/mdev_vfio_device_ops/
Similarly for virtio in future patches.
Will fix in V7.
static void mtty_device_release(struct device *dev)
--
2.19.1
With above small nit changes to rename the fields and file,
Reviewed-by: Parav Pandit <[email protected]>
Appreciate that, thanks.
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization