Lines Matching +full:right +full:- +full:most
13 The AP adapter cards are exposed via the AP bus. The motivation for vfio-ap
16 facilities which do most of the hard work of providing direct access to AP
45 sub-directory::
75 /sys/bus/ap/ap_control_domain_mask. The bits in the mask, from most to least
76 significant bit, correspond to domains 0-255.
111 * NQAP: to enqueue an AP command-request message to a queue
112 * DQAP: to dequeue an AP command-reply message from a queue
131 to the KVM guest. Each bit in the mask, from left to right (i.e. from most
133 an APID from 0-255. If a bit is set, the corresponding adapter is valid for
137 assigned to the KVM guest. Each bit in the mask, from left to right (i.e. from
138 most significant to least significant bit in big endian order), corresponds to
139 an AP queue index (APQI) from 0-255. If a bit is set, the corresponding queue
144 changed by an AP command-request message sent to a usage domain from the
145 guest. Each bit in the mask, from left to right (i.e. from most significant to
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
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
161 at most one guest or to the linux host::
164 ------------------------------
173 ------------------------------
182 --------------------------------
195 3. VFIO AP mediated matrix pass-through device
198 -------------------------
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'
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
406 -------------------------------------------
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
542 (APID). Each bit in the mask, from left to right (i.e., from most significant
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
549 (APQI). Each bit in the mask, from left to right (i.e., from most significant
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
578 with 0s on the right; for example, specifying a mask value of 0x41 is
583 Keep in mind that the mask reads from left to right (i.e., most
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
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