Skip to content

Commit edc5f44

Browse files
committed
Merge tag 'vfio-v4.10-rc1' of git://github.com/awilliam/linux-vfio
Pull VFIO updates from Alex Williamson: - VFIO updates for v4.10 primarily include a new Mediated Device interface, which essentially allows software defined devices to be exposed to users through VFIO. The host vendor driver providing this virtual device polices, or mediates user access to the device. These devices often incorporate portions of real devices, for instance the primary initial users of this interface expose vGPUs which allow the user to map mediated devices, or mdevs, to a portion of a physical GPU. QEMU composes these mdevs into PCI representations using the existing VFIO user API. This enables both Intel KVM-GT support, which is also expected to arrive into Linux mainline during the v4.10 merge window, as well as NVIDIA vGPU, and also Channel I/O devices (aka CCW devices) for s390 virtualization support. (Kirti Wankhede, Neo Jia) - Drop unnecessary uses of pcibios_err_to_errno() (Cao Jin) - Fixes to VFIO capability chain handling (Eric Auger) - Error handling fixes for fallout from mdev (Christophe JAILLET) - Notifiers to expose struct kvm to mdev vendor drivers (Jike Song) - type1 IOMMU model search fixes (Kirti Wankhede, Neo Jia) * tag 'vfio-v4.10-rc1' of git://github.com/awilliam/linux-vfio: (30 commits) vfio iommu type1: Fix size argument to vfio_find_dma() in pin_pages/unpin_pages vfio iommu type1: Fix size argument to vfio_find_dma() during DMA UNMAP. vfio iommu type1: WARN_ON if notifier block is not unregistered kvm: set/clear kvm to/from vfio_group when group add/delete vfio: support notifier chain in vfio_group vfio: vfio_register_notifier: classify iommu notifier vfio: Fix handling of error returned by 'vfio_group_get_from_dev()' vfio: fix vfio_info_cap_add/shift vfio/pci: Drop unnecessary pcibios_err_to_errno() MAINTAINERS: Add entry VFIO based Mediated device drivers docs: Sample driver to demonstrate how to use Mediated device framework. docs: Sysfs ABI for mediated device framework docs: Add Documentation for Mediated devices vfio: Define device_api strings vfio_platform: Updated to use vfio_set_irqs_validate_and_prepare() vfio_pci: Updated to use vfio_set_irqs_validate_and_prepare() vfio: Introduce vfio_set_irqs_validate_and_prepare() vfio_pci: Update vfio_pci to use vfio_info_add_capability() vfio: Introduce common function to add capabilities vfio iommu: Add blocking notifier to notify DMA_UNMAP ...
2 parents 22d8262 + 2b8bb1d commit edc5f44

File tree

23 files changed

+4486
-265
lines changed

23 files changed

+4486
-265
lines changed
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
What: /sys/.../<device>/mdev_supported_types/
2+
Date: October 2016
3+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
4+
Description:
5+
This directory contains list of directories of currently
6+
supported mediated device types and their details for
7+
<device>. Supported type attributes are defined by the
8+
vendor driver who registers with Mediated device framework.
9+
Each supported type is a directory whose name is created
10+
by adding the device driver string as a prefix to the
11+
string provided by the vendor driver.
12+
13+
What: /sys/.../<device>/mdev_supported_types/<type-id>/
14+
Date: October 2016
15+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
16+
Description:
17+
This directory gives details of supported type, like name,
18+
description, available_instances, device_api etc.
19+
'device_api' and 'available_instances' are mandatory
20+
attributes to be provided by vendor driver. 'name',
21+
'description' and other vendor driver specific attributes
22+
are optional.
23+
24+
What: /sys/.../mdev_supported_types/<type-id>/create
25+
Date: October 2016
26+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
27+
Description:
28+
Writing UUID to this file will create mediated device of
29+
type <type-id> for parent device <device>. This is a
30+
write-only file.
31+
For example:
32+
# echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > \
33+
/sys/devices/foo/mdev_supported_types/foo-1/create
34+
35+
What: /sys/.../mdev_supported_types/<type-id>/devices/
36+
Date: October 2016
37+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
38+
Description:
39+
This directory contains symbolic links pointing to mdev
40+
devices sysfs entries which are created of this <type-id>.
41+
42+
What: /sys/.../mdev_supported_types/<type-id>/available_instances
43+
Date: October 2016
44+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
45+
Description:
46+
Reading this attribute will show the number of mediated
47+
devices of type <type-id> that can be created. This is a
48+
readonly file.
49+
Users:
50+
Userspace applications interested in creating mediated
51+
device of that type. Userspace application should check
52+
the number of available instances could be created before
53+
creating mediated device of this type.
54+
55+
What: /sys/.../mdev_supported_types/<type-id>/device_api
56+
Date: October 2016
57+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
58+
Description:
59+
Reading this attribute will show VFIO device API supported
60+
by this type. For example, "vfio-pci" for a PCI device,
61+
"vfio-platform" for platform device.
62+
63+
What: /sys/.../mdev_supported_types/<type-id>/name
64+
Date: October 2016
65+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
66+
Description:
67+
Reading this attribute will show human readable name of the
68+
mediated device that will get created of type <type-id>.
69+
This is optional attribute. For example: "Grid M60-0Q"
70+
Users:
71+
Userspace applications interested in knowing the name of
72+
a particular <type-id> that can help in understanding the
73+
type of mediated device.
74+
75+
What: /sys/.../mdev_supported_types/<type-id>/description
76+
Date: October 2016
77+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
78+
Description:
79+
Reading this attribute will show description of the type of
80+
mediated device that will get created of type <type-id>.
81+
This is optional attribute. For example:
82+
"2 heads, 512M FB, 2560x1600 maximum resolution"
83+
Users:
84+
Userspace applications interested in knowing the details of
85+
a particular <type-id> that can help in understanding the
86+
features provided by that type of mediated device.
87+
88+
What: /sys/.../<device>/<UUID>/
89+
Date: October 2016
90+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
91+
Description:
92+
This directory represents device directory of mediated
93+
device. It contains all the attributes related to mediated
94+
device.
95+
96+
What: /sys/.../<device>/<UUID>/mdev_type
97+
Date: October 2016
98+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
99+
Description:
100+
This is symbolic link pointing to supported type, <type-id>
101+
directory of which this mediated device is created.
102+
103+
What: /sys/.../<device>/<UUID>/remove
104+
Date: October 2016
105+
Contact: Kirti Wankhede <kwankhede@nvidia.com>
106+
Description:
107+
Writing '1' to this file destroys the mediated device. The
108+
vendor driver can fail the remove() callback if that device
109+
is active and the vendor driver doesn't support hot unplug.
110+
Example:
111+
# echo 1 > /sys/bus/mdev/devices/<UUID>/remove

0 commit comments

Comments
 (0)