get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 809648,
    "url": "http://patchwork.ozlabs.org/api/patches/809648/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504527967-29248-22-git-send-email-peter.maydell@linaro.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": "<1504527967-29248-22-git-send-email-peter.maydell@linaro.org>",
    "list_archive_url": null,
    "date": "2017-09-04T12:25:52",
    "name": "[PULL,21/36] hw/arm/virt: allow pmu instantiation with userspace irqchip",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a632ff636a7f5bed916235871db38688592db1c8",
    "submitter": {
        "id": 5111,
        "url": "http://patchwork.ozlabs.org/api/people/5111/?format=api",
        "name": "Peter Maydell",
        "email": "peter.maydell@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504527967-29248-22-git-send-email-peter.maydell@linaro.org/mbox/",
    "series": [
        {
            "id": 1366,
            "url": "http://patchwork.ozlabs.org/api/series/1366/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1366",
            "date": "2017-09-04T12:25:36",
            "name": "[PULL,01/36] target/arm: Use MMUAccessType enum rather than int",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1366/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/809648/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/809648/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 3xm8fd427gz9t2Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  4 Sep 2017 22:43:53 +1000 (AEST)",
            "from localhost ([::1]:59626 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 1doqjH-00018C-ID\n\tfor incoming@patchwork.ozlabs.org; Mon, 04 Sep 2017 08:43:51 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:52697)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <pm215@archaic.org.uk>) id 1doqSX-00056l-VL\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:46 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <pm215@archaic.org.uk>) id 1doqSJ-0004qq-DA\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:33 -0400",
            "from orth.archaic.org.uk ([2001:8b0:1d0::2]:37124)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <pm215@archaic.org.uk>)\n\tid 1doqSJ-0004pl-5m\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 08:26:19 -0400",
            "from pm215 by orth.archaic.org.uk with local (Exim 4.89)\n\t(envelope-from <pm215@archaic.org.uk>) id 1doqSI-0005YG-1F\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 13:26:18 +0100"
        ],
        "From": "Peter Maydell <peter.maydell@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon,  4 Sep 2017 13:25:52 +0100",
        "Message-Id": "<1504527967-29248-22-git-send-email-peter.maydell@linaro.org>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1504527967-29248-1-git-send-email-peter.maydell@linaro.org>",
        "References": "<1504527967-29248-1-git-send-email-peter.maydell@linaro.org>",
        "X-detected-operating-system": "by eggs.gnu.org: Genre and OS details not\n\trecognized.",
        "X-Received-From": "2001:8b0:1d0::2",
        "Subject": "[Qemu-devel] [PULL 21/36] hw/arm/virt: allow pmu instantiation with\n\tuserspace irqchip",
        "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>",
        "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": "From: Andrew Jones <drjones@redhat.com>\n\nMove the in-kernel-irqchip test to only guard the set-irq\nstage, not the init stage of the PMU.  Also add the PMU to\nthe KVM device irq line synchronization to enable its use.\n\nSigned-off-by: Andrew Jones <drjones@redhat.com>\nReviewed-by: Christoffer Dall <cdall@linaro.org>\nMessage-id: 1500471597-2517-4-git-send-email-drjones@redhat.com\nReviewed-by: Peter Maydell <peter.maydell@linaro.org>\nSigned-off-by: Peter Maydell <peter.maydell@linaro.org>\n---\n hw/arm/virt.c      | 3 ++-\n target/arm/kvm.c   | 6 +++++-\n target/arm/kvm64.c | 3 +--\n 3 files changed, 8 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/hw/arm/virt.c b/hw/arm/virt.c\nindex d6e2486..999f448 100644\n--- a/hw/arm/virt.c\n+++ b/hw/arm/virt.c\n@@ -496,7 +496,8 @@ static void fdt_add_pmu_nodes(const VirtMachineState *vms)\n             return;\n         }\n         if (kvm_enabled()) {\n-            if (!kvm_arm_pmu_set_irq(cpu, PPI(VIRTUAL_PMU_IRQ))) {\n+            if (kvm_irqchip_in_kernel() &&\n+                !kvm_arm_pmu_set_irq(cpu, PPI(VIRTUAL_PMU_IRQ))) {\n                 return;\n             }\n             if (!kvm_arm_pmu_init(cpu)) {\ndiff --git a/target/arm/kvm.c b/target/arm/kvm.c\nindex 7c17f0d..211a7bf 100644\n--- a/target/arm/kvm.c\n+++ b/target/arm/kvm.c\n@@ -567,7 +567,11 @@ MemTxAttrs kvm_arch_post_run(CPUState *cs, struct kvm_run *run)\n             switched_level &= ~KVM_ARM_DEV_EL1_PTIMER;\n         }\n \n-        /* XXX PMU IRQ is missing */\n+        if (switched_level & KVM_ARM_DEV_PMU) {\n+            qemu_set_irq(cpu->pmu_interrupt,\n+                         !!(run->s.regs.device_irq_level & KVM_ARM_DEV_PMU));\n+            switched_level &= ~KVM_ARM_DEV_PMU;\n+        }\n \n         if (switched_level) {\n             qemu_log_mask(LOG_UNIMP, \"%s: unhandled in-kernel device IRQ %x\\n\",\ndiff --git a/target/arm/kvm64.c b/target/arm/kvm64.c\nindex e26638a..ec7d853 100644\n--- a/target/arm/kvm64.c\n+++ b/target/arm/kvm64.c\n@@ -506,8 +506,7 @@ int kvm_arch_init_vcpu(CPUState *cs)\n     if (!arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {\n         cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_EL1_32BIT;\n     }\n-    if (!kvm_irqchip_in_kernel() ||\n-        !kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PMU_V3)) {\n+    if (!kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PMU_V3)) {\n             cpu->has_pmu = false;\n     }\n     if (cpu->has_pmu) {\n",
    "prefixes": [
        "PULL",
        "21/36"
    ]
}