Lines Matching +full:sub +full:- +full:domains
13 The AP adapter cards are exposed via the AP bus. The motivation for vfio-ap
45 sub-directory::
52 An adapter is partitioned into domains. An adapter can hold up to 256 domains
61 * Usage domains are domains that are targeted by an AP instruction to
64 * Control domains are domains that are changed by an AP command sent to a
68 The AP usage and control domains are assigned to a given LPAR via the system's
71 domains assigned to the LPAR. The domain number of each usage domain and
76 significant bit, correspond to domains 0-255.
91 domains 6 and 71 (0x47) are assigned to the LPAR, the AP bus will create the
111 * NQAP: to enqueue an AP command-request message to a queue
112 * DQAP: to dequeue an AP command-reply message from a queue
116 command; this must be one of the usage domains. An AP command may modify a
117 domain that is not one of the usage domains, but the modified domain
118 must be one of the control domains.
127 to identify the adapters, usage domains and control domains assigned to the KVM
133 an APID from 0-255. If a bit is set, the corresponding adapter is valid for
136 * The AP Queue Mask (AQM) field is a bit mask identifying the AP usage domains
139 an AP queue index (APQI) from 0-255. If a bit is set, the corresponding queue
142 * The AP Domain Mask field is a bit mask that identifies the AP control domains
143 assigned to the KVM guest. The ADM bit mask controls which domains can be
144 changed by an AP command-request message sent to a usage domain from the
147 0-255. If a bit is set, the corresponding domain can be modified by an AP
148 command-request message sent to a usage domain.
151 an APQN to identify the AP queue to which an AP command-request message is to be
152 sent (NQAP and PQAP instructions), or from which a command-reply message is to
156 and 2 and usage domains 5 and 6 are assigned to a guest, the APQNs (1,5), (1,6),
159 The APQNs can provide secure key functionality - i.e., a private key is stored
160 on the adapter card for each of its domains - so each APQN must be assigned to
164 ------------------------------
165 Guest1: adapters 1,2 domains 5,6
173 ------------------------------
174 Guest1: adapters 1,2 domains 5,6
175 Guest2: adapters 3,4 domains 5,6
182 --------------------------------
183 Guest1: adapters 1,2 domains 5,6
184 Guest2: adapter 1 domains 6,7
195 3. VFIO AP mediated matrix pass-through device
198 -------------------------
205 domains, and control domains comprising the matrix for a KVM guest.
211 ---------------------------------------------
215 +------------------+
217 +--------------------> cex4queue driver |
219 | +------------------+
222 | +------------------+ +----------------+
224 | +----------------> Device core +----------> matrix device |
226 | | +--------^---------+ +----------------+
228 | | +-------------------+
229 | | +-----------------------------------+ |
232 +--------+---+-v---+ +--------+-------+-+
234 | ap_bus +--------------------- > vfio_ap driver |
236 +--------^---------+ +--^--^------------+
238 apmask | +-----------------------------+ | 9 mdev create
240 +--------+-----+---+ +----------------+-+ +----------------+
242 | admin | | VFIO device core |---------> matrix |
244 +------+-+---------+ +--------^---------+ +--------^-------+
246 | | 9 create vfio_ap-passthrough | |
247 | +------------------------------+ |
248 +-------------------------------------------------------------+
254 2. The vfio-ap driver during its initialization will register a single 'matrix'
274 10. The administrator assigns the adapters, usage domains and control domains
278 ------------------------------------------
288 The following high-level block diagram shows the main components and interfaces
291 +-------------+
293 | +---------+ | mdev_register_driver() +--------------+
294 | | Mdev | +<-----------------------+ |
296 | | driver | +----------------------->+ |<-> VFIO user
297 | +---------+ | probe()/remove() +--------------+ APIs
302 | +---------+ | mdev_register_device() +--------------+
303 | |Physical | +<-----------------------+ |
304 | | device | | | vfio_ap.ko |<-> matrix
305 | |interface| +----------------------->+ | device
306 | +---------+ | callback +--------------+
307 +-------------+
317 The VFIO mediated device framework supports creation of user-defined
322 'mdev_supported_types' sub-directory of the device being registered. Along
329 /sys/devices/vfio_ap/matrix/mdev_supported_types/vfio_ap-passthrough
331 Only the read-only attributes required by the VFIO mdev framework will
351 This attribute group identifies the user-defined sysfs attributes of the
358 Write-only attributes for assigning/unassigning an AP adapter to/from the
362 Write-only attributes for assigning/unassigning an AP usage domain to/from
367 A read-only file for displaying the APQNs derived from the cross product
370 Write-only attributes for assigning/unassigning an AP control domain
375 A read-only file for displaying the control domain numbers assigned to the
384 * Store the AP matrix configuration for the adapters, domains, and control
385 domains assigned via the corresponding sysfs attributes files
406 -------------------------------------------
414 * Setting the bits in the AQM corresponding to the domains assigned to the
420 -----------------------------
442 /usr/bin/qemu-system-s390x ... -cpu z13,ap=on,apqci=on,apft=on
447 /usr/bin/qemu-system-s390x ... -cpu host,ap=off,apqci=off,apft=off
451 and newer AP devices - i.e., the cex4card and cex4queue device drivers - need
465 ------
469 05 CEX5C CCA-Coproc
470 05.0004 CEX5C CCA-Coproc
471 05.00ab CEX5C CCA-Coproc
474 06.00ab CEX5C CCA-Coproc
478 ------
488 ------
522 -> Device Drivers
523 -> IOMMU Hardware Support
525 -> VFIO Non-Privileged userspace driver framework
526 -> Mediated device driver frramework
527 -> VFIO driver for Mediated devices
528 -> I/O subsystem
529 -> VFIO support for AP devices
541 The 'apmask' is a 256-bit mask that identifies a set of AP adapter IDs
544 0-255. If a bit is set, the APID is marked as usable only by the default AP
548 The 'aqmask' is a 256-bit mask that identifies a set of AP queue indexes
551 0-255. If a bit is set, the APQI is marked as usable only by the default AP
561 1, 2, 3, 4, 5, and 7-255 belong to the default drivers' pool, and 0 and 6
576 * An absolute hex string starting with 0x - like "0x12345678" - sets
592 number string must be prepended with a ('+') or minus ('-') to indicate
593 the corresponding bit is to be switched on ('+') or off ('-'). Some
596 - "+0" switches bit 0 on
597 - "-13" switches bit 13 off
598 - "+0x41" switches bit 65 on
599 - "-0xff" switches bit 255 off
603 +0,-6,+0x47,-0xf0
627 default drivers pool: adapter 0-15, domain 1
628 alternate drivers pool: adapter 16-255, domains 0, 2-255
631 ----------------------------------
636 echo -5,-6 > /sys/bus/ap/apmask
638 echo -4,-0x47,-0xab,-0xff > /sys/bus/ap/aqmask
686 --- [mdev_supported_types]
687 ------ [vfio_ap-passthrough] (passthrough mediated matrix device type)
688 --------- create
689 --------- [devices]
708 --- [mdev_supported_types]
709 ------ [vfio_ap-passthrough]
710 --------- [devices]
711 ------------ [$uuid1]
712 --------------- assign_adapter
713 --------------- assign_control_domain
714 --------------- assign_domain
715 --------------- matrix
716 --------------- unassign_adapter
717 --------------- unassign_control_domain
718 --------------- unassign_domain
720 ------------ [$uuid2]
721 --------------- assign_adapter
722 --------------- assign_control_domain
723 --------------- assign_domain
724 --------------- matrix
725 --------------- unassign_adapter
726 ----------------unassign_control_domain
727 ----------------unassign_domain
729 ------------ [$uuid3]
730 --------------- assign_adapter
731 --------------- assign_control_domain
732 --------------- assign_domain
733 --------------- matrix
734 --------------- unassign_adapter
735 ----------------unassign_control_domain
736 ----------------unassign_domain
748 Control domains can similarly be assigned using the assign_control_domain
779 the previously assigned domains must be bound to the vfio_ap device
780 driver. If no domains have yet been assigned, then there must be at least
786 previously assigned domains can be assigned to another mediated matrix
799 driver. If no domains have yet been assigned, then there must be at least
816 /usr/bin/qemu-system-s390x ... -cpu host,ap=on,apqci=on,apft=on \
817 -device vfio-ap,sysfsdev=/sys/devices/vfio_ap/matrix/$uuid1 ...
821 /usr/bin/qemu-system-s390x ... -cpu host,ap=on,apqci=on,apft=on \
822 -device vfio-ap,sysfsdev=/sys/devices/vfio_ap/matrix/$uuid2 ...
826 /usr/bin/qemu-system-s390x ... -cpu host,ap=on,apqci=on,apft=on \
827 -device vfio-ap,sysfsdev=/sys/devices/vfio_ap/matrix/$uuid3 ...
834 --- [mdev_supported_types]
835 ------ [vfio_ap-passthrough]
836 --------- [devices]
837 ------------ [$uuid1]
838 --------------- remove