get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 812465,
    "url": "http://patchwork.ozlabs.org/api/patches/812465/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20170911171235.29331-21-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": "<20170911171235.29331-21-clg@kaod.org>",
    "list_archive_url": null,
    "date": "2017-09-11T17:12:34",
    "name": "[RFC,v2,20/21] ppc/xics: introduce a qirq_get() helper in the XICSFabric",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "efdb7eb640c6f3c527d8b3dc0e27d546f23d4e04",
    "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/20170911171235.29331-21-clg@kaod.org/mbox/",
    "series": [
        {
            "id": 2526,
            "url": "http://patchwork.ozlabs.org/api/series/2526/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=2526",
            "date": "2017-09-11T17:12:14",
            "name": "Guest exploitation of the XIVE interrupt controller (POWER9)",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/2526/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812465/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812465/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 3xrZRS49ckz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 03:19:32 +1000 (AEST)",
            "from localhost ([::1]:59295 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 1drSMs-0005Lp-DL\n\tfor incoming@patchwork.ozlabs.org; Mon, 11 Sep 2017 13:19:30 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:35916)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1drSIl-0002LR-8G\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:15:20 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <clg@kaod.org>) id 1drSIk-00051m-0g\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:15:15 -0400",
            "from 4.mo2.mail-out.ovh.net ([87.98.172.75]:33886)\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 1drSIj-00051I-Qj\n\tfor qemu-devel@nongnu.org; Mon, 11 Sep 2017 13:15:13 -0400",
            "from player770.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo2.mail-out.ovh.net (Postfix) with ESMTP id D81CAAB1FE\n\tfor <qemu-devel@nongnu.org>; Mon, 11 Sep 2017 19:15:12 +0200 (CEST)",
            "from zorba.kaod.org.com (LFbn-1-2231-173.w90-76.abo.wanadoo.fr\n\t[90.76.52.173]) (Authenticated sender: clg@kaod.org)\n\tby player770.ha.ovh.net (Postfix) with ESMTPSA id AA8863C0073;\n\tMon, 11 Sep 2017 19:15:05 +0200 (CEST)"
        ],
        "From": "=?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>",
        "To": "qemu-ppc@nongnu.org, qemu-devel@nongnu.org,\n\tDavid Gibson <david@gibson.dropbear.id.au>,\n\tBenjamin Herrenschmidt <benh@kernel.crashing.org>,\n\tAlexey Kardashevskiy <aik@ozlabs.ru>, Alexander Graf <agraf@suse.de>",
        "Date": "Mon, 11 Sep 2017 19:12:34 +0200",
        "Message-Id": "<20170911171235.29331-21-clg@kaod.org>",
        "X-Mailer": "git-send-email 2.13.5",
        "In-Reply-To": "<20170911171235.29331-1-clg@kaod.org>",
        "References": "<20170911171235.29331-1-clg@kaod.org>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "X-Ovh-Tracer-Id": "14168324429764070227",
        "X-VR-SPAMSTATE": "OK",
        "X-VR-SPAMSCORE": "-100",
        "X-VR-SPAMCAUSE": "gggruggvucftvghtrhhoucdtuddrfeelledrgedtgdduudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm",
        "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": "87.98.172.75",
        "Subject": "[Qemu-devel] [RFC PATCH v2 20/21] ppc/xics: introduce a qirq_get()\n\thelper in the XICSFabric",
        "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>",
        "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 will be used to choose the appropriate set of qirqs when XIVE is\nactivated.\n\nSigned-off-by: Cédric Le Goater <clg@kaod.org>\n---\n hw/intc/xics.c        |  7 +------\n hw/ppc/spapr.c        | 12 ++++++++++++\n include/hw/ppc/xics.h |  1 +\n 3 files changed, 14 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/hw/intc/xics.c b/hw/intc/xics.c\nindex 927d4fec966a..7691492aa17b 100644\n--- a/hw/intc/xics.c\n+++ b/hw/intc/xics.c\n@@ -685,13 +685,8 @@ static const TypeInfo xics_fabric_info = {\n qemu_irq xics_get_qirq(XICSFabric *xi, int irq)\n {\n     XICSFabricClass *xic = XICS_FABRIC_GET_CLASS(xi);\n-    ICSState *ics = xic->ics_get(xi, irq);\n \n-    if (ics) {\n-        return ics->qirqs[irq - ics->offset];\n-    }\n-\n-    return NULL;\n+    return xic->qirq_get(xi, irq);\n }\n \n ICPState *xics_icp_get(XICSFabric *xi, int server)\ndiff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c\nindex c2011cb2dc72..d8b25be70cd8 100644\n--- a/hw/ppc/spapr.c\n+++ b/hw/ppc/spapr.c\n@@ -3455,6 +3455,17 @@ static void spapr_phb_placement(sPAPRMachineState *spapr, uint32_t index,\n     *mmio64 = SPAPR_PCI_BASE + (index + 1) * SPAPR_PCI_MEM64_WIN_SIZE;\n }\n \n+static qemu_irq spapr_qirq_get(XICSFabric *dev, int irq)\n+{\n+    sPAPRMachineState *spapr = SPAPR_MACHINE(dev);\n+\n+    if (!ics_valid_irq(spapr->ics, irq)) {\n+        return NULL;\n+    }\n+\n+    return spapr->ics->qirqs[irq - spapr->ics->offset];\n+}\n+\n static ICSState *spapr_ics_get(XICSFabric *dev, int irq)\n {\n     sPAPRMachineState *spapr = SPAPR_MACHINE(dev);\n@@ -3539,6 +3550,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)\n     vhc->unmap_hptes = spapr_unmap_hptes;\n     vhc->store_hpte = spapr_store_hpte;\n     vhc->get_patbe = spapr_get_patbe;\n+    xic->qirq_get = spapr_qirq_get;\n     xic->ics_get = spapr_ics_get;\n     xic->ics_resend = spapr_ics_resend;\n     xic->icp_get = spapr_icp_get;\ndiff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h\nindex c835997303c4..46d2fc1ef2c1 100644\n--- a/include/hw/ppc/xics.h\n+++ b/include/hw/ppc/xics.h\n@@ -178,6 +178,7 @@ struct XICSFabric {\n \n typedef struct XICSFabricClass {\n     InterfaceClass parent;\n+    qemu_irq (*qirq_get)(XICSFabric *xi, int irq);\n     ICSState *(*ics_get)(XICSFabric *xi, int irq);\n     void (*ics_resend)(XICSFabric *xi);\n     ICPState *(*icp_get)(XICSFabric *xi, int server);\n",
    "prefixes": [
        "RFC",
        "v2",
        "20/21"
    ]
}