[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [RFC 15/15] s390-bios: Use sense ccw to ensure consiste
From: |
Cornelia Huck |
Subject: |
Re: [qemu-s390x] [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 */
- [qemu-s390x] [RFC 00/15] s390: vfio-ccw dasd ipl support, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 02/15] s390-bios: decouple cio setup from virtio, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 08/15] s390-bios: Map low core memory, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 09/15] s390-bios: ptr2u32 and u32toptr, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 13/15] s390-bios: Add channel command codes/structs needed for dasd-ipl, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 15/15] s390-bios: Use sense ccw to ensure consistent device state at boot time, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 01/15] s390 vfio-ccw: Add bootindex property and IPLB data, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 03/15] s390-bios: decouple common boot logic from virtio, Jason J. Herne, 2018/07/05
- [qemu-s390x] [RFC 06/15] s390-bios: Clean up cio.h, Jason J. Herne, 2018/07/05