Re: [PATCH v3] crypto: add virtio-crypto driver

2016-11-28 Thread Halil Pasic
On 11/28/2016 06:19 PM, Michael S. Tsirkin wrote: >>> +static int virtio_crypto_alg_ablkcipher_init_session( >>> > > + struct virtio_crypto_ablkcipher_ctx *ctx, >>> > > + uint32_t alg, const uint8_t *key, >>> > > + unsigned int keylen, >>> > > +

Re: [Qemu-devel] [PATCH v7 1/1] crypto: add virtio-crypto driver

2016-12-14 Thread Halil Pasic
On 12/14/2016 12:50 PM, Gonglei wrote: > diff --git a/drivers/crypto/virtio/virtio_crypto_core.c > b/drivers/crypto/virtio/virtio_crypto_core.c > new file mode 100644 > index 000..c0854a1 > --- /dev/null > +++ b/drivers/crypto/virtio/virtio_crypto_core.c > @@ -0,0 +1,474 @@ [..] > + >

Re: [PATCH v6 2/2] crypto: add virtio-crypto driver

2016-12-13 Thread Halil Pasic
On 12/12/2016 11:05 PM, Michael S. Tsirkin wrote: > On Mon, Dec 12, 2016 at 06:54:07PM +0800, Herbert Xu wrote: >> On Mon, Dec 12, 2016 at 06:25:12AM +, Gonglei (Arei) wrote: >>> Hi, Michael & Herbert >>> >>> Because the virtio-crypto device emulation had been in QEMU 2.8, >>> would you

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

2017-11-02 Thread Halil Pasic
On 11/02/2017 01:08 PM, Christian Borntraeger wrote: > > > On 10/16/2017 11:25 AM, Martin Schwidefsky wrote: >> On Fri, 13 Oct 2017 13:39:04 -0400 >> Tony Krowiak wrote: >> >>> Sets up the following facilities bits to enable the specified AP >>> facilities for the

Re: [PATCH 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-14 Thread Halil Pasic
On 05/14/2018 04:00 PM, Cornelia Huck wrote: On Mon, 14 May 2018 15:37:17 +0200 Halil Pasic <pa...@linux.ibm.com> wrote: On 05/14/2018 01:55 PM, Cornelia Huck wrote: On Wed, 9 May 2018 19:36:47 +0200 Halil Pasic <pa...@linux.ibm.c

Re: [PATCH 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-14 Thread Halil Pasic
On 05/14/2018 01:55 PM, Cornelia Huck wrote: On Wed, 9 May 2018 19:36:47 +0200 Halil Pasic <pa...@linux.ibm.com> wrote: There is at least one relevant control program (CP) that don't set the I'd prefer not to talk about 'control program' here, as it is not a term commonly used in

[PATCH 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-09 Thread Halil Pasic
if the channel program is a not supported one. Of course, the real solution would be doing proper translation for all IDA. This is possible, but given the current code not straight forward. Signed-off-by: Halil Pasic <pa...@linux.ibm.com> Tested-by: Jason J. Herne <jjhe...@linux.ibm.com&g

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

2018-05-11 Thread Halil Pasic
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) containing three bitmask fields identifying

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

2018-05-11 Thread Halil Pasic
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 devices each of which will be used to configure

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

2018-05-15 Thread Halil Pasic
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 created by the VFIO AP device driver

[PATCH v2 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-16 Thread Halil Pasic
if the channel program is a not supported one. Of course, the real solution would be doing proper translation for all IDA. This is possible, but given the current code not straight forward. Signed-off-by: Halil Pasic <pa...@linux.ibm.com> Tested-by: Jason J. Herne <jjhe...@linux.ibm.com> ---

Re: [PATCH v4 0/2] vfio/mdev: Device namespace protection

2018-05-23 Thread Halil Pasic
On 05/23/2018 10:56 AM, Cornelia Huck wrote: On Tue, 22 May 2018 12:38:29 -0600 Alex Williamson <alex.william...@redhat.com> wrote: On Tue, 22 May 2018 19:17:07 +0200 Halil Pasic <pa...@linux.ibm.com> wrote: From vfio-ccw perspective I join Connie's assessment: vfio-ccw sh

Re: [PATCH v3] vfio/mdev: Check globally for duplicate devices

2018-05-18 Thread Halil Pasic
On 05/17/2018 10:09 AM, Cornelia Huck wrote: [Dong Jia, Halil: Can you please take a look whether vfio-ccw is really ok? I don't think we open up any new races, but I'd appreciate a second or third opinion.] I will wait for things to settle a bit before I start reviewing the synchronization

Re: [PATCH v4 0/2] vfio/mdev: Device namespace protection

2018-05-22 Thread Halil Pasic
From vfio-ccw perspective I join Connie's assessment: vfio-ccw should be fine with these changes. I'm however not too deeply involved with the mdev framework, thus I don't feel comfortable r-b-ing. That results in Acked-by: Halil Pasic <pa...@linux.ibm.com> for both patches. While at it

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

2018-06-07 Thread Halil Pasic
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, "effective", replace with "really". We do not 

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

2018-06-11 Thread Halil Pasic
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 with KVM, so the VM can use it. I am not sure 

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

2018-06-11 Thread Halil Pasic
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 matrix device which is passed in to all of

Re: [PATCH v6 07/21] s390: vfio-ap: base implementation of VFIO AP device driver

2018-07-02 Thread Halil Pasic
On 06/29/2018 11:11 PM, 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 on the linux host. The VFIO AP device

Re: [PATCH v6 21/21] s390: doc: detailed specifications for AP virtualization

2018-07-02 Thread Halil Pasic
On 06/29/2018 11:11 PM, Tony Krowiak wrote: 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

Re: [PATCH v6 21/21] s390: doc: detailed specifications for AP virtualization

2018-07-03 Thread Halil Pasic
On 07/03/2018 09:46 AM, Harald Freudenberger wrote: On 02.07.2018 18:28, Halil Pasic wrote: On 06/29/2018 11:11 PM, Tony Krowiak wrote: This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example

Re: [PATCH v6 05/21] KVM: s390: CPU model support for AP virtualization

2018-07-02 Thread Halil Pasic
, then no AP devices will be available to the guest regardless of the guest's matrix configuration. This is a limitation of the AP bus running under the guest. Reviewed-by: Christian Borntraeger Reviewed-by: Halil Pasic Signed-off-by: Tony Krowiak I think it probably should be at the end

Re: [PATCH v6 05/21] KVM: s390: CPU model support for AP virtualization

2018-07-02 Thread Halil Pasic
Borntraeger Reviewed-by: Halil Pasic Signed-off-by: Tony Krowiak I think it probably should be at the end of the series, other than that its good. If I move this to the end of the series, the very next patch checks the KVM_S390_VM_CPU_FEAT_AP feature? The point is the following: never expose

Re: [PATCH v6 21/21] s390: doc: detailed specifications for AP virtualization

2018-07-02 Thread Halil Pasic
On 06/29/2018 11:11 PM, Tony Krowiak wrote: 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

Re: [PATCH v6 21/21] s390: doc: detailed specifications for AP virtualization

2018-07-03 Thread Halil Pasic
On 07/03/2018 01:52 PM, Cornelia Huck wrote: On Tue, 3 Jul 2018 11:22:10 +0200 Halil Pasic wrote: [..] Let me try to invoke the DASD analogy. If one for some reason wants to detach a DASD the procedure to follow seems to be (see https://www.ibm.com/support/knowledgecenter/en/linuxonibm

Re: [PATCH v2 5/5] vfio: ccw: add traceponits for interesting error paths

2018-04-30 Thread Halil Pasic
m> wrote: typo in subject: s/traceponits/tracepoints/ From: Halil Pasic <pa...@linux.vnet.ibm.com> Add some tracepoints so we can inspect what is not working as is should. Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdj...@linux.vne

Re: [PATCH v2 5/5] vfio: ccw: add traceponits for interesting error paths

2018-04-30 Thread Halil Pasic
On 04/30/2018 05:03 PM, Cornelia Huck wrote: I think the naming of this fctl thing is a bit cryptic, but if we don't see this as ABI I'm fine with it -- can be improved. What would be a better name? I was thinking along the lines accept_request. (Bad error code would mean that the request did

Re: [PATCH v6 21/21] s390: doc: detailed specifications for AP virtualization

2018-07-03 Thread Halil Pasic
On 07/03/2018 03:25 PM, Cornelia Huck wrote: On Tue, 3 Jul 2018 14:20:11 +0200 Halil Pasic wrote: On 07/03/2018 01:52 PM, Cornelia Huck wrote: On Tue, 3 Jul 2018 11:22:10 +0200 Halil Pasic wrote: [..] Let me try to invoke the DASD analogy. If one for some reason wants to detach

Re: [PATCH v2] vfio-ccw: update documentation

2018-01-16 Thread Halil Pasic
> in regular documentation. > - Fix some typos. > - Describe the current limitations in more detail. > > Signed-off-by: Cornelia Huck <coh...@redhat.com> > --- Acked-by: Halil Pasic <pa...@linux.vnet.ibm.com>

Re: [PATCH 1/1] vfio-ccw: update documentation

2018-01-16 Thread Halil Pasic
On 01/15/2018 11:43 AM, Cornelia Huck wrote: > The vfio-ccw documentation comes from the cover letter of the > original patch submission, which shows in some parts. Give it some > love; in particular: > > - Remove/rework statements that make sense in a cover letter, but not > in regular

Re: [Qemu-devel] [RFC PATCH 0/3] vfio: ccw: basic channel path event handling

2018-01-16 Thread Halil Pasic
On 01/15/2018 09:59 AM, Dong Jia Shi wrote: > * Halil Pasic <pa...@linux.vnet.ibm.com> [2018-01-12 19:10:20 +0100]: > >> >> >> On 01/11/2018 04:04 AM, Dong Jia Shi wrote: >>> What are still missing, thus need to be offered in the next version are: >&

Re: [Qemu-devel] [RFC PATCH 0/3] vfio: ccw: basic channel path event handling

2018-01-25 Thread Halil Pasic
On 01/23/2018 07:23 AM, Dong Jia Shi wrote: > * Halil Pasic <pa...@linux.vnet.ibm.com> [2018-01-16 16:57:13 +0100]: > >> >> >> On 01/15/2018 09:59 AM, Dong Jia Shi wrote: >>> * Halil Pasic <pa...@linux.vnet.ibm.com> [2018-01-12 19:10:20 +0100]: &g

Re: [Qemu-devel] [RFC PATCH 0/3] vfio: ccw: basic channel path event handling

2018-01-12 Thread Halil Pasic
On 01/11/2018 04:04 AM, Dong Jia Shi wrote: > What are still missing, thus need to be offered in the next version are: > - I/O termination and FSM state handling if currently we have I/O on the > status > switched path. > - Vary on/off event is not sensible to a guest. I don't see a doc

Re: [PATCH v9 12/22] s390: vfio-ap: sysfs interfaces to configure control domains

2018-08-20 Thread Halil Pasic
On 08/20/2018 04:23 PM, Cornelia Huck wrote: On Mon, 13 Aug 2018 17:48:09 -0400 Tony Krowiak wrote: From: Tony Krowiak Provides the sysfs interfaces for: 1. Assigning AP control domains to the mediated matrix device 2. Unassigning AP control domains from a mediated matrix device 3.

Re: [PATCH v9 12/22] s390: vfio-ap: sysfs interfaces to configure control domains

2018-08-21 Thread Halil Pasic
On 08/21/2018 07:07 PM, Tony Krowiak wrote: On 08/21/2018 11:25 AM, Cornelia Huck wrote: On Mon, 20 Aug 2018 13:41:32 -0400 Tony Krowiak wrote: On 08/20/2018 10:23 AM, Cornelia Huck wrote: On Mon, 13 Aug 2018 17:48:09 -0400 Tony Krowiak wrote: From: Tony Krowiak Provides the sysfs

Re: [PATCH v9 22/22] s390: doc: detailed specifications for AP virtualization

2018-08-21 Thread Halil Pasic
On 08/20/2018 10:16 PM, Tony Krowiak wrote: Does the SIE complain if you specify a control domain that the host does not have access to (I'd guess so)? The SIE does not complain if you specify a domain to which the host - or a lower level guest - does not have access. The firmware performs 

Re: [PATCH v9 12/22] s390: vfio-ap: sysfs interfaces to configure control domains

2018-08-27 Thread Halil Pasic
On 08/27/2018 03:51 PM, Cornelia Huck wrote: On Mon, 27 Aug 2018 09:47:58 -0400 Tony Krowiak wrote: On 08/27/2018 04:33 AM, Cornelia Huck wrote: On Thu, 23 Aug 2018 10:16:59 -0400 Tony Krowiak wrote: On 08/23/2018 06:25 AM, Cornelia Huck wrote: On Wed, 22 Aug 2018 15:16:19 -0400

Re: [PATCH v9 12/22] s390: vfio-ap: sysfs interfaces to configure control domains

2018-08-22 Thread Halil Pasic
On 08/22/2018 11:42 AM, Cornelia Huck wrote: On Wed, 22 Aug 2018 01:18:20 +0200 Halil Pasic wrote: On 08/21/2018 07:07 PM, Tony Krowiak wrote: This convention has been enforced by the kernel since v1. This is also enforced by both the LPAR as well as in z/VM. The following is from the PR

Re: [PATCH v9 22/22] s390: doc: detailed specifications for AP virtualization

2018-08-22 Thread Halil Pasic
On 08/22/2018 12:13 PM, Harald Freudenberger wrote: ... about control domains Talked with the s390 firmware guys. The convention that the control domain mask is a superset of the usage domain mask is only true for 1st level guests. It is absolutely valid to run a kvm guest with restricted

Re: [PATCH v9 21/22] KVM: s390: CPU model support for AP virtualization

2018-08-23 Thread Halil Pasic
, then no AP devices will be available to the guest regardless of the guest's matrix configuration for the virtual machine. This is a limitation of the Linux AP bus. Signed-off-by: Tony Krowiak Reviewed-by: Christian Borntraeger Reviewed-by: Halil Pasic Tested-by: Michael Mueller

Re: [PATCH v9 12/22] s390: vfio-ap: sysfs interfaces to configure control domains

2018-08-23 Thread Halil Pasic
On 08/22/2018 09:16 PM, Tony Krowiak wrote: On 08/22/2018 01:11 PM, Halil Pasic wrote: On 08/22/2018 05:48 PM, Christian Borntraeger wrote: On 08/22/2018 05:34 PM, Pierre Morel wrote: On 22/08/2018 17:11, Christian Borntraeger wrote: On 08/22/2018 01:03 PM, Pierre Morel wrote: That's

Re: [PATCH v9 12/22] s390: vfio-ap: sysfs interfaces to configure control domains

2018-08-22 Thread Halil Pasic
On 08/22/2018 05:48 PM, Christian Borntraeger wrote: On 08/22/2018 05:34 PM, Pierre Morel wrote: On 22/08/2018 17:11, Christian Borntraeger wrote: On 08/22/2018 01:03 PM, Pierre Morel wrote: That's interesting. IMHO this quote is quite a half-full half-empty cup one: * it mandates the

Re: [PATCH v9 21/22] KVM: s390: CPU model support for AP virtualization

2018-08-23 Thread Halil Pasic
On 08/23/2018 02:47 PM, Pierre Morel wrote: On 23/08/2018 13:12, David Hildenbrand wrote: [..] I'm confused, which 128 bit? Me too :) , I was assuming this block to be 128bit, but the qci block has 128 bytes And looking at arch/s390/include/asm/ap.h, there is a lot of information

Re: [PATCH v9 21/22] KVM: s390: CPU model support for AP virtualization

2018-08-24 Thread Halil Pasic
On 08/23/2018 07:40 PM, David Hildenbrand wrote: On 23.08.2018 19:35, Tony Krowiak wrote: On 08/23/2018 10:59 AM, Pierre Morel wrote: On 23/08/2018 15:38, David Hildenbrand wrote: On 23.08.2018 15:22, Halil Pasic wrote: On 08/23/2018 02:47 PM, Pierre Morel wrote: On 23/08/2018 13:12

Re: [PATCH v9 09/22] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-09-10 Thread Halil Pasic
ces/vfio_ap/matrix/[$uuid] Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Signed-off-by: Christian Borntraeger ---   MAINTAINERS   |    1 +   drivers/s390/crypto/Makefile  |    2 +-   drivers/s390/cry

Re: [PATCH v6 09/21] s390: vfio-ap: structure for storing mdev matrix

2018-07-06 Thread Halil Pasic
On 06/29/2018 11:11 PM, Tony Krowiak wrote: From: Tony Krowiak Introduces a new structure for storing the AP matrix configured for the mediated matrix device via its sysfs attributes files. Signed-off-by: Tony Krowiak --- drivers/s390/crypto/vfio_ap_ops.c | 12

Re: [PATCH v6 14/21] s390: vfio-ap: implement mediated device open callback

2018-07-13 Thread Halil Pasic
On 07/12/2018 06:03 PM, Tony Krowiak wrote: +static int vfio_ap_mdev_open(struct mdev_device *mdev) +{ +struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); +struct ap_matrix_dev *matrix_dev = +to_ap_matrix_dev(mdev_parent_dev(mdev)); +unsigned long events; +

Re: [PATCH v6 15/21] s390: vfio-ap: configure the guest's AP matrix

2018-07-11 Thread Halil Pasic
On 06/29/2018 11:11 PM, Tony Krowiak wrote: From: Tony Krowiak Configures the AP adapters, usage domains and control domains for the KVM guest from the matrix configured via the mediated matrix device's sysfs attribute files. [..] + +static void kvm_ap_set_crycb_masks(struct

Re: [PATCH v6 14/21] s390: vfio-ap: implement mediated device open callback

2018-07-12 Thread Halil Pasic
On 06/29/2018 11:11 PM, 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 will get access to the guest's kvm

Re: [PATCH v6 15/21] s390: vfio-ap: configure the guest's AP matrix

2018-07-12 Thread Halil Pasic
On 06/29/2018 11:11 PM, Tony Krowiak wrote: From: Tony Krowiak Configures the AP adapters, usage domains and control domains for the [..] +static inline void kvm_ap_clear_crycb_masks(struct ap_matrix_mdev *matrix_mdev) +{ + memset(_mdev->kvm->arch.crypto.crycb->apcb0, 0, +

Re: [PATCH v6 21/21] s390: doc: detailed specifications for AP virtualization

2018-07-09 Thread Halil Pasic
On 07/09/2018 05:21 AM, Pierre Morel wrote: On 03/07/2018 01:10, Halil Pasic wrote: On 06/29/2018 11:11 PM, Tony Krowiak wrote: This patch provides documentation describing the AP architecture and design concepts behind the virtualization of AP devices. It also includes an example of how

Re: [PATCH v6 21/21] s390: doc: detailed specifications for AP virtualization

2018-07-03 Thread Halil Pasic
On 07/03/2018 04:30 PM, Cornelia Huck wrote: On Tue, 3 Jul 2018 15:58:37 +0200 Halil Pasic wrote: On 07/03/2018 03:25 PM, Cornelia Huck wrote: On Tue, 3 Jul 2018 14:20:11 +0200 Halil Pasic wrote: On 07/03/2018 01:52 PM, Cornelia Huck wrote: On Tue, 3 Jul 2018 11:22:10 +0200 Halil

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

2018-07-13 Thread Halil Pasic
On 07/13/2018 02:24 PM, Tony Krowiak wrote: On 07/09/2018 04:38 PM, Pierre Morel wrote: On 09/07/2018 14:20, Pierre Morel wrote: On 29/06/2018 23:11, Tony Krowiak wrote: Provides a sysfs interface to view the AP matrix configured for the mediated matrix device. The relevant sysfs

Re: [PATCH 1/1] vfio-ccw: fence off transport mode

2018-03-01 Thread Halil Pasic
ad of trying to process tcws as ccws. > > Signed-off-by: Cornelia Huck <coh...@redhat.com> Acked-by: Halil Pasic <pa...@linux.vnet.ibm.com> > --- > drivers/s390/cio/vfio_ccw_fsm.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/s390/cio/vfi

Re: [PATCH v3 04/14] KVM: s390: device attribute to set AP interpretive execution

2018-03-15 Thread Halil Pasic
On 03/15/2018 04:23 PM, Tony Krowiak wrote: > On 03/14/2018 05:57 PM, Halil Pasic wrote: >> >> On 03/14/2018 07:25 PM, Tony Krowiak wrote: >>> The VFIO AP device model exploits interpretive execution of AP >>> instructions (APIE) to provide guests passthrough acc

Re: [PATCH v3 04/14] KVM: s390: device attribute to set AP interpretive execution

2018-03-14 Thread Halil Pasic
On 03/14/2018 07:25 PM, Tony Krowiak wrote: > The VFIO AP device model exploits interpretive execution of AP > instructions (APIE) to provide guests passthrough access to AP > devices. This patch introduces a new device attribute in the > KVM_S390_VM_CRYPTO device attribute group to set APIE

Re: [PATCH 4/4] vfio: ccw: add traceponits for interesting error paths

2018-04-10 Thread Halil Pasic
On 04/10/2018 10:55 AM, Cornelia Huck wrote: > On Tue, 10 Apr 2018 10:16:39 +0800 > Dong Jia Shi wrote: > >> Does the following effect make sense? >> >> # tracer: nop >> # >> # _-=> irqs-off >> # /

Re: [PATCH v4 02/15] KVM: s390: reset crypto attributes for all vcpus

2018-04-17 Thread Halil Pasic
On 04/15/2018 11:22 PM, Tony Krowiak wrote: Introduces a new function to reset the crypto attributes for all vcpus whether they are running or not. Each vcpu in KVM will be removed from SIE prior to resetting the crypto attributes in its SIE state description. After all vcpus have had their

Re: [PATCH v4 13/15] KVM: s390: configure the guest's AP devices

2018-04-16 Thread Halil Pasic
On 04/16/2018 03:05 PM, Pierre Morel wrote: >> +static void vfio_ap_mdev_release(struct mdev_device *mdev) >> +{ >> +struct ap_matrix_mdev *matrix_mdev = mdev_get_drvdata(mdev); >> + >> +kvm_ap_deconfigure_matrix(matrix_mdev->kvm); >> +kvm_ap_interpret_instructions(matrix_mdev->kvm, 

Re: [PATCH v4 05/15] KVM: s390: enable/disable AP interpretive execution

2018-04-16 Thread Halil Pasic
On 04/16/2018 01:13 PM, Pierre Morel wrote: > On 16/04/2018 12:51, Pierre Morel wrote: >> On 15/04/2018 23:22, Tony Krowiak wrote: >>> The VFIO AP device model exploits interpretive execution of AP >>> instructions (APIE) to provide guests passthrough access to AP >>> devices. This patch

Re: [PATCH v4 05/15] KVM: s390: enable/disable AP interpretive execution

2018-04-16 Thread Halil Pasic
On 04/15/2018 11:22 PM, Tony Krowiak wrote: > The VFIO AP device model exploits interpretive execution of AP > instructions (APIE) to provide guests passthrough access to AP > devices. This patch introduces a new interface to enable and > disable APIE. > > Signed-off-by: Tony Krowiak

Re: [PATCH] vfio-ccw: process ssch with interrupts disabled

2018-04-19 Thread Halil Pasic
is the same as the ccwdevice lock that is mentioned in the documentation for ccw_device_start() and friends. Signed-off-by: Cornelia Huck<coh...@redhat.com> Acked-by: Halil Pasic <pa...@linux.vnet.ibm.com>

Re: [PATCH 1/4] vfio: ccw: fix cleanup if cp_prefetch fails

2018-04-20 Thread Halil Pasic
On 04/20/2018 01:36 PM, Cornelia Huck wrote: On Fri, 20 Apr 2018 12:54:26 +0200 Halil Pasic <pa...@linux.vnet.ibm.com> wrote: ping I think get this fixed. Better sooner than later. [..] Hm, it seems that drowned in other patches... can I get a re-send, please? I guess Do

Re: [PATCH 1/4] vfio: ccw: fix cleanup if cp_prefetch fails

2018-04-20 Thread Halil Pasic
y: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> Signed-off-by: Halil Pasic <pa...@linux.vnet.ibm.com> Signed-off-by: Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> --- drivers/s390/cio/vfio_ccw_cp.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/s

Re: [PATCH 01/10] vfio: ccw: Moving state change out of IRQ context

2018-04-24 Thread Halil Pasic
On 04/24/2018 11:59 AM, Cornelia Huck wrote: On Tue, 24 Apr 2018 10:40:56 +0200 Pierre Morel wrote: On 24/04/2018 08:54, Dong Jia Shi wrote: * Pierre Morel [2018-04-19 16:48:04 +0200]: [...] @@ -94,9 +83,15 @@ static void

Re: [PATCH 01/10] vfio: ccw: Moving state change out of IRQ context

2018-04-25 Thread Halil Pasic
On 04/25/2018 08:57 AM, Cornelia Huck wrote: AFAIU this will be the problem of the person implementing the clear and the halt for vfio-ccw. I.e. it's a non-problem right now. Well, that person is me:) I will post some RFC Real Soon Now if I stop getting sidetracked... Makes sense. It

Re: [PATCH v2 1/5] vfio: ccw: fix cleanup if cp_prefetch fails

2018-04-25 Thread Halil Pasic
On 04/25/2018 04:43 AM, Dong Jia Shi wrote: [Some procedural notes: I've created a new vfio-ccw-fixes branch based on the s390 fixes branch for easier handling. Things targeted for the next release will go on the vfio-ccw branch on top of the s390 features branch, as before. Does that work for

Re: [PATCH v2 1/5] vfio: ccw: fix cleanup if cp_prefetch fails

2018-04-23 Thread Halil Pasic
On 04/23/2018 01:01 PM, Dong Jia Shi wrote: From: Halil Pasic <pa...@linux.vnet.ibm.com> If the translation of a channel program fails, we may end up attempting to clean up (free, unpin) stuff that never got translated (and allocated, pinned) in the first place. By adjusting the l

Re: [PATCH v2 1/5] vfio: ccw: fix cleanup if cp_prefetch fails

2018-04-23 Thread Halil Pasic
On 04/23/2018 01:40 PM, Cornelia Huck wrote: On Mon, 23 Apr 2018 13:01:09 +0200 Dong Jia Shi <bjsdj...@linux.vnet.ibm.com> wrote: From: Halil Pasic <pa...@linux.vnet.ibm.com> If the translation of a channel program fails, we may end up attempting to clean up (free, unpin) stuf

Re: [PATCH] KVM: s390: reset crypto attributes for all vcpus

2018-04-22 Thread Halil Pasic
 potentially get out of synch for running vcpus. Reported-by: Halil Pasic <pa...@linux.vnet.ibm.com> A reported-by for a code refactoring is strange. I was asked to include this. Is this a refactoring or a fix? I the message you state that you are fixing an issue (aka bug).

Re: [PATCH 4/4] vfio: ccw: add traceponits for interesting error paths

2018-03-27 Thread Halil Pasic
On 03/27/2018 12:07 PM, Cornelia Huck wrote: > On Tue, 27 Mar 2018 15:51:14 +0800 > Dong Jia Shi wrote: > >> * Cornelia Huck [2018-03-26 15:59:02 +0200]: >> >> [...] >> @@ -131,6 +138,8 @@ static void fsm_io_request(struct vfio_ccw_private

Re: [PATCH 0/4] vfio: ccw: error handling fixes and improvements

2018-03-26 Thread Halil Pasic
cw, so that we can debug >> such issue easier in future. > > Tracepoints are nice :) > >> >> For details see the commit message portions of the inividual patches. > > Still digging through the post-vacation mail pile, will do more looking > later. > > >> Than

Re: [PATCH v3 04/14] KVM: s390: device attribute to set AP interpretive execution

2018-03-20 Thread Halil Pasic
On 03/20/2018 06:58 PM, Tony Krowiak wrote: > I spoke with Christian this morning and he made a suggestion which I think  > would provide the best solution here. > This is my proposal: > 1. Get rid of the KVM_S390_VM_CRYPTO_INTERPRET_AP device attribute and return  > to setting ECA.28 from the >

Re: [PATCH 1/4] vfio: ccw: fix cleanup if cp_prefetch fails

2018-03-22 Thread Halil Pasic
On 03/22/2018 10:37 AM, Pierre Morel wrote: > On 22/03/2018 03:22, Dong Jia Shi wrote: >> * Halil Pasic <pa...@linux.vnet.ibm.com> [2018-03-21 13:49:54 +0100]: >> >>> >>> On 03/21/2018 03:08 AM, Dong Jia Shi wrote: >>>> From: Halil Pasic <

Re: [PATCH 1/4] vfio: ccw: fix cleanup if cp_prefetch fails

2018-03-21 Thread Halil Pasic
On 03/21/2018 03:08 AM, Dong Jia Shi wrote: > From: Halil Pasic <pa...@linux.vnet.ibm.com> > > If the translation of a channel program fails, we may end up attempting > to clean up (free, unpin) stuff that never got translated (and allocated, > pinned) in the first pla

Re: [PATCH 1/1] s390: vfio-ap: include for test_facility()

2018-11-16 Thread Halil Pasic
On Fri, 16 Nov 2018 11:47:48 +0100 Petr Tesarik wrote: > The driver uses test_facility(), but does not include the > corresponding include file explicitly. The driver currently builds > only thanks to the following include chain: > > vfio_ap_drv.c > > > > >

Re: [PATCH v1 0/2] KVM: s390: Tracing APCB changes

2018-10-05 Thread Halil Pasic
On 10/05/2018 10:31 AM, Pierre Morel wrote: > In the first patch we define kvm_arch_crypto_set_masks, > a new function to centralize the setup the APCB masks > inside the CRYCB SIE satelite and add KVM_EVENT() to > kvm_arch_crypto_set_masks and kvm_arch_crypto_clear_masks. > > In the second

Re: [FIXUP v11] fixup! s390: vfio-ap: implement mediated device open callback

2018-09-28 Thread Halil Pasic
On 09/28/2018 03:35 PM, Cornelia Huck wrote: > On Fri, 28 Sep 2018 09:33:21 -0400 > Tony Krowiak wrote: > >> From: Tony Krowiak >> >> Fixes case statement in vfio_ap_mdev_copy_masks() function in >> vfio-ap-ops.c. >> --- >> drivers/s390/crypto/vfio_ap_ops.c | 3 ++- >> 1 file changed, 2

Re: [PATCH v10 10/26] KVM: s390: interfaces to clear CRYCB masks

2018-09-24 Thread Halil Pasic
l the patch description is correct. Regards, Halil >> >> Signed-off-by: Tony Krowiak >> Acked-by: Halil Pasic >> Tested-by: Michael Mueller >> Tested-by: Farhan Ali >> Tested-by: Pierre Morel >> Signed-off-by: Christian Borntraeger >

Re: [PATCH v10 13/26] s390: vfio-ap: zeroize the AP queues

2018-09-24 Thread Halil Pasic
d. >> >> Zeroizing a queue resets the queue, clears all pending >> messages for the queue entries and disables adapter interruptions >> associated with the queue. >> >> Signed-off-by: Tony Krowiak >> Reviewed-by: Halil Pasic >> Tested-by: M

Re: [PATCH v11 26/26] s390: doc: detailed specifications for AP virtualization

2018-09-27 Thread Halil Pasic
On 09/27/2018 12:42 AM, Alex Williamson wrote: > On Tue, 25 Sep 2018 19:16:41 -0400 > Tony Krowiak wrote: > >> From: Tony Krowiak [..] >> + >> +2. Secure the AP queues to be used by the three guests so that the host can >> not >> + access them. To secure them, there are two sysfs files

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

2018-09-13 Thread Halil Pasic
eadable format. I would prefer an interface where one can set at least one whole mask in one go over the current one that let us manipulate just one bit at a time. Hallil Signed-off-by: Tony Krowiak Reviewed-by: Halil Pasic Tested-by: Michael Mueller Tested-by: Farhan Ali Tested-by: Pier

Re: [PATCH v10 11/26] s390: vfio-ap: implement mediated device open callback

2018-09-18 Thread Halil Pasic
On 09/12/2018 09:43 PM, Tony Krowiak wrote: > +/** > + * vfio_ap_mdev_open_once > + * > + * @matrix_mdev: a mediated matrix device > + * > + * Return 0 if no other mediated matrix device has been opened for the > + * KVM guest assigned to @matrix_mdev; otherwise, returns an error. > + */ >

Re: [PATCH 1/1] vfio-ccw: fence off transport mode

2018-03-01 Thread Halil Pasic
ad of trying to process tcws as ccws. > > Signed-off-by: Cornelia Huck Acked-by: Halil Pasic > --- > drivers/s390/cio/vfio_ccw_fsm.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/s390/cio/vfio_ccw_fsm.c b/drivers/s390/cio/vfio_ccw_fsm.c > ind

Re: [PATCH v3 04/14] KVM: s390: device attribute to set AP interpretive execution

2018-03-14 Thread Halil Pasic
On 03/14/2018 07:25 PM, Tony Krowiak wrote: > The VFIO AP device model exploits interpretive execution of AP > instructions (APIE) to provide guests passthrough access to AP > devices. This patch introduces a new device attribute in the > KVM_S390_VM_CRYPTO device attribute group to set APIE

Re: [PATCH 0/4] vfio: ccw: error handling fixes and improvements

2018-03-26 Thread Halil Pasic
e easier in future. > > Tracepoints are nice :) > >> >> For details see the commit message portions of the inividual patches. > > Still digging through the post-vacation mail pile, will do more looking > later. > > >> Thanks. >> >> Dong

Re: [PATCH 4/4] vfio: ccw: add traceponits for interesting error paths

2018-03-27 Thread Halil Pasic
On 03/27/2018 12:07 PM, Cornelia Huck wrote: > On Tue, 27 Mar 2018 15:51:14 +0800 > Dong Jia Shi wrote: > >> * Cornelia Huck [2018-03-26 15:59:02 +0200]: >> >> [...] >> @@ -131,6 +138,8 @@ static void fsm_io_request(struct vfio_ccw_private *private,

Re: [PATCH 1/4] vfio: ccw: fix cleanup if cp_prefetch fails

2018-03-22 Thread Halil Pasic
On 03/22/2018 10:37 AM, Pierre Morel wrote: > On 22/03/2018 03:22, Dong Jia Shi wrote: >> * Halil Pasic [2018-03-21 13:49:54 +0100]: >> >>> >>> On 03/21/2018 03:08 AM, Dong Jia Shi wrote: >>>> From: Halil Pasic >>>> >>>> If

Re: [PATCH v3 04/14] KVM: s390: device attribute to set AP interpretive execution

2018-03-20 Thread Halil Pasic
On 03/20/2018 06:58 PM, Tony Krowiak wrote: > I spoke with Christian this morning and he made a suggestion which I think  > would provide the best solution here. > This is my proposal: > 1. Get rid of the KVM_S390_VM_CRYPTO_INTERPRET_AP device attribute and return  > to setting ECA.28 from the >

Re: [PATCH 1/4] vfio: ccw: fix cleanup if cp_prefetch fails

2018-03-21 Thread Halil Pasic
On 03/21/2018 03:08 AM, Dong Jia Shi wrote: > From: Halil Pasic > > If the translation of a channel program fails, we may end up attempting > to clean up (free, unpin) stuff that never got translated (and allocated, > pinned) in the first place. > > By adjusting the

Re: [PATCH v3 04/14] KVM: s390: device attribute to set AP interpretive execution

2018-03-15 Thread Halil Pasic
On 03/15/2018 04:23 PM, Tony Krowiak wrote: > On 03/14/2018 05:57 PM, Halil Pasic wrote: >> >> On 03/14/2018 07:25 PM, Tony Krowiak wrote: >>> The VFIO AP device model exploits interpretive execution of AP >>> instructions (APIE) to provide guests passthrough acc

Re: [PATCH 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-14 Thread Halil Pasic
On 05/14/2018 01:55 PM, Cornelia Huck wrote: On Wed, 9 May 2018 19:36:47 +0200 Halil Pasic wrote: There is at least one relevant control program (CP) that don't set the I'd prefer not to talk about 'control program' here, as it is not a term commonly used in Linux. Call it 'guest'? Also

Re: [PATCH 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-14 Thread Halil Pasic
On 05/14/2018 04:00 PM, Cornelia Huck wrote: On Mon, 14 May 2018 15:37:17 +0200 Halil Pasic wrote: On 05/14/2018 01:55 PM, Cornelia Huck wrote: On Wed, 9 May 2018 19:36:47 +0200 Halil Pasic wrote: [..] + /* +* 2k byte block IDAWs (fmt1 or fmt2

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

2018-05-15 Thread Halil Pasic
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 created by the VFIO AP device driver

Re: [PATCH v2 5/5] vfio: ccw: add traceponits for interesting error paths

2018-04-30 Thread Halil Pasic
On 04/30/2018 01:51 PM, Cornelia Huck wrote: On Sat, 28 Apr 2018 13:50:23 +0800 Dong Jia Shi wrote: * Cornelia Huck [2018-04-27 12:13:53 +0200]: On Mon, 23 Apr 2018 13:01:13 +0200 Dong Jia Shi wrote: typo in subject: s/traceponits/tracepoints/ From: Halil Pasic Add some

Re: [PATCH v2 5/5] vfio: ccw: add traceponits for interesting error paths

2018-04-30 Thread Halil Pasic
On 04/30/2018 05:03 PM, Cornelia Huck wrote: I think the naming of this fctl thing is a bit cryptic, but if we don't see this as ABI I'm fine with it -- can be improved. What would be a better name? I was thinking along the lines accept_request. (Bad error code would mean that the request did

Re: [PATCH v2 1/5] vfio: ccw: fix cleanup if cp_prefetch fails

2018-04-25 Thread Halil Pasic
On 04/25/2018 04:43 AM, Dong Jia Shi wrote: [Some procedural notes: I've created a new vfio-ccw-fixes branch based on the s390 fixes branch for easier handling. Things targeted for the next release will go on the vfio-ccw branch on top of the s390 features branch, as before. Does that work for

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

2018-05-11 Thread Halil Pasic
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) containing three bitmask fields identifying

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

2018-05-11 Thread Halil Pasic
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 devices each of which will be used to configure

[PATCH v2 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-16 Thread Halil Pasic
if the channel program is a not supported one. Of course, the real solution would be doing proper translation for all IDA. This is possible, but given the current code not straight forward. Signed-off-by: Halil Pasic Tested-by: Jason J. Herne --- --- drivers/s390/cio/vfio_ccw_cp.c | 19

[PATCH 1/1] s390: vfio-ccw: push down unsupported IDA check

2018-05-09 Thread Halil Pasic
if the channel program is a not supported one. Of course, the real solution would be doing proper translation for all IDA. This is possible, but given the current code not straight forward. Signed-off-by: Halil Pasic Tested-by: Jason J. Herne --- QEMU counterpart comming soon. --- drivers/s390

  1   2   3   4   >