[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 7/7] s390x: refactor error handling for MSCH
From: |
Dong Jia Shi |
Subject: |
Re: [Qemu-devel] [PATCH v3 7/7] s390x: refactor error handling for MSCH handler |
Date: |
Thu, 19 Oct 2017 14:23:17 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
* Halil Pasic <address@hidden> [2017-10-18 13:01:03 +0200]:
>
>
> On 10/18/2017 12:02 PM, Cornelia Huck wrote:
> > On Wed, 18 Oct 2017 12:00:05 +0200
> > Thomas Huth <address@hidden> wrote:
> >
> >> On 17.10.2017 16:04, Halil Pasic wrote:
> >>> Simplify the error handling of the MSCH. Let the code detecting the
> >>> condition tell (in a less ambiguous way) how it's to be handled. No
> >>> changes in behavior.
> >>
> >> ok, so you claim 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(-)
> >>>
> >>> diff --git a/hw/s390x/css.c b/hw/s390x/css.c
> >>> index b9e0329825..30fc236946 100644
> >>> --- a/hw/s390x/css.c
> >>> +++ b/hw/s390x/css.c
> >>> @@ -1347,28 +1347,24 @@ static void copy_schib_from_guest(SCHIB *dest,
> >>> const SCHIB *src)
> >>> }
> >>> }
> >>>
> >>> -int css_do_msch(SubchDev *sch, const SCHIB *orig_schib)
> >>> +IOInstEnding css_do_msch(SubchDev *sch, const SCHIB *orig_schib)
> >>> {
> >>> SCSW *s = &sch->curr_status.scsw;
> >>> PMCW *p = &sch->curr_status.pmcw;
> >>> uint16_t oldflags;
> >>> - int ret;
> >>> SCHIB schib;
> >>>
> >>> if (!(sch->curr_status.pmcw.flags & PMCW_FLAGS_MASK_DNV)) {
> >>> - ret = 0;
> >>> - goto out;
> >>> + return IOINST_CC_EXPECTED;
> >>> }
> >>>
> >>> if (s->ctrl & SCSW_STCTL_STATUS_PEND) {
> >>> - ret = -EINPROGRESS;
> >>> - goto out;
> >>> + return IOINST_CC_STATUS_PRESENT;
> >>> }
> >>>
> >>> if (s->ctrl &
> >>> (SCSW_FCTL_START_FUNC|SCSW_FCTL_HALT_FUNC|SCSW_FCTL_CLEAR_FUNC))
> >>> {
> >>> - ret = -EBUSY;
> >>> - goto out;
> >>> + return IOINST_CC_STATUS_PRESENT;
> >>> }
> >>
> >> ... but here you change -EBUSY (which got mapped to CC=2) to
> >> CC_STATUS_PRESENT which means CC=1. So that's a change in behavior. i.e.
> >> this is either a bug, or you should update the patch description with a
> >> justification for this change in behavior.
> >
> > Indeed, that's a bug. We still want cc 2.
> >
>
> Agree, it is a bug. It was OK in v1 but was already buggy in
> v2.
>
> Conny can you fix this up as well please?
>
> Thanks in advance!
>
I saw Conny fixed this in her branch. So:
Reviewed-by: Dong Jia Shi <address@hidden>
--
Dong Jia Shi
- Re: [Qemu-devel] [PATCH v3 5/7] s390x: refactor error handling for CSCH handler, (continued)
[Qemu-devel] [PATCH v3 3/7] s390x: improve error handling for SSCH and RSCH, Halil Pasic, 2017/10/17
Re: [Qemu-devel] [PATCH v3 3/7] s390x: improve error handling for SSCH and RSCH, Cornelia Huck, 2017/10/18
Re: [Qemu-devel] [PATCH v3 3/7] s390x: improve error handling for SSCH and RSCH, Thomas Huth, 2017/10/18
Re: [Qemu-devel] [PATCH v3 3/7] s390x: improve error handling for SSCH and RSCH, Halil Pasic, 2017/10/18
Re: [Qemu-devel] [PATCH v3 3/7] s390x: improve error handling for SSCH and RSCH, Thomas Huth, 2017/10/18