[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 6/7] s390x: refactor error handling for HSCH
From: |
Dong Jia Shi |
Subject: |
Re: [Qemu-devel] [PATCH v3 6/7] s390x: refactor error handling for HSCH handler |
Date: |
Thu, 19 Oct 2017 14:17:40 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
* Halil Pasic <address@hidden> [2017-10-17 16:04:52 +0200]:
> Simplify the error handling of the HSCH. Let the code detecting the
> condition tell (in a less ambiguous way) how it's to be handled. No
> changes in behavior.
>
> Signed-off-by: Halil Pasic <address@hidden>
> ---
> hw/s390x/css.c | 18 +++++-------------
> include/hw/s390x/css.h | 2 +-
> target/s390x/ioinst.c | 23 ++++-------------------
> 3 files changed, 10 insertions(+), 33 deletions(-)
>
[...]
> @@ -87,24 +85,11 @@ void ioinst_handle_hsch(S390CPU *cpu, uint64_t reg1)
> }
> trace_ioinst_sch_id("hsch", cssid, ssid, schid);
> sch = css_find_subch(m, cssid, ssid, schid);
> - if (sch && css_subch_visible(sch)) {
> - ret = css_do_hsch(sch);
> - }
> - switch (ret) {
> - case -ENODEV:
> - cc = 3;
> - break;
> - case -EBUSY:
> - cc = 2;
> - break;
> - case 0:
> - cc = 0;
> - break;
> - default:
> - cc = 1;
> - break;
> + if (!sch || !css_subch_visible(sch)) {
> + setcc(cpu, 3);
Ditto.
> + return;
> }
> - setcc(cpu, cc);
> + setcc(cpu, css_do_hsch(sch));
> }
>
> static int ioinst_schib_valid(SCHIB *schib)
> --
> 2.13.5
>
Reviewed-by: Dong Jia Shi <address@hidden>
--
Dong Jia Shi
- Re: [Qemu-devel] [PATCH v3 3/7] s390x: improve error handling for SSCH and RSCH, (continued)
Re: [Qemu-devel] [PATCH v3 0/7] improve error handling for IO instr, Cornelia Huck, 2017/10/18
Re: [Qemu-devel] [PATCH v3 0/7] improve error handling for IO instr, Cornelia Huck, 2017/10/19