get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 281131,
    "url": "http://patchwork.ozlabs.org/api/patches/281131/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20131007152344.26996.16447.stgit@bahia.local/",
    "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": "<20131007152344.26996.16447.stgit@bahia.local>",
    "list_archive_url": null,
    "date": "2013-10-07T15:23:44",
    "name": "[2/2] virtio: refresh registers at reset time",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "061bb646334244d4d38941c372f9f5dc6172e1cd",
    "submitter": {
        "id": 38899,
        "url": "http://patchwork.ozlabs.org/api/people/38899/?format=api",
        "name": "Greg Kurz",
        "email": "gkurz@linux.vnet.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20131007152344.26996.16447.stgit@bahia.local/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/281131/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/281131/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",
        "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(Client did not present a certificate)\n\tby ozlabs.org (Postfix) with ESMTPS id 6FD622C00A7\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  8 Oct 2013 02:24:36 +1100 (EST)",
            "from localhost ([::1]:60272 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 1VTCff-0001SF-Pi\n\tfor incoming@patchwork.ozlabs.org; Mon, 07 Oct 2013 11:24:31 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:47015)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <gkurz@linux.vnet.ibm.com>) id 1VTCfA-00019r-1x\n\tfor qemu-devel@nongnu.org; Mon, 07 Oct 2013 11:24:09 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <gkurz@linux.vnet.ibm.com>) id 1VTCf0-0005KH-Su\n\tfor qemu-devel@nongnu.org; Mon, 07 Oct 2013 11:23:59 -0400",
            "from e06smtp14.uk.ibm.com ([195.75.94.110]:44031)\n\tby eggs.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <gkurz@linux.vnet.ibm.com>) id 1VTCf0-0005Jx-HN\n\tfor qemu-devel@nongnu.org; Mon, 07 Oct 2013 11:23:50 -0400",
            "from /spool/local\n\tby e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use\n\tOnly! Violators will be prosecuted\n\tfor <qemu-devel@nongnu.org> from <gkurz@linux.vnet.ibm.com>;\n\tMon, 7 Oct 2013 16:23:49 +0100",
            "from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14)\n\tby e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP\n\tGateway: Authorized Use Only! Violators will be prosecuted; \n\tMon, 7 Oct 2013 16:23:48 +0100",
            "from b06cxnps4075.portsmouth.uk.ibm.com\n\t(d06relay12.portsmouth.uk.ibm.com [9.149.109.197])\n\tby d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id\n\tA7FD92190061; Mon,  7 Oct 2013 16:23:47 +0100 (BST)",
            "from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com\n\t[9.149.37.229])\n\tby b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with\n\tESMTP id r97FNZCE65405136; Mon, 7 Oct 2013 15:23:35 GMT",
            "from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1])\n\tby d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with\n\tESMTP id r97FNl3l029336; Mon, 7 Oct 2013 09:23:47 -0600",
            "from smtp.lab.toulouse-stg.fr.ibm.com\n\t(srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1])\n\tby d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with\n\tESMTP id r97FNl6s029333; Mon, 7 Oct 2013 09:23:47 -0600",
            "from bahia.local (sig-9-145-146-94.de.ibm.com [9.145.146.94])\n\tby smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id\n\t897B6210FF4; Mon,  7 Oct 2013 17:23:46 +0200 (CEST)"
        ],
        "To": "Alexander Graf <agraf@suse.de>",
        "From": "Greg Kurz <gkurz@linux.vnet.ibm.com>",
        "Date": "Mon, 07 Oct 2013 17:23:44 +0200",
        "Message-ID": "<20131007152344.26996.16447.stgit@bahia.local>",
        "In-Reply-To": "<20131007152327.26996.50016.stgit@bahia.local>",
        "References": "<20131007152327.26996.50016.stgit@bahia.local>",
        "User-Agent": "StGit/0.16",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "X-TM-AS-MML": "No",
        "X-Content-Scanned": "Fidelis XPS MAILER",
        "x-cbid": "13100715-1948-0000-0000-00000682ECB4",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]",
        "X-Received-From": "195.75.94.110",
        "Cc": "qemu-ppc@nongnu.org, Rusty Russell <rusty@rustcorp.com.au>,\n\tPaul Mackerras <paulus@samba.org>, qemu-devel@nongnu.org",
        "Subject": "[Qemu-devel] [PATCH 2/2] virtio: refresh registers at reset time",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.14",
        "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-bounces+incoming=patchwork.ozlabs.org@nongnu.org"
    },
    "content": "We need to support the guest endianness as soon as a virtio device shows\nup. Alex suggested this can achieved by calling cpu_synchronize_state().\n\nTo have it working on PowerPC, we need to add LPCR in the sync register\nfunctions.\n\nSigned-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>\n---\n hw/virtio/virtio.c |    5 +++++\n target-ppc/kvm.c   |    4 ++++\n 2 files changed, 9 insertions(+)",
    "diff": "diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c\nindex bc728d8..4a294e1 100644\n--- a/hw/virtio/virtio.c\n+++ b/hw/virtio/virtio.c\n@@ -19,6 +19,7 @@\n #include \"qemu/atomic.h\"\n #include \"hw/virtio/virtio-bus.h\"\n #include \"hw/virtio/virtio-access.h\"\n+#include \"sysemu/kvm.h\"\n \n /*\n  * The alignment to use between consumer and producer parts of vring.\n@@ -566,6 +567,10 @@ void virtio_reset(void *opaque)\n         vdev->vq[i].signalled_used_valid = false;\n         vdev->vq[i].notification = true;\n     }\n+\n+    if (current_cpu) {\n+        cpu_synchronize_state(current_cpu);\n+    }\n }\n \n uint32_t virtio_config_readb(VirtIODevice *vdev, uint32_t addr)\ndiff --git a/target-ppc/kvm.c b/target-ppc/kvm.c\nindex b77ce5e..69ebe2a 100644\n--- a/target-ppc/kvm.c\n+++ b/target-ppc/kvm.c\n@@ -869,6 +869,8 @@ int kvm_arch_put_registers(CPUState *cs, int level)\n                 DPRINTF(\"Warning: Unable to set VPA information to KVM\\n\");\n             }\n         }\n+\n+        kvm_put_one_spr(cs, KVM_REG_PPC_LPCR, SPR_LPCR);\n #endif /* TARGET_PPC64 */\n     }\n \n@@ -1091,6 +1093,8 @@ int kvm_arch_get_registers(CPUState *cs)\n                 DPRINTF(\"Warning: Unable to get VPA information from KVM\\n\");\n             }\n         }\n+\n+        kvm_get_one_spr(cs, KVM_REG_PPC_LPCR, SPR_LPCR);\n #endif\n     }\n \n",
    "prefixes": [
        "2/2"
    ]
}