get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 807154,
    "url": "http://patchwork.ozlabs.org/api/patches/807154/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170829153022.27004-4-vadim.galitsyn@profitbricks.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": "<20170829153022.27004-4-vadim.galitsyn@profitbricks.com>",
    "list_archive_url": null,
    "date": "2017-08-29T15:30:22",
    "name": "[v7,3/3] hmp: introduce 'info memory_size_summary' command",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f9b5a27f39f5af0a067056c454c2d50b1a115da3",
    "submitter": {
        "id": 71788,
        "url": "http://patchwork.ozlabs.org/api/people/71788/?format=api",
        "name": "Vadim Galitsyn",
        "email": "vadim.galitsyn@profitbricks.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170829153022.27004-4-vadim.galitsyn@profitbricks.com/mbox/",
    "series": [
        {
            "id": 395,
            "url": "http://patchwork.ozlabs.org/api/series/395/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=395",
            "date": "2017-08-29T15:30:22",
            "name": null,
            "version": 7,
            "mbox": "http://patchwork.ozlabs.org/series/395/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/807154/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/807154/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>)",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=profitbricks-com.20150623.gappssmtp.com\n\theader.i=@profitbricks-com.20150623.gappssmtp.com\n\theader.b=\"qMZHsm3d\"; dkim-atps=neutral"
        ],
        "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 3xhXfh3Kd5z9t33\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 01:31:24 +1000 (AEST)",
            "from localhost ([::1]:45511 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 1dmiU6-0001is-2X\n\tfor incoming@patchwork.ozlabs.org; Tue, 29 Aug 2017 11:31:22 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:46743)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <vadim.galitsyn@profitbricks.com>) id 1dmiTV-0001gJ-7u\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 11:30:46 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <vadim.galitsyn@profitbricks.com>) id 1dmiTT-0003nS-N8\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 11:30:45 -0400",
            "from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:35373)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <vadim.galitsyn@profitbricks.com>)\n\tid 1dmiTT-0003m0-Ga\n\tfor qemu-devel@nongnu.org; Tue, 29 Aug 2017 11:30:43 -0400",
            "by mail-wr0-x22a.google.com with SMTP id j29so10400608wre.2\n\tfor <qemu-devel@nongnu.org>; Tue, 29 Aug 2017 08:30:43 -0700 (PDT)",
            "from debian-jessie.pb.local ([62.217.45.26])\n\tby smtp.gmail.com with ESMTPSA id\n\tx7sm1702459wme.34.2017.08.29.08.30.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 29 Aug 2017 08:30:41 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=profitbricks-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=RELzZxvu+LBQSggUH+W4jKAIiwQ0nsyo62XUGJR3xvI=;\n\tb=qMZHsm3dM1vBsklEK44iBgkqOZRXkeDNCIokRlBIjWDANZntb1xKRaeQUb1ovrApKx\n\t0VPzCWTTbFjb8Rr1mox7vh1FoQXyOamKo2XWKSBKW7eIue4AXpsHU90IvbJlOawr9ZuL\n\tKIICrZ14dr6xJaSkht4/MR7JRbFZf9irPt2x+gagawFWgeoNBal0X49TxKPYsJXdgo4s\n\thS0tf23wxD1nwTdaPKz5zqNgu8nwT7/0S/SAJsGD8MF/u915UJvffK1C2dP7fwmr9pfQ\n\td9Bt8DPXW10POWpPelGgsUDOZVtXReH+qNTWeOxr8hQzxwaHG4v+2m3qP/H0VhdFCM+r\n\tjYSw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=RELzZxvu+LBQSggUH+W4jKAIiwQ0nsyo62XUGJR3xvI=;\n\tb=UHGIYZDBG02Nv4veRU+JbITxRSd5yzaSr1On7bB7k2H+Q2F1cLnVYcCc++mi4yCoQU\n\tWAzbDHE+aaNBiSg020JydJi4UHSv/skKrJ0rRbkWSIaChWF7iuwZm41BWRDdS4giFkCp\n\tvTvVfcwLaeMfBPTUatTrFhSqCkiFDA9cmLe3qf22obHKyImdG3ubkYr0g8KmBK+TYE/d\n\tqKLQUok7MvQavF5Z7vo2Nf50FqTNs8M0pqLKyrJZ7pDmxAxFUyXayXh7Bf5eNHQ5IK9d\n\t6DQl2mZUSarSQPy05PgNZx+zzv6kdiAMwLdfzuKtniMxHB7H5cO3bGxYgJ6wTPIBDve8\n\tBk9A==",
        "X-Gm-Message-State": "AHYfb5i9loua/cG7xxiZ74fx/OeOprdDW6rccTUIVXfdlcjz7XTmm1fR\n\tzCBFERGqEyk5Mmfs",
        "X-Received": "by 10.223.160.3 with SMTP id k3mr448719wrk.198.1504020642492;\n\tTue, 29 Aug 2017 08:30:42 -0700 (PDT)",
        "From": "Vadim Galitsyn <vadim.galitsyn@profitbricks.com>",
        "To": "Eduardo Habkost <ehabkost@redhat.com>,\n\tDavid Hildenbrand <david@redhat.com>,\n\t\"Dr . David Alan Gilbert\" <dgilbert@redhat.com>,\n\tMarkus Armbruster <armbru@redhat.com>,\n\tIgor Mammedov <imammedo@redhat.com>, \n\tEric Blake <eblake@redhat.com>, qemu-devel@nongnu.org",
        "Date": "Tue, 29 Aug 2017 17:30:22 +0200",
        "Message-Id": "<20170829153022.27004-4-vadim.galitsyn@profitbricks.com>",
        "X-Mailer": "git-send-email 2.13.1.394.g41dd433",
        "In-Reply-To": "<20170829153022.27004-1-vadim.galitsyn@profitbricks.com>",
        "References": "<20170829153022.27004-1-vadim.galitsyn@profitbricks.com>",
        "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.",
        "X-Received-From": "2a00:1450:400c:c0c::22a",
        "Subject": "[Qemu-devel] [PATCH v7 3/3] hmp: introduce 'info\n\tmemory_size_summary' command",
        "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": "Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>,\n\tMohammed Gamal <mohammed.gamal@profitbricks.com>,\n\tEduardo Otubo <eduardo.otubo@profitbricks.com>,\n\tVadim Galitsyn <vadim.galitsyn@profitbricks.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": "Add 'info memory_size_summary' command which is a sibling\nof QMP command query-memory-size-summary. It provides the\nfollowing memory information in bytes:\n\n  * base-memory - size of \"base\" memory specified with command line option -m.\n\n  * plugged-memory - amount of memory that was hot-plugged.\n    If target does not have CONFIG_MEM_HOTPLUG enabled, no\n    value is reported.\n\nSigned-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>\nSigned-off-by: Mohammed Gamal <mohammed.gamal@profitbricks.com>\nSigned-off-by: Eduardo Otubo <eduardo.otubo@profitbricks.com>\nSigned-off-by: Vadim Galitsyn <vadim.galitsyn@profitbricks.com>\nReviewed-by: Eugene Crosser <evgenii.cherkashin@profitbricks.com>\nCc: Dr. David Alan Gilbert <dgilbert@redhat.com>\nCc: Markus Armbruster <armbru@redhat.com>\nCc: Igor Mammedov <imammedo@redhat.com>\nCc: Eric Blake <eblake@redhat.com>\nCc: qemu-devel@nongnu.org\n---\n hmp.h                |  1 +\n hmp.c                | 18 ++++++++++++++++++\n hmp-commands-info.hx | 16 ++++++++++++++++\n 3 files changed, 35 insertions(+)",
    "diff": "diff --git a/hmp.h b/hmp.h\nindex 1ff455295e..3605003e4c 100644\n--- a/hmp.h\n+++ b/hmp.h\n@@ -145,5 +145,6 @@ void hmp_info_dump(Monitor *mon, const QDict *qdict);\n void hmp_info_ramblock(Monitor *mon, const QDict *qdict);\n void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict);\n void hmp_info_vm_generation_id(Monitor *mon, const QDict *qdict);\n+void hmp_info_memory_size_summary(Monitor *mon, const QDict *qdict);\n \n #endif\ndiff --git a/hmp.c b/hmp.c\nindex fd80dce758..b718dab4df 100644\n--- a/hmp.c\n+++ b/hmp.c\n@@ -2868,3 +2868,21 @@ void hmp_info_vm_generation_id(Monitor *mon, const QDict *qdict)\n     hmp_handle_error(mon, &err);\n     qapi_free_GuidInfo(info);\n }\n+\n+void hmp_info_memory_size_summary(Monitor *mon, const QDict *qdict)\n+{\n+    Error *err = NULL;\n+    MemoryInfo *info = qmp_query_memory_size_summary(&err);\n+    if (info) {\n+        monitor_printf(mon, \"base memory: %\" PRIu64 \"\\n\",\n+                       info->base_memory);\n+\n+        if (info->has_plugged_memory) {\n+            monitor_printf(mon, \"plugged memory: %\" PRIu64 \"\\n\",\n+                           info->plugged_memory);\n+        }\n+\n+        qapi_free_MemoryInfo(info);\n+    }\n+    hmp_handle_error(mon, &err);\n+}\ndiff --git a/hmp-commands-info.hx b/hmp-commands-info.hx\nindex d9df238a5f..04c9db81f6 100644\n--- a/hmp-commands-info.hx\n+++ b/hmp-commands-info.hx\n@@ -849,6 +849,22 @@ ETEXI\n         .cmd = hmp_info_vm_generation_id,\n     },\n \n+STEXI\n+@item info memory_size_summary\n+@findex memory_size_summary\n+Display the amount of initially allocated and hot-plugged (if\n+enabled) memory in bytes.\n+ETEXI\n+\n+    {\n+        .name       = \"memory_size_summary\",\n+        .args_type  = \"\",\n+        .params     = \"\",\n+        .help       = \"show the amount of initially allocated and \"\n+                      \"hot-plugged (if enabled) memory in bytes.\",\n+        .cmd        = hmp_info_memory_size_summary,\n+    },\n+\n STEXI\n @end table\n ETEXI\n",
    "prefixes": [
        "v7",
        "3/3"
    ]
}