get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 809851,
    "url": "http://patchwork.ozlabs.org/api/patches/809851/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150456161545.17000.9223127644314285105.stgit@bahia.lan/",
    "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": "<150456161545.17000.9223127644314285105.stgit@bahia.lan>",
    "list_archive_url": null,
    "date": "2017-09-04T21:46:55",
    "name": "[1/4] spapr: only update SDR1 once per-cpu during CAS",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "175c23f22fa51d0789c1dd7d869ea653570173fe",
    "submitter": {
        "id": 69178,
        "url": "http://patchwork.ozlabs.org/api/people/69178/?format=api",
        "name": "Greg Kurz",
        "email": "groug@kaod.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/150456161545.17000.9223127644314285105.stgit@bahia.lan/mbox/",
    "series": [
        {
            "id": 1458,
            "url": "http://patchwork.ozlabs.org/api/series/1458/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1458",
            "date": "2017-09-04T21:46:44",
            "name": "ppc: fix migration with KVM PR (nested)",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1458/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/809851/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/809851/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 3xmNmm6Qncz9s9Y\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 07:50:00 +1000 (AEST)",
            "from localhost ([::1]:55808 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 1dozFn-0005O6-17\n\tfor incoming@patchwork.ozlabs.org; Mon, 04 Sep 2017 17:49:59 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:47103)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1dozD2-0003jn-8T\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 17:47:12 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <groug@kaod.org>) id 1dozCx-0002u5-LE\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 17:47:08 -0400",
            "from 10.mo178.mail-out.ovh.net ([46.105.76.150]:38929)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <groug@kaod.org>) id 1dozCx-0002t7-Ep\n\tfor qemu-devel@nongnu.org; Mon, 04 Sep 2017 17:47:03 -0400",
            "from player728.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo178.mail-out.ovh.net (Postfix) with ESMTP id F3D394AE24\n\tfor <qemu-devel@nongnu.org>; Mon,  4 Sep 2017 23:46:59 +0200 (CEST)",
            "from bahia.lan (gar31-1-82-66-74-139.fbx.proxad.net [82.66.74.139])\n\t(Authenticated sender: groug@kaod.org)\n\tby player728.ha.ovh.net (Postfix) with ESMTPA id A9BD354006C;\n\tMon,  4 Sep 2017 23:46:55 +0200 (CEST)"
        ],
        "From": "Greg Kurz <groug@kaod.org>",
        "To": "qemu-devel@nongnu.org",
        "Date": "Mon, 04 Sep 2017 23:46:55 +0200",
        "Message-ID": "<150456161545.17000.9223127644314285105.stgit@bahia.lan>",
        "In-Reply-To": "<150456160452.17000.3290192176290246589.stgit@bahia.lan>",
        "References": "<150456160452.17000.3290192176290246589.stgit@bahia.lan>",
        "User-Agent": "StGit/0.17.1-46-g6855-dirty",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "X-Ovh-Tracer-Id": "14542967625193134386",
        "X-VR-SPAMSTATE": "OK",
        "X-VR-SPAMSCORE": "-100",
        "X-VR-SPAMCAUSE": "gggruggvucftvghtrhhoucdtuddrfeelledrvdejgddtjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]",
        "X-Received-From": "46.105.76.150",
        "Subject": "[Qemu-devel] [PATCH 1/4] spapr: only update SDR1 once per-cpu\n\tduring CAS",
        "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": "Thomas Huth <thuth@redhat.com>, qemu-ppc@nongnu.org,\n\tSuraj Jitindar Singh <sjitindarsingh@gmail.com>,\n\tDavid Gibson <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": "Commit b55d295e3ec9 added the possibility to support HPT resizing with KVM.\nIn the case of PR, we need to pass the userspace address of the HPT to KVM\nusing the SDR1 slot.\nThis is handled by kvmppc_update_sdr1() which uses CPU_FOREACH() to update\nall CPUs. It is hence not needed to call kvmppc_update_sdr1() for each CPU.\n\nSigned-off-by: Greg Kurz <groug@kaod.org>\n---\n hw/ppc/spapr_hcall.c |   14 +++++---------\n 1 file changed, 5 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c\nindex 8b3c0e17e75c..6ab8c188f381 100644\n--- a/hw/ppc/spapr_hcall.c\n+++ b/hw/ppc/spapr_hcall.c\n@@ -1559,20 +1559,16 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,\n         }\n \n         if (spapr->htab_shift < maxshift) {\n-            CPUState *cs;\n-\n             /* Guest doesn't know about HPT resizing, so we\n              * pre-emptively resize for the maximum permitted RAM.  At\n              * the point this is called, nothing should have been\n              * entered into the existing HPT */\n             spapr_reallocate_hpt(spapr, maxshift, &error_fatal);\n-            CPU_FOREACH(cs) {\n-                if (kvm_enabled()) {\n-                    /* For KVM PR, update the HPT pointer */\n-                    target_ulong sdr1 = (target_ulong)(uintptr_t)spapr->htab\n-                        | (spapr->htab_shift - 18);\n-                    kvmppc_update_sdr1(sdr1);\n-                }\n+            if (kvm_enabled()) {\n+                /* For KVM PR, update the HPT pointer */\n+                target_ulong sdr1 = (target_ulong)(uintptr_t)spapr->htab\n+                    | (spapr->htab_shift - 18);\n+                kvmppc_update_sdr1(sdr1);\n             }\n         }\n     }\n",
    "prefixes": [
        "1/4"
    ]
}