get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 811642,
    "url": "http://patchwork.ozlabs.org/api/patches/811642/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908143344.12960-4-clg@kaod.org/",
    "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": "<20170908143344.12960-4-clg@kaod.org>",
    "list_archive_url": null,
    "date": "2017-09-08T14:33:44",
    "name": "[RFC,3/3] spapr: generate a CAS reset for the XIVE exploitation mode",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ed739b6c0bd4ed840d21376d39a98443e1eb79e1",
    "submitter": {
        "id": 68548,
        "url": "http://patchwork.ozlabs.org/api/people/68548/?format=api",
        "name": "Cédric Le Goater",
        "email": "clg@kaod.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170908143344.12960-4-clg@kaod.org/mbox/",
    "series": [
        {
            "id": 2230,
            "url": "http://patchwork.ozlabs.org/api/series/2230/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2230",
            "date": "2017-09-08T14:33:43",
            "name": "spapr: XIVE and CAS fixes",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2230/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/811642/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/811642/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 3xpg2f5rJmz9s7G\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 00:39:54 +1000 (AEST)",
            "from localhost ([::1]:45781 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 1dqKRl-0000TV-02\n\tfor incoming@patchwork.ozlabs.org; Fri, 08 Sep 2017 10:39:53 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:54643)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1dqKMZ-0004Mh-I2\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:34:32 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1dqKMY-0001SX-3u\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:34:31 -0400",
            "from 4.mo4.mail-out.ovh.net ([178.32.98.131]:43402)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <clg@kaod.org>) id 1dqKMX-0001Rv-UX\n\tfor qemu-devel@nongnu.org; Fri, 08 Sep 2017 10:34:30 -0400",
            "from player159.ha.ovh.net (b9.ovh.net [213.186.33.59])\n\tby mo4.mail-out.ovh.net (Postfix) with ESMTP id E014693060\n\tfor <qemu-devel@nongnu.org>; Fri,  8 Sep 2017 16:34:28 +0200 (CEST)",
            "from zorba.kaod.org.com\n\t(i15-les03-th2-31-37-69-229.sfr.lns.abo.bbox.fr [31.37.69.229])\n\t(Authenticated sender: clg@kaod.org)\n\tby player159.ha.ovh.net (Postfix) with ESMTPSA id 8522948009C;\n\tFri,  8 Sep 2017 16:34:23 +0200 (CEST)"
        ],
        "From": "=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>",
        "To": "qemu-ppc@nongnu.org,\n\tqemu-devel@nongnu.org",
        "Date": "Fri,  8 Sep 2017 16:33:44 +0200",
        "Message-Id": "<20170908143344.12960-4-clg@kaod.org>",
        "X-Mailer": "git-send-email 2.13.5",
        "In-Reply-To": "<20170908143344.12960-1-clg@kaod.org>",
        "References": "<20170908143344.12960-1-clg@kaod.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-Ovh-Tracer-Id": "12282442087628704595",
        "X-VR-SPAMSTATE": "OK",
        "X-VR-SPAMSCORE": "-100",
        "X-VR-SPAMCAUSE": "gggruggvucftvghtrhhoucdtuddrfeelledrfeeggdejkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd",
        "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": "178.32.98.131",
        "Subject": "[Qemu-devel] [RFC PATCH 3/3] spapr: generate a CAS reset for the\n\tXIVE exploitation mode",
        "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": "=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>,\n\tMichael Roth <mdroth@linux.vnet.ibm.com>, David Gibson\n\t<david@gibson.dropbear.id.au>",
        "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": "When the platform and the guest agree on using the XIVE exploitation\nmode for interrupts, the \"interrupt-controller\" node needs to reflect\nthe change and the device tree needs an update.\n\nReseting the guest after the CAS negotiation makes this change\npossible, as the device tree is built at reset time. We use the\n'ov5_cas' field to check which interrupt model was negotiated before\nreset and populate the tree accordingly.\n\nSigned-off-by: Cédric Le Goater <clg@kaod.org>\n---\n hw/ppc/spapr.c       | 6 +++++-\n hw/ppc/spapr_hcall.c | 6 ++++++\n 2 files changed, 11 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c\nindex 3e3ff1fbc988..be467ab61ad0 100644\n--- a/hw/ppc/spapr.c\n+++ b/hw/ppc/spapr.c\n@@ -1073,7 +1073,11 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr,\n     _FDT(fdt_setprop_cell(fdt, 0, \"#size-cells\", 2));\n \n     /* /interrupt controller */\n-    spapr_dt_xics(xics_max_server_number(), fdt, PHANDLE_XICP);\n+    if (!spapr_ovec_test(spapr->ov5_cas, OV5_XIVE_EXPLOIT)) {\n+        spapr_dt_xics(xics_max_server_number(), fdt, PHANDLE_XICP);\n+    } else {\n+        /* populate device tree for XIVE */ ;\n+    }\n \n     ret = spapr_populate_memory(spapr, fdt);\n     if (ret < 0) {\ndiff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c\nindex 92f1e21358b8..ba00b8d3fdd6 100644\n--- a/hw/ppc/spapr_hcall.c\n+++ b/hw/ppc/spapr_hcall.c\n@@ -1613,6 +1613,12 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,\n             (spapr_h_cas_compose_response(spapr, args[1], args[2],\n                                           ov5_updates) != 0);\n     }\n+\n+    /* We need to rebuild the device tree for XIVE, generate a reset */\n+    if (!spapr->cas_reboot) {\n+        spapr->cas_reboot = spapr_ovec_test(ov5_updates, OV5_XIVE_EXPLOIT);\n+    }\n+\n     spapr_ovec_cleanup(ov5_updates);\n \n     if (spapr->cas_reboot) {\n",
    "prefixes": [
        "RFC",
        "3/3"
    ]
}