This patchset is based on NVidia's "Add Mediated device support" series, version 6: http://www.spinics.net/lists/kvm/msg136472.html Background: The patchset from NVidia introduced the Mediated Device support to Linux/VFIO. With that series, one can create virtual devices (supporting by underlying physical device and vendor driver), and assign them to userspace like QEMU/KVM, in the same way as device assignment via VFIO. Based on that, NVidia and Intel implemented their vGPU solutions, IBM implemented its CCW pass-through. However, there are limitations imposed by current (v6 in particular) mdev framework: the mdev must be represented as a PCI device, several vfio capabilities such as sparse mmap are not possible, and so forth. This series aims to address above limitations and simplify the implementation. Key Changes: - An independent "struct device" was introduced to parent_device, thus a hierarchy in driver core is formed with physical device, parent device and mdev device; - Leveraging the mechanism and APIs provided by Linux driver core, it is now safe to remove all refcnts and locks; - vfio_mpci (later renamed to vfio_mdev) was made BUS-agnostic: all PCI-specific logic was removed, accesses from userspace are now passed to vendor driver directly, thus guaranteed that full VFIO capabilities provided: e.g. dynamic regions, sparse mmap, etc.; With vfio_mdev being BUS-agnostic, it is enough to have only one driver for all mdev devices; - UUID was removed from the interface between mdev and vendor driver; TODO remove mdev stuff from vfio.h update doc Jike Song (3): mdev: remove uuid from parent_ops vfio_mpci: remove PCI-specific logic rename 'vfio_mpci' to 'vfio_mdev' since it is now BUS-agnostic Xiao Guangrong (2): mdev: create separate device for parent_device mdev: drop management information and utilize driver-core instead drivers/vfio/mdev/Kconfig | 10 +- drivers/vfio/mdev/Makefile | 5 +- drivers/vfio/mdev/mdev_core.c | 483 +++++--------------------------- drivers/vfio/mdev/mdev_private.h | 9 +- drivers/vfio/mdev/mdev_sysfs.c | 82 ++---- drivers/vfio/mdev/vfio_mdev.c | 168 +++++++++++ drivers/vfio/mdev/vfio_mpci.c | 536 ------------------------------------ drivers/vfio/pci/vfio_pci_private.h | 6 + include/linux/mdev.h | 87 ++---- include/linux/vfio.h | 7 - 10 files changed, 302 insertions(+), 1091 deletions(-) create mode 100644 drivers/vfio/mdev/vfio_mdev.c delete mode 100644 drivers/vfio/mdev/vfio_mpci.c -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html