Serial Driver problems in 2.6

2005-02-15 Thread Pierre Morel
se of handling low_latency. IMHO most drivers do that and are buggy. (or may be I am buggy) what do you think? I was not in the lklm at tht time so I cannot answer in the thread, so I put you in CC. I do not have the email address of Andrew Morton. best regards, Pierre Morel -- http://www.mnis.fr/

Re: [PATCH RFC 1/2] KVM: s390: vsie: simulate VCPU SIE entry/exit

2018-08-07 Thread Pierre Morel
vsie_page = get_vsie_page(vcpu->kvm, scb_addr); Reviewed-by: Pierre Morel Tested-by: Pierre Morel -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH RFC 2/2] KVM: s390: introduce and use KVM_REQ_VSIE_RESTART

2018-08-07 Thread Pierre Morel
to do, just clear the request */ + kvm_clear_request(KVM_REQ_VSIE_RESTART, vcpu); return 0; } Reviewed-by: Pierre Morel Tested-by: Pierre Morel -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH RFC 0/2] KVM: s390: vsie: support VCPU requests

2018-08-07 Thread Pierre Morel
regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH v8 20/22] KVM: s390: Handling of Cypto control block in VSIE

2018-08-09 Thread Pierre Morel
On 09/08/2018 08:20, Janosch Frank wrote: On 08.08.2018 16:44, Tony Krowiak wrote: From: Pierre Morel +#define ECA_APIE 0x0008 That shouldn't be necessary, it's defined in kvm_host.h which vsie.c includes. Or is it not? This was forgotten here for a long long time! You a

Re: [PATCH v8 19/22] KVM: s390: Clear Crypto Control Block when using vSIE

2018-08-09 Thread Pierre Morel
On 09/08/2018 10:10, David Hildenbrand wrote: On 08.08.2018 16:44, Tony Krowiak wrote: From: Pierre Morel When we clear the Crypto Control Block (CRYCB) used by a guest level 2, the vSIE shadow CRYCB for guest level 3 must be updated before the guest uses it. We achieve this by using the

Re: [PATCH v8 19/22] KVM: s390: Clear Crypto Control Block when using vSIE

2018-08-09 Thread Pierre Morel
On 09/08/2018 10:10, David Hildenbrand wrote: On 08.08.2018 16:44, Tony Krowiak wrote: From: Pierre Morel When we clear the Crypto Control Block (CRYCB) used by a guest level 2, the vSIE shadow CRYCB for guest level 3 must be updated before the guest uses it. We achieve this by using the

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

2018-08-09 Thread Pierre Morel
Pierre if (ret) return ret; -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH v8 17/22] s390: vfio-ap: zeroize the AP queues.

2018-08-10 Thread Pierre Morel
mp;matrix_mdev->group_notifier); matrix_mdev->kvm = NULL; -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

[PATCH] KVM: s390: vsie: BUG correction by shadow_crycb

2018-08-21 Thread Pierre Morel
Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 63844b9..a2b28cd 100644 --- a/arch/s390/kvm/vsie.c +++ b

[PATCH] KVM: s390: vsie: Consolidate CRYCB validation

2018-08-22 Thread Pierre Morel
right. Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 35 +-- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index a2b28cd..35c3907 100644 --- a/arch/s390/kvm/vsie.c +++ b/arch/s390/kvm/vsie.c @@ -1

Re: [PATCH] KVM: s390: vsie: Consolidate CRYCB validation

2018-08-22 Thread Pierre Morel
On 22/08/2018 10:25, David Hildenbrand wrote: On 22.08.2018 10:08, Pierre Morel wrote: Currently when shadowing the CRYCB on SIE entrance, the validation tests the following: - accept only FORMAT1 or FORMAT2 - test if MSAext facility (76) is installed - accept the CRYCB if no keys are used

Re: [PATCH v9 00/22] guest dedicated crypto adapters

2018-08-22 Thread Pierre Morel
l domain stuff soon. Would be great to get some LGTM from the vfio-mdev folks :) I believe Pierre is also doing some fixing in the existing crypto vsie code right now? yes Regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

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

2018-08-22 Thread Pierre Morel
hat is not also a control domain is rejected outright? Anybody tried that? :) Yes, and no it is not. We can use a queue (usage domain) to a AP card for SHA-512 or RSA without having to define the queue as a control domain. Regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH] KVM: s390: vsie: Consolidate CRYCB validation

