get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 812345,
    "url": "http://patchwork.ozlabs.org/api/patches/812345/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911110623.24981-51-marcandre.lureau@redhat.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": "<20170911110623.24981-51-marcandre.lureau@redhat.com>",
    "list_archive_url": null,
    "date": "2017-09-11T11:06:23",
    "name": "[v3,50/50] qapi: make query-cpu-definitions depend on specific targets",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "807931cc081882c5519197c3f85963c26ab49836",
    "submitter": {
        "id": 66774,
        "url": "http://patchwork.ozlabs.org/api/people/66774/?format=api",
        "name": "Marc-André Lureau",
        "email": "marcandre.lureau@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911110623.24981-51-marcandre.lureau@redhat.com/mbox/",
    "series": [
        {
            "id": 2480,
            "url": "http://patchwork.ozlabs.org/api/series/2480/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2480",
            "date": "2017-09-11T11:05:33",
            "name": "Hi,",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/2480/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812345/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812345/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>)",
            "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=marcandre.lureau@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 3xrQhF3RW8z9sNV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 21:30:05 +1000 (AEST)",
            "from localhost ([::1]:56839 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 1drMuh-0000HM-G2\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 07:30:03 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:44008)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <marcandre.lureau@redhat.com>) id 1drMaP-0007Au-5u\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 07:09:07 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <marcandre.lureau@redhat.com>) id 1drMaN-0007hB-J6\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 07:09:05 -0400",
            "from mx1.redhat.com ([209.132.183.28]:39238)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <marcandre.lureau@redhat.com>)\n\tid 1drMaH-0007er-5z; Mon, 11 Sep 2017 07:08:57 -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 41E84CC096;\n\tMon, 11 Sep 2017 11:08:56 +0000 (UTC)",
            "from localhost (ovpn-112-47.ams2.redhat.com [10.36.112.47])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id C66185C269;\n\tMon, 11 Sep 2017 11:08:53 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 41E84CC096",
        "From": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon, 11 Sep 2017 13:06:23 +0200",
        "Message-Id": "<20170911110623.24981-51-marcandre.lureau@redhat.com>",
        "In-Reply-To": "<20170911110623.24981-1-marcandre.lureau@redhat.com>",
        "References": "<20170911110623.24981-1-marcandre.lureau@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "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.25]);\n\tMon, 11 Sep 2017 11:08:56 +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": "[Qemu-devel] [PATCH v3 50/50] qapi: make query-cpu-definitions\n\tdepend on specific targets",
        "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": "Peter Maydell <peter.maydell@linaro.org>, Eduardo Habkost\n\t<ehabkost@redhat.com>, armbru@redhat.com, \"Dr. David Alan Gilbert\"\n\t<dgilbert@redhat.com>, Alexander Graf <agraf@suse.de>,\n\t\"open list:ARM\" <qemu-arm@nongnu.org>, \"open list:PowerPC\"\n\t<qemu-ppc@nongnu.org>, \tPaolo Bonzini <pbonzini@redhat.com>,\n\t=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n\tDavid Gibson <david@gibson.dropbear.id.au>, Richard Henderson\n\t<rth@twiddle.net>",
        "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": "It depends on TARGET_PPC || TARGET_ARM || TARGET_I386 || TARGET_S390X.\n\nSigned-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\n---\n qapi-schema.json            | 11 -----------\n qapi/target.json            | 12 ++++++++++++\n include/sysemu/arch_init.h  |  1 -\n monitor.c                   | 22 ----------------------\n qmp.c                       |  5 -----\n stubs/arch-query-cpu-def.c  | 10 ----------\n target/arm/helper.c         |  3 ++-\n target/i386/cpu.c           |  2 +-\n target/ppc/translate_init.c |  3 ++-\n target/s390x/cpu_models.c   |  2 +-\n stubs/Makefile.objs         |  1 -\n 11 files changed, 18 insertions(+), 54 deletions(-)\n delete mode 100644 stubs/arch-query-cpu-def.c",
    "diff": "diff --git a/qapi-schema.json b/qapi-schema.json\nindex 98525c7702..975f2fd30f 100644\n--- a/qapi-schema.json\n+++ b/qapi-schema.json\n@@ -1945,17 +1945,6 @@\n   'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',\n             '*unavailable-features': [ 'str' ], 'typename': 'str' } }\n \n-##\n-# @query-cpu-definitions:\n-#\n-# Return a list of supported virtual CPU definitions\n-#\n-# Returns: a list of CpuDefInfo\n-#\n-# Since: 1.2.0\n-##\n-{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }\n-\n ##\n # @CpuModelInfo:\n #\ndiff --git a/qapi/target.json b/qapi/target.json\nindex d9f3bce22f..e06c9e3ed7 100644\n--- a/qapi/target.json\n+++ b/qapi/target.json\n@@ -214,3 +214,15 @@\n             'model': 'CpuModelInfo' },\n   'returns': 'CpuModelExpansionInfo',\n   'if': 'defined(TARGET_S390X) || defined(TARGET_I386)' }\n+\n+##\n+# @query-cpu-definitions:\n+#\n+# Return a list of supported virtual CPU definitions\n+#\n+# Returns: a list of CpuDefInfo\n+#\n+# Since: 1.2.0\n+##\n+{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'],\n+  'if': 'defined(TARGET_PPC) || defined(TARGET_ARM) || defined(TARGET_I386) || defined(TARGET_S390X)' }\ndiff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h\nindex 08a607b89b..e9721b9ce8 100644\n--- a/include/sysemu/arch_init.h\n+++ b/include/sysemu/arch_init.h\n@@ -31,5 +31,4 @@ extern const uint32_t arch_type;\n int kvm_available(void);\n int xen_available(void);\n \n-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp);\n #endif\ndiff --git a/monitor.c b/monitor.c\nindex 24680f37a6..00fb1bbf4e 100644\n--- a/monitor.c\n+++ b/monitor.c\n@@ -957,26 +957,6 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject **ret_data,\n     *ret_data = qobject_from_qlit(&qmp_schema_qlit);\n }\n \n-/*\n- * We used to define commands in qmp-commands.hx in addition to the\n- * QAPI schema.  This permitted defining some of them only in certain\n- * configurations.  query-commands has always reflected that (good,\n- * because it lets QMP clients figure out what's actually available),\n- * while query-qmp-schema never did (not so good).  This function is a\n- * hack to keep the configuration-specific commands defined exactly as\n- * before, even though qmp-commands.hx is gone.\n- *\n- * FIXME Educate the QAPI schema on configuration-specific commands,\n- * and drop this hack.\n- */\n-static void qmp_unregister_commands_hack(void)\n-{\n-#if !defined(TARGET_PPC) && !defined(TARGET_ARM) && !defined(TARGET_I386) \\\n-    && !defined(TARGET_S390X)\n-    qmp_unregister_command(&qmp_commands, \"query-cpu-definitions\");\n-#endif\n-}\n-\n void monitor_init_qmp_commands(void)\n {\n     /*\n@@ -998,8 +978,6 @@ void monitor_init_qmp_commands(void)\n     qmp_register_command(&qmp_commands, \"netdev_add\", qmp_netdev_add,\n                          QCO_NO_OPTIONS);\n \n-    qmp_unregister_commands_hack();\n-\n     QTAILQ_INIT(&qmp_cap_negotiation_commands);\n     qmp_register_command(&qmp_cap_negotiation_commands, \"qmp_capabilities\",\n                          qmp_marshal_qmp_capabilities, QCO_NO_OPTIONS);\ndiff --git a/qmp.c b/qmp.c\nindex afa266ec1e..d57ccf1251 100644\n--- a/qmp.c\n+++ b/qmp.c\n@@ -541,11 +541,6 @@ DevicePropertyInfoList *qmp_device_list_properties(const char *typename,\n     return prop_list;\n }\n \n-CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)\n-{\n-    return arch_query_cpu_definitions(errp);\n-}\n-\n void qmp_add_client(const char *protocol, const char *fdname,\n                     bool has_skipauth, bool skipauth, bool has_tls, bool tls,\n                     Error **errp)\ndiff --git a/stubs/arch-query-cpu-def.c b/stubs/arch-query-cpu-def.c\ndeleted file mode 100644\nindex cefe4beb82..0000000000\n--- a/stubs/arch-query-cpu-def.c\n+++ /dev/null\n@@ -1,10 +0,0 @@\n-#include \"qemu/osdep.h\"\n-#include \"qemu-common.h\"\n-#include \"sysemu/arch_init.h\"\n-#include \"qapi/qmp/qerror.h\"\n-\n-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)\n-{\n-    error_setg(errp, QERR_UNSUPPORTED);\n-    return NULL;\n-}\ndiff --git a/target/arm/helper.c b/target/arm/helper.c\nindex 329e5178d8..b3ea771fcd 100644\n--- a/target/arm/helper.c\n+++ b/target/arm/helper.c\n@@ -15,6 +15,7 @@\n #include <zlib.h> /* For crc32 */\n #include \"exec/semihost.h\"\n #include \"sysemu/kvm.h\"\n+#include \"target-qmp-commands.h\"\n \n #define ARM_CPU_FREQ 1000000000 /* FIXME: 1 GHz, should be configurable */\n \n@@ -5327,7 +5328,7 @@ static void arm_cpu_add_definition(gpointer data, gpointer user_data)\n     *cpu_list = entry;\n }\n \n-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)\n+CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)\n {\n     CpuDefinitionInfoList *cpu_list = NULL;\n     GSList *list;\ndiff --git a/target/i386/cpu.c b/target/i386/cpu.c\nindex f8719cb2de..9cd1dee1a5 100644\n--- a/target/i386/cpu.c\n+++ b/target/i386/cpu.c\n@@ -2363,7 +2363,7 @@ static void x86_cpu_definition_entry(gpointer data, gpointer user_data)\n     *cpu_list = entry;\n }\n \n-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)\n+CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)\n {\n     CpuDefinitionInfoList *cpu_list = NULL;\n     GSList *list = get_sorted_cpu_model_list();\ndiff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c\nindex c827d1e388..680352f953 100644\n--- a/target/ppc/translate_init.c\n+++ b/target/ppc/translate_init.c\n@@ -35,6 +35,7 @@\n #include \"mmu-book3s-v3.h\"\n #include \"sysemu/qtest.h\"\n #include \"qemu/cutils.h\"\n+#include \"target-qmp-commands.h\"\n \n //#define PPC_DUMP_CPU\n //#define PPC_DEBUG_SPR\n@@ -10415,7 +10416,7 @@ static void ppc_cpu_defs_entry(gpointer data, gpointer user_data)\n     *first = entry;\n }\n \n-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)\n+CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)\n {\n     CpuDefinitionInfoList *cpu_list = NULL;\n     GSList *list;\ndiff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c\nindex 872dc78455..26c9fff79c 100644\n--- a/target/s390x/cpu_models.c\n+++ b/target/s390x/cpu_models.c\n@@ -390,7 +390,7 @@ static void create_cpu_model_list(ObjectClass *klass, void *opaque)\n     *cpu_list = entry;\n }\n \n-CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp)\n+CpuDefinitionInfoList *qmp_query_cpu_definitions(Error **errp)\n {\n     struct CpuDefinitionInfoListData list_data = {\n         .list = NULL,\ndiff --git a/stubs/Makefile.objs b/stubs/Makefile.objs\nindex 8d024a2b71..22e9197dcd 100644\n--- a/stubs/Makefile.objs\n+++ b/stubs/Makefile.objs\n@@ -1,4 +1,3 @@\n-stub-obj-y += arch-query-cpu-def.o\n stub-obj-y += bdrv-next-monitor-owned.o\n stub-obj-y += blk-commit-all.o\n stub-obj-y += blockdev-close-all-bdrv-states.o\n",
    "prefixes": [
        "v3",
        "50/50"
    ]
}