summaryrefslogtreecommitdiff
path: root/drivers/s390/crypto/zcrypt_msgtype6.h
diff options
context:
space:
mode:
authorIngo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>2016-08-25 11:16:03 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-12-14 16:33:38 +0100
commite28d2af43614eb86f59812e7221735fc221bbc10 (patch)
tree20b54a9ac5121a82066098f287e5406efba2022c /drivers/s390/crypto/zcrypt_msgtype6.h
parent34a15167739412750846d4f1a5540d9e592fd815 (diff)
s390/zcrypt: add multi domain support
Currently the ap infrastructure only supports one domain at a time. This feature extends the generic cryptographic device driver to support multiple cryptographic domains simultaneously. There are now card and queue devices on the AP bus with independent card and queue drivers. The new /sys layout is as follows: /sys/bus/ap devices <xx>.<yyyy> -> ../../../devices/ap/card<xx>/<xx>.<yyyy> ... card<xx> -> ../../../devices/ap/card<xx> ... drivers <drv>card card<xx> -> ../../../../devices/ap/card<xx> <drv>queue <xx>.<yyyy> -> ../../../../devices/ap/card<xx>/<xx>.<yyyy> ... /sys/devices/ap card<xx> <xx>.<yyyy> driver -> ../../../../bus/ap/drivers/<zzz>queue ... driver -> ../../../bus/ap/drivers/<drv>card ... The two digit <xx> field is the card number, the four digit <yyyy> field is the queue number and <drv> is the name of the device driver, e.g. "cex4". For compatability /sys/bus/ap/card<xx> for the old layout has to exist, including the attributes that used to reside there. With additional contributions from Harald Freudenberger and Martin Schwidefsky. Signed-off-by: Ingo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_msgtype6.h')
-rw-r--r--drivers/s390/crypto/zcrypt_msgtype6.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/s390/crypto/zcrypt_msgtype6.h b/drivers/s390/crypto/zcrypt_msgtype6.h
index a360dbe3c7d2..7a0d5b57821f 100644
--- a/drivers/s390/crypto/zcrypt_msgtype6.h
+++ b/drivers/s390/crypto/zcrypt_msgtype6.h
@@ -116,9 +116,11 @@ struct type86_fmt2_ext {
unsigned int offset4; /* 0x00000000 */
} __packed;
-unsigned int get_cprb_fc(struct ica_xcRB *, struct ap_message *, int *);
-unsigned int get_ep11cprb_fc(struct ep11_urb *, struct ap_message *, int *);
-unsigned int get_rng_fc(struct ap_message *, int *);
+unsigned int get_cprb_fc(struct ica_xcRB *, struct ap_message *,
+ unsigned int *, unsigned short **);
+unsigned int get_ep11cprb_fc(struct ep11_urb *, struct ap_message *,
+ unsigned int *);
+unsigned int get_rng_fc(struct ap_message *, int *, unsigned int *);
#define LOW 10
#define MEDIUM 100
@@ -134,7 +136,8 @@ int speed_idx_ep11(int);
* @ap_msg: pointer to AP message
*/
static inline void rng_type6CPRB_msgX(struct ap_message *ap_msg,
- unsigned int random_number_length)
+ unsigned int random_number_length,
+ unsigned int *domain)
{
struct {
struct type6_hdr hdr;
@@ -172,6 +175,7 @@ static inline void rng_type6CPRB_msgX(struct ap_message *ap_msg,
msg->verb_length = 0x02;
msg->key_length = 0x02;
ap_msg->length = sizeof(*msg);
+ *domain = (unsigned short)msg->cprbx.domain;
}
void zcrypt_msgtype6_init(void);