get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1110284,
    "url": "http://patchwork.ozlabs.org/api/patches/1110284/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/skiboot/patch/20190605023616.26893-4-npiggin@gmail.com/",
    "project": {
        "id": 44,
        "url": "http://patchwork.ozlabs.org/api/projects/44/?format=api",
        "name": "skiboot firmware development",
        "link_name": "skiboot",
        "list_id": "skiboot.lists.ozlabs.org",
        "list_email": "skiboot@lists.ozlabs.org",
        "web_url": "http://github.com/open-power/skiboot",
        "scm_url": "http://github.com/open-power/skiboot",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20190605023616.26893-4-npiggin@gmail.com>",
    "list_archive_url": null,
    "date": "2019-06-05T02:36:16",
    "name": "[RFC,3/3] core/vm: try to handle recoverable MCEs by turning off VMM",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "0619ae6b5746f64868e5a7bf747a1e2dd1e4a564",
    "submitter": {
        "id": 69518,
        "url": "http://patchwork.ozlabs.org/api/people/69518/?format=api",
        "name": "Nicholas Piggin",
        "email": "npiggin@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/skiboot/patch/20190605023616.26893-4-npiggin@gmail.com/mbox/",
    "series": [
        {
            "id": 111858,
            "url": "http://patchwork.ozlabs.org/api/series/111858/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/skiboot/list/?series=111858",
            "date": "2019-06-05T02:36:13",
            "name": "WIP VMM for OPAL boot",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/111858/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1110284/comments/",
    "check": "fail",
    "checks": "http://patchwork.ozlabs.org/api/patches/1110284/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "skiboot@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (4096 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 45JXyL3cMLz9sBb\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  5 Jun 2019 12:37:46 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 45JXyK6PgSzDqVZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  5 Jun 2019 12:37:45 +1000 (AEST)",
            "from mail-pf1-x444.google.com (mail-pf1-x444.google.com\n\t[IPv6:2607:f8b0:4864:20::444])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 45JXxb1B55zDqVk\n\tfor <skiboot@lists.ozlabs.org>; Wed,  5 Jun 2019 12:37:07 +1000 (AEST)",
            "by mail-pf1-x444.google.com with SMTP id a186so13209037pfa.5\n\tfor <skiboot@lists.ozlabs.org>; Tue, 04 Jun 2019 19:37:06 -0700 (PDT)",
            "from bobo.local0.net ([61.68.71.55])\n\tby smtp.gmail.com with ESMTPSA id\n\tc9sm9077122pfn.3.2019.06.04.19.37.02\n\t(version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);\n\tTue, 04 Jun 2019 19:37:04 -0700 (PDT)"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=gmail.com",
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mcKLVm9a\"; dkim-atps=neutral",
            "lists.ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:4864:20::444; helo=mail-pf1-x444.google.com;\n\tenvelope-from=npiggin@gmail.com; receiver=<UNKNOWN>)",
            "lists.ozlabs.org;\n\tdmarc=pass (p=none dis=none) header.from=gmail.com",
            "lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"mcKLVm9a\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=0BC3AsuNeqOZZSR6/QItVo1UI9kpmLmM9m6pr4Kc7jY=;\n\tb=mcKLVm9aeqcr9VzgjU2aUgTd5vdojz4Au3Fg59hIMAVIixZCElmpEW4zDakji/X2p6\n\tm4mtdmlo1H8zdsgqgRpCmsx2CUcHD25eG5oH9iKSnYB89D4JLI+4PBpdL9ezdjg5f+B0\n\tVu7tzPt1d2YYSPST2auULWSE7H0DoWewd4JvbXszU8daWz+apvEzmqNj/sjgFwLkDZWD\n\tMc77yIOC0qQK/iTXLjjXLDBGmgbCi1je/eQ6mo6NjlyLZnXELUgBf9tLma06QE8Vzw/5\n\t/gEX6vq/YaTkJF0F9pnfl1pIIuos1bgRs8GmCa/5wm0LkwdNVB8buh4kPaLao9Lalu5W\n\tGmFg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=0BC3AsuNeqOZZSR6/QItVo1UI9kpmLmM9m6pr4Kc7jY=;\n\tb=SySL/kXh+vMl4PKYemeVUx1rwy15J5HNp1ZYYp3vG1cdtVazguqjNEbIfL1X8xfyeY\n\tAwYpJ8zxwqyVy7y7Ubdxv/wOCdT08QE98kGZeymOiZcFDx+p3hGuq1gj+M+s+QbCKyTl\n\tAJOafhBKTnIs7ns4RMvsactxdbVGjQgMNzv92MfKB+yWEwTJoV81HnZXWpy7rXhI+pg0\n\tG/5bvg6BWgmwOtWWzmmsVG03mo2CE2eW8DYKa25giF1kP7/2279DU8v+5RTXQHREBH0T\n\t5DC0eX42i0f//O3808OZOuMiGFTzwFM7Xfdtkrdx1lSZelFAjneXztaYPcUfT7UYYZtu\n\tx5eQ==",
        "X-Gm-Message-State": "APjAAAVkeDHHVhExJTsW++KkUgYXhau4oevhYrJawH2a/Q30/EiWv8b2\n\tOfpzZ/QnpfkYKjgTMDS01dbL0U6Z",
        "X-Google-Smtp-Source": "APXvYqxefST7oOxa8UR66C6cqJlkUYQEJf1ShGhp0rJzfQI6mi2EkXIf7CHPowZkpG8/TxCHsbY0wQ==",
        "X-Received": "by 2002:aa7:9e0a:: with SMTP id\n\ty10mr41218670pfq.190.1559702224672; \n\tTue, 04 Jun 2019 19:37:04 -0700 (PDT)",
        "From": "Nicholas Piggin <npiggin@gmail.com>",
        "To": "skiboot@lists.ozlabs.org",
        "Date": "Wed,  5 Jun 2019 12:36:16 +1000",
        "Message-Id": "<20190605023616.26893-4-npiggin@gmail.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190605023616.26893-1-npiggin@gmail.com>",
        "References": "<20190605023616.26893-1-npiggin@gmail.com>",
        "MIME-Version": "1.0",
        "Subject": "[Skiboot] [RFC PATCH 3/3] core/vm: try to handle recoverable MCEs\n\tby turning off VMM",
        "X-BeenThere": "skiboot@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Mailing list for skiboot development <skiboot.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/skiboot/>",
        "List-Post": "<mailto:skiboot@lists.ozlabs.org>",
        "List-Help": "<mailto:skiboot-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/skiboot>,\n\t<mailto:skiboot-request@lists.ozlabs.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Skiboot\"\n\t<skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"
    },
    "content": "This is not foolproof because local mappings and io accessors will\nnot cope with the VMM being switched off, but it may catch some\ncases. io accessors in particular won't recover properly because\nthey won't switch to use the real-mode cache inhibited instructions\nafter VMM turns off. That could be solved by marking IO accessors\nas non-recoverable, or providing an exception recovery address\nwhich retries.\n\nThis is mostly just a debugging aid, real MCE recovery for VMM\nfaults would have to flush SLB and translation caches.\n---\n core/exceptions.c | 26 ++++++++++++++++++++++++++\n 1 file changed, 26 insertions(+)",
    "diff": "diff --git a/core/exceptions.c b/core/exceptions.c\nindex 89b4451ab..8dafed676 100644\n--- a/core/exceptions.c\n+++ b/core/exceptions.c\n@@ -41,6 +41,21 @@ static void dump_regs(struct stack_frame *stack)\n \n #define EXCEPTION_MAX_STR 320\n \n+static void print_recoverable_mce_vm(struct stack_frame *stack, uint64_t nip, uint64_t msr)\n+{\n+\tchar buf[EXCEPTION_MAX_STR];\n+\tsize_t l;\n+\n+\tl = 0;\n+\tl += snprintf(buf + l, EXCEPTION_MAX_STR - l,\n+\t\t\"Recoverable MCE with VM on at \"REG\"   \", nip);\n+\tl += snprintf_symbol(buf + l, EXCEPTION_MAX_STR - l, nip);\n+\tl += snprintf(buf + l, EXCEPTION_MAX_STR - l, \"  MSR \"REG, msr);\n+\tprerror(\"%s\\n\", buf);\n+\tdump_regs(stack);\n+\tprerror(\"Continuing with VM off\\n\");\n+}\n+\n void exception_entry(struct stack_frame *stack)\n {\n \tbool fatal = false;\n@@ -92,6 +107,17 @@ void exception_entry(struct stack_frame *stack)\n \t\tbreak;\n \n \tcase 0x200:\n+\t\tif (this_cpu()->vm_local_map_inuse)\n+\t\t\tfatal = true; /* local map is non-linear */\n+\n+\t\tif (!fatal && (msr & (MSR_IR|MSR_DR))) {\n+\t\t\tprint_recoverable_mce_vm(stack, nip, msr);\n+\t\t\t/* Turn off VM and try again */\n+\t\t\tthis_cpu()->vm_setup = false;\n+\t\t\tstack->srr1 &= ~(MSR_IR|MSR_DR);\n+\t\t\tgoto out;\n+\t\t}\n+\n \t\tfatal = true;\n \t\tprerror(\"***********************************************\\n\");\n \t\tl += snprintf(buf + l, EXCEPTION_MAX_STR - l,\n",
    "prefixes": [
        "RFC",
        "3/3"
    ]
}