Received: by 10.223.164.221 with SMTP id h29csp1052592wrb; Fri, 13 Oct 2017 10:47:52 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBZDjoRj4NRpMGWXOmlqQIY5f4791HGLdiE/Cj9Aj71oIT9OqJwWDPxeWJmJ97Y7PjTr/j3 X-Received: by 10.84.139.3 with SMTP id 3mr1994187plq.367.1507916872696; Fri, 13 Oct 2017 10:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507916872; cv=none; d=google.com; s=arc-20160816; b=pOYrkMLheEtRTKKVLraTasOUOPTDu9NgnYntYb6ufZuDnXVQ5Pn5S8/C+7fUa+tXKd ySquwTrqx74hPPeJkVj1R4oEkFPgbV1cpvaa2KtdWgR5muu3t87wNFaLaJx9agJanDas aLjSZSSAP+YWzvX8W3tmA3Qb8xunmFEl/dU8F8VgF4pHhmTPBwWPKfq14MfUQ8YOo6cd /ivxNqDfiiZDRT9rw8eyd0Qfm2rYH2GD/iktXyYkXXLgsR8Fop/HuS6j5EUC+2YvkYQ2 hJi1wDUFa3A0GTfs/rm4f/l8djIUDTKpkDCv55nWVB059cMv84aIu98/q1j1G5InkaOF AcOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=olWMU4NoCzgxjBioCA4Y5TVzCgczInFxUznmjQw+YPY=; b=tCSrmMWtLyAH7rOR4tntAc6Xo2WaNCarz98uz4F7rkZXNP0lo/4nqD/8F6Z1YV2z+v AJmfQWrQGN5DHyolgteDKXNdPNerFf56xAFlnFvT62xo6WOhWj4nEjuQEP5WOk5hT/Js koxgCbqHC31eS3B3Om0coGgQlchZ9lyGAbMp8BpnrH5yZNtLAOpOH+tS519im9HwDZVn Ry/HQE+OCecUSIST7qydQNa0wWcEVUk4bGRWUeJ3Q15Wn4s5/V6N9n1iERg6rTjLmFDo aDU+ERRJkcNOGQyc7W95+VT55CqPo0zhE8dEmpMPfExiK58dYru5Q3i6Vpk1rB/KelcO OoCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h11si838532pfk.513.2017.10.13.10.47.38; Fri, 13 Oct 2017 10:47:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753171AbdJMRqI (ORCPT + 99 others); Fri, 13 Oct 2017 13:46:08 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:39512 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752933AbdJMRj7 (ORCPT ); Fri, 13 Oct 2017 13:39:59 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9DHcv9q142409 for ; Fri, 13 Oct 2017 13:39:59 -0400 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0b-001b2d01.pphosted.com with ESMTP id 2djyeveg4u-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 13 Oct 2017 13:39:59 -0400 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 13 Oct 2017 13:39:58 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 13 Oct 2017 13:39:54 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9DHdrcw40435882; Fri, 13 Oct 2017 17:39:53 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D7E92803F; Fri, 13 Oct 2017 13:39:46 -0400 (EDT) Received: from localhost.localdomain (unknown [9.85.201.79]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTPS id 89E3728050; Fri, 13 Oct 2017 13:39:45 -0400 (EDT) From: Tony Krowiak To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.com, pmorel@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, qemu-s390x@nongnu.org, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com, Tony Krowiak Subject: [RFC 03/19] s390/zcrypt: new AP matrix bus Date: Fri, 13 Oct 2017 13:38:48 -0400 X-Mailer: git-send-email 1.7.1 In-Reply-To: <1507916344-3896-1-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1507916344-3896-1-git-send-email-akrowiak@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17101317-0008-0000-0000-000002908D9D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007892; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000236; SDB=6.00930642; UDB=6.00468501; IPR=6.00710909; BA=6.00005636; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017529; XFM=3.00000015; UTC=2017-10-13 17:39:57 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101317-0009-0000-0000-000036FF6220 Message-Id: <1507916344-3896-4-git-send-email-akrowiak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-13_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710130244 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Introduces an AP matrix bus. The sysfs location of the AP matrix bus is: /sys/bus/ap_matrix The AP matrix bus will create an AP matrix device that will hold the AP queues reserved for use by KVM guests. Signed-off-by: Tony Krowiak --- MAINTAINERS | 8 +++++ drivers/s390/crypto/Makefile | 4 +- drivers/s390/crypto/ap_matrix_bus.c | 52 +++++++++++++++++++++++++++++++++++ drivers/s390/crypto/ap_matrix_bus.h | 15 ++++++++++ 4 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 drivers/s390/crypto/ap_matrix_bus.c create mode 100644 drivers/s390/crypto/ap_matrix_bus.h diff --git a/MAINTAINERS b/MAINTAINERS index ef23cf5..cbd6f7c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11711,6 +11711,14 @@ W: http://www.ibm.com/developerworks/linux/linux390/ S: Supported F: drivers/s390/crypto/ +S390 VFIO AP MATRIX DRIVER +M: Tony Krowiak +L: linux-s390@vger.kernel.org +W: http://www.ibm.com/developerworks/linux/linux390/ +S: Supported +F: drivers/s390/crypto/ap_matrix_bus.h +F: drivers/s390/crypto/ap_matrix_bus.c + S390 ZFCP DRIVER M: Steffen Maier M: Benjamin Block diff --git a/drivers/s390/crypto/Makefile b/drivers/s390/crypto/Makefile index be36f10..87646ca 100644 --- a/drivers/s390/crypto/Makefile +++ b/drivers/s390/crypto/Makefile @@ -2,7 +2,7 @@ # S/390 crypto devices # -ap-objs := ap_bus.o ap_card.o ap_queue.o +ap-objs := ap_bus.o ap_card.o ap_queue.o ap_matrix_bus.o obj-$(subst m,y,$(CONFIG_ZCRYPT)) += ap.o # zcrypt_api.o and zcrypt_msgtype*.o depend on ap.o zcrypt-objs := zcrypt_api.o zcrypt_card.o zcrypt_queue.o @@ -13,4 +13,4 @@ obj-$(CONFIG_ZCRYPT) += zcrypt_pcixcc.o zcrypt_cex2a.o zcrypt_cex4.o # pkey kernel module pkey-objs := pkey_api.o -obj-$(CONFIG_PKEY) += pkey.o +obj-$(CONFIG_PKEY) += pkey.o \ No newline at end of file diff --git a/drivers/s390/crypto/ap_matrix_bus.c b/drivers/s390/crypto/ap_matrix_bus.c new file mode 100644 index 0000000..fbae175 --- /dev/null +++ b/drivers/s390/crypto/ap_matrix_bus.c @@ -0,0 +1,52 @@ +/* + * Copyright IBM Corp. 2017 + * Author(s): Tony Krowiak + * + * Adjunct processor matrix bus. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include +#include + +#include "ap_matrix_bus.h" + +MODULE_AUTHOR("Tony Krowiak + * + * Adjunct processor bus header file. + */ + +#ifndef _AP_MATRIX_BUS_H_ +#define _AP_MATRIX_BUS_H_ + +int ap_matrix_init(void); + +#endif /* _AP_MATRIX_BUS_H_ */ -- 1.7.1 From 1584083965225486047@xxx Tue Nov 14 22:56:32 +0000 2017 X-GM-THRID: 1584083965225486047 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread