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/
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
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
regards,
Pierre
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
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
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
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
Pierre
if (ret)
return ret;
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
mp;matrix_mdev->group_notifier);
matrix_mdev->kvm = NULL;
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 &
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
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
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
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
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
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
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
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
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
-
* 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
using the
sysfs.
Regards,
Pierre
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
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
s in preceding patch, I do not understand why you need this.
Pierre
--
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
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
, 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 --
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
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
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
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 - 100 of 532 matches
Mail list logo