Received: by 10.223.164.221 with SMTP id h29csp229750wrb; Mon, 16 Oct 2017 01:48:16 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCOL6jmZyUUCALYXf4ss1lIJIlzA2q24qL4fg9IE1RxxfQkSorY/IohVhcFpHi37Ihyr0e2 X-Received: by 10.98.166.204 with SMTP id r73mr8231037pfl.259.1508143696366; Mon, 16 Oct 2017 01:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1508143696; cv=none; d=google.com; s=arc-20160816; b=ujY0dZvkL1a6gj2hkVTgZoBHKZk1vP0CO22KONC/W2FA2JpLCSzp3Ii5Cl+3dnmJbF lJ+IZK/KQ92+OIjxcl+dMI6UZBaUpApNspGnB4Ks6/dA0KSDqvbP7dSjRoYBGhaE69ZP 7zb+Cr6xuZYp+FTQTwePwZ/H9EhIzzu9WNMMCOiasMvLYMpFGRfsW/sS5tR9qcXU8IlZ 8kD5QVSBfZaiR9tqlw1qUyWZheVHKzOXd79sfCaj62HpIdZ/0g/TO+8sX/LhLJl/yftf FbyWA205RT3b2E+DV9XZzQBTP08t0rxd7L8attz3+VxaPBzyJGZPuiO3QEeX9+iRbNin bfYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=pTwVKUlFZ0Lzf8aKOX0Esttm7mzaeY7siP3wmLSjqoE=; b=eGIsZsQXUbEF+bvOL1/GaFHykrUwSQrydZBOcc/QYBu9VHhV0vqHw6hMm+EDjnHNX+ mGQh+qf/kiMe9ZttoXP7pYIISh4ZDTFmE4aVicfsuvWnE84FPrX8WYRgu5ldC6KJFBnF Ep/iZA1Xnzcst1CQKOqlL9/rjhPZQNghDjCkLVU6zC18a4wWooMmLmTecn+ZcE8Yn7hf 6ipnhRcMSJhFPfZXon1pZPGupe7qZC8thDxzFWLsRXjlzW3l/l/uWKTUoLcPs+wsW56M YhYi4zgpYI/ShFTynpX1q0Xpi9E5w9T9xzEtQz62H/zK/daGDz6WZ6s+iSag7Uj5ZvFu LlAw== 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 q83si4104741pfj.99.2017.10.16.01.48.02; Mon, 16 Oct 2017 01:48:16 -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 S1751937AbdJPIrf (ORCPT + 99 others); Mon, 16 Oct 2017 04:47:35 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:35856 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751871AbdJPIre (ORCPT ); Mon, 16 Oct 2017 04:47:34 -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 v9G8iYLF123817 for ; Mon, 16 Oct 2017 04:47:33 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2dmr9r35bj-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 16 Oct 2017 04:47:33 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Oct 2017 09:47:31 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 16 Oct 2017 09:47:26 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9G8lQt825231504; Mon, 16 Oct 2017 08:47:26 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73515A4053; Mon, 16 Oct 2017 09:42:53 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EB6BCA404D; Mon, 16 Oct 2017 09:42:52 +0100 (BST) Received: from mschwideX1 (unknown [9.152.212.220]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 16 Oct 2017 09:42:52 +0100 (BST) Date: Mon, 16 Oct 2017 10:47:23 +0200 From: Martin Schwidefsky To: Tony Krowiak Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, freude@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 Subject: Re: [RFC 03/19] s390/zcrypt: new AP matrix bus In-Reply-To: <1507916344-3896-4-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1507916344-3896-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1507916344-3896-4-git-send-email-akrowiak@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17101608-0016-0000-0000-000004F62BA5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101608-0017-0000-0000-0000283160EB Message-Id: <20171016104723.71b683c3@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-16_03:,, 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-1710160124 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 13 Oct 2017 13:38:48 -0400 Tony Krowiak wrote: > 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 Try to avoid this newline hunk please. It is removed again with patch #5. > 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 +MODULE_DESCRIPTION("AP Matrix, Copyright IBM Corp. 2017"); > +MODULE_LICENSE("GPL v2"); > + > +#define AP_MATRIX_BUS_NAME "ap_matrix" > + > +static struct device *ap_matrix_root_device; > + > +static struct bus_type ap_matrix_bus_type = { > + .name = AP_MATRIX_BUS_NAME, > +}; > + > +int __init ap_matrix_init(void) > +{ > + int ret; > + > + ap_matrix_root_device = root_device_register(AP_MATRIX_BUS_NAME); > + ret = PTR_RET(ap_matrix_root_device); > + if (ret) > + goto done; > + > + ret = bus_register(&ap_matrix_bus_type); > + if (ret) > + goto bus_reg_err; > + > + return 0; > + > +bus_reg_err: > + root_device_unregister(ap_matrix_root_device); > + > +done: > + return ret; > +} > +device_initcall(ap_matrix_init); > diff --git a/drivers/s390/crypto/ap_matrix_bus.h b/drivers/s390/crypto/ap_matrix_bus.h > new file mode 100644 > index 0000000..58e116f > --- /dev/null > +++ b/drivers/s390/crypto/ap_matrix_bus.h > @@ -0,0 +1,15 @@ > +/* > + * Adjunct processor matrix bus header file > + * > + * Copyright IBM Corp. 2017 > + * Author(s): 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_ */ While I understand the approach to split the patches into meaningful parts, there is always a balance between too coarse and too fine granular. I would merge patch #3, patch #4 and parts of patch #5 that affect ap_matrix_bus.c & ap_matrix_bus.h. -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. From 1581165442340565906@xxx Fri Oct 13 17:47:52 +0000 2017 X-GM-THRID: 1581165442340565906 X-Gmail-Labels: Inbox,Category Forums