[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 15/15] s390-bios: Use sense ccw to ensure consiste
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [RFC 15/15] s390-bios: Use sense ccw to ensure consistent device state at boot time |
Date: |
Fri, 6 Jul 2018 12:08:41 +0200 |
On Thu, 5 Jul 2018 13:25:43 -0400
"Jason J. Herne" <address@hidden> wrote:
> If a vfio-ccw device is left in an error state (example: pending unit
> check) then it is possible for that state to persist for a vfio-ccw device
> even
> after the enable subchannel that we do to bring the device online. If this
> state
> is allowed to persist then even simple I/O operations will needlessly fail. A
> basic sense ccw is used to clear this error state for the boot device.
Another thing: What about unsolicited interrupts? I.e., you enable the
subchannel, and then it becomes pending with unsolicited status. Do you
have any handling for that (or plan to add it)?
We could ignore that for virtio devices, but probably not for dasds.
>
> Signed-off-by: Jason J. Herne <address@hidden>
> ---
> pc-bios/s390-ccw/cio.c | 13 +++++++++++++
> pc-bios/s390-ccw/cio.h | 13 +++++++++++++
> pc-bios/s390-ccw/main.c | 5 +++++
> 3 files changed, 31 insertions(+)
> diff --git a/pc-bios/s390-ccw/main.c b/pc-bios/s390-ccw/main.c
> index 2bccfa7..e0ce59b 100644
> --- a/pc-bios/s390-ccw/main.c
> +++ b/pc-bios/s390-ccw/main.c
> @@ -201,12 +201,17 @@ static void virtio_setup(void)
>
> int main(void)
> {
> + SenseData sd;
> +
> sclp_setup();
> cio_setup();
> boot_setup();
> find_boot_device();
> enable_subchannel(blk_schid);
>
> + /* Clear any outstanding device error conditions */
> + basic_sense(blk_schid, &sd);
Hmm. Could an error condition reassert itself after it was cleared?
Probably not worth spending too much time on, though.
> +
> switch (cu_type(blk_schid)) {
> case 0x3990: /* Real DASD device */
> dasd_ipl(blk_schid); /* no return */
Re: [Qemu-devel] [RFC 10/15] s390-bios: Support for running format-0/1 channel programs, Christian Borntraeger, 2018/07/09
Re: [Qemu-devel] [RFC 10/15] s390-bios: Support for running format-0/1 channel programs, Christian Borntraeger, 2018/07/09
[Qemu-devel] [RFC 04/15] s390-bios: Extend find_dev() for non-virtio devices, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 13/15] s390-bios: Add channel command codes/structs needed for dasd-ipl, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 09/15] s390-bios: ptr2u32 and u32toptr, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 15/15] s390-bios: Use sense ccw to ensure consistent device state at boot time, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 05/15] s390-bios: Factor finding boot device out of virtio code path, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 12/15] s390-bios: Use control unit type to determine boot method, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 02/15] s390-bios: decouple cio setup from virtio, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 11/15] s390-bios: Refactor virtio to run channel programs via cio, Jason J. Herne, 2018/07/05
[Qemu-devel] [RFC 03/15] s390-bios: decouple common boot logic from virtio, Jason J. Herne, 2018/07/05