Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2154102imm; Thu, 20 Sep 2018 08:33:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaOVajQ4wVrNOvgd0DFwbdMp9azzhXJnPsbUgzS6ikNd92MKK/h49/nxAn+cEnOrdtyg+G0 X-Received: by 2002:a63:991a:: with SMTP id d26-v6mr37652598pge.159.1537457610255; Thu, 20 Sep 2018 08:33:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537457610; cv=none; d=google.com; s=arc-20160816; b=zOYPrM5DIYySCy1CPr9OZj5TswHEf5kj18f5y8Ssz5/pBFeNaWF7sP0NC0x/+zCw3Y r88UQBs0SbUV5L68nG4sX840Rg2DHVxUlB+Dd8cKQjimpf2wpHt66lxHw0W/2hEr1Hve jxn1jJcFaT8szxR239bQuXWIZoUzqPf3QWwCUtbi7K3P1B0eXB7AGmtyFKNh2q+GnqBQ Oe6WtRw3hlSXd1ybMpEmEG+UnosCksi9qEqPjM7/os/OafRicF8YigEJzm7avWV6nk1q bKVPyFKT32+JGvrP1Muc5B4kpS82CjR+ktqcxEllKLM/sdS0omxJHA1mlZhU8r5vckfA ZfLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=QF6WtXd+cP4dgADtATxbysaA87N/ihcjgp1b/vCJh7g=; b=yW2y8zXjW+dit74E1py1IjxW1Wli7FXA9lhzAFdEsNzy+U/zP9H3bFWRooWhNuGOG9 IgQelwBVd0VlAblPpae4MJErdGzl82kPTeTenBIQb+G+UNZQIPhXRjw6et1uww0IRurz 5ief5ut3n57hHzDEFi2hQIE2gJ5i3Kiur1PaafDlZM84YkGvxuFKJyKh/Aq5sPK0tJ0U XRlqNRj7Tp/J7Lt78VLPv/e5zNv7OaP+bJLpA7nHeRv9WijB8oPzRaM92XwgslZpLA8m 1c30s2Rcvb6UCuXTNqVZBYKDRrv3xz4oScsFK+44Kj+BxrlxSeAR2hiB3a+npL8RqO8Y 8OiA== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21-v6si25280564pfy.169.2018.09.20.08.33.02; Thu, 20 Sep 2018 08:33:30 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733153AbeITVQH (ORCPT + 99 others); Thu, 20 Sep 2018 17:16:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46350 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733024AbeITVQH (ORCPT ); Thu, 20 Sep 2018 17:16:07 -0400 Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 666AC7F6B3; Thu, 20 Sep 2018 15:32:05 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id B60883091327; Thu, 20 Sep 2018 15:31:59 +0000 (UTC) Date: Thu, 20 Sep 2018 17:31:56 +0200 From: Cornelia Huck To: Tony Krowiak 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, pmorel@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com, berrange@redhat.com, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com, frankja@linux.ibm.com, Tony Krowiak Subject: Re: [PATCH v10 04/26] s390: vfio-ap: base implementation of VFIO AP device driver Message-ID: <20180920173156.70299b6c.cohuck@redhat.com> In-Reply-To: <1536781396-13601-5-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1536781396-13601-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1536781396-13601-5-git-send-email-akrowiak@linux.vnet.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 20 Sep 2018 15:32:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Sep 2018 15:42:54 -0400 Tony Krowiak wrote: > From: Tony Krowiak > > Introduces a new AP device driver. This device driver > is built on the VFIO mediated device framework. The framework > provides sysfs interfaces that facilitate passthrough > access by guests to devices installed on the linux host. > > The VFIO AP device driver will serve two purposes: > > 1. Provide the interfaces to reserve AP devices for exclusive > use by KVM guests. This is accomplished by unbinding the > devices to be reserved for guest usage from the zcrypt > device driver and binding them to the VFIO AP device driver. > > 2. Implements the functions, callbacks and sysfs attribute > interfaces required to create one or more VFIO mediated > devices each of which will be used to configure the AP > matrix for a guest and serve as a file descriptor > for facilitating communication between QEMU and the > VFIO AP device driver. > > When the VFIO AP device driver is initialized: > > * It registers with the AP bus for control of type 10 (CEX4 > and newer) AP queue devices. This limitation was imposed > due to: > > 1. A desire to keep the code as simple as possible; > > 2. Some older models are no longer supported by the kernel > and others are getting close to end of service. > > The probe and remove callbacks will be provided to support > the binding/unbinding of AP queue devices to/from the VFIO > AP device driver. > > * Creates a matrix device, /sys/devices/vfio_ap/matrix, > to serve as the parent of the mediated devices created, one > for each guest, and to hold the APQNs of the AP devices bound to > the VFIO AP device driver. > > Signed-off-by: Tony Krowiak > Reviewed-by: Halil Pasic > Tested-by: Michael Mueller > Tested-by: Farhan Ali > Signed-off-by: Christian Borntraeger Christian's S-o-b looks a bit odd here; OTOH, it's probably him anyway who will queue the patches in the end :) > --- > MAINTAINERS | 10 +++ > arch/s390/Kconfig | 11 +++ > drivers/iommu/Kconfig | 8 ++ > drivers/s390/crypto/Makefile | 4 + > drivers/s390/crypto/vfio_ap_drv.c | 134 +++++++++++++++++++++++++++++++++ > drivers/s390/crypto/vfio_ap_private.h | 34 ++++++++ > 6 files changed, 201 insertions(+), 0 deletions(-) > create mode 100644 drivers/s390/crypto/vfio_ap_drv.c > create mode 100644 drivers/s390/crypto/vfio_ap_private.h Reviewed-by: Cornelia Huck