Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1523824 > unrolled thread
| Started by | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| First post | 2016-11-16 21:50 +0100 |
| Last post | 2016-11-18 18:00 +0100 |
| Articles | 20 on this page of 40 — 9 participants |
Back to article view | Back to linux.kernel
[PATCH v14 00/22] Add Mediated device support Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
[PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
Re: [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP Alex Williamson <alex.williamson@redhat.com> - 2016-11-17 01:10 +0100
Re: [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP Jike Song <jike.song@intel.com> - 2016-11-17 04:00 +0100
Re: [PATCH v14 11/22] vfio iommu: Add blocking notifier to notify DMA_UNMAP Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-17 06:00 +0100
[PATCH v14 18/22] vfio: Define device_api strings Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
[PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
Re: [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma Alexey Kardashevskiy <aik@ozlabs.ru> - 2016-11-17 06:50 +0100
Re: [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma Alex Williamson <alex.williamson@redhat.com> - 2016-11-17 07:20 +0100
Re: [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma Alexey Kardashevskiy <aik@ozlabs.ru> - 2016-11-17 07:50 +0100
Re: [PATCH v14 09/22] vfio iommu type1: Add task structure to vfio_dma Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-17 07:30 +0100
[PATCH v14 07/22] vfio iommu type1: Update argument of vaddr_get_pfn() Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
[PATCH v14 20/22] docs: Sysfs ABI for mediated device framework Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
[PATCH v14 13/22] vfio: Introduce common function to add capabilities Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
Re: [Qemu-devel] [PATCH v14 13/22] vfio: Introduce common function to add capabilities Auger Eric <eric.auger@redhat.com> - 2016-11-21 12:10 +0100
[PATCH v14 01/22] vfio: Mediated device Core driver Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 21:50 +0100
[PATCH v14 03/22] vfio: Rearrange functions to get vfio_group from dev Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 22:00 +0100
[PATCH v14 08/22] vfio iommu type1: Add find_iommu_group() function Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 22:00 +0100
Re: [PATCH v14 08/22] vfio iommu type1: Add find_iommu_group() function Auger Eric <eric.auger@redhat.com> - 2016-11-21 12:30 +0100
Re: [PATCH v14 08/22] vfio iommu type1: Add find_iommu_group() function Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-21 13:00 +0100
Re: [PATCH v14 08/22] vfio iommu type1: Add find_iommu_group() function Auger Eric <eric.auger@redhat.com> - 2016-11-21 13:50 +0100
[PATCH v14 02/22] vfio: VFIO based driver for Mediated devices Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 22:00 +0100
[PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 22:00 +0100
Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-17 06:10 +0100
Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-17 06:10 +0100
Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-17 18:30 +0100
Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev Alex Williamson <alex.williamson@redhat.com> - 2016-11-17 18:40 +0100
Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev Jike Song <jike.song@intel.com> - 2016-11-17 18:40 +0100
Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev Alex Williamson <alex.williamson@redhat.com> - 2016-11-17 19:00 +0100
[PATCH v14 04/22] vfio: Common function to increment container_users Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-16 22:00 +0100
Re: [PATCH v14 00/22] Add Mediated device support Alex Williamson <alex.williamson@redhat.com> - 2016-11-17 22:30 +0100
Re: [PATCH v14 00/22] Add Mediated device support Neo Jia <cjia@nvidia.com> - 2016-11-17 23:20 +0100
Re: [PATCH v14 00/22] Add Mediated device support Kirti Wankhede <kwankhede@nvidia.com> - 2016-11-18 03:10 +0100
Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support Jike Song <jike.song@intel.com> - 2016-11-18 03:30 +0100
RE: [PATCH v14 00/22] Add Mediated device support "Tian, Kevin" <kevin.tian@intel.com> - 2016-11-18 00:30 +0100
Re: [PATCH v14 00/22] Add Mediated device support Alex Williamson <alex.williamson@redhat.com> - 2016-11-18 01:00 +0100
Re: [PATCH v14 00/22] Add Mediated device support Zhenyu Wang <zhenyuw@linux.intel.com> - 2016-11-18 10:30 +0100
Re: [PATCH v14 00/22] Add Mediated device support Alex Williamson <alex.williamson@redhat.com> - 2016-11-18 16:50 +0100
Re: [PATCH v14 00/22] Add Mediated device support Daniel Vetter <daniel@ffwll.ch> - 2016-11-18 17:20 +0100
Re: [PATCH v14 00/22] Add Mediated device support Alex Williamson <alex.williamson@redhat.com> - 2016-11-18 18:00 +0100
Page 2 of 2 — ← Prev page 1 [2]
| From | Auger Eric <eric.auger@redhat.com> |
|---|---|
| Date | 2016-11-21 13:50 +0100 |
| Subject | Re: [PATCH v14 08/22] vfio iommu type1: Add find_iommu_group() function |
| Message-ID | <sFWcO-1f8-19@gated-at.bofh.it> |
| In reply to | #1526602 |
Hi Kirti,
On 21/11/2016 12:55, Kirti Wankhede wrote:
>
> Hi Eric,
>
> Thanks for your reviews.
> Alex had already pulled this series into his next branch for v4.10.
>
> http://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1274745.html
Yes I am showing up too late and noticed that later :-(
Anyway I needed (and still need) to look at it.
Thanks
Eric
>
> Thanks,
> Kirti
>
> On 11/21/2016 4:59 PM, Auger Eric wrote:
>> Hi,
>> On 16/11/2016 21:46, Kirti Wankhede wrote:
>>> Add find_iommu_group()
>>>
>>> Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
>>> Signed-off-by: Neo Jia <cjia@nvidia.com>
>>> Reviewed-by: Jike Song <jike.song@intel.com>
>>> Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
>>>
>>> Change-Id: I9d372f1ebe9eb01a5a21374b8a2b03f7df73601f
>>> ---
>>> drivers/vfio/vfio_iommu_type1.c | 57 ++++++++++++++++++++++++-----------------
>>> 1 file changed, 33 insertions(+), 24 deletions(-)
>>>
>>> diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
>>> index 52af5fc01d91..ffe2026f1341 100644
>>> --- a/drivers/vfio/vfio_iommu_type1.c
>>> +++ b/drivers/vfio/vfio_iommu_type1.c
>>> @@ -752,11 +752,24 @@ static void vfio_test_domain_fgsp(struct vfio_domain *domain)
>>> __free_pages(pages, order);
>>> }
>>>
>>> +static struct vfio_group *find_iommu_group(struct vfio_domain *domain,
>>> + struct iommu_group *iommu_group)
>>> +{
>>> + struct vfio_group *g;
>>> +
>>> + list_for_each_entry(g, &domain->group_list, next) {
>>> + if (g->iommu_group == iommu_group)
>>> + return g;
>>> + }
>>> +
>>> + return NULL;
>>> +}
>>> +
>>> static int vfio_iommu_type1_attach_group(void *iommu_data,
>>> struct iommu_group *iommu_group)
>>> {
>>> struct vfio_iommu *iommu = iommu_data;
>>> - struct vfio_group *group, *g;
>>> + struct vfio_group *group;
>>> struct vfio_domain *domain, *d;
>>> struct bus_type *bus = NULL;
>>> int ret;
>>> @@ -764,10 +777,7 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
>>> mutex_lock(&iommu->lock);
>>>
>>> list_for_each_entry(d, &iommu->domain_list, next) {
>>> - list_for_each_entry(g, &d->group_list, next) {
>>> - if (g->iommu_group != iommu_group)
>>> - continue;
>>> -
>>> + if (find_iommu_group(d, iommu_group)) {
>>> mutex_unlock(&iommu->lock);
>>> return -EINVAL;
>>> }
>>> @@ -887,27 +897,26 @@ static void vfio_iommu_type1_detach_group(void *iommu_data,
>>> mutex_lock(&iommu->lock);
>>>
>>> list_for_each_entry(domain, &iommu->domain_list, next) {
>>> - list_for_each_entry(group, &domain->group_list, next) {
>>> - if (group->iommu_group != iommu_group)
>>> - continue;
>>> + group = find_iommu_group(domain, iommu_group);
>>> + if (!group)
>>> + continue;
>>>
>>> - iommu_detach_group(domain->domain, iommu_group);
>>> - list_del(&group->next);
>>> - kfree(group);
>>> - /*
>>> - * Group ownership provides privilege, if the group
>>> - * list is empty, the domain goes away. If it's the
>>> - * last domain, then all the mappings go away too.
>>> - */
>>> - if (list_empty(&domain->group_list)) {
>>> - if (list_is_singular(&iommu->domain_list))
>>> - vfio_iommu_unmap_unpin_all(iommu);
>>> - iommu_domain_free(domain->domain);
>>> - list_del(&domain->next);
>>> - kfree(domain);
>>> - }
>>> - goto done;
>>> + iommu_detach_group(domain->domain, iommu_group);
>>> + list_del(&group->next);
>>> + kfree(group);
>>> + /*
>>> + * Group ownership provides privilege, if the group
>>> + * list is empty, the domain goes away. If it's the
>>> + * last domain, then all the mappings go away too.
>>> + */
>>> + if (list_empty(&domain->group_list)) {
>>> + if (list_is_singular(&iommu->domain_list))
>>> + vfio_iommu_unmap_unpin_all(iommu);
>>> + iommu_domain_free(domain->domain);
>>> + list_del(&domain->next);
>>> + kfree(domain);
>>> }
>>> + goto done;
>>> }
>>>
>>> done:
>>>
>> Reviewed-by: Eric Auger <eric.auger@redhat.com>
>>
>> Eric
>>
[toc] | [prev] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2016-11-16 22:00 +0100 |
| Subject | [PATCH v14 02/22] vfio: VFIO based driver for Mediated devices |
| Message-ID | <sEftg-7M4-29@gated-at.bofh.it> |
| In reply to | #1523824 |
vfio_mdev driver registers with mdev core driver.
mdev core driver creates mediated device and calls probe routine of
vfio_mdev driver for each device.
Probe routine of vfio_mdev driver adds mediated device to VFIO core module
This driver forms a shim layer that pass through VFIO devices operations
to vendor driver for mediated devices.
Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Neo Jia <cjia@nvidia.com>
Reviewed-by: Jike Song <jike.song@intel.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Change-Id: I583f4734752971d3d112324d69e2508c88f359ec
---
drivers/vfio/mdev/Kconfig | 7 ++
drivers/vfio/mdev/Makefile | 1 +
drivers/vfio/mdev/mdev_core.c | 13 +++-
drivers/vfio/mdev/vfio_mdev.c | 148 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 168 insertions(+), 1 deletion(-)
create mode 100644 drivers/vfio/mdev/vfio_mdev.c
diff --git a/drivers/vfio/mdev/Kconfig b/drivers/vfio/mdev/Kconfig
index 258481d65ebd..424ddebee55d 100644
--- a/drivers/vfio/mdev/Kconfig
+++ b/drivers/vfio/mdev/Kconfig
@@ -7,3 +7,10 @@ config VFIO_MDEV
Provides a framework to virtualize devices.
If you don't know what do here, say N.
+
+config VFIO_MDEV_DEVICE
+ tristate "VFIO driver for Mediated devices"
+ depends on VFIO && VFIO_MDEV
+ default n
+ help
+ VFIO based driver for Mediated devices.
diff --git a/drivers/vfio/mdev/Makefile b/drivers/vfio/mdev/Makefile
index 31bc04801d94..fa2d5ea466ee 100644
--- a/drivers/vfio/mdev/Makefile
+++ b/drivers/vfio/mdev/Makefile
@@ -2,3 +2,4 @@
mdev-y := mdev_core.o mdev_sysfs.o mdev_driver.o
obj-$(CONFIG_VFIO_MDEV) += mdev.o
+obj-$(CONFIG_VFIO_MDEV_DEVICE) += vfio_mdev.o
diff --git a/drivers/vfio/mdev/mdev_core.c b/drivers/vfio/mdev/mdev_core.c
index 613e8a8a3b2a..be1ee89ee917 100644
--- a/drivers/vfio/mdev/mdev_core.c
+++ b/drivers/vfio/mdev/mdev_core.c
@@ -354,7 +354,18 @@ int mdev_device_remove(struct device *dev, bool force_remove)
static int __init mdev_init(void)
{
- return mdev_bus_register();
+ int ret;
+
+ ret = mdev_bus_register();
+
+ /*
+ * Attempt to load known vfio_mdev. This gives us a working environment
+ * without the user needing to explicitly load vfio_mdev driver.
+ */
+ if (!ret)
+ request_module_nowait("vfio_mdev");
+
+ return ret;
}
static void __exit mdev_exit(void)
diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
new file mode 100644
index 000000000000..ffc36758cb84
--- /dev/null
+++ b/drivers/vfio/mdev/vfio_mdev.c
@@ -0,0 +1,148 @@
+/*
+ * VFIO based driver for Mediated device
+ *
+ * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
+ * Author: Neo Jia <cjia@nvidia.com>
+ * Kirti Wankhede <kwankhede@nvidia.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/vfio.h>
+#include <linux/mdev.h>
+
+#include "mdev_private.h"
+
+#define DRIVER_VERSION "0.1"
+#define DRIVER_AUTHOR "NVIDIA Corporation"
+#define DRIVER_DESC "VFIO based driver for Mediated device"
+
+static int vfio_mdev_open(void *device_data)
+{
+ struct mdev_device *mdev = device_data;
+ struct parent_device *parent = mdev->parent;
+ int ret;
+
+ if (unlikely(!parent->ops->open))
+ return -EINVAL;
+
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
+
+ ret = parent->ops->open(mdev);
+ if (ret)
+ module_put(THIS_MODULE);
+
+ return ret;
+}
+
+static void vfio_mdev_release(void *device_data)
+{
+ struct mdev_device *mdev = device_data;
+ struct parent_device *parent = mdev->parent;
+
+ if (likely(parent->ops->release))
+ parent->ops->release(mdev);
+
+ module_put(THIS_MODULE);
+}
+
+static long vfio_mdev_unlocked_ioctl(void *device_data,
+ unsigned int cmd, unsigned long arg)
+{
+ struct mdev_device *mdev = device_data;
+ struct parent_device *parent = mdev->parent;
+
+ if (unlikely(!parent->ops->ioctl))
+ return -EINVAL;
+
+ return parent->ops->ioctl(mdev, cmd, arg);
+}
+
+static ssize_t vfio_mdev_read(void *device_data, char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ struct mdev_device *mdev = device_data;
+ struct parent_device *parent = mdev->parent;
+
+ if (unlikely(!parent->ops->read))
+ return -EINVAL;
+
+ return parent->ops->read(mdev, buf, count, ppos);
+}
+
+static ssize_t vfio_mdev_write(void *device_data, const char __user *buf,
+ size_t count, loff_t *ppos)
+{
+ struct mdev_device *mdev = device_data;
+ struct parent_device *parent = mdev->parent;
+
+ if (unlikely(!parent->ops->write))
+ return -EINVAL;
+
+ return parent->ops->write(mdev, buf, count, ppos);
+}
+
+static int vfio_mdev_mmap(void *device_data, struct vm_area_struct *vma)
+{
+ struct mdev_device *mdev = device_data;
+ struct parent_device *parent = mdev->parent;
+
+ if (unlikely(!parent->ops->mmap))
+ return -EINVAL;
+
+ return parent->ops->mmap(mdev, vma);
+}
+
+static const struct vfio_device_ops vfio_mdev_dev_ops = {
+ .name = "vfio-mdev",
+ .open = vfio_mdev_open,
+ .release = vfio_mdev_release,
+ .ioctl = vfio_mdev_unlocked_ioctl,
+ .read = vfio_mdev_read,
+ .write = vfio_mdev_write,
+ .mmap = vfio_mdev_mmap,
+};
+
+int vfio_mdev_probe(struct device *dev)
+{
+ struct mdev_device *mdev = to_mdev_device(dev);
+
+ return vfio_add_group_dev(dev, &vfio_mdev_dev_ops, mdev);
+}
+
+void vfio_mdev_remove(struct device *dev)
+{
+ vfio_del_group_dev(dev);
+}
+
+struct mdev_driver vfio_mdev_driver = {
+ .name = "vfio_mdev",
+ .probe = vfio_mdev_probe,
+ .remove = vfio_mdev_remove,
+};
+
+static int __init vfio_mdev_init(void)
+{
+ return mdev_register_driver(&vfio_mdev_driver, THIS_MODULE);
+}
+
+static void __exit vfio_mdev_exit(void)
+{
+ mdev_unregister_driver(&vfio_mdev_driver);
+}
+
+module_init(vfio_mdev_init)
+module_exit(vfio_mdev_exit)
+
+MODULE_VERSION(DRIVER_VERSION);
+MODULE_LICENSE("GPL v2");
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESC);
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2016-11-16 22:00 +0100 |
| Subject | [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev |
| Message-ID | <sEftg-7M4-21@gated-at.bofh.it> |
| In reply to | #1523824 |
Add a notifier calback to parent's ops structure of mdev device so that per
device notifer for vfio module is registered through vfio_mdev module.
Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Neo Jia <cjia@nvidia.com>
Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637
---
drivers/vfio/mdev/vfio_mdev.c | 34 +++++++++++++++++++++++++++++++++-
include/linux/mdev.h | 9 +++++++++
2 files changed, 42 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
index ffc36758cb84..2f8e06e5f95a 100644
--- a/drivers/vfio/mdev/vfio_mdev.c
+++ b/drivers/vfio/mdev/vfio_mdev.c
@@ -24,6 +24,15 @@
#define DRIVER_AUTHOR "NVIDIA Corporation"
#define DRIVER_DESC "VFIO based driver for Mediated device"
+static int vfio_mdev_notifier(struct notifier_block *nb, unsigned long action,
+ void *data)
+{
+ struct mdev_device *mdev = container_of(nb, struct mdev_device, nb);
+ struct parent_device *parent = mdev->parent;
+
+ return parent->ops->notifier(mdev, action, data);
+}
+
static int vfio_mdev_open(void *device_data)
{
struct mdev_device *mdev = device_data;
@@ -36,9 +45,27 @@ static int vfio_mdev_open(void *device_data)
if (!try_module_get(THIS_MODULE))
return -ENODEV;
+ if (likely(parent->ops->notifier)) {
+ mdev->nb.notifier_call = vfio_mdev_notifier;
+ ret = vfio_register_notifier(&mdev->dev, &mdev->nb);
+
+ /*
+ * This should not fail if backend iommu module doesn't support
+ * register_notifier.
+ */
+ if (ret && (ret != -ENOTTY)) {
+ pr_err("Failed to register notifier for mdev\n");
+ module_put(THIS_MODULE);
+ return ret;
+ }
+ }
+
ret = parent->ops->open(mdev);
- if (ret)
+ if (ret) {
+ if (likely(parent->ops->notifier))
+ vfio_unregister_notifier(&mdev->dev, &mdev->nb);
module_put(THIS_MODULE);
+ }
return ret;
}
@@ -51,6 +78,11 @@ static void vfio_mdev_release(void *device_data)
if (likely(parent->ops->release))
parent->ops->release(mdev);
+ if (likely(parent->ops->notifier)) {
+ if (vfio_unregister_notifier(&mdev->dev, &mdev->nb))
+ pr_err("Failed to unregister notifier for mdev\n");
+ }
+
module_put(THIS_MODULE);
}
diff --git a/include/linux/mdev.h b/include/linux/mdev.h
index ec819e9a115a..94c43034c297 100644
--- a/include/linux/mdev.h
+++ b/include/linux/mdev.h
@@ -37,6 +37,7 @@ struct mdev_device {
struct kref ref;
struct list_head next;
struct kobject *type_kobj;
+ struct notifier_block nb;
};
/**
@@ -85,6 +86,12 @@ struct mdev_device {
* @mmap: mmap callback
* @mdev: mediated device structure
* @vma: vma structure
+ * @notifer: Notifier callback, currently only for
+ * VFIO_IOMMU_NOTIFY_DMA_UNMAP action notified duing
+ * DMA_UNMAP call on mapped iova range.
+ * @mdev: mediated device structure
+ * @action: Action for which notifier is called
+ * @data: Data associated with the notifier
* Parent device that support mediated device should be registered with mdev
* module with parent_ops structure.
**/
@@ -106,6 +113,8 @@ struct parent_ops {
ssize_t (*ioctl)(struct mdev_device *mdev, unsigned int cmd,
unsigned long arg);
int (*mmap)(struct mdev_device *mdev, struct vm_area_struct *vma);
+ int (*notifier)(struct mdev_device *mdev, unsigned long action,
+ void *data);
};
/* interface for exporting mdev supported type attributes */
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2016-11-17 06:10 +0100 |
| Subject | Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev |
| Message-ID | <sEn7r-4Gv-1@gated-at.bofh.it> |
| In reply to | #1523839 |
On 11/17/2016 7:45 AM, Dong Jia Shi wrote:
> * Kirti Wankhede <kwankhede@nvidia.com> [2016-11-17 02:16:24 +0530]:
>
> Hi Kirti,
>
>> diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
> [...]
>
>> @@ -51,6 +78,11 @@ static void vfio_mdev_release(void *device_data)
>> if (likely(parent->ops->release))
>> parent->ops->release(mdev);
>>
>> + if (likely(parent->ops->notifier)) {
>> + if (vfio_unregister_notifier(&mdev->dev, &mdev->nb))
>> + pr_err("Failed to unregister notifier for mdev\n");
> For the -ENOTTY case, we should not fail here either.
>
Removing the error print and ignoring return from this unregister call.
Updating this patch on this thread.
>> + }
>> +
>> module_put(THIS_MODULE);
>> }
>>
> [...]
>
[toc] | [prev] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2016-11-17 06:10 +0100 |
| Subject | Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev |
| Message-ID | <sEn7r-4Gv-7@gated-at.bofh.it> |
| In reply to | #1523839 |
Add a notifier calback to parent's ops structure of mdev device so that per
device notifer for vfio module is registered through vfio_mdev module.
Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Neo Jia <cjia@nvidia.com>
Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637
---
drivers/vfio/mdev/vfio_mdev.c | 32 +++++++++++++++++++++++++++++++-
include/linux/mdev.h | 9 +++++++++
2 files changed, 40 insertions(+), 1 deletion(-)
diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
index ffc36758cb84..7ffdc317319d 100644
--- a/drivers/vfio/mdev/vfio_mdev.c
+++ b/drivers/vfio/mdev/vfio_mdev.c
@@ -24,6 +24,15 @@
#define DRIVER_AUTHOR "NVIDIA Corporation"
#define DRIVER_DESC "VFIO based driver for Mediated device"
+static int vfio_mdev_notifier(struct notifier_block *nb, unsigned long action,
+ void *data)
+{
+ struct mdev_device *mdev = container_of(nb, struct mdev_device, nb);
+ struct parent_device *parent = mdev->parent;
+
+ return parent->ops->notifier(mdev, action, data);
+}
+
static int vfio_mdev_open(void *device_data)
{
struct mdev_device *mdev = device_data;
@@ -36,9 +45,27 @@ static int vfio_mdev_open(void *device_data)
if (!try_module_get(THIS_MODULE))
return -ENODEV;
+ if (likely(parent->ops->notifier)) {
+ mdev->nb.notifier_call = vfio_mdev_notifier;
+ ret = vfio_register_notifier(&mdev->dev, &mdev->nb);
+
+ /*
+ * This should not fail if backend iommu module doesn't support
+ * register_notifier.
+ */
+ if (ret && (ret != -ENOTTY)) {
+ pr_err("Failed to register notifier for mdev\n");
+ module_put(THIS_MODULE);
+ return ret;
+ }
+ }
+
ret = parent->ops->open(mdev);
- if (ret)
+ if (ret) {
+ if (likely(parent->ops->notifier))
+ vfio_unregister_notifier(&mdev->dev, &mdev->nb);
module_put(THIS_MODULE);
+ }
return ret;
}
@@ -51,6 +78,9 @@ static void vfio_mdev_release(void *device_data)
if (likely(parent->ops->release))
parent->ops->release(mdev);
+ if (likely(parent->ops->notifier))
+ vfio_unregister_notifier(&mdev->dev, &mdev->nb);
+
module_put(THIS_MODULE);
}
diff --git a/include/linux/mdev.h b/include/linux/mdev.h
index ec819e9a115a..94c43034c297 100644
--- a/include/linux/mdev.h
+++ b/include/linux/mdev.h
@@ -37,6 +37,7 @@ struct mdev_device {
struct kref ref;
struct list_head next;
struct kobject *type_kobj;
+ struct notifier_block nb;
};
/**
@@ -85,6 +86,12 @@ struct mdev_device {
* @mmap: mmap callback
* @mdev: mediated device structure
* @vma: vma structure
+ * @notifer: Notifier callback, currently only for
+ * VFIO_IOMMU_NOTIFY_DMA_UNMAP action notified duing
+ * DMA_UNMAP call on mapped iova range.
+ * @mdev: mediated device structure
+ * @action: Action for which notifier is called
+ * @data: Data associated with the notifier
* Parent device that support mediated device should be registered with mdev
* module with parent_ops structure.
**/
@@ -106,6 +113,8 @@ struct parent_ops {
ssize_t (*ioctl)(struct mdev_device *mdev, unsigned int cmd,
unsigned long arg);
int (*mmap)(struct mdev_device *mdev, struct vm_area_struct *vma);
+ int (*notifier)(struct mdev_device *mdev, unsigned long action,
+ void *data);
};
/* interface for exporting mdev supported type attributes */
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2016-11-17 18:30 +0100 |
| Subject | Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev |
| Message-ID | <sEyFz-3CT-45@gated-at.bofh.it> |
| In reply to | #1523839 |
On 11/17/2016 8:57 PM, Alex Williamson wrote: > On Thu, 17 Nov 2016 20:35:38 +0800 > Jike Song <jike.song@intel.com> wrote: > >> On 11/17/2016 04:46 AM, Kirti Wankhede wrote: >>> Add a notifier calback to parent's ops structure of mdev device so that per >>> device notifer for vfio module is registered through vfio_mdev module. >>> >>> Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com> >>> Signed-off-by: Neo Jia <cjia@nvidia.com> >>> Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637 >>> --- >>> drivers/vfio/mdev/vfio_mdev.c | 34 +++++++++++++++++++++++++++++++++- >>> include/linux/mdev.h | 9 +++++++++ >>> 2 files changed, 42 insertions(+), 1 deletion(-) >>> >> >> Hi Alex, Kirti, >> >> Since everyone agreed we should let the vendor driver call vfio_register_notifier >> directly, can you drop this patch from merging? So that I don't need to send a >> reverse patch. > > This seems like a reasonable request to me, this patch drops cleanly > from the series. Any objection Kirti? It seems like it removes a > little bit of pre-release churn from the API. Thanks, > This is independent patch, I don't have any concern to drop this patch. Small nit: Since Documentation patch is later in series, its mentioned in the doc. One line need to be removed from vfio-mediated-device.txt. --- a/Documentation/vfio-mediated-device.txt +++ b/Documentation/vfio-mediated-device.txt @@ -150,7 +150,6 @@ The callbacks in the parent_ops structure are as follows: * read : read emulation callback * write: write emulation callback * mmap: mmap emulation callback -* notifier: notifier callback Thanks, Kirti
[toc] | [prev] | [next] | [standalone]
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2016-11-17 18:40 +0100 |
| Subject | Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev |
| Message-ID | <sEyPg-3IB-23@gated-at.bofh.it> |
| In reply to | #1524550 |
On Thu, 17 Nov 2016 21:30:26 +0530 Kirti Wankhede <kwankhede@nvidia.com> wrote: > On 11/17/2016 8:57 PM, Alex Williamson wrote: > > On Thu, 17 Nov 2016 20:35:38 +0800 > > Jike Song <jike.song@intel.com> wrote: > > > >> On 11/17/2016 04:46 AM, Kirti Wankhede wrote: > >>> Add a notifier calback to parent's ops structure of mdev device so that per > >>> device notifer for vfio module is registered through vfio_mdev module. > >>> > >>> Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com> > >>> Signed-off-by: Neo Jia <cjia@nvidia.com> > >>> Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637 > >>> --- > >>> drivers/vfio/mdev/vfio_mdev.c | 34 +++++++++++++++++++++++++++++++++- > >>> include/linux/mdev.h | 9 +++++++++ > >>> 2 files changed, 42 insertions(+), 1 deletion(-) > >>> > >> > >> Hi Alex, Kirti, > >> > >> Since everyone agreed we should let the vendor driver call vfio_register_notifier > >> directly, can you drop this patch from merging? So that I don't need to send a > >> reverse patch. > > > > This seems like a reasonable request to me, this patch drops cleanly > > from the series. Any objection Kirti? It seems like it removes a > > little bit of pre-release churn from the API. Thanks, > > > > This is independent patch, I don't have any concern to drop this patch. > > Small nit: Since Documentation patch is later in series, its mentioned > in the doc. One line need to be removed from vfio-mediated-device.txt. > > --- a/Documentation/vfio-mediated-device.txt > +++ b/Documentation/vfio-mediated-device.txt > @@ -150,7 +150,6 @@ The callbacks in the parent_ops structure are as > follows: > * read : read emulation callback > * write: write emulation callback > * mmap: mmap emulation callback > -* notifier: notifier callback Good catch, I'll remove this line. Thanks, Alex
[toc] | [prev] | [next] | [standalone]
| From | Jike Song <jike.song@intel.com> |
|---|---|
| Date | 2016-11-17 18:40 +0100 |
| Subject | Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev |
| Message-ID | <sEyFz-3CT-47@gated-at.bofh.it> |
| In reply to | #1523839 |
On 11/17/2016 04:46 AM, Kirti Wankhede wrote:
> Add a notifier calback to parent's ops structure of mdev device so that per
> device notifer for vfio module is registered through vfio_mdev module.
>
> Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
> Signed-off-by: Neo Jia <cjia@nvidia.com>
> Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637
> ---
> drivers/vfio/mdev/vfio_mdev.c | 34 +++++++++++++++++++++++++++++++++-
> include/linux/mdev.h | 9 +++++++++
> 2 files changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/vfio/mdev/vfio_mdev.c b/drivers/vfio/mdev/vfio_mdev.c
> index ffc36758cb84..2f8e06e5f95a 100644
> --- a/drivers/vfio/mdev/vfio_mdev.c
> +++ b/drivers/vfio/mdev/vfio_mdev.c
> @@ -24,6 +24,15 @@
> #define DRIVER_AUTHOR "NVIDIA Corporation"
> #define DRIVER_DESC "VFIO based driver for Mediated device"
>
> +static int vfio_mdev_notifier(struct notifier_block *nb, unsigned long action,
> + void *data)
> +{
> + struct mdev_device *mdev = container_of(nb, struct mdev_device, nb);
> + struct parent_device *parent = mdev->parent;
> +
> + return parent->ops->notifier(mdev, action, data);
> +}
> +
> static int vfio_mdev_open(void *device_data)
> {
> struct mdev_device *mdev = device_data;
> @@ -36,9 +45,27 @@ static int vfio_mdev_open(void *device_data)
> if (!try_module_get(THIS_MODULE))
> return -ENODEV;
>
> + if (likely(parent->ops->notifier)) {
> + mdev->nb.notifier_call = vfio_mdev_notifier;
> + ret = vfio_register_notifier(&mdev->dev, &mdev->nb);
> +
> + /*
> + * This should not fail if backend iommu module doesn't support
> + * register_notifier.
> + */
> + if (ret && (ret != -ENOTTY)) {
> + pr_err("Failed to register notifier for mdev\n");
> + module_put(THIS_MODULE);
> + return ret;
> + }
> + }
> +
> ret = parent->ops->open(mdev);
> - if (ret)
> + if (ret) {
> + if (likely(parent->ops->notifier))
> + vfio_unregister_notifier(&mdev->dev, &mdev->nb);
> module_put(THIS_MODULE);
> + }
>
> return ret;
> }
> @@ -51,6 +78,11 @@ static void vfio_mdev_release(void *device_data)
> if (likely(parent->ops->release))
> parent->ops->release(mdev);
>
> + if (likely(parent->ops->notifier)) {
> + if (vfio_unregister_notifier(&mdev->dev, &mdev->nb))
> + pr_err("Failed to unregister notifier for mdev\n");
> + }
> +
> module_put(THIS_MODULE);
> }
>
> diff --git a/include/linux/mdev.h b/include/linux/mdev.h
> index ec819e9a115a..94c43034c297 100644
> --- a/include/linux/mdev.h
> +++ b/include/linux/mdev.h
> @@ -37,6 +37,7 @@ struct mdev_device {
> struct kref ref;
> struct list_head next;
> struct kobject *type_kobj;
> + struct notifier_block nb;
> };
>
> /**
> @@ -85,6 +86,12 @@ struct mdev_device {
> * @mmap: mmap callback
> * @mdev: mediated device structure
> * @vma: vma structure
> + * @notifer: Notifier callback, currently only for
> + * VFIO_IOMMU_NOTIFY_DMA_UNMAP action notified duing
> + * DMA_UNMAP call on mapped iova range.
> + * @mdev: mediated device structure
> + * @action: Action for which notifier is called
> + * @data: Data associated with the notifier
> * Parent device that support mediated device should be registered with mdev
> * module with parent_ops structure.
> **/
> @@ -106,6 +113,8 @@ struct parent_ops {
> ssize_t (*ioctl)(struct mdev_device *mdev, unsigned int cmd,
> unsigned long arg);
> int (*mmap)(struct mdev_device *mdev, struct vm_area_struct *vma);
> + int (*notifier)(struct mdev_device *mdev, unsigned long action,
> + void *data);
> };
>
> /* interface for exporting mdev supported type attributes */
>
Hi Alex, Kirti,
Since everyone agreed we should let the vendor driver call vfio_register_notifier
directly, can you drop this patch from merging? So that I don't need to send a
reverse patch.
Thanks :)
--
Thanks,
Jike
[toc] | [prev] | [next] | [standalone]
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2016-11-17 19:00 +0100 |
| Subject | Re: [PATCH v14 12/22] vfio: Add notifier callback to parent's ops structure of mdev |
| Message-ID | <sEyFz-3CT-49@gated-at.bofh.it> |
| In reply to | #1524578 |
On Thu, 17 Nov 2016 20:35:38 +0800 Jike Song <jike.song@intel.com> wrote: > On 11/17/2016 04:46 AM, Kirti Wankhede wrote: > > Add a notifier calback to parent's ops structure of mdev device so that per > > device notifer for vfio module is registered through vfio_mdev module. > > > > Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com> > > Signed-off-by: Neo Jia <cjia@nvidia.com> > > Change-Id: Iafa6f1721aecdd6e50eb93b153b5621e6d29b637 > > --- > > drivers/vfio/mdev/vfio_mdev.c | 34 +++++++++++++++++++++++++++++++++- > > include/linux/mdev.h | 9 +++++++++ > > 2 files changed, 42 insertions(+), 1 deletion(-) > > > > Hi Alex, Kirti, > > Since everyone agreed we should let the vendor driver call vfio_register_notifier > directly, can you drop this patch from merging? So that I don't need to send a > reverse patch. This seems like a reasonable request to me, this patch drops cleanly from the series. Any objection Kirti? It seems like it removes a little bit of pre-release churn from the API. Thanks, Alex
[toc] | [prev] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2016-11-16 22:00 +0100 |
| Subject | [PATCH v14 04/22] vfio: Common function to increment container_users |
| Message-ID | <sEftg-7M4-31@gated-at.bofh.it> |
| In reply to | #1523824 |
This change rearrange functions to have common function to increment
container_users
Signed-off-by: Kirti Wankhede <kwankhede@nvidia.com>
Signed-off-by: Neo Jia <cjia@nvidia.com>
Reviewed-by: Jike Song <jike.song@intel.com>
Change-Id: I8bdeb352bc8439b107ffd519480fd4dc238677f2
---
drivers/vfio/vfio.c | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 23bc86c1d05d..2e83bdf007fe 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -1385,6 +1385,23 @@ static bool vfio_group_viable(struct vfio_group *group)
group, vfio_dev_viable) == 0);
}
+static int vfio_group_add_container_user(struct vfio_group *group)
+{
+ if (!atomic_inc_not_zero(&group->container_users))
+ return -EINVAL;
+
+ if (group->noiommu) {
+ atomic_dec(&group->container_users);
+ return -EPERM;
+ }
+ if (!group->container->iommu_driver || !vfio_group_viable(group)) {
+ atomic_dec(&group->container_users);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
static const struct file_operations vfio_device_fops;
static int vfio_group_get_device_fd(struct vfio_group *group, char *buf)
@@ -1694,23 +1711,14 @@ static const struct file_operations vfio_device_fops = {
struct vfio_group *vfio_group_get_external_user(struct file *filep)
{
struct vfio_group *group = filep->private_data;
+ int ret;
if (filep->f_op != &vfio_group_fops)
return ERR_PTR(-EINVAL);
- if (!atomic_inc_not_zero(&group->container_users))
- return ERR_PTR(-EINVAL);
-
- if (group->noiommu) {
- atomic_dec(&group->container_users);
- return ERR_PTR(-EPERM);
- }
-
- if (!group->container->iommu_driver ||
- !vfio_group_viable(group)) {
- atomic_dec(&group->container_users);
- return ERR_PTR(-EINVAL);
- }
+ ret = vfio_group_add_container_user(group);
+ if (ret)
+ return ERR_PTR(ret);
vfio_group_get(group);
--
2.7.0
[toc] | [prev] | [next] | [standalone]
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2016-11-17 22:30 +0100 |
| Message-ID | <sECpQ-67V-13@gated-at.bofh.it> |
| In reply to | #1523824 |
On Thu, 17 Nov 2016 02:16:12 +0530 Kirti Wankhede <kwankhede@nvidia.com> wrote: > > Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ > Documentation/vfio-mediated-device.txt | 399 +++++++ > MAINTAINERS | 9 + > drivers/vfio/Kconfig | 1 + > drivers/vfio/Makefile | 1 + > drivers/vfio/mdev/Kconfig | 17 + > drivers/vfio/mdev/Makefile | 5 + > drivers/vfio/mdev/mdev_core.c | 385 +++++++ > drivers/vfio/mdev/mdev_driver.c | 119 ++ > drivers/vfio/mdev/mdev_private.h | 41 + > drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ > drivers/vfio/mdev/vfio_mdev.c | 180 +++ > drivers/vfio/pci/vfio_pci.c | 83 +- > drivers/vfio/platform/vfio_platform_common.c | 31 +- > drivers/vfio/vfio.c | 340 +++++- > drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- > include/linux/mdev.h | 177 +++ > include/linux/vfio.h | 32 +- > include/uapi/linux/vfio.h | 10 + > samples/vfio-mdev/Makefile | 13 + > samples/vfio-mdev/mtty.c | 1503 +++++++++++++++++++++++++ > 21 files changed, 4358 insertions(+), 257 deletions(-) > create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev > create mode 100644 Documentation/vfio-mediated-device.txt > create mode 100644 drivers/vfio/mdev/Kconfig > create mode 100644 drivers/vfio/mdev/Makefile > create mode 100644 drivers/vfio/mdev/mdev_core.c > create mode 100644 drivers/vfio/mdev/mdev_driver.c > create mode 100644 drivers/vfio/mdev/mdev_private.h > create mode 100644 drivers/vfio/mdev/mdev_sysfs.c > create mode 100644 drivers/vfio/mdev/vfio_mdev.c > create mode 100644 include/linux/mdev.h > create mode 100644 samples/vfio-mdev/Makefile > create mode 100644 samples/vfio-mdev/mtty.c As discussed, I dropped patch 12, updated the documentation, and added 'retries' initialization. This is now applied to my next branch for v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! Thanks, Alex
[toc] | [prev] | [next] | [standalone]
| From | Neo Jia <cjia@nvidia.com> |
|---|---|
| Date | 2016-11-17 23:20 +0100 |
| Message-ID | <sEDce-6KN-25@gated-at.bofh.it> |
| In reply to | #1524820 |
On Thu, Nov 17, 2016 at 02:25:15PM -0700, Alex Williamson wrote: > On Thu, 17 Nov 2016 02:16:12 +0530 > Kirti Wankhede <kwankhede@nvidia.com> wrote: > > > > Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ > > Documentation/vfio-mediated-device.txt | 399 +++++++ > > MAINTAINERS | 9 + > > drivers/vfio/Kconfig | 1 + > > drivers/vfio/Makefile | 1 + > > drivers/vfio/mdev/Kconfig | 17 + > > drivers/vfio/mdev/Makefile | 5 + > > drivers/vfio/mdev/mdev_core.c | 385 +++++++ > > drivers/vfio/mdev/mdev_driver.c | 119 ++ > > drivers/vfio/mdev/mdev_private.h | 41 + > > drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ > > drivers/vfio/mdev/vfio_mdev.c | 180 +++ > > drivers/vfio/pci/vfio_pci.c | 83 +- > > drivers/vfio/platform/vfio_platform_common.c | 31 +- > > drivers/vfio/vfio.c | 340 +++++- > > drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- > > include/linux/mdev.h | 177 +++ > > include/linux/vfio.h | 32 +- > > include/uapi/linux/vfio.h | 10 + > > samples/vfio-mdev/Makefile | 13 + > > samples/vfio-mdev/mtty.c | 1503 +++++++++++++++++++++++++ > > 21 files changed, 4358 insertions(+), 257 deletions(-) > > create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev > > create mode 100644 Documentation/vfio-mediated-device.txt > > create mode 100644 drivers/vfio/mdev/Kconfig > > create mode 100644 drivers/vfio/mdev/Makefile > > create mode 100644 drivers/vfio/mdev/mdev_core.c > > create mode 100644 drivers/vfio/mdev/mdev_driver.c > > create mode 100644 drivers/vfio/mdev/mdev_private.h > > create mode 100644 drivers/vfio/mdev/mdev_sysfs.c > > create mode 100644 drivers/vfio/mdev/vfio_mdev.c > > create mode 100644 include/linux/mdev.h > > create mode 100644 samples/vfio-mdev/Makefile > > create mode 100644 samples/vfio-mdev/mtty.c > > As discussed, I dropped patch 12, updated the documentation, and added > 'retries' initialization. This is now applied to my next branch for > v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! Really appreciate your help and reviews to allow us reach here, and thanks to various reviewers for their comments and suggestions! Thanks, Neo > Thanks, > > Alex
[toc] | [prev] | [next] | [standalone]
| From | Kirti Wankhede <kwankhede@nvidia.com> |
|---|---|
| Date | 2016-11-18 03:10 +0100 |
| Message-ID | <sEGMN-Dc-7@gated-at.bofh.it> |
| In reply to | #1524850 |
On 11/18/2016 3:35 AM, Neo Jia wrote: > On Thu, Nov 17, 2016 at 02:25:15PM -0700, Alex Williamson wrote: >> On Thu, 17 Nov 2016 02:16:12 +0530 >> Kirti Wankhede <kwankhede@nvidia.com> wrote: >>> >>> Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ >>> Documentation/vfio-mediated-device.txt | 399 +++++++ >>> MAINTAINERS | 9 + >>> drivers/vfio/Kconfig | 1 + >>> drivers/vfio/Makefile | 1 + >>> drivers/vfio/mdev/Kconfig | 17 + >>> drivers/vfio/mdev/Makefile | 5 + >>> drivers/vfio/mdev/mdev_core.c | 385 +++++++ >>> drivers/vfio/mdev/mdev_driver.c | 119 ++ >>> drivers/vfio/mdev/mdev_private.h | 41 + >>> drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ >>> drivers/vfio/mdev/vfio_mdev.c | 180 +++ >>> drivers/vfio/pci/vfio_pci.c | 83 +- >>> drivers/vfio/platform/vfio_platform_common.c | 31 +- >>> drivers/vfio/vfio.c | 340 +++++- >>> drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- >>> include/linux/mdev.h | 177 +++ >>> include/linux/vfio.h | 32 +- >>> include/uapi/linux/vfio.h | 10 + >>> samples/vfio-mdev/Makefile | 13 + >>> samples/vfio-mdev/mtty.c | 1503 +++++++++++++++++++++++++ >>> 21 files changed, 4358 insertions(+), 257 deletions(-) >>> create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev >>> create mode 100644 Documentation/vfio-mediated-device.txt >>> create mode 100644 drivers/vfio/mdev/Kconfig >>> create mode 100644 drivers/vfio/mdev/Makefile >>> create mode 100644 drivers/vfio/mdev/mdev_core.c >>> create mode 100644 drivers/vfio/mdev/mdev_driver.c >>> create mode 100644 drivers/vfio/mdev/mdev_private.h >>> create mode 100644 drivers/vfio/mdev/mdev_sysfs.c >>> create mode 100644 drivers/vfio/mdev/vfio_mdev.c >>> create mode 100644 include/linux/mdev.h >>> create mode 100644 samples/vfio-mdev/Makefile >>> create mode 100644 samples/vfio-mdev/mtty.c >> >> As discussed, I dropped patch 12, updated the documentation, and added >> 'retries' initialization. This is now applied to my next branch for >> v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! > > Really appreciate your help and reviews to allow us reach here, and thanks to > various reviewers for their comments and suggestions! > Thanks for your constant guidance and reviews. Thanks to all reviewers for reviews and suggestions. Thanks, Kirti
[toc] | [prev] | [next] | [standalone]
| From | Jike Song <jike.song@intel.com> |
|---|---|
| Date | 2016-11-18 03:30 +0100 |
| Subject | Re: [Qemu-devel] [PATCH v14 00/22] Add Mediated device support |
| Message-ID | <sEH6a-RN-9@gated-at.bofh.it> |
| In reply to | #1524969 |
On 11/18/2016 10:00 AM, Kirti Wankhede wrote: > On 11/18/2016 3:35 AM, Neo Jia wrote: >> On Thu, Nov 17, 2016 at 02:25:15PM -0700, Alex Williamson wrote: >>> On Thu, 17 Nov 2016 02:16:12 +0530 >>> Kirti Wankhede <kwankhede@nvidia.com> wrote: >>>> >>>> Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ >>>> Documentation/vfio-mediated-device.txt | 399 +++++++ >>>> MAINTAINERS | 9 + >>>> drivers/vfio/Kconfig | 1 + >>>> drivers/vfio/Makefile | 1 + >>>> drivers/vfio/mdev/Kconfig | 17 + >>>> drivers/vfio/mdev/Makefile | 5 + >>>> drivers/vfio/mdev/mdev_core.c | 385 +++++++ >>>> drivers/vfio/mdev/mdev_driver.c | 119 ++ >>>> drivers/vfio/mdev/mdev_private.h | 41 + >>>> drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ >>>> drivers/vfio/mdev/vfio_mdev.c | 180 +++ >>>> drivers/vfio/pci/vfio_pci.c | 83 +- >>>> drivers/vfio/platform/vfio_platform_common.c | 31 +- >>>> drivers/vfio/vfio.c | 340 +++++- >>>> drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- >>>> include/linux/mdev.h | 177 +++ >>>> include/linux/vfio.h | 32 +- >>>> include/uapi/linux/vfio.h | 10 + >>>> samples/vfio-mdev/Makefile | 13 + >>>> samples/vfio-mdev/mtty.c | 1503 +++++++++++++++++++++++++ >>>> 21 files changed, 4358 insertions(+), 257 deletions(-) >>>> create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev >>>> create mode 100644 Documentation/vfio-mediated-device.txt >>>> create mode 100644 drivers/vfio/mdev/Kconfig >>>> create mode 100644 drivers/vfio/mdev/Makefile >>>> create mode 100644 drivers/vfio/mdev/mdev_core.c >>>> create mode 100644 drivers/vfio/mdev/mdev_driver.c >>>> create mode 100644 drivers/vfio/mdev/mdev_private.h >>>> create mode 100644 drivers/vfio/mdev/mdev_sysfs.c >>>> create mode 100644 drivers/vfio/mdev/vfio_mdev.c >>>> create mode 100644 include/linux/mdev.h >>>> create mode 100644 samples/vfio-mdev/Makefile >>>> create mode 100644 samples/vfio-mdev/mtty.c >>> >>> As discussed, I dropped patch 12, updated the documentation, and added >>> 'retries' initialization. This is now applied to my next branch for >>> v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! >> >> Really appreciate your help and reviews to allow us reach here, and thanks to >> various reviewers for their comments and suggestions! >> > > Thanks for your constant guidance and reviews. > Thanks to all reviewers for reviews and suggestions. Echo Alex: thanks for your great work, congrats! :-) -- Thanks, Jike
[toc] | [prev] | [next] | [standalone]
| From | "Tian, Kevin" <kevin.tian@intel.com> |
|---|---|
| Date | 2016-11-18 00:30 +0100 |
| Message-ID | <sEEhX-7on-1@gated-at.bofh.it> |
| In reply to | #1524820 |
> From: Alex Williamson [mailto:alex.williamson@redhat.com] > Sent: Friday, November 18, 2016 5:25 AM > > On Thu, 17 Nov 2016 02:16:12 +0530 > Kirti Wankhede <kwankhede@nvidia.com> wrote: > > > > Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ > > Documentation/vfio-mediated-device.txt | 399 +++++++ > > MAINTAINERS | 9 + > > drivers/vfio/Kconfig | 1 + > > drivers/vfio/Makefile | 1 + > > drivers/vfio/mdev/Kconfig | 17 + > > drivers/vfio/mdev/Makefile | 5 + > > drivers/vfio/mdev/mdev_core.c | 385 +++++++ > > drivers/vfio/mdev/mdev_driver.c | 119 ++ > > drivers/vfio/mdev/mdev_private.h | 41 + > > drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ > > drivers/vfio/mdev/vfio_mdev.c | 180 +++ > > drivers/vfio/pci/vfio_pci.c | 83 +- > > drivers/vfio/platform/vfio_platform_common.c | 31 +- > > drivers/vfio/vfio.c | 340 +++++- > > drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- > > include/linux/mdev.h | 177 +++ > > include/linux/vfio.h | 32 +- > > include/uapi/linux/vfio.h | 10 + > > samples/vfio-mdev/Makefile | 13 + > > samples/vfio-mdev/mtty.c | 1503 > +++++++++++++++++++++++++ > > 21 files changed, 4358 insertions(+), 257 deletions(-) > > create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev > > create mode 100644 Documentation/vfio-mediated-device.txt > > create mode 100644 drivers/vfio/mdev/Kconfig > > create mode 100644 drivers/vfio/mdev/Makefile > > create mode 100644 drivers/vfio/mdev/mdev_core.c > > create mode 100644 drivers/vfio/mdev/mdev_driver.c > > create mode 100644 drivers/vfio/mdev/mdev_private.h > > create mode 100644 drivers/vfio/mdev/mdev_sysfs.c > > create mode 100644 drivers/vfio/mdev/vfio_mdev.c > > create mode 100644 include/linux/mdev.h > > create mode 100644 samples/vfio-mdev/Makefile > > create mode 100644 samples/vfio-mdev/mtty.c > > As discussed, I dropped patch 12, updated the documentation, and added > 'retries' initialization. This is now applied to my next branch for > v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! > Thanks, > That's a great news! Alex, do you have an idea when this series may hit linux-next? :-) Thanks Kevin
[toc] | [prev] | [next] | [standalone]
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2016-11-18 01:00 +0100 |
| Message-ID | <sEEKZ-7yT-1@gated-at.bofh.it> |
| In reply to | #1524876 |
On Thu, 17 Nov 2016 23:29:38 +0000 "Tian, Kevin" <kevin.tian@intel.com> wrote: > > From: Alex Williamson [mailto:alex.williamson@redhat.com] > > Sent: Friday, November 18, 2016 5:25 AM > > > > On Thu, 17 Nov 2016 02:16:12 +0530 > > Kirti Wankhede <kwankhede@nvidia.com> wrote: > > > > > > Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ > > > Documentation/vfio-mediated-device.txt | 399 +++++++ > > > MAINTAINERS | 9 + > > > drivers/vfio/Kconfig | 1 + > > > drivers/vfio/Makefile | 1 + > > > drivers/vfio/mdev/Kconfig | 17 + > > > drivers/vfio/mdev/Makefile | 5 + > > > drivers/vfio/mdev/mdev_core.c | 385 +++++++ > > > drivers/vfio/mdev/mdev_driver.c | 119 ++ > > > drivers/vfio/mdev/mdev_private.h | 41 + > > > drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ > > > drivers/vfio/mdev/vfio_mdev.c | 180 +++ > > > drivers/vfio/pci/vfio_pci.c | 83 +- > > > drivers/vfio/platform/vfio_platform_common.c | 31 +- > > > drivers/vfio/vfio.c | 340 +++++- > > > drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- > > > include/linux/mdev.h | 177 +++ > > > include/linux/vfio.h | 32 +- > > > include/uapi/linux/vfio.h | 10 + > > > samples/vfio-mdev/Makefile | 13 + > > > samples/vfio-mdev/mtty.c | 1503 > > +++++++++++++++++++++++++ > > > 21 files changed, 4358 insertions(+), 257 deletions(-) > > > create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev > > > create mode 100644 Documentation/vfio-mediated-device.txt > > > create mode 100644 drivers/vfio/mdev/Kconfig > > > create mode 100644 drivers/vfio/mdev/Makefile > > > create mode 100644 drivers/vfio/mdev/mdev_core.c > > > create mode 100644 drivers/vfio/mdev/mdev_driver.c > > > create mode 100644 drivers/vfio/mdev/mdev_private.h > > > create mode 100644 drivers/vfio/mdev/mdev_sysfs.c > > > create mode 100644 drivers/vfio/mdev/vfio_mdev.c > > > create mode 100644 include/linux/mdev.h > > > create mode 100644 samples/vfio-mdev/Makefile > > > create mode 100644 samples/vfio-mdev/mtty.c > > > > As discussed, I dropped patch 12, updated the documentation, and added > > 'retries' initialization. This is now applied to my next branch for > > v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! > > Thanks, > > > > That's a great news! Alex, do you have an idea when this series may > hit linux-next? :-) Whenever there's a new build, hopefully within the next 24hrs, but I don't really know the schedule. Thanks, Alex
[toc] | [prev] | [next] | [standalone]
| From | Zhenyu Wang <zhenyuw@linux.intel.com> |
|---|---|
| Date | 2016-11-18 10:30 +0100 |
| Message-ID | <sENEC-5bP-23@gated-at.bofh.it> |
| In reply to | #1524897 |
[Multipart message — attachments visible in raw view] — view raw
On 2016.11.17 16:51:45 -0700, Alex Williamson wrote: > On Thu, 17 Nov 2016 23:29:38 +0000 > "Tian, Kevin" <kevin.tian@intel.com> wrote: > > > > From: Alex Williamson [mailto:alex.williamson@redhat.com] > > > Sent: Friday, November 18, 2016 5:25 AM > > > > > > On Thu, 17 Nov 2016 02:16:12 +0530 > > > Kirti Wankhede <kwankhede@nvidia.com> wrote: > > > > > > > > Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ > > > > Documentation/vfio-mediated-device.txt | 399 +++++++ > > > > MAINTAINERS | 9 + > > > > drivers/vfio/Kconfig | 1 + > > > > drivers/vfio/Makefile | 1 + > > > > drivers/vfio/mdev/Kconfig | 17 + > > > > drivers/vfio/mdev/Makefile | 5 + > > > > drivers/vfio/mdev/mdev_core.c | 385 +++++++ > > > > drivers/vfio/mdev/mdev_driver.c | 119 ++ > > > > drivers/vfio/mdev/mdev_private.h | 41 + > > > > drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ > > > > drivers/vfio/mdev/vfio_mdev.c | 180 +++ > > > > drivers/vfio/pci/vfio_pci.c | 83 +- > > > > drivers/vfio/platform/vfio_platform_common.c | 31 +- > > > > drivers/vfio/vfio.c | 340 +++++- > > > > drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- > > > > include/linux/mdev.h | 177 +++ > > > > include/linux/vfio.h | 32 +- > > > > include/uapi/linux/vfio.h | 10 + > > > > samples/vfio-mdev/Makefile | 13 + > > > > samples/vfio-mdev/mtty.c | 1503 > > > +++++++++++++++++++++++++ > > > > 21 files changed, 4358 insertions(+), 257 deletions(-) > > > > create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev > > > > create mode 100644 Documentation/vfio-mediated-device.txt > > > > create mode 100644 drivers/vfio/mdev/Kconfig > > > > create mode 100644 drivers/vfio/mdev/Makefile > > > > create mode 100644 drivers/vfio/mdev/mdev_core.c > > > > create mode 100644 drivers/vfio/mdev/mdev_driver.c > > > > create mode 100644 drivers/vfio/mdev/mdev_private.h > > > > create mode 100644 drivers/vfio/mdev/mdev_sysfs.c > > > > create mode 100644 drivers/vfio/mdev/vfio_mdev.c > > > > create mode 100644 include/linux/mdev.h > > > > create mode 100644 samples/vfio-mdev/Makefile > > > > create mode 100644 samples/vfio-mdev/mtty.c > > > > > > As discussed, I dropped patch 12, updated the documentation, and added > > > 'retries' initialization. This is now applied to my next branch for > > > v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! > > > Thanks, > > > > > > > That's a great news! Alex, do you have an idea when this series may > > hit linux-next? :-) > > Whenever there's a new build, hopefully within the next 24hrs, but I > don't really know the schedule. Thanks, > Alex, could you do a pull request of mdev for Daniel's drm-intel tree? We need to send KVMGT mdev support pull base on that. Thanks! -- Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
[toc] | [prev] | [next] | [standalone]
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2016-11-18 16:50 +0100 |
| Message-ID | <sETAm-xQ-5@gated-at.bofh.it> |
| In reply to | #1525122 |
On Fri, 18 Nov 2016 17:16:32 +0800 Zhenyu Wang <zhenyuw@linux.intel.com> wrote: > On 2016.11.17 16:51:45 -0700, Alex Williamson wrote: > > On Thu, 17 Nov 2016 23:29:38 +0000 > > "Tian, Kevin" <kevin.tian@intel.com> wrote: > > > > > > From: Alex Williamson [mailto:alex.williamson@redhat.com] > > > > Sent: Friday, November 18, 2016 5:25 AM > > > > > > > > On Thu, 17 Nov 2016 02:16:12 +0530 > > > > Kirti Wankhede <kwankhede@nvidia.com> wrote: > > > > > > > > > > Documentation/ABI/testing/sysfs-bus-vfio-mdev | 111 ++ > > > > > Documentation/vfio-mediated-device.txt | 399 +++++++ > > > > > MAINTAINERS | 9 + > > > > > drivers/vfio/Kconfig | 1 + > > > > > drivers/vfio/Makefile | 1 + > > > > > drivers/vfio/mdev/Kconfig | 17 + > > > > > drivers/vfio/mdev/Makefile | 5 + > > > > > drivers/vfio/mdev/mdev_core.c | 385 +++++++ > > > > > drivers/vfio/mdev/mdev_driver.c | 119 ++ > > > > > drivers/vfio/mdev/mdev_private.h | 41 + > > > > > drivers/vfio/mdev/mdev_sysfs.c | 286 +++++ > > > > > drivers/vfio/mdev/vfio_mdev.c | 180 +++ > > > > > drivers/vfio/pci/vfio_pci.c | 83 +- > > > > > drivers/vfio/platform/vfio_platform_common.c | 31 +- > > > > > drivers/vfio/vfio.c | 340 +++++- > > > > > drivers/vfio/vfio_iommu_type1.c | 872 +++++++++++--- > > > > > include/linux/mdev.h | 177 +++ > > > > > include/linux/vfio.h | 32 +- > > > > > include/uapi/linux/vfio.h | 10 + > > > > > samples/vfio-mdev/Makefile | 13 + > > > > > samples/vfio-mdev/mtty.c | 1503 > > > > +++++++++++++++++++++++++ > > > > > 21 files changed, 4358 insertions(+), 257 deletions(-) > > > > > create mode 100644 Documentation/ABI/testing/sysfs-bus-vfio-mdev > > > > > create mode 100644 Documentation/vfio-mediated-device.txt > > > > > create mode 100644 drivers/vfio/mdev/Kconfig > > > > > create mode 100644 drivers/vfio/mdev/Makefile > > > > > create mode 100644 drivers/vfio/mdev/mdev_core.c > > > > > create mode 100644 drivers/vfio/mdev/mdev_driver.c > > > > > create mode 100644 drivers/vfio/mdev/mdev_private.h > > > > > create mode 100644 drivers/vfio/mdev/mdev_sysfs.c > > > > > create mode 100644 drivers/vfio/mdev/vfio_mdev.c > > > > > create mode 100644 include/linux/mdev.h > > > > > create mode 100644 samples/vfio-mdev/Makefile > > > > > create mode 100644 samples/vfio-mdev/mtty.c > > > > > > > > As discussed, I dropped patch 12, updated the documentation, and added > > > > 'retries' initialization. This is now applied to my next branch for > > > > v4.10. Thanks to the reviewers and Kirti and Neo for your hard work! > > > > Thanks, > > > > > > > > > > That's a great news! Alex, do you have an idea when this series may > > > hit linux-next? :-) > > > > Whenever there's a new build, hopefully within the next 24hrs, but I > > don't really know the schedule. Thanks, > > > > Alex, could you do a pull request of mdev for Daniel's drm-intel tree? > We need to send KVMGT mdev support pull base on that. No, this is not how I intend or prefer to merge this. This is a large change for vfio and it is not exclusive to KVMGT. We have linux-next to facilitate handling dependencies between subsystems during development and a two week merge window to allow managing how these changes enter the mainline tree. If I were to have this pulled into drm-intel it ties my hands as to how I can manage changes within my functional area. I want these two weeks of linux-next exposure for vetting the changes and resolving any remaining issues. I'm not going to compromise my ability to react to such issues. linux-next inclusion should be sufficient for you to coordinate through the drm tree, though Daniel will need to be made aware of the dependency. I will however plan to send my pull request to Linus early in the merge window to accommodate dependent changes also being included for v4.10. Hope you understand, thanks, Alex
[toc] | [prev] | [next] | [standalone]
| From | Daniel Vetter <daniel@ffwll.ch> |
|---|---|
| Date | 2016-11-18 17:20 +0100 |
| Message-ID | <sEU3o-113-39@gated-at.bofh.it> |
| In reply to | #1525471 |
On Fri, Nov 18, 2016 at 4:40 PM, Alex Williamson <alex.williamson@redhat.com> wrote: >> Alex, could you do a pull request of mdev for Daniel's drm-intel tree? >> We need to send KVMGT mdev support pull base on that. > > No, this is not how I intend or prefer to merge this. This is a large > change for vfio and it is not exclusive to KVMGT. We have linux-next > to facilitate handling dependencies between subsystems during > development and a two week merge window to allow managing how these > changes enter the mainline tree. If I were to have this pulled into > drm-intel it ties my hands as to how I can manage changes within my > functional area. I want these two weeks of linux-next exposure for > vetting the changes and resolving any remaining issues. I'm not going > to compromise my ability to react to such issues. linux-next inclusion > should be sufficient for you to coordinate through the drm tree, though > Daniel will need to be made aware of the dependency. I will however > plan to send my pull request to Linus early in the merge window to > accommodate dependent changes also being included for v4.10. Hope > you understand, thanks, My understanding was that the mdev changes are needed to be able to apply the kvmgt stuff, and otherwise it won't build. For that I need a stable git tag&pull request (can be specific topic branch, which means subsystems can land in any order, or the full subsystem tree, which means depencies need to be tracked correctly). I am not going to resolve that in the merge window, since in drm we want everything lined up _before_ that opens (the feature cutoff is this w/e, but there's some wiggle room ofc). Sounds like there's just not enough time to line all the things up in time for 4.10, and the i915/kmvgt stuff needs to be postponed to 4.11. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
[toc] | [prev] | [next] | [standalone]
| From | Alex Williamson <alex.williamson@redhat.com> |
|---|---|
| Date | 2016-11-18 18:00 +0100 |
| Message-ID | <sEUG6-1ff-23@gated-at.bofh.it> |
| In reply to | #1525489 |
On Fri, 18 Nov 2016 17:09:59 +0100 Daniel Vetter <daniel@ffwll.ch> wrote: > On Fri, Nov 18, 2016 at 4:40 PM, Alex Williamson > <alex.williamson@redhat.com> wrote: > >> Alex, could you do a pull request of mdev for Daniel's drm-intel tree? > >> We need to send KVMGT mdev support pull base on that. > > > > No, this is not how I intend or prefer to merge this. This is a large > > change for vfio and it is not exclusive to KVMGT. We have linux-next > > to facilitate handling dependencies between subsystems during > > development and a two week merge window to allow managing how these > > changes enter the mainline tree. If I were to have this pulled into > > drm-intel it ties my hands as to how I can manage changes within my > > functional area. I want these two weeks of linux-next exposure for > > vetting the changes and resolving any remaining issues. I'm not going > > to compromise my ability to react to such issues. linux-next inclusion > > should be sufficient for you to coordinate through the drm tree, though > > Daniel will need to be made aware of the dependency. I will however > > plan to send my pull request to Linus early in the merge window to > > accommodate dependent changes also being included for v4.10. Hope > > you understand, thanks, > > My understanding was that the mdev changes are needed to be able to > apply the kvmgt stuff, and otherwise it won't build. For that I need a > stable git tag&pull request (can be specific topic branch, which means > subsystems can land in any order, or the full subsystem tree, which > means depencies need to be tracked correctly). I am not going to > resolve that in the merge window, since in drm we want everything > lined up _before_ that opens (the feature cutoff is this w/e, but > there's some wiggle room ofc). > > Sounds like there's just not enough time to line all the things up in > time for 4.10, and the i915/kmvgt stuff needs to be postponed to 4.11. My only alternate suggestion is that perhaps the KVMGT code can be sufficiently partitioned off with #ifdefs that could be removed later, allowing mdev and KVMGT to be merged independently. We have only just added mdev to linux-next, my intention is that the next two weeks are for finding and correcting issues. There are still outstanding API changes, specifically for KVMGT being proposed by Intel included with that. Thanks, Alex
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | linux.kernel
csiph-web