get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/813892/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 813892,
    "url": "http://patchwork.ozlabs.org/api/patches/813892/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/b9b4d8a8c1d17bf3f086b120fdf04c925da0f331.1505403478.git.alifm@linux.vnet.ibm.com/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/projects/14/?format=api",
        "name": "QEMU Development",
        "link_name": "qemu-devel",
        "list_id": "qemu-devel.nongnu.org",
        "list_email": "qemu-devel@nongnu.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<b9b4d8a8c1d17bf3f086b120fdf04c925da0f331.1505403478.git.alifm@linux.vnet.ibm.com>",
    "list_archive_url": null,
    "date": "2017-09-14T15:55:09",
    "name": "[v2,2/2] virtio-gpu-ccw: Create a virtio gpu device for the ccw bus",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c19773034e7690184ec9949d8327dc6f1d237ee7",
    "submitter": {
        "id": 71051,
        "url": "http://patchwork.ozlabs.org/api/people/71051/?format=api",
        "name": "Farhan Ali",
        "email": "alifm@linux.vnet.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/b9b4d8a8c1d17bf3f086b120fdf04c925da0f331.1505403478.git.alifm@linux.vnet.ibm.com/mbox/",
    "series": [
        {
            "id": 3130,
            "url": "http://patchwork.ozlabs.org/api/series/3130/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=3130",
            "date": "2017-09-14T15:55:08",
            "name": "Virtio GPU for S390",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/3130/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/813892/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/813892/checks/",
    "tags": {},
    "related": [],
    "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 3xtNTK05PRz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 01:57:25 +1000 (AEST)",
            "from localhost ([::1]:48582 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 1dsWW3-0002pI-3n\n\tfor incoming@patchwork.ozlabs.org; Thu, 14 Sep 2017 11:57:23 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:34471)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <alifm@linux.vnet.ibm.com>) id 1dsWVY-0002nS-Nh\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 11:56:54 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <alifm@linux.vnet.ibm.com>) id 1dsWVT-0007fR-Re\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 11:56:52 -0400",
            "from mx0b-001b2d01.pphosted.com ([148.163.158.5]:57154\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 <alifm@linux.vnet.ibm.com>)\n\tid 1dsWVT-0007ez-Lk\n\tfor qemu-devel@nongnu.org; Thu, 14 Sep 2017 11:56:47 -0400",
            "from pps.filterd (m0098413.ppops.net [127.0.0.1])\n\tby mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id\n\tv8EFtp60120132\n\tfor <qemu-devel@nongnu.org>; Thu, 14 Sep 2017 11:56:46 -0400",
            "from e35.co.us.ibm.com (e35.co.us.ibm.com [32.97.110.153])\n\tby mx0b-001b2d01.pphosted.com with ESMTP id 2cyuy0u285-1\n\t(version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)\n\tfor <qemu-devel@nongnu.org>; Thu, 14 Sep 2017 11:56:38 -0400",
            "from localhost\n\tby e35.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <alifm@linux.vnet.ibm.com>;\n\tThu, 14 Sep 2017 09:55:18 -0600",
            "from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17)\n\tby e35.co.us.ibm.com (192.168.1.135) with IBM ESMTP SMTP Gateway:\n\tAuthorized Use Only! Violators will be prosecuted; \n\tThu, 14 Sep 2017 09:55:14 -0600",
            "from b03ledav002.gho.boulder.ibm.com\n\t(b03ledav002.gho.boulder.ibm.com [9.17.130.233])\n\tby b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with\n\tESMTP id v8EFtEwb1376660; Thu, 14 Sep 2017 08:55:14 -0700",
            "from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 3B0B513604B;\n\tThu, 14 Sep 2017 09:55:14 -0600 (MDT)",
            "from alifm-ThinkPad-W540.pok.ibm.com (unknown [9.56.58.64])\n\tby b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTPS id\n\tC0F95136048; Thu, 14 Sep 2017 09:55:13 -0600 (MDT)"
        ],
        "From": "Farhan Ali <alifm@linux.vnet.ibm.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Thu, 14 Sep 2017 11:55:09 -0400",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": [
            "<cover.1505403478.git.alifm@linux.vnet.ibm.com>",
            "<cover.1505403478.git.alifm@linux.vnet.ibm.com>"
        ],
        "References": [
            "<cover.1505403478.git.alifm@linux.vnet.ibm.com>",
            "<cover.1505403478.git.alifm@linux.vnet.ibm.com>"
        ],
        "X-TM-AS-GCONF": "00",
        "x-cbid": "17091415-0012-0000-0000-00001501B120",
        "X-IBM-SpamModules-Scores": "",
        "X-IBM-SpamModules-Versions": "BY=3.00007733; HX=3.00000241; KW=3.00000007;\n\tPH=3.00000004; SC=3.00000227; SDB=6.00916962; UDB=6.00460515;\n\tIPR=6.00697189; \n\tBA=6.00005589; 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.00017153;\n\tXFM=3.00000015; UTC=2017-09-14 15:55:16",
        "X-IBM-AV-DETECTION": "SAVI=unused REMOTE=unused XFE=unused",
        "x-cbparentid": "17091415-0013-0000-0000-00004F7C91C9",
        "Message-Id": "<b9b4d8a8c1d17bf3f086b120fdf04c925da0f331.1505403478.git.alifm@linux.vnet.ibm.com>",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10432:, ,\n\tdefinitions=2017-09-14_04:, , signatures=0",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n\tspamscore=0 suspectscore=1\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-1709140238",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]",
        "X-Received-From": "148.163.158.5",
        "Subject": "[Qemu-devel] [PATCH v2 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>"
    },
    "content": "Wire up the virtio-gpu device for the CCW bus. The virtio-gpu\nis a virtio-1 device, so disable revision 0.\n\nSigned-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>\nAcked-by: Christian Borntraeger <borntraeger@de.ibm.com>\nReviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com>\n---\n hw/s390x/virtio-ccw.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++\n hw/s390x/virtio-ccw.h | 10 ++++++++++\n 2 files changed, 59 insertions(+)",
    "diff": "diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c\nindex b1976fd..12cacf6 100644\n--- a/hw/s390x/virtio-ccw.c\n+++ b/hw/s390x/virtio-ccw.c\n@@ -1007,6 +1007,15 @@ 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+\n+    qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));\n+    object_property_set_bool(OBJECT(vdev), true, \"realized\", errp);\n+}\n+\n /* DeviceState to VirtioCcwDevice. Note: used on datapath,\n  * be careful and test performance if you change this.\n  */\n@@ -1616,6 +1625,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+    set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);\n+}\n+\n+static const TypeInfo virtio_ccw_gpu = {\n+    .name          = TYPE_VIRTIO_GPU_CCW,\n+    .parent        = TYPE_VIRTIO_CCW_DEVICE,\n+    .instance_size = sizeof(VirtIOGPUCcw),\n+    .instance_init = virtio_ccw_gpu_instance_init,\n+    .class_init    = virtio_ccw_gpu_class_init,\n+};\n+\n static void virtio_ccw_busdev_realize(DeviceState *dev, Error **errp)\n {\n     VirtioCcwDevice *_dev = (VirtioCcwDevice *)dev;\n@@ -1815,6 +1863,7 @@ static void virtio_ccw_register(void)\n     type_register_static(&vhost_vsock_ccw_info);\n #endif\n     type_register_static(&virtio_ccw_crypto);\n+    type_register_static(&virtio_ccw_gpu);\n }\n \n type_init(virtio_ccw_register)\ndiff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h\nindex 41d4010..541fdd2 100644\n--- a/hw/s390x/virtio-ccw.h\n+++ b/hw/s390x/virtio-ccw.h\n@@ -27,6 +27,7 @@\n #ifdef CONFIG_VHOST_VSOCK\n #include \"hw/virtio/vhost-vsock.h\"\n #endif /* CONFIG_VHOST_VSOCK */\n+#include \"hw/virtio/virtio-gpu.h\"\n \n #include \"hw/s390x/s390_flic.h\"\n #include \"hw/s390x/css.h\"\n@@ -223,4 +224,13 @@ typedef struct VHostVSockCCWState {\n \n #endif /* CONFIG_VHOST_VSOCK */\n \n+#define TYPE_VIRTIO_GPU_CCW \"virtio-gpu-ccw\"\n+#define VIRTIO_GPU_CCW(obj) \\\n+        OBJECT_CHECK(VirtIOGPUCcw, (obj), TYPE_VIRTIO_GPU_CCW)\n+\n+typedef struct VirtIOGPUCcw {\n+    VirtioCcwDevice parent_obj;\n+    VirtIOGPU vdev;\n+} VirtIOGPUCcw;\n+\n #endif\n",
    "prefixes": [
        "v2",
        "2/2"
    ]
}