[{"id":1768433,"web_url":"http://patchwork.ozlabs.org/comment/1768433/","msgid":"<20170914110820.0de92331.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-14T09:08:20","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Wed, 13 Sep 2017 13:50:26 +0200\nHalil Pasic <pasic@linux.vnet.ibm.com> wrote:\n\n> This is a preparation for introducing handling for indirect data\n> addressing and modified indirect data addressing (CCW). Here we introduce\n> an interface which should make the addressing scheme transparent for the\n> client code. Here we implement only the basic scheme (no IDA or MIDA).\n> \n> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n> ---\n>  hw/s390x/css.c         | 55 +++++++++++++++++++++++++++++++++++++++++\n>  include/hw/s390x/css.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++\n>  2 files changed, 122 insertions(+)\n> \n\n> +void ccw_dstream_init(CcwDataStream *cds, CCW1 const *ccw, ORB const *orb)\n> +{\n> +    /*\n> +     * We don't support MIDA (an optional facility) yet and we\n> +     * catch this earlier. Just for expressing the precondition.\n> +     */\n> +    g_assert(!(orb->ctrl1 & ORB_CTRL1_MASK_MIDAW));\n> +    cds->flags = (orb->ctrl0 & ORB_CTRL0_MASK_I2K ? CDS_F_I2K : 0) |\n> +                 (orb->ctrl0 & ORB_CTRL0_MASK_C64 ? CDS_F_C64 : 0) |\n> +                 (ccw->flags & CCW_FLAG_IDA ? CDS_F_IDA : 0);\n> +    cds->count = ccw->count;\n> +    cds->cda_orig = ccw->cda;\n> +    ccw_dstream_rewind(cds);\n> +    if (!(cds->flags & CDS_F_IDA)) {\n> +        cds->op_handler = ccw_dstream_rw_noflags;\n> +    } else {\n> +        assert(false);\n\ng_assert_not_reached() might have been better; but as this is removed\nanyway in patch 4, it does not matter.\n\n> +    }\n> +}\n>  \n>  static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr,\n>                               bool suspend_allowed)\n> diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n> index 0653d3c9be..79acaf99b7 100644\n> --- a/include/hw/s390x/css.h\n> +++ b/include/hw/s390x/css.h\n> @@ -75,6 +75,29 @@ typedef struct CMBE {\n>      uint32_t reserved[7];\n>  } QEMU_PACKED CMBE;\n>  \n> +typedef enum CcwDataStreamOp {\n> +    CDS_OP_R = 0,\n> +    CDS_OP_W = 1,\n> +    CDS_OP_A = 2\n> +} CcwDataStreamOp;\n> +\n> +/** normal usage is via SuchchDev.cds instead of instantiating */\n\n/* instead of /**? Can change while applying.\n\n> +typedef struct CcwDataStream {\n> +#define CDS_F_IDA   0x01\n> +#define CDS_F_MIDA  0x02\n> +#define CDS_F_I2K   0x04\n> +#define CDS_F_C64   0x08\n> +#define CDS_F_STREAM_BROKEN  0x80\n> +    uint8_t flags;\n> +    uint8_t at_idaw;\n> +    uint16_t at_byte;\n> +    uint16_t count;\n> +    uint32_t cda_orig;\n> +    int (*op_handler)(struct CcwDataStream *cds, void *buff, int len,\n> +                      CcwDataStreamOp op);\n> +    hwaddr cda;\n> +} CcwDataStream;\n> +\n>  typedef struct SubchDev SubchDev;\n>  struct SubchDev {\n>      /* channel-subsystem related things: */","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtCQ060JWz9sPt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 19:08:53 +1000 (AEST)","from localhost ([::1]:46477 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dsQ8h-0004JG-Ah\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 05:08:51 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33128)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dsQ8M-0004J3-MA\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 05:08:31 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1dsQ8H-00019F-Jr\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 05:08:30 -0400","from mx1.redhat.com ([209.132.183.28]:59508)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1dsQ8H-00017t-Al\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 05:08:25 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 36305C04B924;\n\tThu, 14 Sep 2017 09:08:24 +0000 (UTC)","from gondolin (ovpn-117-98.ams2.redhat.com [10.36.117.98])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id F04CB69FD4;\n\tThu, 14 Sep 2017 09:08:22 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 36305C04B924","Date":"Thu, 14 Sep 2017 11:08:20 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Halil Pasic <pasic@linux.vnet.ibm.com>","Message-ID":"<20170914110820.0de92331.cohuck@redhat.com>","In-Reply-To":"<20170913115029.47626-2-pasic@linux.vnet.ibm.com>","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.31]);\n\tThu, 14 Sep 2017 09:08:24 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1770615,"web_url":"http://patchwork.ozlabs.org/comment/1770615/","msgid":"<20170919022142.GB5274@bjsdjshi@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-19T02:21:42","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":68897,"url":"http://patchwork.ozlabs.org/api/people/68897/","name":"Dong Jia Shi","email":"bjsdjshi@linux.vnet.ibm.com"},"content":"* Halil Pasic <pasic@linux.vnet.ibm.com> [2017-09-13 13:50:26 +0200]:\n\n[...]\n\n> diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n> index 0653d3c9be..79acaf99b7 100644\n> --- a/include/hw/s390x/css.h\n> +++ b/include/hw/s390x/css.h\n> @@ -75,6 +75,29 @@ typedef struct CMBE {\n>      uint32_t reserved[7];\n>  } QEMU_PACKED CMBE;\n> \n> +typedef enum CcwDataStreamOp {\n> +    CDS_OP_R = 0,\n> +    CDS_OP_W = 1,\n> +    CDS_OP_A = 2\n\nNit:\n\ntypedef enum CcwDataStreamOp {\n    CDS_OP_R, /* read */\n    CDS_OP_W, /* write */\n    CDS_OP_A  /* advance */\n} CcwDataStreamOp;\n\n(I just keep translating 'A' as append in my mind...)\n\n> +} CcwDataStreamOp;\n> +\n[...]\n\n> +static inline uint16_t ccw_dstream_avail(CcwDataStream *cds)\n> +{\n> +    return ccw_dstream_good(cds) ?  ccw_dstream_residual_count(cds) : 0;\n                                     ^^\nNit.\n\n> +}\n\n[...]\n\nWith or w/o responses the nit picks:\nReviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xx69Y4hfYz9s4s\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 12:23:10 +1000 (AEST)","from localhost ([::1]:39750 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1du8Bn-0007vb-Fo\n\tfor incoming@patchwork.ozlabs.org; Mon, 18 Sep 2017 22:23:07 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:35061)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <bjsdjshi@linux.vnet.ibm.com>) id 1du8Ad-0007OZ-H5\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 22:21:56 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <bjsdjshi@linux.vnet.ibm.com>) id 1du8AZ-0002j0-F4\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 22:21:55 -0400","from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58724)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <bjsdjshi@linux.vnet.ibm.com>)\n\tid 1du8AZ-0002iA-6O\n\tfor qemu-devel@nongnu.org; Mon, 18 Sep 2017 22:21:51 -0400","from pps.filterd (m0098399.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8J2J45C053517\n\tfor <qemu-devel@nongnu.org>; Mon, 18 Sep 2017 22:21:49 -0400","from e16.ny.us.ibm.com (e16.ny.us.ibm.com [129.33.205.206])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2d2m894b98-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Mon, 18 Sep 2017 22:21:49 -0400","from localhost\n\tby e16.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <bjsdjshi@linux.vnet.ibm.com>;\n\tMon, 18 Sep 2017 22:21:47 -0400","from b01cxnp22035.gho.pok.ibm.com (9.57.198.25)\n\tby e16.ny.us.ibm.com (146.89.104.203) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tMon, 18 Sep 2017 22:21:45 -0400","from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com\n\t[9.57.199.110])\n\tby b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP\n\tid v8J2LikB50004192; Tue, 19 Sep 2017 02:21:44 GMT","from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 79C9AAE082;\n\tMon, 18 Sep 2017 22:22:15 -0400 (EDT)","from localhost (unknown [9.115.112.23])\n\tby b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id B8BF8AE067;\n\tMon, 18 Sep 2017 22:22:14 -0400 (EDT)"],"Date":"Tue, 19 Sep 2017 10:21:42 +0800","From":"Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","To":"Halil Pasic <pasic@linux.vnet.ibm.com>","Mail-Followup-To":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tCornelia Huck <cohuck@redhat.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20170913115029.47626-2-pasic@linux.vnet.ibm.com>","Organization":"(IBM CSL)","X-URL":"http://ibm.com/","User-Agent":"Mutt/1.5.21 (2010-09-15)","X-TM-AS-GCONF":"00","x-cbid":"17091902-0024-0000-0000-000002D466D9","X-IBM-SpamModules-Scores":"","X-IBM-SpamModules-Versions":"BY=3.00007759; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000230; SDB=6.00919061; UDB=6.00461728;\n\tIPR=6.00699288; \n\tBA=6.00005595; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009;\n\tZB=6.00000000; \n\tZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017202;\n\tXFM=3.00000015; UTC=2017-09-19 02:21:46","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17091902-0025-0000-0000-0000457831F0","Message-Id":"<20170919022142.GB5274@bjsdjshi@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-19_01:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709190032","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.156.1","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>,\n\tCornelia Huck <cohuck@redhat.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1770753,"web_url":"http://patchwork.ozlabs.org/comment/1770753/","msgid":"<20170919103851.50fd0237.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-19T08:38:51","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Tue, 19 Sep 2017 10:21:42 +0800\nDong Jia Shi <bjsdjshi@linux.vnet.ibm.com> wrote:\n\n> * Halil Pasic <pasic@linux.vnet.ibm.com> [2017-09-13 13:50:26 +0200]:\n> \n> [...]\n> \n> > diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n> > index 0653d3c9be..79acaf99b7 100644\n> > --- a/include/hw/s390x/css.h\n> > +++ b/include/hw/s390x/css.h\n> > @@ -75,6 +75,29 @@ typedef struct CMBE {\n> >      uint32_t reserved[7];\n> >  } QEMU_PACKED CMBE;\n> > \n> > +typedef enum CcwDataStreamOp {\n> > +    CDS_OP_R = 0,\n> > +    CDS_OP_W = 1,\n> > +    CDS_OP_A = 2  \n> \n> Nit:\n> \n> typedef enum CcwDataStreamOp {\n>     CDS_OP_R, /* read */\n>     CDS_OP_W, /* write */\n>     CDS_OP_A  /* advance */\n> } CcwDataStreamOp;\n> \n> (I just keep translating 'A' as append in my mind...)\n\nAdding comments makes sense. Done.\n\n> \n> > +} CcwDataStreamOp;\n> > +  \n> [...]\n> \n> > +static inline uint16_t ccw_dstream_avail(CcwDataStream *cds)\n> > +{\n> > +    return ccw_dstream_good(cds) ?  ccw_dstream_residual_count(cds) : 0;  \n>                                      ^^\n> Nit.\n\nFixed.\n\n> \n> > +}  \n> \n> [...]\n> \n> With or w/o responses the nit picks:\n> Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>\n> \n\nThanks!","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx04.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxGWw1VsMz9s7M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 18:39:38 +1000 (AEST)","from localhost ([::1]:40791 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duE46-0006NN-RV\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 04:39:34 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37771)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1duE3b-0006Mt-Pc\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 04:39:09 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1duE3W-0000k5-Ss\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 04:39:03 -0400","from mx1.redhat.com ([209.132.183.28]:40944)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1duE3W-0000jp-Ma\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 04:38:58 -0400","from smtp.corp.redhat.com\n\t(int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id BD8507EA84;\n\tTue, 19 Sep 2017 08:38:56 +0000 (UTC)","from gondolin (unknown [10.36.117.0])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 960C55D6A4;\n\tTue, 19 Sep 2017 08:38:54 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com BD8507EA84","Date":"Tue, 19 Sep 2017 10:38:51 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>","Message-ID":"<20170919103851.50fd0237.cohuck@redhat.com>","In-Reply-To":"<20170919022142.GB5274@bjsdjshi@linux.vnet.ibm.com>","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>\n\t<20170919022142.GB5274@bjsdjshi@linux.vnet.ibm.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.15","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.28]);\n\tTue, 19 Sep 2017 08:38:56 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tPierre Morel <pmorel@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1770774,"web_url":"http://patchwork.ozlabs.org/comment/1770774/","msgid":"<63eabac3-0646-92ff-dede-d16391124061@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-19T09:11:27","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":66825,"url":"http://patchwork.ozlabs.org/api/people/66825/","name":"Pierre Morel","email":"pmorel@linux.vnet.ibm.com"},"content":"On 13/09/2017 13:50, Halil Pasic wrote:\n> This is a preparation for introducing handling for indirect data\n> addressing and modified indirect data addressing (CCW). Here we introduce\n> an interface which should make the addressing scheme transparent for the\n> client code. Here we implement only the basic scheme (no IDA or MIDA).\n> \n> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n> ---\n>   hw/s390x/css.c         | 55 +++++++++++++++++++++++++++++++++++++++++\n>   include/hw/s390x/css.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++\n>   2 files changed, 122 insertions(+)\n> \n> diff --git a/hw/s390x/css.c b/hw/s390x/css.c\n> index 901dc6a0f3..e8d2016563 100644\n> --- a/hw/s390x/css.c\n> +++ b/hw/s390x/css.c\n> @@ -783,6 +783,61 @@ static CCW1 copy_ccw_from_guest(hwaddr addr, bool fmt1)\n>       }\n>       return ret;\n>   }\n> +/**\n> + * If out of bounds marks the stream broken. If broken returns -EINVAL,\n> + * otherwise the requested length (may be zero)\n> + */\n> +static inline int cds_check_len(CcwDataStream *cds, int len)\n> +{\n> +    if (cds->at_byte + len > cds->count) {\n> +        cds->flags |= CDS_F_STREAM_BROKEN;\n> +    }\n> +    return cds->flags & CDS_F_STREAM_BROKEN ? -EINVAL : len;\n> +}\n> +\n> +static int ccw_dstream_rw_noflags(CcwDataStream *cds, void *buff, int len,\n> +                                  CcwDataStreamOp op)\n> +{\n> +    int ret;\n> +\n> +    ret = cds_check_len(cds, len);\n> +    if (ret <= 0) {\n> +        return ret;\n> +    }\n> +    if (op == CDS_OP_A) {\n> +        goto incr;\n> +    }\n> +    ret = address_space_rw(&address_space_memory, cds->cda,\n> +                           MEMTXATTRS_UNSPECIFIED, buff, len, op);\n> +    if (ret != MEMTX_OK) {\n> +        cds->flags |= CDS_F_STREAM_BROKEN;\n> +        return -EINVAL;\n> +    }\n> +incr:\n> +    cds->at_byte += len;\n> +    cds->cda += len;\n> +    return 0;\n> +}\n> +\n> +void ccw_dstream_init(CcwDataStream *cds, CCW1 const *ccw, ORB const *orb)\n> +{\n> +    /*\n> +     * We don't support MIDA (an optional facility) yet and we\n> +     * catch this earlier. Just for expressing the precondition.\n> +     */\n> +    g_assert(!(orb->ctrl1 & ORB_CTRL1_MASK_MIDAW));\n> +    cds->flags = (orb->ctrl0 & ORB_CTRL0_MASK_I2K ? CDS_F_I2K : 0) |\n> +                 (orb->ctrl0 & ORB_CTRL0_MASK_C64 ? CDS_F_C64 : 0) |\n> +                 (ccw->flags & CCW_FLAG_IDA ? CDS_F_IDA : 0);\n> +    cds->count = ccw->count;\n> +    cds->cda_orig = ccw->cda;\n> +    ccw_dstream_rewind(cds);\n> +    if (!(cds->flags & CDS_F_IDA)) {\n> +        cds->op_handler = ccw_dstream_rw_noflags;\n> +    } else {\n> +        assert(false);\n> +    }\n> +}\n> \n>   static int css_interpret_ccw(SubchDev *sch, hwaddr ccw_addr,\n>                                bool suspend_allowed)\n> diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n> index 0653d3c9be..79acaf99b7 100644\n> --- a/include/hw/s390x/css.h\n> +++ b/include/hw/s390x/css.h\n> @@ -75,6 +75,29 @@ typedef struct CMBE {\n>       uint32_t reserved[7];\n>   } QEMU_PACKED CMBE;\n> \n> +typedef enum CcwDataStreamOp {\n> +    CDS_OP_R = 0,\n> +    CDS_OP_W = 1,\n> +    CDS_OP_A = 2\n> +} CcwDataStreamOp;\n> +\n> +/** normal usage is via SuchchDev.cds instead of instantiating */\n> +typedef struct CcwDataStream {\n> +#define CDS_F_IDA   0x01\n> +#define CDS_F_MIDA  0x02\n> +#define CDS_F_I2K   0x04\n> +#define CDS_F_C64   0x08\n> +#define CDS_F_STREAM_BROKEN  0x80\n> +    uint8_t flags;\n> +    uint8_t at_idaw;\n> +    uint16_t at_byte;\n> +    uint16_t count;\n> +    uint32_t cda_orig;\n> +    int (*op_handler)(struct CcwDataStream *cds, void *buff, int len,\n> +                      CcwDataStreamOp op);\n\nI would have prefer one handler per operation instead of a operation \nparameter.\n\nIs it possible to change the name of the \"buf\" argument to \"arg\".\nI just think of the foollowing:\nIf one day we do not want to gather all IDAs into a single buffer but \nkeep them split, we can have something like an array of buffers as argument.\n\n\n\n> +    hwaddr cda;\n> +} CcwDataStream;\n> +\n>   typedef struct SubchDev SubchDev;\n>   struct SubchDev {\n>       /* channel-subsystem related things: */\n> @@ -92,6 +115,7 @@ struct SubchDev {\n>       uint8_t ccw_no_data_cnt;\n>       uint16_t migrated_schid; /* used for missmatch detection */\n>       ORB orb;\n> +    CcwDataStream cds;\n>       /* transport-provided data: */\n>       int (*ccw_cb) (SubchDev *, CCW1);\n>       void (*disable_cb)(SubchDev *);\n> @@ -240,4 +264,47 @@ SubchDev *css_create_sch(CssDevId bus_id, bool is_virtual, bool squash_mcss,\n>   /** Turn on css migration */\n>   void css_register_vmstate(void);\n> \n> +\n> +void ccw_dstream_init(CcwDataStream *cds, CCW1 const *ccw, ORB const *orb);\n> +\n> +static inline void ccw_dstream_rewind(CcwDataStream *cds)\n> +{\n> +    cds->at_byte = 0;\n> +    cds->at_idaw = 0;\n> +    cds->cda = cds->cda_orig;\n> +}\n> +\n> +static inline bool ccw_dstream_good(CcwDataStream *cds)\n> +{\n> +    return !(cds->flags & CDS_F_STREAM_BROKEN);\n> +}\n> +\n> +static inline uint16_t ccw_dstream_residual_count(CcwDataStream *cds)\n> +{\n> +    return cds->count - cds->at_byte;\n> +}\n> +\n> +static inline uint16_t ccw_dstream_avail(CcwDataStream *cds)\n> +{\n> +    return ccw_dstream_good(cds) ?  ccw_dstream_residual_count(cds) : 0;\n> +}\n> +\n> +static inline int ccw_dstream_advance(CcwDataStream *cds, int len)\n> +{\n> +    return cds->op_handler(cds, NULL, len, CDS_OP_A);\n> +}\n> +\n> +static inline int ccw_dstream_write_buf(CcwDataStream *cds, void *buff, int len)\n> +{\n> +    return cds->op_handler(cds, buff, len, CDS_OP_W);\n> +}\n> +\n> +static inline int ccw_dstream_read_buf(CcwDataStream *cds, void *buff, int len)\n> +{\n> +    return cds->op_handler(cds, buff, len, CDS_OP_R);\n> +}\n> +\n> +#define ccw_dstream_read(cds, v) ccw_dstream_read_buf((cds), &(v), sizeof(v))\n> +#define ccw_dstream_write(cds, v) ccw_dstream_write_buf((cds), &(v), sizeof(v))\n> +\n>   #endif\n> \n\notherwise, LGTM","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxHFF6rYhz9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 19:12:01 +1000 (AEST)","from localhost ([::1]:40930 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duEZS-00024S-J1\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 05:11:58 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:47741)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pmorel@linux.vnet.ibm.com>) id 1duEZ6-00022l-Lg\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 05:11:38 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pmorel@linux.vnet.ibm.com>) id 1duEZ3-0006YV-F6\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 05:11:36 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58745\n\thelo=mx0a-001b2d01.pphosted.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pmorel@linux.vnet.ibm.com>)\n\tid 1duEZ3-0006Xs-9f\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 05:11:33 -0400","from pps.filterd (m0098416.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8J99aC5089690\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 05:11:32 -0400","from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2d2xcjymuf-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 05:11:32 -0400","from localhost\n\tby e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <pmorel@linux.vnet.ibm.com>;\n\tTue, 19 Sep 2017 10:11:30 +0100","from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197)\n\tby e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tTue, 19 Sep 2017 10:11:28 +0100","from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com\n\t[9.149.105.59])\n\tby b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8J9BSX315073460; Tue, 19 Sep 2017 09:11:28 GMT","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id C87B8A4040;\n\tTue, 19 Sep 2017 10:07:30 +0100 (BST)","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 9675EA404D;\n\tTue, 19 Sep 2017 10:07:30 +0100 (BST)","from [9.145.21.76] (unknown [9.145.21.76])\n\tby d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP;\n\tTue, 19 Sep 2017 10:07:30 +0100 (BST)"],"To":"Halil Pasic <pasic@linux.vnet.ibm.com>, Cornelia Huck <cohuck@redhat.com>","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>","From":"Pierre Morel <pmorel@linux.vnet.ibm.com>","Date":"Tue, 19 Sep 2017 11:11:27 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170913115029.47626-2-pasic@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17091909-0016-0000-0000-000004EE4548","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17091909-0017-0000-0000-000028287756","Message-Id":"<63eabac3-0646-92ff-dede-d16391124061@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-19_04:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709190129","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0b-001b2d01.pphosted.com id v8J99aC5089690","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.158.5","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1770804,"web_url":"http://patchwork.ozlabs.org/comment/1770804/","msgid":"<20170919115321.0f3b5c57.cohuck@redhat.com>","list_archive_url":null,"date":"2017-09-19T09:53:21","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":71914,"url":"http://patchwork.ozlabs.org/api/people/71914/","name":"Cornelia Huck","email":"cohuck@redhat.com"},"content":"On Tue, 19 Sep 2017 11:11:27 +0200\nPierre Morel <pmorel@linux.vnet.ibm.com> wrote:\n\n> On 13/09/2017 13:50, Halil Pasic wrote:\n> > This is a preparation for introducing handling for indirect data\n> > addressing and modified indirect data addressing (CCW). Here we introduce\n> > an interface which should make the addressing scheme transparent for the\n> > client code. Here we implement only the basic scheme (no IDA or MIDA).\n> > \n> > Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n> > ---\n> >   hw/s390x/css.c         | 55 +++++++++++++++++++++++++++++++++++++++++\n> >   include/hw/s390x/css.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++\n> >   2 files changed, 122 insertions(+)\n\n> > diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n> > index 0653d3c9be..79acaf99b7 100644\n> > --- a/include/hw/s390x/css.h\n> > +++ b/include/hw/s390x/css.h\n> > @@ -75,6 +75,29 @@ typedef struct CMBE {\n> >       uint32_t reserved[7];\n> >   } QEMU_PACKED CMBE;\n> > \n> > +typedef enum CcwDataStreamOp {\n> > +    CDS_OP_R = 0,\n> > +    CDS_OP_W = 1,\n> > +    CDS_OP_A = 2\n> > +} CcwDataStreamOp;\n> > +\n> > +/** normal usage is via SuchchDev.cds instead of instantiating */\n> > +typedef struct CcwDataStream {\n> > +#define CDS_F_IDA   0x01\n> > +#define CDS_F_MIDA  0x02\n> > +#define CDS_F_I2K   0x04\n> > +#define CDS_F_C64   0x08\n> > +#define CDS_F_STREAM_BROKEN  0x80\n> > +    uint8_t flags;\n> > +    uint8_t at_idaw;\n> > +    uint16_t at_byte;\n> > +    uint16_t count;\n> > +    uint32_t cda_orig;\n> > +    int (*op_handler)(struct CcwDataStream *cds, void *buff, int len,\n> > +                      CcwDataStreamOp op);  \n> \n> I would have prefer one handler per operation instead of a operation \n> parameter.\n> \n> Is it possible to change the name of the \"buf\" argument to \"arg\".\n> I just think of the foollowing:\n> If one day we do not want to gather all IDAs into a single buffer but \n> keep them split, we can have something like an array of buffers as argument.\n\nIt should be possible to change the internal format should we decide to\nwant to do something different, so I'll leave that as-is for now.\n\n> \n> \n> \n> > +    hwaddr cda;\n> > +} CcwDataStream;\n> > +\n\n> otherwise, LGTM\n\nIs that an ack? :)","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=cohuck@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxJCx1H4dz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 19:55:57 +1000 (AEST)","from localhost ([::1]:41097 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duFFz-0002u5-B7\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 05:55:55 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33462)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1duFDc-0001O9-Tv\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 05:53:29 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <cohuck@redhat.com>) id 1duFDc-0006ed-2x\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 05:53:29 -0400","from mx1.redhat.com ([209.132.183.28]:58386)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <cohuck@redhat.com>) id 1duFDb-0006eI-TN\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 05:53:28 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id B249581DFF;\n\tTue, 19 Sep 2017 09:53:26 +0000 (UTC)","from gondolin (unknown [10.36.117.0])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 59F0E60619;\n\tTue, 19 Sep 2017 09:53:25 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com B249581DFF","Date":"Tue, 19 Sep 2017 11:53:21 +0200","From":"Cornelia Huck <cohuck@redhat.com>","To":"Pierre Morel <pmorel@linux.vnet.ibm.com>","Message-ID":"<20170919115321.0f3b5c57.cohuck@redhat.com>","In-Reply-To":"<63eabac3-0646-92ff-dede-d16391124061@linux.vnet.ibm.com>","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>\n\t<63eabac3-0646-92ff-dede-d16391124061@linux.vnet.ibm.com>","Organization":"Red Hat GmbH","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tTue, 19 Sep 2017 09:53:26 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1770894,"web_url":"http://patchwork.ozlabs.org/comment/1770894/","msgid":"<b75ec315-27c4-aa65-9360-85ed21796f0d@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-19T11:41:17","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":66825,"url":"http://patchwork.ozlabs.org/api/people/66825/","name":"Pierre Morel","email":"pmorel@linux.vnet.ibm.com"},"content":"On 19/09/2017 11:53, Cornelia Huck wrote:\n> On Tue, 19 Sep 2017 11:11:27 +0200\n> Pierre Morel <pmorel@linux.vnet.ibm.com> wrote:\n> \n>> On 13/09/2017 13:50, Halil Pasic wrote:\n>>> This is a preparation for introducing handling for indirect data\n>>> addressing and modified indirect data addressing (CCW). Here we introduce\n>>> an interface which should make the addressing scheme transparent for the\n>>> client code. Here we implement only the basic scheme (no IDA or MIDA).\n>>>\n>>> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n>>> ---\n>>>    hw/s390x/css.c         | 55 +++++++++++++++++++++++++++++++++++++++++\n>>>    include/hw/s390x/css.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++\n>>>    2 files changed, 122 insertions(+)\n> \n>>> diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n>>> index 0653d3c9be..79acaf99b7 100644\n>>> --- a/include/hw/s390x/css.h\n>>> +++ b/include/hw/s390x/css.h\n>>> @@ -75,6 +75,29 @@ typedef struct CMBE {\n>>>        uint32_t reserved[7];\n>>>    } QEMU_PACKED CMBE;\n>>>\n>>> +typedef enum CcwDataStreamOp {\n>>> +    CDS_OP_R = 0,\n>>> +    CDS_OP_W = 1,\n>>> +    CDS_OP_A = 2\n>>> +} CcwDataStreamOp;\n>>> +\n>>> +/** normal usage is via SuchchDev.cds instead of instantiating */\n>>> +typedef struct CcwDataStream {\n>>> +#define CDS_F_IDA   0x01\n>>> +#define CDS_F_MIDA  0x02\n>>> +#define CDS_F_I2K   0x04\n>>> +#define CDS_F_C64   0x08\n>>> +#define CDS_F_STREAM_BROKEN  0x80\n>>> +    uint8_t flags;\n>>> +    uint8_t at_idaw;\n>>> +    uint16_t at_byte;\n>>> +    uint16_t count;\n>>> +    uint32_t cda_orig;\n>>> +    int (*op_handler)(struct CcwDataStream *cds, void *buff, int len,\n>>> +                      CcwDataStreamOp op);\n>>\n>> I would have prefer one handler per operation instead of a operation\n>> parameter.\n>>\n>> Is it possible to change the name of the \"buf\" argument to \"arg\".\n>> I just think of the foollowing:\n>> If one day we do not want to gather all IDAs into a single buffer but\n>> keep them split, we can have something like an array of buffers as argument.\n> \n> It should be possible to change the internal format should we decide to\n> want to do something different, so I'll leave that as-is for now.\n> \n>>\n>>\n>>\n>>> +    hwaddr cda;\n>>> +} CcwDataStream;\n>>> +\n> \n>> otherwise, LGTM\n> \n> Is that an ack? :)\n> \n\nSorry, yes it is.\nI play a little with the code before giving a RB\nShould be end of the day.","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxLZ93f8Pz9s7h\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 21:41:50 +1000 (AEST)","from localhost ([::1]:41747 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duGuR-0007uM-48\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 07:41:47 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:56697)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pmorel@linux.vnet.ibm.com>) id 1duGu9-0007u3-4V\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 07:41:30 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pmorel@linux.vnet.ibm.com>) id 1duGu5-0007Y3-UY\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 07:41:29 -0400","from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58440)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pmorel@linux.vnet.ibm.com>)\n\tid 1duGu5-0007XM-MN\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 07:41:25 -0400","from pps.filterd (m0098409.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8JBe605102319\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 07:41:23 -0400","from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2d2yyyrywy-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 07:41:23 -0400","from localhost\n\tby e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <pmorel@linux.vnet.ibm.com>;\n\tTue, 19 Sep 2017 12:41:21 +0100","from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197)\n\tby e06smtp13.uk.ibm.com (192.168.101.143) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tTue, 19 Sep 2017 12:41:18 +0100","from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com\n\t[9.149.105.59])\n\tby b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8JBfHqe20775110; Tue, 19 Sep 2017 11:41:17 GMT","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 11315A4040;\n\tTue, 19 Sep 2017 12:37:20 +0100 (BST)","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id D34D8A404D;\n\tTue, 19 Sep 2017 12:37:19 +0100 (BST)","from [9.145.21.76] (unknown [9.145.21.76])\n\tby d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP;\n\tTue, 19 Sep 2017 12:37:19 +0100 (BST)"],"To":"Cornelia Huck <cohuck@redhat.com>","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>\n\t<63eabac3-0646-92ff-dede-d16391124061@linux.vnet.ibm.com>\n\t<20170919115321.0f3b5c57.cohuck@redhat.com>","From":"Pierre Morel <pmorel@linux.vnet.ibm.com>","Date":"Tue, 19 Sep 2017 13:41:17 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170919115321.0f3b5c57.cohuck@redhat.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17091911-0012-0000-0000-0000057A5D09","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17091911-0013-0000-0000-000018F3904A","Message-Id":"<b75ec315-27c4-aa65-9360-85ed21796f0d@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-19_05:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709190166","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0a-001b2d01.pphosted.com id v8JBe605102319","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.156.1","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1770937,"web_url":"http://patchwork.ozlabs.org/comment/1770937/","msgid":"<3fb74715-e807-7316-99e8-c111702b8d44@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-19T12:16:36","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":68297,"url":"http://patchwork.ozlabs.org/api/people/68297/","name":"Halil Pasic","email":"pasic@linux.vnet.ibm.com"},"content":"On 09/19/2017 01:41 PM, Pierre Morel wrote:\n> On 19/09/2017 11:53, Cornelia Huck wrote:\n>> On Tue, 19 Sep 2017 11:11:27 +0200\n>> Pierre Morel <pmorel@linux.vnet.ibm.com> wrote:\n>>\n>>> On 13/09/2017 13:50, Halil Pasic wrote:\n>>>> This is a preparation for introducing handling for indirect data\n>>>> addressing and modified indirect data addressing (CCW). Here we introduce\n>>>> an interface which should make the addressing scheme transparent for the\n>>>> client code. Here we implement only the basic scheme (no IDA or MIDA).\n>>>>\n>>>> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n>>>> ---\n>>>>    hw/s390x/css.c         | 55 +++++++++++++++++++++++++++++++++++++++++\n>>>>    include/hw/s390x/css.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++\n>>>>    2 files changed, 122 insertions(+)\n>>\n>>>> diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n>>>> index 0653d3c9be..79acaf99b7 100644\n>>>> --- a/include/hw/s390x/css.h\n>>>> +++ b/include/hw/s390x/css.h\n>>>> @@ -75,6 +75,29 @@ typedef struct CMBE {\n>>>>        uint32_t reserved[7];\n>>>>    } QEMU_PACKED CMBE;\n>>>>\n>>>> +typedef enum CcwDataStreamOp {\n>>>> +    CDS_OP_R = 0,\n>>>> +    CDS_OP_W = 1,\n>>>> +    CDS_OP_A = 2\n>>>> +} CcwDataStreamOp;\n>>>> +\n>>>> +/** normal usage is via SuchchDev.cds instead of instantiating */\n>>>> +typedef struct CcwDataStream {\n>>>> +#define CDS_F_IDA   0x01\n>>>> +#define CDS_F_MIDA  0x02\n>>>> +#define CDS_F_I2K   0x04\n>>>> +#define CDS_F_C64   0x08\n>>>> +#define CDS_F_STREAM_BROKEN  0x80\n>>>> +    uint8_t flags;\n>>>> +    uint8_t at_idaw;\n>>>> +    uint16_t at_byte;\n>>>> +    uint16_t count;\n>>>> +    uint32_t cda_orig;\n>>>> +    int (*op_handler)(struct CcwDataStream *cds, void *buff, int len,\n>>>> +                      CcwDataStreamOp op);\n>>>\n>>> I would have prefer one handler per operation instead of a operation\n>>> parameter.\n>>>\n>>> Is it possible to change the name of the \"buf\" argument to \"arg\".\n>>> I just think of the foollowing:\n>>> If one day we do not want to gather all IDAs into a single buffer but\n>>> keep them split, we can have something like an array of buffers as argument.\n>>\n\nI had a similar idea: basically indirect data access is kind of a scatter-\ngather mechanism. If one just has to mediate the data (e.g. between some\nbacked taking sg or some facility provided by the kernel) creating a copy\nof the data (what CcwDataStream currently does) is not necessarily optimal.\n\nI've realized that while looking at the 3270 code.\n\nSo some kind of a turn a CcwDataStream into a scatter-gather list may\ncome along the road. But I would like to have an use-case for that first.\n\n>> It should be possible to change the internal format should we decide to\n>> want to do something different, so I'll leave that as-is for now.\n>>\n\nFully agree! This is internal stuff we have under full control. We can\ndecide any time to do something completely different looking (if we are\nwilling to change all the client code). So I think taking out the crystal orb\n(pun intended) ain't necessary (or very productive).\n\n>>>\n>>>\n>>>\n>>>> +    hwaddr cda;\n>>>> +} CcwDataStream;\n>>>> +\n>>\n>>> otherwise, LGTM\n>>\n>> Is that an ack? :)\n>>\n> \n> Sorry, yes it is.\n> I play a little with the code before giving a RB\n> Should be end of the day.\n> \n>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxMLr4B3Zz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 22:17:08 +1000 (AEST)","from localhost ([::1]:42517 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duHSc-00089J-Eg\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 08:17:06 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:53125)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pasic@linux.vnet.ibm.com>) id 1duHSJ-00089A-Tu\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 08:16:49 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pasic@linux.vnet.ibm.com>) id 1duHSE-0005nd-Tb\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 08:16:47 -0400","from mx0a-001b2d01.pphosted.com ([148.163.156.1]:48704)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pasic@linux.vnet.ibm.com>)\n\tid 1duHSE-0005mX-L5\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 08:16:42 -0400","from pps.filterd (m0098394.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8JCE4oL047218\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 08:16:41 -0400","from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2d2yyqb22y-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 08:16:41 -0400","from localhost\n\tby e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <pasic@linux.vnet.ibm.com>;\n\tTue, 19 Sep 2017 13:16:38 +0100","from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194)\n\tby e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tTue, 19 Sep 2017 13:16:36 +0100","from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com\n\t[9.149.105.61])\n\tby b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8JCGaO812648678; Tue, 19 Sep 2017 12:16:36 GMT","from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 19E3B11C04A;\n\tTue, 19 Sep 2017 13:12:40 +0100 (BST)","from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id D35CB11C058;\n\tTue, 19 Sep 2017 13:12:39 +0100 (BST)","from oc3836556865.ibm.com (unknown [9.152.224.207])\n\tby d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP;\n\tTue, 19 Sep 2017 13:12:39 +0100 (BST)"],"To":"Pierre Morel <pmorel@linux.vnet.ibm.com>,\n\tCornelia Huck <cohuck@redhat.com>","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>\n\t<63eabac3-0646-92ff-dede-d16391124061@linux.vnet.ibm.com>\n\t<20170919115321.0f3b5c57.cohuck@redhat.com>\n\t<b75ec315-27c4-aa65-9360-85ed21796f0d@linux.vnet.ibm.com>","From":"Halil Pasic <pasic@linux.vnet.ibm.com>","Date":"Tue, 19 Sep 2017 14:16:36 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<b75ec315-27c4-aa65-9360-85ed21796f0d@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17091912-0016-0000-0000-000004EE593F","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17091912-0017-0000-0000-000028288C1D","Message-Id":"<3fb74715-e807-7316-99e8-c111702b8d44@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-19_05:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709190175","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0a-001b2d01.pphosted.com id v8JCE4oL047218","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.156.1","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}},{"id":1771048,"web_url":"http://patchwork.ozlabs.org/comment/1771048/","msgid":"<092270d2-4079-2ce0-910b-80e792499532@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-19T13:55:07","subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","submitter":{"id":66825,"url":"http://patchwork.ozlabs.org/api/people/66825/","name":"Pierre Morel","email":"pmorel@linux.vnet.ibm.com"},"content":"On 19/09/2017 11:53, Cornelia Huck wrote:\n> On Tue, 19 Sep 2017 11:11:27 +0200\n> Pierre Morel <pmorel@linux.vnet.ibm.com> wrote:\n> \n>> On 13/09/2017 13:50, Halil Pasic wrote:\n>>> This is a preparation for introducing handling for indirect data\n>>> addressing and modified indirect data addressing (CCW). Here we introduce\n>>> an interface which should make the addressing scheme transparent for the\n>>> client code. Here we implement only the basic scheme (no IDA or MIDA).\n>>>\n>>> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n>>> ---\n>>>    hw/s390x/css.c         | 55 +++++++++++++++++++++++++++++++++++++++++\n>>>    include/hw/s390x/css.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++\n>>>    2 files changed, 122 insertions(+)\n> \n>>> diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h\n>>> index 0653d3c9be..79acaf99b7 100644\n>>> --- a/include/hw/s390x/css.h\n>>> +++ b/include/hw/s390x/css.h\n>>> @@ -75,6 +75,29 @@ typedef struct CMBE {\n>>>        uint32_t reserved[7];\n>>>    } QEMU_PACKED CMBE;\n>>>\n>>> +typedef enum CcwDataStreamOp {\n>>> +    CDS_OP_R = 0,\n>>> +    CDS_OP_W = 1,\n>>> +    CDS_OP_A = 2\n>>> +} CcwDataStreamOp;\n>>> +\n>>> +/** normal usage is via SuchchDev.cds instead of instantiating */\n>>> +typedef struct CcwDataStream {\n>>> +#define CDS_F_IDA   0x01\n>>> +#define CDS_F_MIDA  0x02\n>>> +#define CDS_F_I2K   0x04\n>>> +#define CDS_F_C64   0x08\n>>> +#define CDS_F_STREAM_BROKEN  0x80\n>>> +    uint8_t flags;\n>>> +    uint8_t at_idaw;\n>>> +    uint16_t at_byte;\n>>> +    uint16_t count;\n>>> +    uint32_t cda_orig;\n>>> +    int (*op_handler)(struct CcwDataStream *cds, void *buff, int len,\n>>> +                      CcwDataStreamOp op);\n>>\n>> I would have prefer one handler per operation instead of a operation\n>> parameter.\n>>\n>> Is it possible to change the name of the \"buf\" argument to \"arg\".\n>> I just think of the foollowing:\n>> If one day we do not want to gather all IDAs into a single buffer but\n>> keep them split, we can have something like an array of buffers as argument.\n> \n> It should be possible to change the internal format should we decide to\n> want to do something different, so I'll leave that as-is for now.\n> \n>>\n>>\n>>\n>>> +    hwaddr cda;\n>>> +} CcwDataStream;\n>>> +\n> \n>> otherwise, LGTM\n> \n> Is that an ack? :)\n> \n> \n\nReviewed-by: Pierre Morel<pmorel@linux.vnet.ibm.com>","headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xxPZ63R6nz9s7B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 19 Sep 2017 23:57:00 +1000 (AEST)","from localhost ([::1]:43090 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1duJ1G-0006yL-L8\n\tfor incoming@patchwork.ozlabs.org; Tue, 19 Sep 2017 09:56:58 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34407)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pmorel@linux.vnet.ibm.com>) id 1duIzh-0006B6-Gt\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 09:55:22 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pmorel@linux.vnet.ibm.com>) id 1duIzb-0001iY-FK\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 09:55:21 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48460\n\thelo=mx0a-001b2d01.pphosted.com)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pmorel@linux.vnet.ibm.com>)\n\tid 1duIzb-0001iL-9Y\n\tfor qemu-devel@nongnu.org; Tue, 19 Sep 2017 09:55:15 -0400","from pps.filterd (m0098417.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8JDsuYg113813\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 09:55:14 -0400","from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2d30nvq5mg-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Tue, 19 Sep 2017 09:55:12 -0400","from localhost\n\tby e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <pmorel@linux.vnet.ibm.com>;\n\tTue, 19 Sep 2017 14:55:11 +0100","from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197)\n\tby e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tTue, 19 Sep 2017 14:55:08 +0100","from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com\n\t[9.149.105.59])\n\tby b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8JDt8dF14549234; Tue, 19 Sep 2017 13:55:08 GMT","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 8CBB7A404D;\n\tTue, 19 Sep 2017 14:51:10 +0100 (BST)","from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 5C6EAA4051;\n\tTue, 19 Sep 2017 14:51:10 +0100 (BST)","from [9.145.21.76] (unknown [9.145.21.76])\n\tby d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP;\n\tTue, 19 Sep 2017 14:51:10 +0100 (BST)"],"To":"Cornelia Huck <cohuck@redhat.com>","References":"<20170913115029.47626-1-pasic@linux.vnet.ibm.com>\n\t<20170913115029.47626-2-pasic@linux.vnet.ibm.com>\n\t<63eabac3-0646-92ff-dede-d16391124061@linux.vnet.ibm.com>\n\t<20170919115321.0f3b5c57.cohuck@redhat.com>","From":"Pierre Morel <pmorel@linux.vnet.ibm.com>","Date":"Tue, 19 Sep 2017 15:55:07 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170919115321.0f3b5c57.cohuck@redhat.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","X-TM-AS-GCONF":"00","x-cbid":"17091913-0008-0000-0000-000004985F35","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17091913-0009-0000-0000-00001E2990F4","Message-Id":"<092270d2-4079-2ce0-910b-80e792499532@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-19_06:, , signatures=0","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=0\n\tmalwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\n\tadjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000\n\tdefinitions=main-1709190198","Content-Transfer-Encoding":"quoted-printable","X-MIME-Autoconverted":"from 8bit to quoted-printable by\n\tmx0a-001b2d01.pphosted.com id v8JDsuYg113813","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]","X-Received-From":"148.163.158.5","Subject":"Re: [Qemu-devel] [PATCH v2 1/4] s390x/css: introduce css data stream","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Halil Pasic <pasic@linux.vnet.ibm.com>,\n\tDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>, qemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"}}]