Received: by 10.223.164.202 with SMTP id h10csp1922047wrb; Thu, 16 Nov 2017 06:36:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMbX+3hIzpj5qdmgveZw6j1UyWmyNTYMgP5TPY97XF8n9Tyb7DibsoeOJrFHcUWi2OnKhNuk X-Received: by 10.84.252.150 with SMTP id y22mr1879381pll.29.1510842971859; Thu, 16 Nov 2017 06:36:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510842971; cv=none; d=google.com; s=arc-20160816; b=G0Oej/19puuAafwaIcu6mTBROGQWv5Cn/9DTEJeM/evierbcohCqkxPJHz4Tte2HGg TW7hppzri7v1/QNTr36O6jOWB6uRRCkpPt0XIHKCLiBi+ANFw7X6FdsgJDdxITjL5tZQ XvSDjStoNGhgTZhFdVWV2jfOz9UQADWtd7dym7X+9QMEbSK5gz8z2NMhMtn08Nx4mvNW v4GmHitsFfQ22HrOYbhMA38DzxkMAzjznfVPh02Vd5EEjtAbfK/OqCBFskf9CFzmP2Sa l6MgXnZ84SHlqKF4VTo1LJ9tePilKBYPXzKvSZZuzt8yj4Z+zsOiUldke4B6p9e2Qh7H Hang== 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 :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=sv0pMVJOJ3ruxI2MnReX+pg6xVzrgY/iP9PJVZFzqi8=; b=LEmu7c5l2Ed06boY4xFrHB+L1Vd4pK6kRHxkajubrl3pQ1qfgWarHLY2t/I9W1rvVO dDVS5a6MopaCoLRotGSPwqfDiU6k+0FORsq4ln5mAO9pRlIlsQC+xTgUjh8XZ7KS8qmU cD20x3LrCJ5VO0/TylhKSyazUJb8K0NxWuyrYCc5zpYdBo5OOqMkE7Ms+GSNj5OGXqnU d+7yd0GoMyUwBzoL6gPIFHn1MA8D71Zl3nyNVTvnAnqnK+ShGrlPg02dXhRCl9wchi/D GmL8S2pwYJH6OwJLBYuH4Dwyu6tUIWYBrg5Jpymc5i+QOfP4WO4+Zil2tQwdGs8ODgfP fB6A== 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 g12si980689plj.261.2017.11.16.06.35.58; Thu, 16 Nov 2017 06:36:11 -0800 (PST) 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 S933343AbdKPMCp (ORCPT + 91 others); Thu, 16 Nov 2017 07:02:45 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:57482 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932459AbdKPMCg (ORCPT ); Thu, 16 Nov 2017 07:02:36 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAGBwwX3012547 for ; Thu, 16 Nov 2017 07:02:35 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e97eb11d2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 16 Nov 2017 07:02:34 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 16 Nov 2017 12:02:31 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 16 Nov 2017 12:02:27 -0000 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAGC2Rag35193044; Thu, 16 Nov 2017 12:02:27 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB89142057; Thu, 16 Nov 2017 11:57:19 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 332F042047; Thu, 16 Nov 2017 11:57:19 +0000 (GMT) Received: from [9.145.170.243] (unknown [9.145.170.243]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 16 Nov 2017 11:57:19 +0000 (GMT) Subject: Re: [RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver To: Tony Krowiak , Cornelia Huck Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.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 References: <1507916344-3896-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1507916344-3896-6-git-send-email-akrowiak@linux.vnet.ibm.com> <20171114134040.3fcd6efd.cohuck@redhat.com> <06ddee4e-e1b8-ba17-5e3e-241e4dcf7cd0@linux.vnet.ibm.com> From: Pierre Morel Date: Thu, 16 Nov 2017 13:02:26 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <06ddee4e-e1b8-ba17-5e3e-241e4dcf7cd0@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 17111612-0016-0000-0000-00000502064C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111612-0017-0000-0000-0000283DC50E Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-16_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711160163 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/11/2017 17:37, Tony Krowiak wrote: > On 11/14/2017 07:40 AM, Cornelia Huck wrote: >> On Fri, 13 Oct 2017 13:38:50 -0400 >> Tony Krowiak wrote: >> >>> Introduces a new AP matrix device driver. This device driver >>> will ultimately perform the following functions: >>> >>> * Register with the AP bus to let it know that the matrix >>>    driver can control AP queue devices. This will allow >>>    an administrator to unbind an AP queue device from its >>>    device driver and bind it to the matrix device driver. >>>    This is how AP queue devices will be reserved for use >>>    by guest machines. >>> >>> * Register the matrix device created by the AP matrix bus >>>    with the VFIO mediated device framework. This will create >>>    the sysfs entries needed to create mediated matrix devices. >>>    Each mediated matrix device can be configured with a matrix >>>    of adapters, usage domains and control domains that can be >>>    accessed by a guest machine. >>> >>> * Process requests via ioctl calls defined for the mediated >>>    matrix device. The guest can access the ioctl calls via >>>    the mediated device's file descriptor to: >>> >>>      * Grant access to the adapters, usage domains and >>>        control domains configured for the mediated matrix >>>        device. >>> >>> This device driver >>> is built on the VFIO mediated device framework. The VFIO mediated >>> device framework allows a mediated device to be dedicated exclusively >>> to a single guest VM. >>> >>> Signed-off-by: Tony Krowiak >>> --- >>>   MAINTAINERS                                  |    2 + >>>   arch/s390/Kconfig                            |   13 +++ >>>   arch/s390/configs/default_defconfig          |    1 + >>>   arch/s390/configs/gcov_defconfig             |    1 + >>>   arch/s390/configs/performance_defconfig      |    1 + >>>   arch/s390/defconfig                          |    1 + >>>   drivers/s390/crypto/Makefile                 |    6 +- >>>   drivers/s390/crypto/ap_matrix_bus.c          |    8 ++ >>>   drivers/s390/crypto/ap_matrix_bus.h          |    2 +- >>>   drivers/s390/crypto/vfio_ap_matrix_drv.c     |  102 >>> ++++++++++++++++++++++++++ >>>   drivers/s390/crypto/vfio_ap_matrix_private.h |   47 ++++++++++++ >>>   11 files changed, 182 insertions(+), 2 deletions(-) >>>   create mode 100644 drivers/s390/crypto/vfio_ap_matrix_drv.c >>>   create mode 100644 drivers/s390/crypto/vfio_ap_matrix_private.h >>> >>> diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig >>> index 48af970..411c19a 100644 >>> --- a/arch/s390/Kconfig >>> +++ b/arch/s390/Kconfig >>> @@ -722,6 +722,19 @@ config VFIO_CCW >>>         To compile this driver as a module, choose M here: the >>>         module will be called vfio_ccw. >>> +config VFIO_AP_MATRIX >>> +    def_tristate m >>> +    prompt "Support for Adjunct Processor Matrix device interface" >>> +    depends on ZCRYPT >>> +    select VFIO >>> +    select MDEV >>> +    select VFIO_MDEV >>> +    select VFIO_MDEV_DEVICE >>> +    select IOMMU_API >> I think the more common pattern is to depend on the VFIO configs >> instead of selecting them. > It's ironic because I originally changed from using 'depends on' and > changed it based on review comments made > on our internal mailing list. I'll go with 'depends on'. Is doing like the others a sufficient good reason? What if the first who did this did not really think about it? When an administrator configure the kernel what does he think? - I want to have AP through AP_VFIO in my guests and he get implicitly VFIO or - I want to have VFIO and he has to explicitly add AP_VFIO too It seems to me that the first is much more user friendly. Please tell me if I missed something. dependencies? collateral damages? my logic is wrong? Regards, Pierre ..snip... -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany From 1584127859471909729@xxx Wed Nov 15 10:34:13 +0000 2017 X-GM-THRID: 1581165332668656184 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread