Lines Matching +full:neo +full:- +full:8

1 .. SPDX-License-Identifier: GPL-2.0-only
9 :Author: Neo Jia <cjia@nvidia.com>
17 The number of use cases for virtualizing DMA devices that do not have built-in
25 an IOMMU/device-agnostic framework for exposing direct device access to user
26 space in a secure, IOMMU-protected environment. This framework is used for
44 The following high-level block diagram shows the main components and interfaces
48 +---------------+
50 | +-----------+ | mdev_register_driver() +--------------+
51 | | | +<------------------------+ |
53 | | bus | +------------------------>+ vfio_mdev.ko |<-> VFIO user
55 | | | | +--------------+
56 | +-----------+ |
61 | +-----------+ | mdev_register_parent() +--------------+
62 | | | +<------------------------+ |
63 | | | | | nvidia.ko |<-> physical
64 | | | +------------------------>+ | device
65 | | | | callbacks +--------------+
67 | | device | | mdev_register_parent() +--------------+
68 | | interface | |<------------------------+ |
69 | | | | | i915.ko |<-> physical
70 | | | +------------------------>+ | device
71 | | | | callbacks +--------------+
73 | | | | mdev_register_parent() +--------------+
74 | | | +<------------------------+ |
75 | | | | | ccw_device.ko|<-> physical
76 | | | +------------------------>+ | device
77 | | | | callbacks +--------------+
78 | +-----------+ |
79 +---------------+
92 ------------------------------------------------
98 * struct mdev_driver [2] - Mediated device's driver
146 libvirt, to query and configure mediated devices in a hardware-agnostic fashion.
155 -------------------------------------
160 --------------------------------------------------------------
164 |- [parent physical device]
165 |--- Vendor-specific-attributes [optional]
166 |--- [mdev_supported_types]
167 | |--- [<type-id>]
168 | | |--- create
169 | | |--- name
170 | | |--- available_instances
171 | | |--- device_api
172 | | |--- description
173 | | |--- [devices]
174 | |--- [<type-id>]
175 | | |--- create
176 | | |--- name
177 | | |--- available_instances
178 | | |--- device_api
179 | | |--- description
180 | | |--- [devices]
181 | |--- [<type-id>]
182 | |--- create
183 | |--- name
184 | |--- available_instances
185 | |--- device_api
186 | |--- description
187 | |--- [devices]
193 [<type-id>], device_api, and available_instances are mandatory attributes
196 * [<type-id>]
198 The [<type-id>] name is created by adding the device driver string as a prefix
202 sprintf(buf, "%s-%s", dev_driver_string(parent->dev), group->name);
207 "vfio-pci" for a PCI device.
211 This attribute shows the number of devices of type <type-id> that can be
216 This directory contains links to the devices of type <type-id> that have been
229 ----------------------------------------------------------
233 |- [parent phy device]
234 |--- [$MDEV_UUID]
235 |--- remove
236 |--- mdev_type {link to its type}
237 |--- vendor-specific-attributes [optional]
250 ------------------------
267 These functions call back into the back-end IOMMU module by using the pin_pages
276 mtty.c in samples/vfio-mdev/ directory is a sample driver program to
290 |-- mdev_supported_types
291 | |-- mtty-1
292 | | |-- available_instances
293 | | |-- create
294 | | |-- device_api
295 | | |-- devices
296 | | `-- name
297 | `-- mtty-2
298 | |-- available_instances
299 | |-- create
300 | |-- device_api
301 | |-- devices
302 | `-- name
303 |-- mtty_dev
304 | `-- sample_mtty_dev
305 |-- power
306 | |-- autosuspend_delay_ms
307 | |-- control
308 | |-- runtime_active_time
309 | |-- runtime_status
310 | `-- runtime_suspended_time
311 |-- subsystem -> ../../../../class/mtty
312 `-- uevent
317 # echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > \
318 /sys/devices/virtual/mtty/mtty/mdev_supported_types/mtty-2/create
320 3. Add parameters to qemu-kvm::
322 -device vfio-pci,\
323 sysfsdev=/sys/bus/mdev/devices/83b8f4f2-509f-382f-3c1e-e6bfe0fa1001
330 # lspci -s 00:05.0 -xxvv
331 00:05.0 Serial controller: Device 4348:3253 (rev 10) (prog-if 02 [16550])
334 Control: I/O+ Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
335 Stepping- SERR- FastB2B- DisINTx-
336 Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
337 <TAbort- <MAbort- >SERR- <PERR- INTx-
339 Region 0: I/O ports at c150 [size=8]
340 Region 1: I/O ports at c158 [size=8]
349 serial 0000:00:05.0: PCI INT A -> Link[LNKA] -> GSI 10 (level, high) -> IRQ 10
356 # setserial -g /dev/ttyS*
369 8. Destroy the mediated device that you created::
371 # echo 1 > /sys/bus/mdev/devices/83b8f4f2-509f-382f-3c1e-e6bfe0fa1001/remove
376 1. See Documentation/driver-api/vfio.rst for more information on VFIO.