Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-10-16 Thread Tony Krowiak
On 10/16/2017 06:05 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:45 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Overview: An adjunct processor (AP) facility is an IBM Z cryptographic facility. The AP facility is comprised of three AP instructions and from 1 to

Re: [RFC 03/19] s390/zcrypt: new AP matrix bus

2017-10-16 Thread Tony Krowiak
On 10/16/2017 04:47 AM, Martin Schwidefsky wrote: On Fri, 13 Oct 2017 13:38:48 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> 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 wil

Re: [RFC 06/19] s390/zcrypt: register matrix device with VFIO mediated device framework

2017-10-16 Thread Tony Krowiak
On 10/16/2017 05:03 AM, Martin Schwidefsky wrote: On Fri, 13 Oct 2017 13:38:51 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: diff --git a/drivers/s390/crypto/ap_matrix_bus.c b/drivers/s390/crypto/ap_matrix_bus.c index 66bfa54..418c23b 100644 --- a/drivers/s390/crypto/ap_matrix

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-10-16 Thread Tony Krowiak
On 10/16/2017 06:06 AM, Christian Borntraeger wrote: On 10/16/2017 11:27 AM, Martin Schwidefsky wrote: On Fri, 13 Oct 2017 13:38:45 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Tony Krowiak (19): KVM: s390: SIE considerations for AP Queue virtualization KVM: s390: re