2018-08-22 Thread Pierre Morel
On 22/08/2018 13:09, David Hildenbrand wrote: On 22.08.2018 12:42, Pierre Morel wrote: On 22/08/2018 10:44, David Hildenbrand wrote: On 22.08.2018 10:41, Pierre Morel wrote: On 22/08/2018 10:25, David Hildenbrand wrote: On 22.08.2018 10:08, Pierre Morel wrote: Currently when shadowing the

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

2018-08-22 Thread Pierre Morel
with z13 and only in the Z architecture mode as host and as guest. We then need to abort the VFIO driver if APXA is not installed. In this case we will have no problem with older guests not having idea about APXA. Would it be a solution? Regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

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

2018-08-22 Thread Pierre Morel
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 set of usage domains is a subset of the set of the control domains, but * it speaks of indepe

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

2018-08-22 Thread Pierre Morel
On 22/08/2018 17:04, David Hildenbrand wrote: On 22.08.2018 16:33, Pierre Morel wrote: On 22/08/2018 13:19, David Hildenbrand wrote: On 13.08.2018 23:48, Tony Krowiak wrote: From: Tony Krowiak Introduces a new CPU model feature and two CPU model facilities to support AP virtualization for

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

2018-08-22 Thread Pierre Morel
On 22/08/2018 17:48, 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 s

[PATCH v2 4/5] KVM: s390: vsie: Always test the crycbd for NULL

2018-08-22 Thread Pierre Morel
BUG: the crycbd must be tested for null even if not crossing a page boundary (which will never occur in this case anyway). Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index

[PATCH v2 5/5] KVM: s390: vsie: Do the CRYCB validation first

2018-08-22 Thread Pierre Morel
When entering the SIE the CRYCB validation better be done independently of the instruction's availability. Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c

[PATCH v2 3/5] KVM: s390: vsie: Allow support for a host without AP

2018-08-22 Thread Pierre Morel
Currently the CRYCB format used in the host for the shadowed CRYCB is FORMAT2 while no check is done if AP instructions are supported in the host. We better use the format the host calculated for the guest 1 as the host already tested it against its facility set. Signed-off-by: Pierre Morel

[PATCH v2 1/5] KVM: s390: vsie: BUG correction by shadow_crycb

2018-08-22 Thread Pierre Morel
Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel Reviewed-by: David Hildenbrand --- arch/s390/kvm/vsie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c index 9175518..12b9707 100644

[PATCH v2 0/5] KVM: s390: vsie: Consolidate CRYCB validation

2018-08-22 Thread Pierre Morel
Before adapting the CRYCB shadowing for a guest supporting the AP instructions we want to clean the CRYCB shadowing code. Pierre Morel (5): KVM: s390: vsie: BUG correction by shadow_crycb KVM: s390: vsie: Only accept FORMAT1 CRYCB for guest2 KVM: s390: vsie: Allow support for a host

[PATCH v2 2/5] KVM: s390: vsie: Only accept FORMAT1 CRYCB for guest2

2018-08-22 Thread Pierre Morel
As the comment above the function suggested the shadowing of the guest2 CRYCB can only accept a format 1 since AP instructions are not supported in the guest. Let's modify the check which allowed to accept a format 2 too. Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 4 +++- 1

Re: [PATCH v2 1/5] KVM: s390: vsie: BUG correction by shadow_crycb

2018-08-22 Thread Pierre Morel
On 22/08/2018 18:53, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel Reviewed-by: David Hildenbrand --- arch/s390/kvm/vsie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

Re: [PATCH v2 3/5] KVM: s390: vsie: Allow support for a host without AP

2018-08-22 Thread Pierre Morel
On 22/08/2018 19:06, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: Currently the CRYCB format used in the host for the shadowed CRYCB is FORMAT2 while no check is done if AP instructions are supported in the host. We better use the format the host calculated for the guest 1

Re: [PATCH v2 3/5] KVM: s390: vsie: Allow support for a host without AP

2018-08-22 Thread Pierre Morel
On 22/08/2018 19:06, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: Currently the CRYCB format used in the host for the shadowed CRYCB is FORMAT2 while no check is done if AP instructions are supported in the host. We better use the format the host calculated for the guest 1

Re: [PATCH v2 4/5] KVM: s390: vsie: Always test the crycbd for NULL

2018-08-22 Thread Pierre Morel
On 22/08/2018 19:07, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: BUG: the crycbd must be tested for null even if not crossing a page boundary (which will never occur in this case anyway). I don't see the BUG. Can you elaborate? (maybe it is too late for me) No i

Re: [PATCH v2 5/5] KVM: s390: vsie: Do the CRYCB validation first

2018-08-23 Thread Pierre Morel
On 22/08/2018 19:15, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: When entering the SIE the CRYCB validation better be done independently of the instruction's availability. Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 11 ++- 1 file chang

Re: [PATCH v2 2/5] KVM: s390: vsie: Only accept FORMAT1 CRYCB for guest2

2018-08-23 Thread Pierre Morel
On 22/08/2018 18:55, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: As the comment above the function suggested the shadowing of the guest2 CRYCB can only accept a format 1 since AP instructions are not supported in the guest. Let's modify the check which allowed to acc

Re: [PATCH v2 3/5] KVM: s390: vsie: Allow support for a host without AP

2018-08-23 Thread Pierre Morel
On 23/08/2018 09:15, David Hildenbrand wrote: On 23.08.2018 08:44, Pierre Morel wrote: On 22/08/2018 19:06, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: Currently the CRYCB format used in the host for the shadowed CRYCB is FORMAT2 while no check is done if AP instructions

Re: [PATCH v2 5/5] KVM: s390: vsie: Do the CRYCB validation first

2018-08-23 Thread Pierre Morel
On 23/08/2018 09:31, David Hildenbrand wrote: On 23.08.2018 09:17, Pierre Morel wrote: On 22/08/2018 19:15, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: When entering the SIE the CRYCB validation better be done independently of the instruction's availability. Signe

Re: [PATCH v2 1/5] KVM: s390: vsie: BUG correction by shadow_crycb

2018-08-23 Thread Pierre Morel
On 23/08/2018 09:27, Cornelia Huck wrote: On Wed, 22 Aug 2018 18:53:02 +0200 David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel Reviewed-by: David Hildenbrand --- arch/s390/kvm

Re: [PATCH v2 1/5] KVM: s390: vsie: BUG correction by shadow_crycb

2018-08-23 Thread Pierre Morel
On 23/08/2018 10:02, Janosch Frank wrote: On 22.08.2018 18:53, David Hildenbrand wrote: On 22.08.2018 18:51, Pierre Morel wrote: Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel Reviewed-by: David Hildenbrand --- arch/s390/kvm/vsie.c | 3 ++- 1

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

2018-08-23 Thread Pierre Morel
ty. We can use this bit as an indication of the presence of APXA, the documentation mention that both are implemented together. regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

[PATCH v3 1/3] KVM: s390: vsie: copy wrapping keys to right place

2018-08-23 Thread Pierre Morel
Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck Reviewed-by: Janosch Frank --- arch/s390/kvm/vsie.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/s390/kvm/vsie.c b

[PATCH v3 2/3] KVM: s390: vsie: Do the CRYCB validation first

2018-08-23 Thread Pierre Morel
When entering the SIE the CRYCB validation better be done independently of the instruction's availability. Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/s390/kvm/vsie.c b/arch/s390/kvm/vsie.c

[PATCH v3 3/3] KVM: s390: vsie: Make use of CRYCB FORMAT2 clear

2018-08-23 Thread Pierre Morel
The comment preceding the shadow_crycb function is misleading, we effectively accept FORMAT2 CRYCB in the guest. When using FORMAT2 in the host we do not need to or with FORMAT1. Signed-off-by: Pierre Morel --- arch/s390/kvm/vsie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v3 0/3] KVM: s390: vsie: Consolidate CRYCB validation

2018-08-23 Thread Pierre Morel
the real machine. Patch 3 does not correct the compiled code but make more clear what is done concerning the formating of the CRYCB in the guest original CRYCB and in the shadow CRYCB. Pierre Morel (3): KVM: s390: vsie: copy wrapping keys to right place KVM: s390: vsie: Do the CRYCB validation

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

2018-08-23 Thread Pierre Morel
On 23/08/2018 11:26, Halil Pasic wrote: 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

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

2018-08-23 Thread Pierre Morel
whole infrastructure...] When I read you it convince me that it is not wise to change anything that has been already discuss and could impact the Libvirt. Regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

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

2018-08-23 Thread Pierre Morel
nstalled. If we have the APFT, we have the APXA, problem seems solved to me. Regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH v3 2/3] KVM: s390: vsie: Do the CRYCB validation first

2018-08-23 Thread Pierre Morel
On 23/08/2018 13:17, Christian Borntraeger wrote: On 08/23/2018 12:25 PM, Pierre Morel wrote: When entering the SIE the CRYCB validation better be done independently of the instruction's availability. Maybe something like We need to handle the validity checks for the crycb, no matter

Re: [PATCH v3 3/3] KVM: s390: vsie: Make use of CRYCB FORMAT2 clear

2018-08-23 Thread Pierre Morel
On 23/08/2018 13:21, David Hildenbrand wrote: On 23.08.2018 13:05, Janosch Frank wrote: On 8/23/18 12:25 PM, Pierre Morel wrote: The comment preceding the shadow_crycb function is misleading, we effectively accept FORMAT2 CRYCB in the guest. I beg to differ: if (!(crycbd_o &

Re: [PATCH v3 1/3] KVM: s390: vsie: copy wrapping keys to right place

2018-08-23 Thread Pierre Morel
On 23/08/2018 13:19, David Hildenbrand wrote: On 23.08.2018 13:07, Christian Borntraeger wrote: On 08/23/2018 12:25 PM, Pierre Morel wrote: Copy the key mask to the right offset inside the shadow CRYCB Signed-off-by: Pierre Morel Reviewed-by: David Hildenbrand Reviewed-by: Cornelia Huck

Re: [PATCH v3 2/3] KVM: s390: vsie: Do the CRYCB validation first

2018-08-23 Thread Pierre Morel
On 23/08/2018 13:19, David Hildenbrand wrote: On 23.08.2018 13:17, Christian Borntraeger wrote: On 08/23/2018 12:25 PM, Pierre Morel wrote: When entering the SIE the CRYCB validation better be done independently of the instruction's availability. Maybe something like We need to handl

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

2018-08-23 Thread Pierre Morel
On 23/08/2018 13:31, Cornelia Huck wrote: On Thu, 23 Aug 2018 12:43:42 +0200 Pierre Morel wrote: On 23/08/2018 12:25, Cornelia Huck wrote: On Wed, 22 Aug 2018 15:16:19 -0400 Tony Krowiak wrote: One of the things I suggested in a private conversation with Christian earlier today was to

Re: [PATCH v3 3/3] KVM: s390: vsie: Make use of CRYCB FORMAT2 clear

2018-08-23 Thread Pierre Morel
On 23/08/2018 13:33, Janosch Frank wrote: On 8/23/18 1:21 PM, David Hildenbrand wrote: On 23.08.2018 13:05, Janosch Frank wrote: On 8/23/18 12:25 PM, Pierre Morel wrote: The comment preceding the shadow_crycb function is misleading, we effectively accept FORMAT2 CRYCB in the guest. I beg to

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

2018-08-23 Thread Pierre Morel
On 23/08/2018 13:12, David Hildenbrand wrote: On 23.08.2018 13:10, Pierre Morel wrote: On 23/08/2018 12:28, David Hildenbrand wrote: On 23.08.2018 12:00, Halil Pasic wrote: On 08/23/2018 09:44 AM, David Hildenbrand wrote: On 22.08.2018 22:16, Tony Krowiak wrote: On 08/22/2018 07:24 AM

Re: [PATCH v3 1/3] KVM: s390: vsie: copy wrapping keys to right place

2018-08-23 Thread Pierre Morel
On 23/08/2018 14:43, Christian Borntraeger wrote: On 08/23/2018 01:41 PM, Pierre Morel wrote: On 23/08/2018 13:19, David Hildenbrand wrote: On 23.08.2018 13:07, Christian Borntraeger wrote: On 08/23/2018 12:25 PM, Pierre Morel wrote: Copy the key mask to the right offset inside the

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

2018-08-23 Thread Pierre Morel
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, David Hildenbrand wrote: [..] I'm confused, which 128 bit? Me too :) , I was assuming this block to be 128bit, but the qci bloc

Re: [RFC PATCH 1/3] vfio: ccw: introduce schib region

2018-01-15 Thread Pierre Morel
NS }; diff --git a/include/uapi/linux/vfio_ccw.h b/include/uapi/linux/vfio_ccw.h index 2ec5f367ff78..12508ef6e6fc 100644 --- a/include/uapi/linux/vfio_ccw.h +++ b/include/uapi/linux/vfio_ccw.h @@ -22,4 +22,10 @@ struct ccw_io_region { __u32 ret_code; } __packed; +struct ccw_sch

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

2018-01-15 Thread Pierre Morel
ted schib. :) I think so too, if the guest's administrator wants to be able to do something. But I would like to see something about path virtualization. Having more accurate information on hardware without virtualization is a big handicap for migration and hotplug. Regards, Pierre -

Re: [PATCH v3 03/14] KVM: s390: CPU model support for AP virtualization

2018-03-27 Thread Pierre Morel
* We need SIE support, ESOP (PROT_READ protection for gmap_shadow), * 64bit SCAO (SCA passthrough) and IDTE (for gmap_shadow unshadowing). -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH v3 05/14] s390: vfio-ap: base implementation of VFIO AP device driver

2018-03-27 Thread Pierre Morel
On 27/03/2018 13:17, Cornelia Huck wrote: On Thu, 15 Mar 2018 13:25:25 -0400 Tony Krowiak wrote: On 03/15/2018 09:25 AM, Pierre Morel wrote: On 14/03/2018 19:25, Tony Krowiak wrote: +config VFIO_AP +def_tristate m not sure it must be module by default. I would not set it by default

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

2018-03-22 Thread Pierre Morel
like: " For each chain composing the channel program: On entry ch_len hold the count of CCW to be translated. On exit ch_len is adjusted to the count of successfully translated CCW. This allows cp_free to find in ch_len the count of CCW to free in a chain. " Could also be inside the com

[PATCH v2 0/3] s390: vfio: ap: Using GISA for AP Interrupt

2018-11-22 Thread Pierre Morel
course, need the QEMU patches, which will be sent separately. Take care of the incompatbility in the ioctl parameters. Pierre Morel (3): vfio: ap: Add AP Queue Interruption Control facility vfio: ap: ioctl definitions for AP Queue Interrupt Control vfio: ap: AP Queue Interrupt Control VFIO

[PATCH v2 2/3] vfio: ap: ioctl definitions for AP Queue Interrupt Control

2018-11-22 Thread Pierre Morel
We define two VFIO ioctl command to setup and clear the AP Queues interrupt. Arguments passed by the guest are: - the apqn, AP queue number - the Notification by address - the identifier of the previously associated adapter Signed-off-by: Pierre Morel --- include/uapi/linux/vfio.h | 25

[PATCH v2 1/3] vfio: ap: Add AP Queue Interruption Control facility

2018-11-22 Thread Pierre Morel
AP Queue Interruption Control (AQIC) facility gives the guest the possibility to control interruption for the Cryptographic Adjunct Processor queues Signed-off-by: Pierre Morel Reviewed-by: Tony Krowiak --- arch/s390/tools/gen_facilities.c | 1 + 1 file changed, 1 insertion(+) diff --git a

[PATCH v2 3/3] vfio: ap: AP Queue Interrupt Control VFIO ioctl calls

2018-11-22 Thread Pierre Morel
This is the implementation of the VFIO ioctl calls to handle the AQIC interception and use GISA to handle interrupts. Signed-off-by: Pierre Morel --- drivers/s390/crypto/vfio_ap_ops.c | 110 +- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a

Re: [PATCH v2 2/3] vfio: ap: ioctl definitions for AP Queue Interrupt Control

2018-11-27 Thread Pierre Morel
On 27/11/2018 18:22, Alex Williamson wrote: On Thu, 22 Nov 2018 18:11:14 +0100 Pierre Morel wrote: We define two VFIO ioctl command to setup and clear the AP Queues interrupt. Arguments passed by the guest are: - the apqn, AP queue number - the Notification by address - the identifier of the

[PATCH v3 5/6] vfio: ccw: Documenting state transitions

2018-11-28 Thread Pierre Morel
Let's document the state transitions. Signed-off-by: Pierre Morel --- Documentation/s390/vfio-ccw.txt | 45 + 1 file changed, 45 insertions(+) diff --git a/Documentation/s390/vfio-ccw.txt b/Documentation/s390/vfio-ccw.txt index 2be11ad..0a1a19f 1

[PATCH v3 6/6] vfio: ccw: serialize the write system calls

2018-11-28 Thread Pierre Morel
a clear or a halt started after a data transfer do not win the race agains the data transfer. Which would result in the data transfer being started after the halt/clear. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_ops.c | 17 + 1 file changed, 13 insertions(+), 4

[PATCH v3 3/6] vfio: ccw: Rework subchannel state on removing

2018-11-28 Thread Pierre Morel
normal state of the device do not change the state but on errors. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 1 - drivers/s390/cio/vfio_ccw_ops.c | 25 ++--- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/drivers/s390/cio/vfio_ccw_drv.c b

[PATCH v3 2/6] vfio: ccw: Rework subchannel state on setup

2018-11-28 Thread Pierre Morel
evice has been opened and set the VFIO_CCW_STATE_STANDBY on a successful open. On release the state is set back to VFIO_CCW_STATE_NOT_OPER by vfio_ccw_sch_quiesce(). When the mediated device is closed, disable the sub channel by calling vfio_ccw_sch_quiesce(). Signed-off-by: Pierre

[PATCH v3 1/6] vfio: ccw: Register mediated device once all structures are initialized

2018-11-28 Thread Pierre Morel
There is a risk that the mediated device is used before all the data are initialized if it is registered too early. Let's register the mediated device when all the data structures which could be used are initialized. Signed-off-by: Pierre Morel Reviewed-by: Eric Farman --- drivers/s39

[PATCH v3 4/6] vfio: ccw: Rework subchannel state on sch_event

2018-11-28 Thread Pierre Morel
We do not need to change the state when handling events. If we can not update the SCHIB it is an unrecoverable error independent of the real sub channel. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 13 ++--- 1 file changed, 2 insertions(+), 11 deletions(-) diff

[PATCH v3 0/6] vfio: ccw: VFIO CCW cleanup part1

2018-11-28 Thread Pierre Morel
driver is serialized. Pierre Morel (6): vfio: ccw: Register mediated device once all structures are initialized vfio: ccw: Rework subchannel state on setup vfio: ccw: Rework subchannel state on removing vfio: ccw: Rework subchannel state on sch_event vfio: ccw: Documenting state

Re: [PATCH v2 3/3] vfio: ap: AP Queue Interrupt Control VFIO ioctl calls

2018-11-29 Thread Pierre Morel
On 29/11/2018 12:37, Cornelia Huck wrote: On Thu, 22 Nov 2018 18:11:15 +0100 Pierre Morel wrote: This is the implementation of the VFIO ioctl calls to handle the AQIC interception and use GISA to handle interrupts. Signed-off-by: Pierre Morel --- drivers/s390/crypto/vfio_ap_ops.c | 110

Re: [PATCH v2 3/3] vfio: ap: AP Queue Interrupt Control VFIO ioctl calls

2018-12-03 Thread Pierre Morel
On 03/12/2018 11:04, Cornelia Huck wrote: On Thu, 22 Nov 2018 18:11:15 +0100 Pierre Morel wrote: This is the implementation of the VFIO ioctl calls to handle the AQIC interception and use GISA to handle interrupts. Signed-off-by: Pierre Morel --- drivers/s390/crypto/vfio_ap_ops.c | 110

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

2018-07-09 Thread Pierre Morel
k to the default driver'. You need to unbind and then call dev_reprobe() which triggers the default way of assigning a driver to a device and give the ap bus a chance to handle this. Are you saying that the administrator can not unbind a AP device and bind it to another AP driver? I am sur

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

2018-07-09 Thread Pierre Morel
using the sysfs. Regards, Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH v6 10/21] s390: vfio-ap: sysfs interfaces to configure adapters

2018-07-09 Thread Pierre Morel
ner = THIS_MODULE, .supported_type_groups = vfio_ap_mdev_type_groups, + .mdev_attr_groups = vfio_ap_mdev_attr_groups, .create = vfio_ap_mdev_create, .remove = vfio_ap_mdev_remove, }; -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH v6 11/21] s390: vfio-ap: sysfs interfaces to configure domains

2018-07-09 Thread Pierre Morel
s in preceding patch, I do not understand why you need this. Pierre -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

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

2018-07-09 Thread Pierre Morel
here is not what is currently used by the SIE. It is not irrelevant but what the guest really use may be more interesting for the admin. -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

Re: [PATCH v6 08/21] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-07-09 Thread Pierre Morel
, device.parent); + return container_of(dev, struct ap_matrix_dev, device); } +extern int vfio_ap_mdev_register(struct ap_matrix_dev *matrix_dev); +extern void vfio_ap_mdev_unregister(struct ap_matrix_dev *matrix_dev); + #endif /* _VFIO_AP_PRIVATE_H_ */ -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

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

2018-07-09 Thread Pierre Morel
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 structures are: /sys/devices/vfio_ap ... [matrix] .. [mdev_supported_types] . [vfio_ap

Re: [PATCH v6 08/21] s390: vfio-ap: register matrix device with VFIO mdev framework

2018-07-09 Thread Pierre Morel
ap_matrix_dev, device.parent); + return container_of(dev, struct ap_matrix_dev, device); } +extern int vfio_ap_mdev_register(struct ap_matrix_dev *matrix_dev); +extern void vfio_ap_mdev_unregister(struct ap_matrix_dev *matrix_dev); + #endif /* _VFIO_AP_PRIVATE_H_ */ -- Pierre Morel Linux/KVM/QEMU in Böblingen - Germany

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

2018-07-10 Thread Pierre Morel
On 09/07/2018 17:50, Halil Pasic wrote: 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

Re: [PATCH v3 0/8] vfio: ccw: Refactoring the VFIO CCW state machine

2018-06-27 Thread Pierre Morel
On 26/06/2018 18:00, Cornelia Huck wrote: On Tue, 26 Jun 2018 13:04:12 +0200 Pierre Morel wrote: On 19/06/2018 16:00, Cornelia Huck wrote: On Thu, 14 Jun 2018 10:06:31 +0200 Pierre Morel wrote: ...snip... The goal of the state machine is to describe the device driver state. Not the

[PATCH v2 00/10] vfio: ccw: Refactoring the VFIO CCW state machine

2018-05-25 Thread Pierre Morel
branch can be used. Pierre Morel (10): vfio: ccw: Moving state change out of IRQ context vfio: ccw: Transform FSM functions to return state vfio: ccw: new SCH_EVENT event vfio: ccw: replace IO_REQ event with SSCH_REQ event vfio: ccw: Suppress unused event parameter vfio: ccw: Make FSM

[PATCH v2 10/10] vfio: ccw: Let user wait when busy on IO

2018-05-25 Thread Pierre Morel
x27;s make the caller wait until the last SSCH ends. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 4 drivers/s390/cio/vfio_ccw_ops.c | 6 ++ drivers/s390/cio/vfio_ccw_private.h | 1 + 3 files changed, 11 insertions(+) diff --git a/drivers/s390/cio/vfio_c

[PATCH v2 09/10] vfio: ccw: Suppressing the BOXED state

2018-05-25 Thread Pierre Morel
VFIO_CCW_STATE_BOXED and VFIO_CCW_STATE_BUSY are the same states. Let's only keep one: VFIO_CCW_STATE_BUSY Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 11 --- drivers/s390/cio/vfio_ccw_private.h | 1 - 2 files changed, 12 deletions(-) diff --git a/dr

[PATCH v2 08/10] vfio: ccw: Handling reset and shutdown with states

2018-05-25 Thread Pierre Morel
Two new events, VFIO_CCW_EVENT_ONLINE and VFIO_CCW_EVENT_OFFLINE allow to handle the enabling and disabling of a Sub Channel and the init, shutdown, quiesce and reset operations are changed accordingly. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 44

[PATCH v2 05/10] vfio: ccw: Suppress unused event parameter

2018-05-25 Thread Pierre Morel
The fsm_func_t function type definition does not need the event parameter since all functions are in a state/event table. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 24 drivers/s390/cio/vfio_ccw_private.h | 5 ++--- 2 files changed, 10

[PATCH v2 07/10] vfio: ccw: FSM and mediated device initialization

2018-05-25 Thread Pierre Morel
device is opened by QEMU, the vfio_private structure is not completely initialized. Let's change the actions for the VFIO_CCW_STATE_NOT_OPER to fsm_nop when vfio_private is not initialized. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 22 ++ drivers

[PATCH v2 06/10] vfio: ccw: Make FSM functions atomic

2018-05-25 Thread Pierre Morel
We use mutex around the FSM function call to make the FSM event handling and state change atomic. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 3 +-- drivers/s390/cio/vfio_ccw_private.h | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/s390

[PATCH v2 04/10] vfio: ccw: replace IO_REQ event with SSCH_REQ event

2018-05-25 Thread Pierre Morel
H_REQ Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 67 - drivers/s390/cio/vfio_ccw_ops.c | 16 + drivers/s390/cio/vfio_ccw_private.h | 2 +- 3 files changed, 31 insertions(+), 54 deletions(-) diff --git a/drivers/s39

[PATCH v2 03/10] vfio: ccw: new SCH_EVENT event

2018-05-25 Thread Pierre Morel
The Sub channel event callback may be called with interrupt or thread context. Let's thread the FSM action using workqueues. The update of the SCHIB is now done inside an FSM action. using the VFIO_CCW_EVENT_SCHIB_CHANGED event to guaranty coherency with other FSM events. Signed-off-by: P

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

2018-05-25 Thread Pierre Morel
Let's move the state change from the IRQ routine to the workqueue callback. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 20 +++- drivers/s390/cio/vfio_ccw_fsm.c | 14 -- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/dr

[PATCH v2 02/10] vfio: ccw: Transform FSM functions to return state

2018-05-25 Thread Pierre Morel
We change the FSM functions to return the next state, and adapt the fsm_func_t function type. This will allow to factor FSM state change out of the action routine. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 23 ++- drivers/s390/cio

[PATCH v3 1/8] vfio: ccw: Moving state change out of IRQ context

2018-06-12 Thread Pierre Morel
From: Pierre Morel Having state changes out of IRQ context allows to protect critical sections with mutexes. Next patches in the serie will use this possibility. We use work queues to thread the interrupts. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 20

[PATCH v3 3/8] vfio: ccw: new VFIO_CCW_EVENT_SCHIB_CHANGED event

2018-06-12 Thread Pierre Morel
From: Pierre Morel The Sub channel event callback is threaded using workqueues. The work uses the FSM introducing the VFIO_CCW_EVENT_SCHIB_CHANGED event. The update of the SCHIB is now done inside the FSM function. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 33

[PATCH v3 7/8] vfio: ccw: Introduce the INIT event

2018-06-12 Thread Pierre Morel
during the mediated device open callback. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 21 ++--- drivers/s390/cio/vfio_ccw_fsm.c | 20 drivers/s390/cio/vfio_ccw_ops.c | 26 +- drivers/s390/cio

[PATCH v3 8/8] vfio: ccw: Suppressing the BOXED state

2018-06-12 Thread Pierre Morel
VFIO_CCW_STATE_BOXED and VFIO_CCW_STATE_BUSY are the same. Let's only keep one: VFIO_CCW_STATE_BUSY Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 9 + drivers/s390/cio/vfio_ccw_private.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --

[PATCH v3 6/8] vfio: ccw: Make FSM functions atomic

2018-06-12 Thread Pierre Morel
We use mutex around the FSM function call to make the FSM event handling and state change atomic. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_drv.c | 1 + drivers/s390/cio/vfio_ccw_private.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/s390/cio

[PATCH v3 4/8] vfio: ccw: Only accept SSCH as an IO request

2018-06-12 Thread Pierre Morel
This patch simplifies the IO request handling to handle the only implemented request: SSCH. Other requests are invalid and get a return value of -ENOTSUP as before. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 55 - drivers/s390/cio

[PATCH v3 5/8] vfio: ccw: Suppress unused event parameter

2018-06-12 Thread Pierre Morel
The fsm_func_t function type definition does not need the event parameter since all functions are in a state/event table. Signed-off-by: Pierre Morel --- drivers/s390/cio/vfio_ccw_fsm.c | 24 drivers/s390/cio/vfio_ccw_private.h | 5 ++--- 2 files changed, 10

[PATCH v3 2/8] vfio: ccw: Transform FSM functions to return state

2018-06-12 Thread Pierre Morel
We change the FSM functions to return the next state, and adapt the fsm_func_t function type. Doing this change will allow to move the state changes out of the action functions to a common point. This is important to guaranty the coherency of the FSM and add to readibility. Signed-off-by: Pierre

  1   2   3   4   5   6   >