[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/9] s390x/css: be more consistent if broken bey
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH 3/9] s390x/css: be more consistent if broken beyond repair |
Date: |
Thu, 31 Aug 2017 11:33:40 +0200 |
On Wed, 30 Aug 2017 18:36:03 +0200
Halil Pasic <address@hidden> wrote:
> If we detect that the internally manged state of the subchannel
> is broken beyond repair while in do_subchannel_work in case of
> virtual we just abort the operation and pretend all went well,
> while in case of pass-through we honor the situation with -ENODEV
> which results in cc 3 for the instruction whose handler triggered
> the call.
>
> Let's be consistent on this and do the -ENODEV also for virtual
> subchannels.
>
> Signed-off-by: Halil Pasic <address@hidden>
> Acked-by: Pierre Morel<address@hidden>
> ---
> hw/s390x/css.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> index 0822538cde..bc47bf5b20 100644
> --- a/hw/s390x/css.c
> +++ b/hw/s390x/css.c
> @@ -1078,7 +1078,7 @@ int do_subchannel_work_virtual(SubchDev *sch)
> sch_handle_start_func_virtual(sch);
> } else {
> /* Cannot happen. */
> - return 0;
> + return -ENODEV;
No, this _really_ cannot happen. fctl is a three-bit field, which means
that one of the branches above must have executed. fctl cannot be 0, as
any caller of do_subchannel_work() either sets a bit there or, in the
case of rsch, checks for a bit already set. This is an internal error,
so an assert seems more suitable here. [We might need to keep the
return to keep mingw happy.]
> }
> css_inject_io_interrupt(sch);
> return 0;
- Re: [Qemu-devel] [PATCH 1/9] s390x/css: fix cc handling for XSCH, (continued)
[Qemu-devel] [PATCH 2/9] s390x: fix invalid use of cc 1 for SSCH, Halil Pasic, 2017/08/30
[Qemu-devel] [PATCH 3/9] s390x/css: be more consistent if broken beyond repair, Halil Pasic, 2017/08/30
[Qemu-devel] [PATCH 6/9] s390x: refactor error handling for CSCH handler, Halil Pasic, 2017/08/30
[Qemu-devel] [PATCH 4/9] s390x: refactor error handling for SSCH and RSCH, Halil Pasic, 2017/08/30
[Qemu-devel] [PATCH 5/9] s390x: refactor error handling for XSCH handler, Halil Pasic, 2017/08/30
[Qemu-devel] [PATCH 7/9] s390x: refactor error handling for HSCH handler, Halil Pasic, 2017/08/30
[Qemu-devel] [PATCH 8/9] s390x: refactor error handling for MSCH handler, Halil Pasic, 2017/08/30
[Qemu-devel] [PATCH 9/9] s390x: factor out common ioinst handler logic, Halil Pasic, 2017/08/30
Re: [Qemu-devel] [PATCH 0/9], Cornelia Huck, 2017/08/31