Re: [RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver

2017-10-16 Thread Tony Krowiak
On 10/16/2017 04:59 AM, Martin Schwidefsky wrote: On Fri, 13 Oct 2017 13:38:50 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: diff --git a/drivers/s390/crypto/Makefile b/drivers/s390/crypto/Makefile index 87646ca..1983afa 100644 --- a/drivers/s390/crypto/Makefile +++ b/driver

Re: [RFC 07/19] KVM: s390: introduce AP matrix configuration interface

2017-10-16 Thread Tony Krowiak
On 10/16/2017 05:10 AM, Martin Schwidefsky wrote: On Fri, 13 Oct 2017 13:38:52 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: This patch introduces a new compilation unit that will contain all of the data structures and logic for configuring AP adapters, usage domains and c

Re: [RFC 16/19] KVM: s390: interface to configure KVM guest's AP matrix

2017-10-16 Thread Tony Krowiak
On 10/13/2017 01:39 PM, Tony Krowiak wrote: Provides an interface to assign AP adapters, usage domains and control domains to a KVM guest. A KVM guest is started by executing the Start Interpretive Execution (SIE) instruction. The SIE state description is a control block that contains the state

[RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver

2017-10-13 Thread Tony Krowiak
to a single guest VM. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- MAINTAINERS |2 + arch/s390/Kconfig| 13 +++ arch/s390/configs/default_defconfig |1 + arch/s390/configs/gcov_def

[RFC 11/19] s390/zcrypt: validate domain assignment

2017-10-13 Thread Tony Krowiak
of an AP queue bound to the AP matrix device driver. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_matrix_ops.c | 63 ++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/drivers/s390/

[RFC 03/19] s390/zcrypt: new AP matrix bus

2017-10-13 Thread Tony Krowiak
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 <akrow...@linux.vnet.ibm.com> --- MAINT

[RFC 15/19] s390/zcrypt: introduce ioctl access to VFIO AP Matrix driver

2017-10-13 Thread Tony Krowiak
Introduces ioctl access to the VFIO AP Matrix device driver by implementing the VFIO_DEVICE_GET_INFO ioctl. This ioctl provides the VFIO AP Matrix device driver information to the guest machine. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/

[RFC 16/19] KVM: s390: interface to configure KVM guest's AP matrix

2017-10-13 Thread Tony Krowiak
masks, EAPM, EAQM and EADM. 2. Set the APM, AQM and ADM in the CRYCB from the EAPM, EAQM and EADM calculated in step 1. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- arch/s390/include/asm/ap-config.h |7 ++ arch/s390/kvm/ap-config.c

[RFC 09/19] s390/zcrypt: validate adapter assignment

2017-10-13 Thread Tony Krowiak
of an AP queue bound to the AP matrix device driver. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_matrix_ops.c | 63 ++ 1 files changed, 63 insertions(+), 0 deletions(-) diff --git a/drivers/s390/

[RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-10-13 Thread Tony Krowiak
KVM guest's SIE state description. Programs running on the guest will then be able to use the cryptographic functions provided by the AP facilities configured for the guest. Tony Krowiak (19): KVM: s390: SIE considerations for AP Queue virtualization KVM: s390: refactor crypto initialization s390

[RFC 19/19] s390/facilities: enable AP facilities needed by guest

2017-10-13 Thread Tony Krowiak
to configure AP adapters and domains for the guest machine. * STFLE.15: Indicates the AP facilities test is available. The AP bus running in the guest uses the information. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- arc

[RFC 04/19] s390/zcrypt: create an AP matrix device on the AP matrix bus

2017-10-13 Thread Tony Krowiak
matrix devices can then be configured with a matrix of AP adapters, usage and control domains that will be made accessible to the guest. The sysfs location of the matrix device is: /sys/bus/ap_matrix ... [devices] .. [matrix] Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.

[RFC 02/19] KVM: s390: refactor crypto initialization

2017-10-13 Thread Tony Krowiak
processor (AP) instructions. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- arch/s390/include/asm/kvm_host.h |1 + arch/s390/kvm/kvm-s390.c | 17 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/arch/s390/include/asm/kvm_host.h

[RFC 06/19] s390/zcrypt: register matrix device with VFIO mediated device framework

2017-10-13 Thread Tony Krowiak
ces/ap_matrix ... [matrix] .. [mdev_supported_types] . [ap_matrix-passthrough] [devices] ... [$uuid] Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- MAINTAINERS |1 + drivers/s390/crypto/Makefile

[RFC 17/19] KVM: s390: validate input to AP matrix config interface

2017-10-13 Thread Tony Krowiak
is not set, the instruction will fail. The APQNs that can be derived from the bits set in the APM and AQM fields of the KVM guest's CRYCB must not be available to any other KVM guest running on the same system. If any APQN is not unique to the KVM guest, the ioctl will fail. Signed-off-by: Tony Krowiak

[RFC 12/19] s390/zcrypt: sysfs support for control domain assignment

2017-10-13 Thread Tony Krowiak
ned: cat control_domains To unassign control domain 0xff: echo ff > unassign_control_domain Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_matrix_ops.c | 82 ++ 1 files changed, 82 insertions(+), 0 deleti

[RFC 13/19] s390/zcrypt: validate control domain assignment

2017-10-13 Thread Tony Krowiak
The AP control domain being assigned to the mediated matrix driver must be assigned to the LPAR. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_matrix_ops.c | 33 ++ 1 files changed, 33 insertions(+), 0 deletions(-)

[RFC 08/19] s390/zcrypt: support for assigning adapters to matrix mdev

2017-10-13 Thread Tony Krowiak
signed: cat adapters Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- arch/s390/include/asm/ap-config.h| 13 +++ drivers/s390/crypto/vfio_ap_matrix_ops.c | 147 ++ 2 files changed, 160 insertions(+), 0 deletions(-) diff --git

[RFC 18/19] KVM: s390: New ioctl to configure KVM guest's AP matrix

2017-10-13 Thread Tony Krowiak
in the corresponding mediated matrix device's sysfs files. The bit masks will also be returned by the ioctl call to the caller. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_matrix_ops.c | 68 +- include/uapi/linux/

[RFC 01/19] KVM: s390: SIE considerations for AP Queue virtualization

2017-10-13 Thread Tony Krowiak
. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- arch/s390/include/asm/kvm_host.h | 25 + 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 51375e7..50a6b25 100644 ---

[RFC 14/19] KVM: s390: Connect the AP mediated matrix device to KVM

2017-10-13 Thread Tony Krowiak
Registers a group notifier during the open of the mediated device to get information on KVM presence through the VFIO_GROUP_NOTIFY_SET_KVM event. When notified, save the pointer to KVM inside mediated matrix device structure. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- d

[RFC 10/19] s390/zcrypt: sysfs interfaces supporting AP domain assignment

2017-10-13 Thread Tony Krowiak
signed: cat domains Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_matrix_ops.c | 80 ++ 1 files changed, 80 insertions(+), 0 deletions(-) diff --git a/drivers/s390/crypto/vfio_ap_matrix_ops.c b/drivers

[RFC 07/19] KVM: s390: introduce AP matrix configuration interface

2017-10-13 Thread Tony Krowiak
This patch introduces a new compilation unit that will contain all of the data structures and logic for configuring AP adapters, usage domains and control domains for a KVM guest. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- MAINTAINERS |2 ++ arc

Re: [RFC 04/19] s390/zcrypt: create an AP matrix device on the AP matrix bus

2017-10-18 Thread Tony Krowiak
On 10/18/2017 12:20 PM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:49 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: [Please take with a grain of salt as I did not yet have time to take more than a very superficial glance at the whole structure.] Creates a single AP matrix

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-11-27 Thread Tony Krowiak
On 11/22/2017 08:47 AM, Cornelia Huck wrote: On Tue, 21 Nov 2017 11:08:01 -0500 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: I am not quite sure what you are asking, but I'll attempt to answer what I think you're asking. A new type of mediated matrix device will be intr

Re: [RFC 07/19] KVM: s390: introduce AP matrix configuration interface

2017-11-16 Thread Tony Krowiak
On 11/14/2017 08:16 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:52 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: This patch introduces a new compilation unit that will contain all of the data structures and logic for configuring AP adapters, usage domains and control d

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-11-16 Thread Tony Krowiak
On 11/14/2017 08:57 AM, Cornelia Huck wrote: On Tue, 31 Oct 2017 15:39:09 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 10/13/2017 01:38 PM, Tony Krowiak wrote: Ping Tony Krowiak (19): KVM: s390: SIE considerations for AP Queue virtualization KVM: s390: refactor

Re: [RFC 06/19] s390/zcrypt: register matrix device with VFIO mediated device framework

2017-11-16 Thread Tony Krowiak
On 11/14/2017 08:14 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:51 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Registers the matrix device created by the AP matrix bus with the VFIO mediated device framework. Registering the matrix device will create the sysfs stru

Re: [RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver

2017-11-16 Thread Tony Krowiak
On 11/16/2017 07:35 AM, Cornelia Huck wrote: On Thu, 16 Nov 2017 13:02:26 +0100 Pierre Morel <pmo...@linux.vnet.ibm.com> wrote: 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 <akrow...@linux.vne

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-11-17 Thread Tony Krowiak
On 11/17/2017 05:07 AM, Cornelia Huck wrote: On Fri, 17 Nov 2017 08:07:15 +0100 Pierre Morel <pmo...@linux.vnet.ibm.com> wrote: On 17/11/2017 00:35, Tony Krowiak wrote: On 11/16/2017 03:25 PM, Pierre Morel wrote: On 16/11/2017 18:03, Cornelia Huck wrote: On Thu, 16 Nov 2017 17:06:58

Re: [RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver

2017-11-17 Thread Tony Krowiak
On 11/16/2017 11:47 AM, Cornelia Huck wrote: On Thu, 16 Nov 2017 09:25:27 -0500 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 11/16/2017 07:35 AM, Cornelia Huck wrote: On Thu, 16 Nov 2017 13:02:26 +0100 Pierre Morel <pmo...@linux.vnet.ibm.com> wrote: On 14/11/2017

Re: [RFC 03/19] s390/zcrypt: new AP matrix bus

2017-11-14 Thread Tony Krowiak
On 11/14/2017 06:58 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:48 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> 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 wil

Re: [RFC 02/19] KVM: s390: refactor crypto initialization

2017-11-14 Thread Tony Krowiak
On 11/14/2017 06:50 AM, Cornelia Huck wrote: On Thu, 2 Nov 2017 13:41:18 +0100 Christian Borntraeger <borntrae...@de.ibm.com> wrote: On 10/13/2017 07:38 PM, Tony Krowiak wrote: This patch introduces the following changes to crypto initialization. * For key management operations s

Re: [RFC 03/19] s390/zcrypt: new AP matrix bus

2017-11-14 Thread Tony Krowiak
On 11/14/2017 06:58 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:48 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> 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 wil

Re: [RFC 03/19] s390/zcrypt: new AP matrix bus

2017-11-14 Thread Tony Krowiak
On 11/14/2017 06:58 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:48 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> 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 wil

Re: [RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver

2017-11-14 Thread Tony Krowiak
On 11/14/2017 07:40 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:50 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Introduces a new AP matrix device driver. This device driver will ultimately perform the following functions: * Register with the AP bus to let i

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-11-21 Thread Tony Krowiak
On 11/20/2017 12:13 PM, Cornelia Huck wrote: On Fri, 17 Nov 2017 15:28:16 -0500 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 11/17/2017 05:07 AM, Cornelia Huck wrote: On Fri, 17 Nov 2017 08:07:15 +0100 Pierre Morel <pmo...@linux.vnet.ibm.com> wrote: On 17/11/2017

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-11-16 Thread Tony Krowiak
On 11/16/2017 03:25 PM, Pierre Morel wrote: On 16/11/2017 18:03, Cornelia Huck wrote: On Thu, 16 Nov 2017 17:06:58 +0100 Pierre Morel <pmo...@linux.vnet.ibm.com> wrote: On 16/11/2017 16:23, Tony Krowiak wrote: On 11/14/2017 08:57 AM, Cornelia Huck wrote: On Tue, 31 Oct 2017 15:39:09

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-11-16 Thread Tony Krowiak
On 11/16/2017 11:49 AM, Cornelia Huck wrote: On Thu, 16 Nov 2017 10:23:25 -0500 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 11/14/2017 08:57 AM, Cornelia Huck wrote: On Tue, 31 Oct 2017 15:39:09 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 10/13/2017 01

Re: [RFC 08/19] s390/zcrypt: support for assigning adapters to matrix mdev

2017-11-16 Thread Tony Krowiak
On 11/14/2017 08:22 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:53 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Provides the sysfs interfaces for assigning an adapter to and unassigning an AP adapter from a mediated matrix device. The IDs of the AP adapters as

Re: [RFC 05/19] s390/zcrypt: base implementation of AP matrix device driver

2017-11-14 Thread Tony Krowiak
On 11/14/2017 12:00 PM, Cornelia Huck wrote: On Tue, 14 Nov 2017 11:37:05 -0500 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 11/14/2017 07:40 AM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:50 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: diff --git a/drivers

Re: [RFC 19/19] s390/facilities: enable AP facilities needed by guest

2017-11-02 Thread Tony Krowiak
On 11/02/2017 11:53 AM, Christian Borntraeger wrote: On 11/02/2017 04:36 PM, Tony Krowiak wrote: On 11/02/2017 08:08 AM, Christian Borntraeger wrote: On 10/16/2017 11:25 AM, Martin Schwidefsky wrote: On Fri, 13 Oct 2017 13:39:04 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote:

Re: [RFC 18/19] KVM: s390: New ioctl to configure KVM guest's AP matrix

2017-11-02 Thread Tony Krowiak
On 10/13/2017 01:39 PM, Tony Krowiak wrote: Implements an ioctl to configure the adapters, usage domains and control domains to which a KVM guest will be granted access. The ioctl is invoked using the VFIO mediated matrix device's file descriptor. Guest access to AP adapters, usage domains

Re: [RFC 01/19] KVM: s390: SIE considerations for AP Queue virtualization

2017-11-02 Thread Tony Krowiak
On 11/02/2017 07:54 AM, Christian Borntraeger wrote: To make the whole series smaller I will apply some of these patches directly (those of which are "obvious" and touch kvm/s390 only) Okay On 10/13/2017 07:38 PM, Tony Krowiak wrote: The Crypto Control Block (CRYCB) is referenced

Re: [RFC 19/19] s390/facilities: enable AP facilities needed by guest

2017-12-01 Thread Tony Krowiak
On 11/03/2017 04:47 AM, Christian Borntraeger wrote: On 11/02/2017 07:49 PM, Tony Krowiak wrote: On 11/02/2017 11:53 AM, Christian Borntraeger wrote: On 11/02/2017 04:36 PM, Tony Krowiak wrote: On 11/02/2017 08:08 AM, Christian Borntraeger wrote: On 10/16/2017 11:25 AM, Martin Schwidefsky

Re: [RFC 19/19] s390/facilities: enable AP facilities needed by guest

2017-12-05 Thread Tony Krowiak
On 12/05/2017 09:23 AM, Pierre Morel wrote: On 05/12/2017 15:04, Cornelia Huck wrote: On Tue, 5 Dec 2017 08:52:57 +0100 Harald Freudenberger <fre...@linux.vnet.ibm.com> wrote: On 12/02/2017 02:30 AM, Tony Krowiak wrote: I agree with your suggestion that defining a new CPU model f

Re: [RFC 19/19] s390/facilities: enable AP facilities needed by guest

2017-12-05 Thread Tony Krowiak
On 12/05/2017 09:04 AM, Cornelia Huck wrote: On Tue, 5 Dec 2017 08:52:57 +0100 Harald Freudenberger <fre...@linux.vnet.ibm.com> wrote: On 12/02/2017 02:30 AM, Tony Krowiak wrote: I agree with your suggestion that defining a new CPU model feature is probably the best way to resolve this

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-12-05 Thread Tony Krowiak
On 12/05/2017 09:06 AM, Cornelia Huck wrote: On Mon, 27 Nov 2017 19:39:32 -0500 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 11/22/2017 08:47 AM, Cornelia Huck wrote: On Tue, 21 Nov 2017 11:08:01 -0500 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: I am not quite s

Re: [RFC 19/19] s390/facilities: enable AP facilities needed by guest

2017-12-05 Thread Tony Krowiak
On 12/05/2017 02:52 AM, Harald Freudenberger wrote: On 12/02/2017 02:30 AM, Tony Krowiak wrote: On 11/03/2017 04:47 AM, Christian Borntraeger wrote: On 11/02/2017 07:49 PM, Tony Krowiak wrote: On 11/02/2017 11:53 AM, Christian Borntraeger wrote: On 11/02/2017 04:36 PM, Tony Krowiak wrote

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-10-31 Thread Tony Krowiak
On 10/13/2017 01:38 PM, Tony Krowiak wrote: Ping Overview: An adjunct processor (AP) facility is an IBM Z cryptographic facility. The AP facility is comprised of three AP instructions and from 1 to 256 AP adapter cards. The design takes advantage of the interpretive execution mode

Re: [RFC 00/19] KVM: s390/crypto/vfio: guest dedicated crypto adapters

2017-10-30 Thread Tony Krowiak
On 10/30/2017 04:57 AM, Christian Borntraeger wrote: adding qemu devel and add Daniel and Erik from libvirt to keep them in the loop. On 10/29/2017 12:11 PM, Cornelia Huck wrote: On Fri, 13 Oct 2017 13:38:45 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Tony Krowiak (19):

Re: [PATCH v4 01/15] s390: zcrypt: externalize AP instructions available function

2018-05-07 Thread Tony Krowiak
On 05/04/2018 03:19 AM, David Hildenbrand wrote: On 15.04.2018 23:22, Tony Krowiak wrote: If the AP instructions are not available on the linux host, then AP devices can not be interpreted by the SIE. The AP bus has a This statement is wrong. The instructions can be interpreted by SIE e.g

[PATCH v5 09/13] s390: vfio-ap: sysfs interfaces to configure control domains

2018-05-07 Thread Tony Krowiak
the maximum value for an AP domain: * If the AP Extended Addressing (APXA) facility is installed, the max value is 255 * Else the max value is 15 Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_ops.c | 114 +++

[PATCH v5 10/13] s390: vfio-ap: sysfs interface to view matrix mdev matrix

2018-05-07 Thread Tony Krowiak
To view the matrix configured for the mediated matrix device, print the matrix file: cat matrix Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_ops.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-)

[PATCH v5 04/13] s390: vfio-ap: base implementation of VFIO AP device driver

2018-05-07 Thread Tony Krowiak
devices bound to the VFIO AP device driver and serves as the parent of the mediated devices created for each guest. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- MAINTAINERS | 10 +++ arch/s390/Kconfig | 11 +++ driver

[PATCH v5 01/13] KVM: s390: Interface to test whether APXA installed

2018-05-07 Thread Tony Krowiak
instructions will not be accessible if CONFIG_ZCRYPT=n, so the relevant code will be temporarily contained in the new arch/s390/kvm/kvm-ap.c file until the patch(es) to statically build the required AP bus interfaces are available. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.

[PATCH v5 07/13] s390: vfio-ap: sysfs interfaces to configure adapters

2018-05-07 Thread Tony Krowiak
x (APQI) of each of the AP domains previously assigned can not be matched with an APQN of an AP queue device reserved by the VFIO AP driver. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- drivers/s390/crypto/vfio_ap_ops.c | 318 ++

[PATCH v5 00/13] s390: vfio-ap: guest dedicated crypto adapters

2018-05-07 Thread Tony Krowiak
that are unavailable if CONFIG_ZCRYPT=n are temporarily embedded in KVM until available statically via future patch. Tony Krowiak (13): KVM: s390: Interface to test whether APXA installed KVM: s390: refactor crypto initialization KVM: s390: CPU model support for AP virtualization

[PATCH v5 06/13] KVM: s390: interfaces to manage guest's AP matrix

2018-05-07 Thread Tony Krowiak
to the matrix configured for the mediated matrix device via its sysfs assign_adapter, assign_domain and assign_control domain attribute files respectively. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- arch/s390/include/asm/kvm-ap.h | 52 arch/s390/i

[PATCH v5 03/13] KVM: s390: CPU model support for AP virtualization

2018-05-07 Thread Tony Krowiak
matrix configuration. This is a limitation of the AP bus running under the guest. Reviewed-by: Christian Borntraeger <borntrae...@de.ibm.com> Reviewed-by: Halil Pasic <pa...@linux.vnet.ibm.com> Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- arch/s390/include/asm

[PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-05-07 Thread Tony Krowiak
represents a control domain - from most significant to least significant bit - from 0-255. The bits in the ADM are set according to the domain numbers assigned to the mediated matrix device via its 'assign_control_domain' sysfs attribute file. Signed-off-by: Tony Krowiak <ak

[PATCH v5 13/13] s390: doc: detailed specifications for AP virtualization

2018-05-07 Thread Tony Krowiak
This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how to configure AP devices for exclusive use of KVM guests. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- Documen

[PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-07 Thread Tony Krowiak
ugh] [devices] ... [$uuid] Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com> --- MAINTAINERS |1 + drivers/s390/crypto/Makefile |2 +- drivers/s390/crypto/vfio_ap_drv.c |9 +++ drivers/s390/crypto/vfio_ap_ops.c

Re: [PATCH v4 08/15] KVM: s390: interfaces to (de)configure guest's AP matrix

2018-05-07 Thread Tony Krowiak
On 05/03/2018 12:01 PM, Pierre Morel wrote: On 03/05/2018 16:41, Tony Krowiak wrote: On 05/02/2018 10:57 AM, Pierre Morel wrote: On 25/04/2018 18:21, Tony Krowiak wrote: On 04/23/2018 09:46 AM, Pierre Morel wrote: On 15/04/2018 23:22, Tony Krowiak wrote: Provides interfaces to assign AP

[PATCH v5 08/13] s390: vfio-ap: sysfs interfaces to configure domains

2018-05-07 Thread Tony Krowiak
an be derived from the intersection of the APQI being assigned and the AP adapter ID (APID) of each of the AP adapters previously assigned can not be matched with an APQN of an AP queue device reserved by the VFIO AP driver. Signed-off-by: Tony Krowiak <akrow...@linux.vnet.ibm.com>

[PATCH v5 02/13] KVM: s390: refactor crypto initialization

2018-05-07 Thread Tony Krowiak
) facility was installed on the host system. With the introduction of AP device virtualization, the CRYCB and its format must be made accessible to the guest regardless of the presence of the MSAX3 facility as long as the AP instructions are installed on the host. Signed-off-by: Tony Krowiak <ak

[PATCH v5 12/13] s390: vfio-ap: implement VFIO_DEVICE_GET_INFO ioctl

2018-05-07 Thread Tony Krowiak
Introduces ioctl access to the VFIO AP Matrix device driver by implementing the VFIO_DEVICE_GET_INFO ioctl. This ioctl provides the VFIO AP Matrix device driver information to the guest machine. Reviewed-by: Pierre Morel <pmo...@linux.vnet.ibm.com> Signed-off-by: Tony Krowiak

Re: [PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-14 Thread Tony Krowiak
On 05/11/2018 01:18 PM, Halil Pasic wrote: On 05/07/2018 05:11 PM, Tony Krowiak wrote: Registers the matrix device created by the VFIO AP device driver with the VFIO mediated device framework. Registering the matrix device will create the sysfs structures needed to create mediated matrix

Re: [PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-15 Thread Tony Krowiak
On 05/15/2018 10:17 AM, Pierre Morel wrote: On 14/05/2018 21:42, Tony Krowiak wrote: On 05/11/2018 01:18 PM, Halil Pasic wrote: On 05/07/2018 05:11 PM, Tony Krowiak wrote: Registers the matrix device created by the VFIO AP device driver with the VFIO mediated device framework. Registering

Re: [PATCH v5 06/13] KVM: s390: interfaces to manage guest's AP matrix

2018-05-16 Thread Tony Krowiak
On 05/11/2018 12:08 PM, Halil Pasic wrote: On 05/07/2018 05:11 PM, Tony Krowiak wrote: Provides interfaces to manage the AP adapters, usage domains and control domains assigned to a KVM guest. The guest's SIE state description has a satellite structure called the Crypto Control Block (CRYCB

Re: [PATCH v5 06/13] KVM: s390: interfaces to manage guest's AP matrix

2018-05-16 Thread Tony Krowiak
On 05/16/2018 09:15 AM, Pierre Morel wrote: On 16/05/2018 15:12, Tony Krowiak wrote: On 05/16/2018 03:48 AM, Pierre Morel wrote: On 15/05/2018 18:07, Tony Krowiak wrote: On 05/15/2018 10:55 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: Provides interfaces to manage the AP

Re: [PATCH v5 01/13] KVM: s390: Interface to test whether APXA installed

2018-05-16 Thread Tony Krowiak
On 05/16/2018 06:21 AM, Cornelia Huck wrote: On Mon, 7 May 2018 11:11:40 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Relocates an existing static function that tests whether the AP extended addressing facility (APXA) is installed on the linux host. The primary

Re: [PATCH v5 02/13] KVM: s390: refactor crypto initialization

2018-05-16 Thread Tony Krowiak
On 05/16/2018 04:51 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: This patch refactors the code that initializes the crypto configuration for a guest. The crypto configuration is contained in a crypto control block (CRYCB) which is a satellite control block to our main

Re: [PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-16 Thread Tony Krowiak
On 05/16/2018 06:42 AM, Cornelia Huck wrote: On Mon, 7 May 2018 11:11:44 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Registers the matrix device created by the VFIO AP device driver with the VFIO mediated device framework. Registering the matrix device will create the

Re: [PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-16 Thread Tony Krowiak
On 05/16/2018 06:42 AM, Cornelia Huck wrote: On Mon, 7 May 2018 11:11:44 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: Registers the matrix device created by the VFIO AP device driver with the VFIO mediated device framework. Registering the matrix device will create the

Re: [PATCH v5 06/13] KVM: s390: interfaces to manage guest's AP matrix

2018-05-16 Thread Tony Krowiak
On 05/16/2018 03:48 AM, Pierre Morel wrote: On 15/05/2018 18:07, Tony Krowiak wrote: On 05/15/2018 10:55 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: Provides interfaces to manage the AP adapters, usage domains and control domains assigned to a KVM guest. The guest's SIE

Re: [PATCH v5 04/13] s390: vfio-ap: base implementation of VFIO AP device driver

2018-05-16 Thread Tony Krowiak
On 05/16/2018 04:21 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: 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

Re: [PATCH v5 04/13] s390: vfio-ap: base implementation of VFIO AP device driver

2018-05-16 Thread Tony Krowiak
On 05/16/2018 04:21 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: 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

Re: [PATCH v5 06/13] KVM: s390: interfaces to manage guest's AP matrix

2018-05-15 Thread Tony Krowiak
On 05/15/2018 10:55 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: Provides interfaces to manage the AP adapters, usage domains and control domains assigned to a KVM guest. The guest's SIE state description has a satellite structure called the Crypto Control Block (CRYCB

Re: [PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-15 Thread Tony Krowiak
On 05/15/2018 11:48 AM, Halil Pasic wrote: On 05/15/2018 05:16 PM, Tony Krowiak wrote: On 05/15/2018 10:17 AM, Pierre Morel wrote: On 14/05/2018 21:42, Tony Krowiak wrote: On 05/11/2018 01:18 PM, Halil Pasic wrote: On 05/07/2018 05:11 PM, Tony Krowiak wrote: Registers the matrix device

Re: [PATCH v5 06/13] KVM: s390: interfaces to manage guest's AP matrix

2018-05-21 Thread Tony Krowiak
On 05/16/2018 10:41 AM, Pierre Morel wrote: On 16/05/2018 16:29, Tony Krowiak wrote: On 05/11/2018 12:08 PM, Halil Pasic wrote: On 05/07/2018 05:11 PM, Tony Krowiak wrote: Provides interfaces to manage the AP adapters, usage domains and control domains assigned to a KVM guest. The guest's

Re: [PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-21 Thread Tony Krowiak
On 05/17/2018 03:44 AM, Cornelia Huck wrote: On Mon, 14 May 2018 15:42:18 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 05/11/2018 01:18 PM, Halil Pasic wrote: On 05/07/2018 05:11 PM, Tony Krowiak wrote: Registers the matrix device created by the VFIO AP device

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-05-23 Thread Tony Krowiak
On 05/16/2018 04:03 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: Implements the open callback on the mediated matrix device. The function registers a group notifier to receive notification of the VFIO_GROUP_NOTIFY_SET_KVM event. When notified, the vfio_ap device driver

Re: [PATCH v5 10/13] s390: vfio-ap: sysfs interface to view matrix mdev matrix

2018-05-23 Thread Tony Krowiak
On 05/16/2018 03:55 AM, Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: Provides a sysfs interface to view the AP matrix configured for the mediated matrix device. The relevant sysfs structures are: /sys/devices/vfio_ap ... [matrix] .. [mdev_supported_types

Re: [PATCH v5 06/13] KVM: s390: interfaces to manage guest's AP matrix

2018-05-23 Thread Tony Krowiak
On 05/18/2018 04:55 AM, Pierre Morel wrote: On 16/05/2018 15:48, Tony Krowiak wrote: On 05/16/2018 09:15 AM, Pierre Morel wrote: On 16/05/2018 15:12, Tony Krowiak wrote: On 05/16/2018 03:48 AM, Pierre Morel wrote: On 15/05/2018 18:07, Tony Krowiak wrote: On 05/15/2018 10:55 AM, Pierre Morel

Re: [PATCH v5 05/13] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-05-22 Thread Tony Krowiak
On 05/22/2018 04:19 AM, Cornelia Huck wrote: On Mon, 21 May 2018 11:13:58 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 05/17/2018 03:44 AM, Cornelia Huck wrote: On Mon, 14 May 2018 15:42:18 -0400 Tony Krowiak <akrow...@linux.vnet.ibm.com> wrote: On 05/11/2018 01:

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-06-07 Thread Tony Krowiak
On 06/06/2018 01:40 PM, Pierre Morel wrote: On 06/06/2018 18:08, Pierre Morel wrote: On 06/06/2018 16:28, Tony Krowiak wrote: On 06/05/2018 08:19 AM, Pierre Morel wrote: On 30/05/2018 16:33, Tony Krowiak wrote: On 05/24/2018 05:08 AM, Pierre Morel wrote: On 23/05/2018 16:45, Tony Krowiak

Re: [PATCH v5 10/13] s390: vfio-ap: sysfs interface to view matrix mdev matrix

2018-06-07 Thread Tony Krowiak
On 06/06/2018 11:10 AM, Pierre Morel wrote: On 06/06/2018 16:24, Tony Krowiak wrote: On 06/05/2018 08:40 AM, Pierre Morel wrote: On 30/05/2018 16:28, Tony Krowiak wrote: On 05/24/2018 05:10 AM, Pierre Morel wrote: On 23/05/2018 16:38, Tony Krowiak wrote: On 05/16/2018 03:55 AM, Pierre Morel

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-06-07 Thread Tony Krowiak
On 06/06/2018 12:08 PM, Pierre Morel wrote: On 06/06/2018 16:28, Tony Krowiak wrote: On 06/05/2018 08:19 AM, Pierre Morel wrote: On 30/05/2018 16:33, Tony Krowiak wrote: On 05/24/2018 05:08 AM, Pierre Morel wrote: On 23/05/2018 16:45, Tony Krowiak wrote: On 05/16/2018 04:03 AM, Pierre Morel

Re: [PATCH v5 10/13] s390: vfio-ap: sysfs interface to view matrix mdev matrix

2018-06-07 Thread Tony Krowiak
On 06/07/2018 09:16 AM, Halil Pasic wrote: On 06/07/2018 02:53 PM, Tony Krowiak wrote: 2) As I said above, what you show is not the effective mask used by the guest Why would a sysfs attribute for the mediated matrix device show the effective mask used by the guest? OK, bad word

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-06-07 Thread Tony Krowiak
On 06/07/2018 11:20 AM, Pierre Morel wrote: On 07/06/2018 15:54, Tony Krowiak wrote: On 06/06/2018 01:40 PM, Pierre Morel wrote: On 06/06/2018 18:08, Pierre Morel wrote: On 06/06/2018 16:28, Tony Krowiak wrote: On 06/05/2018 08:19 AM, Pierre Morel wrote: On 30/05/2018 16:33, Tony Krowiak

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-06-08 Thread Tony Krowiak
On 06/07/2018 01:15 PM, Pierre Morel wrote: We have internal structures like the ap_matrix and kvm_ap_matrix which look like the bus/devices we had previously but are differently or not at all integrated with the LDD. What is LDD? Are you talking about dependencies between the vfio_ap

Re: [PATCH v5 04/13] s390: vfio-ap: base implementation of VFIO AP device driver

2018-06-14 Thread Tony Krowiak
, 13 Jun 2018 09:41:16 +0200 Pierre Morel wrote: On 07/05/2018 17:11, Tony Krowiak wrote: 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

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-06-11 Thread Tony Krowiak
On 06/11/2018 12:50 PM, Halil Pasic wrote: On 06/11/2018 06:26 PM, Tony Krowiak wrote: @Janosch: Does core KVM share my opinion? At least I do. KVM does not care about who has which crypto queue/card. I'd like to have a driver that does internal bookkeeping and then registers the crycb

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-06-11 Thread Tony Krowiak
On 06/11/2018 07:32 AM, Halil Pasic wrote: On 06/11/2018 11:23 AM, Pierre Morel wrote: On 08/06/2018 23:59, Tony Krowiak wrote: On 06/07/2018 01:15 PM, Pierre Morel wrote: ...snip... Why maintain a list of kvm_ap_matrix structures if we don't have to; it is stored with the mediated

Re: [PATCH v5 11/13] KVM: s390: implement mediated device open callback

2018-06-11 Thread Tony Krowiak
On 06/11/2018 05:23 AM, Pierre Morel wrote: On 08/06/2018 23:59, Tony Krowiak wrote: On 06/07/2018 01:15 PM, Pierre Morel wrote: ...snip... Why maintain a list of kvm_ap_matrix structures if we don't have to; it is stored with the mediated matrix device which is passed in to all

  1   2   3   4   5   6   7   8   9   10   >