[{"id":1767827,"web_url":"http://patchwork.ozlabs.org/comment/1767827/","msgid":"<4c65d9e0-df2c-6838-22dc-46415cdd82f1@redhat.com>","list_archive_url":null,"date":"2017-09-13T12:09:15","subject":"Re: [Qemu-devel] [PATCH v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"On 12.09.2017 16:26, Farhan Ali wrote:\n> Wire up the virtio-gpu device for the CCW bus. The virtio-gpu\n> is a virtio-1 device, so disable revision 0.\n> \n> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>\n> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>\n> ---\n>  hw/s390x/virtio-ccw.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++\n>  hw/s390x/virtio-ccw.h | 10 ++++++++++\n>  2 files changed, 64 insertions(+)\n> \n> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c\n> index b1976fd..3078bf0 100644\n> --- a/hw/s390x/virtio-ccw.c\n> +++ b/hw/s390x/virtio-ccw.c\n> @@ -1007,6 +1007,20 @@ static void virtio_ccw_crypto_realize(VirtioCcwDevice *ccw_dev, Error **errp)\n>                               NULL);\n>  }\n>  \n> +static void virtio_ccw_gpu_realize(VirtioCcwDevice *ccw_dev, Error **errp)\n> +{\n> +    VirtIOGPUCcw *dev = VIRTIO_GPU_CCW(ccw_dev);\n> +    DeviceState *vdev = DEVICE(&dev->vdev);\n> +    Error *err = NULL;\n> +\n> +    qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));\n> +    object_property_set_bool(OBJECT(vdev), true, \"realized\", &err);\n> +    if (err) {\n> +        error_propagate(errp, err);\n> +        return;\n> +    }\n\nYou can call error_propagate() unconditionally, it can deal with !err.\n\n> +}\n> +\n>  /* DeviceState to VirtioCcwDevice. Note: used on datapath,\n>   * be careful and test performance if you change this.\n>   */\n> @@ -1616,6 +1630,45 @@ static const TypeInfo virtio_ccw_crypto = {\n>      .class_init    = virtio_ccw_crypto_class_init,\n>  };\n>  \n> +static Property virtio_ccw_gpu_properties[] = {\n> +    DEFINE_PROP_BIT(\"ioeventfd\", VirtioCcwDevice, flags,\n> +                    VIRTIO_CCW_FLAG_USE_IOEVENTFD_BIT, true),\n> +    DEFINE_PROP_UINT32(\"max_revision\", VirtioCcwDevice, max_rev,\n> +                       VIRTIO_CCW_MAX_REV),\n> +    DEFINE_PROP_END_OF_LIST(),\n> +};\n> +\n> +static void virtio_ccw_gpu_instance_init(Object *obj)\n> +{\n> +    VirtIOGPUCcw *dev = VIRTIO_GPU_CCW(obj);\n> +    VirtioCcwDevice *ccw_dev = VIRTIO_CCW_DEVICE(obj);\n> +\n> +    ccw_dev->force_revision_1 = true;\n> +    virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev),\n> +                                TYPE_VIRTIO_GPU);\n> +}\n> +\n> +static void virtio_ccw_gpu_class_init(ObjectClass *klass, void *data)\n> +{\n> +    DeviceClass *dc = DEVICE_CLASS(klass);\n> +    VirtIOCCWDeviceClass *k = VIRTIO_CCW_DEVICE_CLASS(klass);\n> +\n> +    k->realize = virtio_ccw_gpu_realize;\n> +    k->exit = virtio_ccw_exit;\n> +    dc->reset = virtio_ccw_reset;\n> +    dc->props = virtio_ccw_gpu_properties;\n> +    dc->hotpluggable = false;\n\nWonder if hotplug could work?","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-mx05.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx05.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=david@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 3xsgTD46V8z9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 22:09:51 +1000 (AEST)","from localhost ([::1]:42084 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 1ds6UG-0002mY-Cg\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 08:09:48 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:53696)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1ds6Tt-0002mB-D9\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 08:09:26 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1ds6Tp-0000DI-E3\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 08:09:25 -0400","from mx1.redhat.com ([209.132.183.28]:40964)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <david@redhat.com>) id 1ds6Tp-0000Cn-5d\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 08:09:21 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\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 2253413A49;\n\tWed, 13 Sep 2017 12:09:20 +0000 (UTC)","from [10.36.116.21] (ovpn-116-21.ams2.redhat.com [10.36.116.21])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id AA53E6EE56;\n\tWed, 13 Sep 2017 12:09:16 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 2253413A49","To":"Farhan Ali <alifm@linux.vnet.ibm.com>, qemu-devel@nongnu.org","References":"<cover.1505225353.git.alifm@linux.vnet.ibm.com>\n\t<a30f50d543182914e83cba5501f615a8ded2b858.1505225353.git.alifm@linux.vnet.ibm.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<4c65d9e0-df2c-6838-22dc-46415cdd82f1@redhat.com>","Date":"Wed, 13 Sep 2017 14:09:15 +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":"<a30f50d543182914e83cba5501f615a8ded2b858.1505225353.git.alifm@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.29]);\n\tWed, 13 Sep 2017 12:09:20 +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 v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","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":"borntraeger@de.ibm.com, thuth@redhat.com, cohuck@redhat.com,\n\tkraxel@redhat.com","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":1767929,"web_url":"http://patchwork.ozlabs.org/comment/1767929/","msgid":"<73299e84-a502-2367-17c3-a72c5e34167f@linux.vnet.ibm.com>","list_archive_url":null,"date":"2017-09-13T14:31:53","subject":"Re: [Qemu-devel] [PATCH v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","submitter":{"id":68297,"url":"http://patchwork.ozlabs.org/api/people/68297/","name":"Halil Pasic","email":"pasic@linux.vnet.ibm.com"},"content":"On 09/12/2017 04:26 PM, Farhan Ali wrote:\n> Wire up the virtio-gpu device for the CCW bus. The virtio-gpu\n> is a virtio-1 device, so disable revision 0.\n> \n> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>\n> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>\n\nReviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>\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 3xskf86bDFz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 00:32:48 +1000 (AEST)","from localhost ([::1]:42840 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 1ds8id-00062h-1H\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 10:32:47 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:39907)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pasic@linux.vnet.ibm.com>) id 1ds8hx-0005qY-7y\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:32:10 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pasic@linux.vnet.ibm.com>) id 1ds8hs-0004UY-28\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:32:05 -0400","from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34144\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 <pasic@linux.vnet.ibm.com>)\n\tid 1ds8hr-0004UA-RO\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:31:59 -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\tv8DET5l3136571\n\tfor <qemu-devel@nongnu.org>; Wed, 13 Sep 2017 10:31:59 -0400","from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111])\n\tby mx0a-001b2d01.pphosted.com with ESMTP id 2cy5y3sw8v-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Wed, 13 Sep 2017 10:31:58 -0400","from localhost\n\tby e06smtp15.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\tWed, 13 Sep 2017 15:31:56 +0100","from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194)\n\tby e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tWed, 13 Sep 2017 15:31:54 +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 v8DEVs0j15532252; Wed, 13 Sep 2017 14:31:54 GMT","from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id C3CBE11C04C;\n\tWed, 13 Sep 2017 15:28:05 +0100 (BST)","from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 3FC3811C058;\n\tWed, 13 Sep 2017 15:28:05 +0100 (BST)","from oc3836556865.ibm.com (unknown [9.152.224.207])\n\tby d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP;\n\tWed, 13 Sep 2017 15:28:05 +0100 (BST)"],"To":"Farhan Ali <alifm@linux.vnet.ibm.com>, qemu-devel@nongnu.org","References":"<cover.1505225353.git.alifm@linux.vnet.ibm.com>\n\t<a30f50d543182914e83cba5501f615a8ded2b858.1505225353.git.alifm@linux.vnet.ibm.com>","From":"Halil Pasic <pasic@linux.vnet.ibm.com>","Date":"Wed, 13 Sep 2017 16:31:53 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.0","MIME-Version":"1.0","In-Reply-To":"<a30f50d543182914e83cba5501f615a8ded2b858.1505225353.git.alifm@linux.vnet.ibm.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-TM-AS-GCONF":"00","x-cbid":"17091314-0020-0000-0000-000003B7AF92","X-IBM-AV-DETECTION":"SAVI=unused REMOTE=unused XFE=unused","x-cbparentid":"17091314-0021-0000-0000-000042492168","Message-Id":"<73299e84-a502-2367-17c3-a72c5e34167f@linux.vnet.ibm.com>","X-Proofpoint-Virus-Version":"vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-13_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-1709130227","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 v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","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":"borntraeger@de.ibm.com, thuth@redhat.com, cohuck@redhat.com,\n\tkraxel@redhat.com","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":1767952,"web_url":"http://patchwork.ozlabs.org/comment/1767952/","msgid":"<1505314391.22749.9.camel@redhat.com>","list_archive_url":null,"date":"2017-09-13T14:53:11","subject":"Re: [Qemu-devel] [PATCH v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","submitter":{"id":589,"url":"http://patchwork.ozlabs.org/api/people/589/","name":"Gerd Hoffmann","email":"kraxel@redhat.com"},"content":"On Wed, 2017-09-13 at 14:09 +0200, David Hildenbrand wrote:\n> > +    dc->props = virtio_ccw_gpu_properties;\n> > +    dc->hotpluggable = false;\n> \n> Wonder if hotplug could work?\n\nNo, ui/* doesn't support hotplug.\n\ncheers,\n  Gerd","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-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=kraxel@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 3xsl7x0W27z9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 00:55:08 +1000 (AEST)","from localhost ([::1]:42974 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 1ds94F-0006c8-1Y\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 10:55:07 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:49105)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <kraxel@redhat.com>) id 1ds92W-0005P7-RP\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:53:21 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <kraxel@redhat.com>) id 1ds92S-00032E-Tr\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:53:20 -0400","from mx1.redhat.com ([209.132.183.28]:59670)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <kraxel@redhat.com>) id 1ds92S-00031M-OS\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 10:53:16 -0400","from smtp.corp.redhat.com\n\t(int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16])\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 C1288C058EA1;\n\tWed, 13 Sep 2017 14:53:14 +0000 (UTC)","from sirius.home.kraxel.org (ovpn-117-51.ams2.redhat.com\n\t[10.36.117.51])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id A9B1963743;\n\tWed, 13 Sep 2017 14:53:12 +0000 (UTC)","from localhost (localhost [IPv6:::1])\n\tby sirius.home.kraxel.org (Postfix) with ESMTP id D4895ECC;\n\tWed, 13 Sep 2017 16:53:11 +0200 (CEST)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com C1288C058EA1","Message-ID":"<1505314391.22749.9.camel@redhat.com>","From":"Gerd Hoffmann <kraxel@redhat.com>","To":"David Hildenbrand <david@redhat.com>, Farhan Ali\n\t<alifm@linux.vnet.ibm.com>,  qemu-devel@nongnu.org","Date":"Wed, 13 Sep 2017 16:53:11 +0200","In-Reply-To":"<4c65d9e0-df2c-6838-22dc-46415cdd82f1@redhat.com>","References":"<cover.1505225353.git.alifm@linux.vnet.ibm.com>\n\t<a30f50d543182914e83cba5501f615a8ded2b858.1505225353.git.alifm@linux.vnet.ibm.com>\n\t<4c65d9e0-df2c-6838-22dc-46415cdd82f1@redhat.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Mime-Version":"1.0","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.16","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tWed, 13 Sep 2017 14:53:14 +0000 (UTC)","Content-Transfer-Encoding":"quoted-printable","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 v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","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":"borntraeger@de.ibm.com, thuth@redhat.com, cohuck@redhat.com","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":1768080,"web_url":"http://patchwork.ozlabs.org/comment/1768080/","msgid":"<dc3abfc6-4a62-9c2c-4f7a-371f8001e6b1@redhat.com>","list_archive_url":null,"date":"2017-09-13T18:22:03","subject":"Re: [Qemu-devel] [PATCH v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","submitter":{"id":66152,"url":"http://patchwork.ozlabs.org/api/people/66152/","name":"Thomas Huth","email":"thuth@redhat.com"},"content":"On 13.09.2017 14:09, David Hildenbrand wrote:\n> On 12.09.2017 16:26, Farhan Ali wrote:\n>> Wire up the virtio-gpu device for the CCW bus. The virtio-gpu\n>> is a virtio-1 device, so disable revision 0.\n>>\n>> Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>\n>> Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>\n>> ---\n>>  hw/s390x/virtio-ccw.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++\n>>  hw/s390x/virtio-ccw.h | 10 ++++++++++\n>>  2 files changed, 64 insertions(+)\n>>\n>> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c\n>> index b1976fd..3078bf0 100644\n>> --- a/hw/s390x/virtio-ccw.c\n>> +++ b/hw/s390x/virtio-ccw.c\n>> @@ -1007,6 +1007,20 @@ static void virtio_ccw_crypto_realize(VirtioCcwDevice *ccw_dev, Error **errp)\n>>                               NULL);\n>>  }\n>>  \n>> +static void virtio_ccw_gpu_realize(VirtioCcwDevice *ccw_dev, Error **errp)\n>> +{\n>> +    VirtIOGPUCcw *dev = VIRTIO_GPU_CCW(ccw_dev);\n>> +    DeviceState *vdev = DEVICE(&dev->vdev);\n>> +    Error *err = NULL;\n>> +\n>> +    qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));\n>> +    object_property_set_bool(OBJECT(vdev), true, \"realized\", &err);\n>> +    if (err) {\n>> +        error_propagate(errp, err);\n>> +        return;\n>> +    }\n> \n> You can call error_propagate() unconditionally, it can deal with !err.\n\nI think you even do not need error_propagate here - just pass errp\ndirectly to object_property_set_bool. You exit the function afterwards\nanyway.\n\n Thomas","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-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=thuth@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 3xsqrz6qdWz9s3T\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 04:27:31 +1000 (AEST)","from localhost ([::1]:44030 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 1dsCNl-0005Hj-Tu\n\tfor incoming@patchwork.ozlabs.org; Wed, 13 Sep 2017 14:27:29 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:37961)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1dsCId-0001K3-MD\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 14:22:12 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <thuth@redhat.com>) id 1dsCIc-0006kO-S5\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 14:22:11 -0400","from mx1.redhat.com ([209.132.183.28]:45124)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <thuth@redhat.com>) id 1dsCIc-0006iE-Mh\n\tfor qemu-devel@nongnu.org; Wed, 13 Sep 2017 14:22:10 -0400","from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])\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 D729DC058EA3;\n\tWed, 13 Sep 2017 18:22:09 +0000 (UTC)","from [10.36.116.123] (ovpn-116-123.ams2.redhat.com [10.36.116.123])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 9658B60C8A;\n\tWed, 13 Sep 2017 18:22:04 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com D729DC058EA3","To":"David Hildenbrand <david@redhat.com>,\n\tFarhan Ali <alifm@linux.vnet.ibm.com>, qemu-devel@nongnu.org","References":"<cover.1505225353.git.alifm@linux.vnet.ibm.com>\n\t<a30f50d543182914e83cba5501f615a8ded2b858.1505225353.git.alifm@linux.vnet.ibm.com>\n\t<4c65d9e0-df2c-6838-22dc-46415cdd82f1@redhat.com>","From":"Thomas Huth <thuth@redhat.com>","Message-ID":"<dc3abfc6-4a62-9c2c-4f7a-371f8001e6b1@redhat.com>","Date":"Wed, 13 Sep 2017 20:22:03 +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":"<4c65d9e0-df2c-6838-22dc-46415cdd82f1@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.12","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tWed, 13 Sep 2017 18:22:10 +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 v1 2/2] virtio-gpu-ccw: Create a virtio gpu\n\tdevice for the ccw bus","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":"borntraeger@de.ibm.com, cohuck@redhat.com, kraxel@redhat.com","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>"}}]