get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 831257,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/831257/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-imx/patch/1509101470-7881-25-git-send-email-Dave.Martin@arm.com/",
    "project": {
        "id": 19,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/19/?format=api",
        "name": "Linux IMX development",
        "link_name": "linux-imx",
        "list_id": "linux-imx-kernel.lists.patchwork.ozlabs.org",
        "list_email": "linux-imx-kernel@lists.patchwork.ozlabs.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1509101470-7881-25-git-send-email-Dave.Martin@arm.com>",
    "list_archive_url": null,
    "date": "2017-10-27T10:51:06",
    "name": "[v4,24/28] arm64/sve: KVM: Hide SVE from CPU features exposed to guests",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "61b227a63a14235bcc6fdc4563b97bf3985d2898",
    "submitter": {
        "id": 26612,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/26612/?format=api",
        "name": "Dave Martin",
        "email": "Dave.Martin@arm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-imx/patch/1509101470-7881-25-git-send-email-Dave.Martin@arm.com/mbox/",
    "series": [
        {
            "id": 10556,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/10556/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-imx/list/?series=10556",
            "date": "2017-10-27T10:50:43",
            "name": "ARM Scalable Vector Extension (SVE)",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/10556/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/831257/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/831257/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming-imx@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming-imx@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.infradead.org\n\t(client-ip=65.50.211.133; helo=bombadil.infradead.org;\n\tenvelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=lists.infradead.org\n\theader.i=@lists.infradead.org header.b=\"KHVSMBF0\"; \n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=infradead.org header.i=@infradead.org\n\theader.b=\"MckFrEcE\"; dkim-atps=neutral"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n\t[65.50.211.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yNh9K0Gcxz9sNx\n\tfor <incoming-imx@patchwork.ozlabs.org>;\n\tFri, 27 Oct 2017 22:14:45 +1100 (AEDT)",
            "from localhost ([127.0.0.1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e82b0-000675-Db; Fri, 27 Oct 2017 11:14:38 +0000",
            "from merlin.infradead.org ([2001:8b0:10b:1231::1])\n\tby bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e82VR-0002lQ-DI for linux-arm-kernel@bombadil.infradead.org;\n\tFri, 27 Oct 2017 11:08:53 +0000",
            "from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]\n\thelo=foss.arm.com)\n\tby merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux))\n\tid 1e82Ff-0005EW-5r for linux-arm-kernel@lists.infradead.org;\n\tFri, 27 Oct 2017 10:52:36 +0000",
            "from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7BFB71A3B;\n\tFri, 27 Oct 2017 03:52:06 -0700 (PDT)",
            "from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com\n\t[10.72.51.249])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id\n\tC12023F24A; Fri, 27 Oct 2017 03:52:04 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20170209; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=qWj3BkBihNlxtboElR7p7wSuoWNSz3WadOWVmFTVbQM=;\n\tb=KHVSMBF0nrb3TP\n\tgRgcbi4pSdm0aPVkZpCjewSvUg/skHyckNrmWPMUEDOaIzhy7WR9JgVYsw5Byx1NdMr6tWq6JzNAS\n\tGKVaO1FTCSAAiS5q33fBarxNN+QTuwodFTrZ79Ed6YHoUpOEH3X+DWL60zSE+MS/9okbnWsV5Jo0l\n\tMkv/voU0NNKFYfzwaPn0D4LZEnrzhMWGy/ZnGmRZANJDb5SirLrfc2ZZqMGSS8BTi3v+hjjSKplvQ\n\tqUNtdtrp6Pj72FL248NzHqRTx5UXg9nBRmd/9ejVhKrQxoKnC3yr181ZsQ08owi7Ls9fxTcwDKmeE\n\tN4EacOn97NjlmXoldaPw==;",
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=infradead.org; s=merlin.20170209;\n\th=Content-Transfer-Encoding:Content-Type:\n\tMIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender\n\t:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:\n\tList-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=Rhfy33GBH9TDPgaGLT2CikqZ52gCXiB52pmtXp4CN7o=;\n\tb=MckFrEcE/YFP/PGXtReAEBxXyC\n\tGJu8OBiBU6282AEQ7ovbPczk5cI3Pa6Bw5sWvIGsHgemjrayJxB7rujNmlMW4aINED1VZHMrNNTS2\n\tN1P6YAPGR+PimD0RG7w75Dwxb8Tw2VhFbuYgdPrSUD5Fz0TezpaQszi4rANLWF5x4Qqj+W3LQIX+8\n\tzP2Q8ZfBkSP33FoXE729OOtZjjd9GbdPE6oI040VD1LV9IbwC9rZ85EDPzN9mk7x1hjq8I9TKUe94\n\tgVL6R14svKLZSl99Is/fePegkWZ9cgrPhC2fgAYjlfv0X37NirkzBc61tCKNCVBAJ40VDLQmOXroW\n\todRm917Q==;"
        ],
        "From": "Dave Martin <Dave.Martin@arm.com>",
        "To": "linux-arm-kernel@lists.infradead.org",
        "Subject": "[PATCH v4 24/28] arm64/sve: KVM: Hide SVE from CPU features exposed\n\tto guests",
        "Date": "Fri, 27 Oct 2017 11:51:06 +0100",
        "Message-Id": "<1509101470-7881-25-git-send-email-Dave.Martin@arm.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1509101470-7881-1-git-send-email-Dave.Martin@arm.com>",
        "References": "<1509101470-7881-1-git-send-email-Dave.Martin@arm.com>",
        "MIME-Version": "1.0",
        "X-Spam-Note": "CRM114 invocation failed",
        "X-Spam-Score": "-6.9 (------)",
        "X-Spam-Report": "SpamAssassin version 3.4.1 on merlin.infradead.org summary:\n\tContent analysis details:   (-6.9 points)\n\tpts rule name              description\n\t---- ----------------------\n\t--------------------------------------------------\n\t-5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/,\n\thigh trust [217.140.101.70 listed in list.dnswl.org]\n\t-0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay\n\tdomain\n\t-0.0 SPF_PASS               SPF: sender matches SPF record\n\t-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n\t[score: 0.0000]",
        "X-BeenThere": "linux-arm-kernel@lists.infradead.org",
        "X-Mailman-Version": "2.1.21",
        "Precedence": "list",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-arm-kernel/>",
        "List-Post": "<mailto:linux-arm-kernel@lists.infradead.org>",
        "List-Help": "<mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,\n\t<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>",
        "Cc": "linux-arch@vger.kernel.org, Okamoto Takayuki <tokamoto@jp.fujitsu.com>,\n\tlibc-alpha@sourceware.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>, \n\tSzabolcs Nagy <szabolcs.nagy@arm.com>, \n\tCatalin Marinas <catalin.marinas@arm.com>,\n\tWill Deacon <will.deacon@arm.com>, =?utf-8?q?Alex_Benn=C3=A9e?=\n\t<alex.bennee@linaro.org>,  kvmarm@lists.cs.columbia.edu",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Sender": "\"linux-arm-kernel\" <linux-arm-kernel-bounces@lists.infradead.org>",
        "Errors-To": "linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org",
        "List-Id": "linux-imx-kernel.lists.patchwork.ozlabs.org"
    },
    "content": "KVM guests cannot currently use SVE, because SVE is always\nconfigured to trap to EL2.\n\nHowever, a guest that sees SVE reported as present in\nID_AA64PFR0_EL1 may legitimately expect that SVE works and try to\nuse it.  Instead of working, the guest will receive an injected\nundef exception, which may cause the guest to oops or go into a\nspin.\n\nTo avoid misleading the guest into believing that SVE will work,\nthis patch masks out the SVE field from ID_AA64PFR0_EL1 when a\nguest attempts to read this register.  No support is explicitly\nadded for ID_AA64ZFR0_EL1 either, so that is still emulated as\nreading as zero, which is consistent with SVE not being\nimplemented.\n\nThis is a temporary measure, and will be removed in a later series\nwhen full KVM support for SVE is implemented.\n\nSigned-off-by: Dave Martin <Dave.Martin@arm.com>\nReviewed-by: Alex Bennée <alex.bennee@linaro.org>\nAcked-by: Marc Zyngier <marc.zyngier@arm.com>\nAcked-by: Catalin Marinas <catalin.marinas@arm.com>\nAcked-by: Christoffer Dall <christoffer.dall@linaro.org>\n---\n arch/arm64/kvm/sys_regs.c | 12 +++++++++++-\n 1 file changed, 11 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c\nindex b1f7552..a0ee9b0 100644\n--- a/arch/arm64/kvm/sys_regs.c\n+++ b/arch/arm64/kvm/sys_regs.c\n@@ -23,6 +23,7 @@\n #include <linux/bsearch.h>\n #include <linux/kvm_host.h>\n #include <linux/mm.h>\n+#include <linux/printk.h>\n #include <linux/uaccess.h>\n \n #include <asm/cacheflush.h>\n@@ -897,8 +898,17 @@ static u64 read_id_reg(struct sys_reg_desc const *r, bool raz)\n {\n \tu32 id = sys_reg((u32)r->Op0, (u32)r->Op1,\n \t\t\t (u32)r->CRn, (u32)r->CRm, (u32)r->Op2);\n+\tu64 val = raz ? 0 : read_sanitised_ftr_reg(id);\n \n-\treturn raz ? 0 : read_sanitised_ftr_reg(id);\n+\tif (id == SYS_ID_AA64PFR0_EL1) {\n+\t\tif (val & (0xfUL << ID_AA64PFR0_SVE_SHIFT))\n+\t\t\tpr_err_once(\"kvm [%i]: SVE unsupported for guests, suppressing\\n\",\n+\t\t\t\t    task_pid_nr(current));\n+\n+\t\tval &= ~(0xfUL << ID_AA64PFR0_SVE_SHIFT);\n+\t}\n+\n+\treturn val;\n }\n \n /* cpufeature ID register access trap handlers */\n",
    "prefixes": [
        "v4",
        "24/28"
    ]
}