Lines Matching +full:product +full:- +full:files
13 The AP adapter cards are exposed via the AP bus. The motivation for vfio-ap
45 sub-directory::
76 significant bit, correspond to domains 0-255.
89 the cross product of the AP adapter and usage domain numbers detected when 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
132 an APID from 0-255. If a bit is set, the corresponding adapter is valid for
137 corresponds to an AP queue index (APQI) from 0-255. If a bit is set, the
142 changed by an AP command-request message sent to a usage domain from the
144 0-255. If a bit is set, the corresponding domain can be modified by an AP
145 command-request message sent to a usage domain.
148 an APQN to identify the AP queue to which an AP command-request message is to be
149 sent (NQAP and PQAP instructions), or from which a command-reply message is to
151 calculated from the APM and AQM; it is the Cartesian product of all assigned
156 The APQNs can provide secure key functionality - i.e., a private key is stored
157 on the adapter card for each of its domains - so each APQN must be assigned to
161 ------------------------------
170 ------------------------------
179 --------------------------------
192 3. VFIO AP mediated pass-through device
195 -------------------------
209 ---------------------------------------------
213 +------------------+
215 +--------------------> cex4queue driver |
217 | +------------------+
220 | +------------------+ +----------------+
222 | +----------------> Device core +----------> matrix device |
224 | | +--------^---------+ +----------------+
226 | | +-------------------+
227 | | +-----------------------------------+ |
230 +--------+---+-v---+ +--------+-------+-+
232 | ap_bus +--------------------- > vfio_ap driver |
234 +--------^---------+ +--^--^------------+
236 apmask | +-----------------------------+ | 11 mdev create
238 +--------+-----+---+ +----------------+-+ +----------------+
240 | admin | | VFIO device core |---------> matrix |
242 +------+-+---------+ +--------^---------+ +--------^-------+
244 | | 9 create vfio_ap-passthrough | |
245 | +------------------------------+ |
246 +-------------------------------------------------------------+
252 2. The vfio-ap driver during its initialization will register a single 'matrix'
276 ------------------------------------------
286 The following high-level block diagram shows the main components and interfaces
289 +-------------+
291 | +---------+ | mdev_register_driver() +--------------+
292 | | Mdev | +<-----------------------+ |
294 | | driver | +----------------------->+ |<-> VFIO user
295 | +---------+ | probe()/remove() +--------------+ APIs
300 | +---------+ | mdev_register_parent() +--------------+
301 | |Physical | +<-----------------------+ |
302 | | device | | | vfio_ap.ko |<-> matrix
303 | |interface| +----------------------->+ | device
304 | +---------+ | callback +--------------+
305 +-------------+
315 The VFIO mediated device framework supports creation of user-defined
320 'mdev_supported_types' sub-directory of the device being registered. Along
327 /sys/devices/vfio_ap/matrix/mdev_supported_types/vfio_ap-passthrough
329 Only the read-only attributes required by the VFIO mdev framework will
349 This attribute group identifies the user-defined sysfs attributes of the
351 framework, the sysfs attribute files identified in the 'mdev_attr_groups'
356 Write-only attributes for assigning/unassigning an AP adapter to/from the
360 Write-only attributes for assigning/unassigning an AP usage domain to/from
365 A read-only file for displaying the APQNs derived from the Cartesian
366 product of the adapter and domain numbers assigned to the vfio_ap mediated
369 A read-only file for displaying the APQNs derived from the Cartesian
370 product of the adapter and domain numbers assigned to the APM and AQM
376 Write-only attributes for assigning/unassigning an AP control domain
381 A read-only file for displaying the control domain numbers assigned to the
391 domains assigned via the corresponding sysfs attributes files
410 defined via the vfio_ap mediated device's sysfs attribute files.
421 ----------------------------------
435 is not bound to the device driver facilitating its pass-through. Consequently,
448 * Each APQN derived from the Cartesian product of the APIDs and APQIs assigned
455 -----------------------------
482 /usr/bin/qemu-system-s390x ... -cpu z13,ap=on,apqci=on,apft=on,apqi=on
487 /usr/bin/qemu-system-s390x ... -cpu host,ap=off,apqci=off,apft=off,apqi=off
491 register for type 10 and newer AP devices - i.e., the cex4card and cex4queue
492 device drivers - need the APFT facility to ascertain the facilities installed on
505 ------
509 05 CEX5C CCA-Coproc
510 05.0004 CEX5C CCA-Coproc
511 05.00ab CEX5C CCA-Coproc
518 ------
522 05 CEX5C CCA-Coproc
523 05.0047 CEX5C CCA-Coproc
524 05.00ff CEX5C CCA-Coproc
528 ------
561 -> Device Drivers
562 -> IOMMU Hardware Support
564 -> VFIO Non-Privileged userspace driver framework
565 -> Mediated device driver frramework
566 -> VFIO driver for Mediated devices
567 -> I/O subsystem
568 -> VFIO support for AP devices
571 access them. To secure them, there are two sysfs files that specify
575 non-default device driver. The location of the sysfs files containing the
581 The 'apmask' is a 256-bit mask that identifies a set of AP adapter IDs
583 0-255. If a bit is set, the APID belongs to the subset of APQNs marked as
586 The 'aqmask' is a 256-bit mask that identifies a set of AP queue indexes
588 0-255. If a bit is set, the APQI belongs to the subset of APQNs marked as
591 The Cartesian product of the APIDs corresponding to the bits set in the
594 All other APQNs are available to the non-default device drivers such as the
617 * All other APQNs are available for use by the non-default device drivers.
620 AP bus against the set of APQNs derived from the Cartesian product of APIDs
628 1. The sysfs mask files can be edited by echoing a string into the
631 * An absolute hex string starting with 0x - like "0x12345678" - sets
646 number string must be prepended with a ('+') or minus ('-') to indicate
647 the corresponding bit is to be switched on ('+') or off ('-'). Some
650 - "+0" switches bit 0 on
651 - "-13" switches bit 13 off
652 - "+0x41" switches bit 65 on
653 - "-0xff" switches bit 255 off
657 +0,-6,+0x47,-0xf0
681 default drivers pool: adapter 0-15, domain 1
682 alternate drivers pool: adapter 16-255, domains 0, 2-255
691 … Userspace may not re-assign queue 05.0054 already assigned to 62177883-f1bb-47f0-914d-32a22e3a8804
692 … Userspace may not re-assign queue 04.0054 already assigned to cef03c3c-903d-4ecc-9a83-40694cb8aee4
695 ----------------------------------
701 echo -5,-6 > /sys/bus/ap/apmask
703 echo -4,-0x47,-0xab,-0xff > /sys/bus/ap/aqmask
751 --- [mdev_supported_types]
752 ------ [vfio_ap-passthrough] (passthrough vfio_ap mediated device type)
753 --------- create
754 --------- [devices]
773 --- [mdev_supported_types]
774 ------ [vfio_ap-passthrough]
775 --------- [devices]
776 ------------ [$uuid1]
777 --------------- assign_adapter
778 --------------- assign_control_domain
779 --------------- assign_domain
780 --------------- matrix
781 --------------- unassign_adapter
782 --------------- unassign_control_domain
783 --------------- unassign_domain
785 ------------ [$uuid2]
786 --------------- assign_adapter
787 --------------- assign_control_domain
788 --------------- assign_domain
789 --------------- matrix
790 --------------- unassign_adapter
791 ----------------unassign_control_domain
792 ----------------unassign_domain
794 ------------ [$uuid3]
795 --------------- assign_adapter
796 --------------- assign_control_domain
797 --------------- assign_domain
798 --------------- matrix
799 --------------- unassign_adapter
800 ----------------unassign_control_domain
801 ----------------unassign_domain
820 you can use the unassign_xxx files to unassign the adapter, domain or
853 * Each APQN derived from the Cartesian product of the APID of the adapter
856 - Must only be available to the vfio_ap device driver as specified in the
857 sysfs /sys/bus/ap/apmask and /sys/bus/ap/aqmask attribute files. If even
861 - Must NOT be assigned to another vfio_ap mediated device. If even one APQN
865 - Must NOT be assigned while the sysfs /sys/bus/ap/apmask and
866 sys/bus/ap/aqmask attribute files are being edited or the operation may
879 * Each APQN derived from the Cartesian product of the APQI of the domain
882 - Must only be available to the vfio_ap device driver as specified in the
883 sysfs /sys/bus/ap/apmask and /sys/bus/ap/aqmask attribute files. If even
887 - Must NOT be assigned to another vfio_ap mediated device. If even one APQN
891 - Must NOT be assigned while the sysfs /sys/bus/ap/apmask and
892 sys/bus/ap/aqmask attribute files are being edited or the operation may
904 /usr/bin/qemu-system-s390x ... -cpu host,ap=on,apqci=on,apft=on,apqi=on \
905 -device vfio-ap,sysfsdev=/sys/devices/vfio_ap/matrix/$uuid1 ...
909 /usr/bin/qemu-system-s390x ... -cpu host,ap=on,apqci=on,apft=on,apqi=on \
910 -device vfio-ap,sysfsdev=/sys/devices/vfio_ap/matrix/$uuid2 ...
914 /usr/bin/qemu-system-s390x ... -cpu host,ap=on,apqci=on,apft=on,apqi=on \
915 -device vfio-ap,sysfsdev=/sys/devices/vfio_ap/matrix/$uuid3 ...
922 --- [mdev_supported_types]
923 ------ [vfio_ap-passthrough]
924 --------- [devices]
925 ------------ [$uuid1]
926 --------------- remove
951 * Each APQN derived from the Cartesian product comprised of the APID of the
955 * To hot plug a domain, each APQN derived from the Cartesian product
964 Over-provisioning of AP queues for a KVM guest:
966 Over-provisioning is defined herein as the assignment of adapters or domains to
969 available, it will be automatically hot-plugged into the KVM guest using
986 virsh detach-device <guestname> <path-to-device-xml>
988 For example, to hot unplug mdev 62177883-f1bb-47f0-914d-32a22e3a8804 from
989 the guest named 'my-guest':
991 virsh detach-device my-guest ~/config/my-guest-hostdev.xml
993 The contents of my-guest-hostdev.xml:
995 .. code-block:: xml
997 <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-ap'>
999 <address uuid='62177883-f1bb-47f0-914d-32a22e3a8804'/>
1004 virsh qemu-monitor-command <guest-name> --hmp "device-del <device-id>"
1007 qemu command line with 'id=hostdev0' from the guest named 'my-guest':
1009 .. code-block:: sh
1011 virsh qemu-monitor-command my-guest --hmp "device_del hostdev0"
1016 (QEMU) device-del id=<device-id>
1021 (QEMU) device-del id=hostdev0
1030 virsh attach-device <guestname> <path-to-device-xml>
1032 For example, to hot plug mdev 62177883-f1bb-47f0-914d-32a22e3a8804 into
1033 the guest named 'my-guest':
1035 virsh attach-device my-guest ~/config/my-guest-hostdev.xml
1037 The contents of my-guest-hostdev.xml:
1039 .. code-block:: xml
1041 <hostdev mode='subsystem' type='mdev' managed='no' model='vfio-ap'>
1043 <address uuid='62177883-f1bb-47f0-914d-32a22e3a8804'/>
1048 virsh qemu-monitor-command <guest-name> --hmp \
1049 "device_add vfio-ap,sysfsdev=<path-to-mdev>,id=<device-id>"
1052 62177883-f1bb-47f0-914d-32a22e3a8804 into the guest named 'my-guest' with
1053 device-id hostdev0:
1055 virsh qemu-monitor-command my-guest --hmp \
1056 "device_add vfio-ap,\
1057 sysfsdev=/sys/devices/vfio_ap/matrix/62177883-f1bb-47f0-914d-32a22e3a8804,\
1063 (qemu) device_add "vfio-ap,sysfsdev=<path-to-mdev>,id=<device-id>"
1066 62177883-f1bb-47f0-914d-32a22e3a8804 into the guest with the device-id
1069 (QEMU) device-add "vfio-ap,\
1070 sysfsdev=/sys/devices/vfio_ap/matrix/62177883-f1bb-47f0-914d-32a22e3a8804,\