linux-next/drivers/s390/crypto
Harald Freudenberger 8fcc231ce3 s390/pkey: Introduce pkey base with handler registry and handler modules
Introduce pkey base kernel code with a simple pkey handler registry.
Regroup the pkey code into these kernel modules:
- pkey is the pkey api supporting the ioctls, sysfs and in-kernel api.
  Also the pkey base code which offers the handler registry and
  handler wrapping invocation functions is integrated there. This
  module is automatically loaded in via CPU feature if the MSA feature
  is available.
- pkey-cca is the CCA related handler code kernel module a offering
  CCA specific implementation for pkey. This module is loaded in
  via MODULE_DEVICE_TABLE when a CEX[4-8] card becomes available.
- pkey-ep11 is the EP11 related handler code kernel module offering an
  EP11 specific implementation for pkey. This module is loaded in via
  MODULE_DEVICE_TABLE when a CEX[4-8] card becomes available.
- pkey-pckmo is the PCKMO related handler code kernel module. This
  module is loaded in via CPU feature if the MSA feature is available,
  but on init a check for availability of the pckmo instruction is
  performed.

The handler modules register via a pkey_handler struct at the pkey
base code and the pkey customer (that is currently the pkey api code
fetches a handler via pkey handler registry functions and calls the
unified handler functions via the pkey base handler functions.

As a result the pkey-cca, pkey-ep11 and pkey-pckmo modules get
independent from each other and it becomes possible to write new
handlers which offer another kind of implementation without implicit
dependencies to other handler implementations and/or kernel device
drivers.

For each of these 4 kernel modules there is an individual Kconfig
entry: CONFIG_PKEY for the base and api, CONFIG_PKEY_CCA for the PKEY
CCA support handler, CONFIG_PKEY_EP11 for the EP11 support handler and
CONFIG_PKEY_PCKMO for the pckmo support. The both CEX related handler
modules (PKEY CCA and PKEY EP11) have a dependency to the zcrypt api
of the zcrypt device driver.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Reviewed-by: Holger Dengler <dengler@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2024-08-29 22:56:34 +02:00
..
ap_bus.c s390/ap_bus: Cleanup debug code 2024-08-21 16:17:00 +02:00
ap_bus.h driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
ap_card.c s390/ap: store TAPQ hwinfo in struct ap_card 2023-11-30 16:24:23 +01:00
ap_debug.h s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
ap_queue.c s390/ap_queue: Cleanup debug code 2024-08-21 16:17:00 +02:00
Makefile s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
pkey_api.c s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
pkey_base.c s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
pkey_base.h s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
pkey_cca.c s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
pkey_ep11.c s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
pkey_pckmo.c s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
pkey_sysfs.c s390/pkey: Introduce pkey base with handler registry and handler modules 2024-08-29 22:56:34 +02:00
vfio_ap_debug.h s390-vfio-ap: introduces s390 kernel debug feature for vfio_ap device driver 2022-02-06 23:31:29 +01:00
vfio_ap_drv.c s390/vfio-ap: make matrix_bus const 2024-02-09 13:58:16 +01:00
vfio_ap_ops.c s390/vfio-ap: Add write support to sysfs attr ap_config 2024-04-22 12:49:17 +02:00
vfio_ap_private.h s390/vfio-ap: Add write support to sysfs attr ap_config 2024-04-22 12:49:17 +02:00
zcrypt_api.c s390/zcrypt_api: Cleanup debug code 2024-08-21 16:17:01 +02:00
zcrypt_api.h s390/zcrypt: improve zcrypt retry behavior 2024-03-07 14:41:15 +01:00
zcrypt_card.c s390/zcrypt: don't report online if card or queue is in check-stop state 2023-11-05 22:34:57 +01:00
zcrypt_cca_key.h s390/zcrypt: rework arrays with length zero occurrences 2023-04-19 16:47:31 +02:00
zcrypt_ccamisc.c s390/pkey: Rework and split PKEY kernel module code 2024-08-29 22:56:33 +02:00
zcrypt_ccamisc.h s390/pkey: Rework and split PKEY kernel module code 2024-08-29 22:56:33 +02:00
zcrypt_cex2a.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2a.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.c s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex2c.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_cex4.c s390/ap: store TAPQ hwinfo in struct ap_card 2023-11-30 16:24:23 +01:00
zcrypt_cex4.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zcrypt_debug.h s390/zcrypt: introduce dynamic debugging for AP and zcrypt code 2024-02-16 14:30:12 +01:00
zcrypt_ep11misc.c s390/pkey: Rework and split PKEY kernel module code 2024-08-29 22:56:33 +02:00
zcrypt_ep11misc.h s390/pkey: Rework and split PKEY kernel module code 2024-08-29 22:56:33 +02:00
zcrypt_error.h s390/zcrypt: improve zcrypt retry behavior 2024-03-07 14:41:15 +01:00
zcrypt_msgtype6.c s390/zcrypt_msgtype6: Cleanup debug code 2024-08-21 16:17:01 +02:00
zcrypt_msgtype6.h s390/zcrypt: code cleanup 2022-04-25 13:54:14 +02:00
zcrypt_msgtype50.c s390/zcrypt_msgtype50: Cleanup debug code 2024-08-21 16:17:01 +02:00
zcrypt_msgtype50.h s390/zcrypt: remove CEX2 and CEX3 device drivers 2023-07-24 12:12:22 +02:00
zcrypt_queue.c s390/zcrypt: don't report online if card or queue is in check-stop state 2023-11-05 22:34:57 +01:00