get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 810060,
    "url": "http://patchwork.ozlabs.org/api/patches/810060/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504603805-180240-3-git-send-email-arei.gonglei@huawei.com/",
    "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": "<1504603805-180240-3-git-send-email-arei.gonglei@huawei.com>",
    "list_archive_url": null,
    "date": "2017-09-05T09:30:05",
    "name": "[2/2] i386/cpu/hyperv: support over 64 vcpus for windows guests",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "ea3bfbbcabeef2bcd3ce0ec64c2fa59704a54c37",
    "submitter": {
        "id": 35948,
        "url": "http://patchwork.ozlabs.org/api/people/35948/?format=api",
        "name": "Gonglei (Arei)",
        "email": "arei.gonglei@huawei.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/1504603805-180240-3-git-send-email-arei.gonglei@huawei.com/mbox/",
    "series": [
        {
            "id": 1536,
            "url": "http://patchwork.ozlabs.org/api/series/1536/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=1536",
            "date": "2017-09-05T09:30:04",
            "name": "Support over 64 vcpus for windows guests",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/1536/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/810060/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/810060/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 3xmhZT6P0Vz9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  5 Sep 2017 19:42:09 +1000 (AEST)",
            "from localhost ([::1]:57757 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 1dpAMx-0000bK-VQ\n\tfor incoming@patchwork.ozlabs.org; Tue, 05 Sep 2017 05:42:08 -0400",
            "from eggs.gnu.org ([2001:4830:134:3::10]:46412)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <arei.gonglei@huawei.com>) id 1dpABs-0008W3-VS\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:30:50 -0400",
            "from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <arei.gonglei@huawei.com>) id 1dpABk-0007vD-Vm\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:30:40 -0400",
            "from szxga05-in.huawei.com ([45.249.212.191]:2252)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71)\n\t(envelope-from <arei.gonglei@huawei.com>) id 1dpABk-0007t2-95\n\tfor qemu-devel@nongnu.org; Tue, 05 Sep 2017 05:30:32 -0400",
            "from 172.30.72.60 (EHLO DGGEMS403-HUB.china.huawei.com)\n\t([172.30.72.60])\n\tby dggrg05-dlp.huawei.com (MOS 4.4.6-GA FastPath queued)\n\twith ESMTP id DGQ09082; Tue, 05 Sep 2017 17:30:24 +0800 (CST)",
            "from localhost (10.177.18.62) by DGGEMS403-HUB.china.huawei.com\n\t(10.3.19.203) with Microsoft SMTP Server id 14.3.301.0;\n\tTue, 5 Sep 2017 17:30:13 +0800"
        ],
        "From": "Gonglei <arei.gonglei@huawei.com>",
        "To": "<qemu-devel@nongnu.org>",
        "Date": "Tue, 5 Sep 2017 17:30:05 +0800",
        "Message-ID": "<1504603805-180240-3-git-send-email-arei.gonglei@huawei.com>",
        "X-Mailer": "git-send-email 2.8.2.windows.1",
        "In-Reply-To": "<1504603805-180240-1-git-send-email-arei.gonglei@huawei.com>",
        "References": "<1504603805-180240-1-git-send-email-arei.gonglei@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.177.18.62]",
        "X-CFilter-Loop": "Reflected",
        "X-Mirapoint-Virus-RAPID-Raw": "score=unknown(0),\n\trefid=str=0001.0A0B0203.59AE6EB0.019A, ss=1, re=0.000, recu=0.000,\n\treip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0,\n\tso=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32",
        "X-Mirapoint-Loop-Id": "c806f08c8765f63f0508a95a3f5099f5",
        "X-detected-operating-system": "by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]\n\t[fuzzy]",
        "X-Received-From": "45.249.212.191",
        "Subject": "[Qemu-devel] [PATCH 2/2] i386/cpu/hyperv: support over 64 vcpus for\n\twindows guests",
        "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": "weidong.huang@huawei.com, ehabkost@redhat.com, mst@redhat.com,\n\tmtosatti@redhat.com, Gonglei <arei.gonglei@huawei.com>,\n\tvrozenfe@redhat.com, pbonzini@redhat.com, rth@twiddle.net",
        "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": "Starting with Windows Server 2012 and Windows 8, if\nCPUID.40000005.EAX contains a value of -1, Windows assumes specific\nlimit to the number of VPs. In this case, Windows Server 2012\nguest VMs may use more than 64 VPs, up to the maximum supported\nnumber of processors applicable to the specific Windows\nversion being used.\n\nhttps://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs\n\nFor compatibility, Let's introduce a new property for X86CPU,\nnamed \"hv-cpuid-limits-eax\" as Paolo's suggestion, and set it\nto \"on\" before machine 2.10.\n\nSigned-off-by: Gonglei <arei.gonglei@huawei.com>\n---\n include/hw/i386/pc.h |  5 +++++\n target/i386/cpu.c    |  1 +\n target/i386/cpu.h    |  2 ++\n target/i386/kvm.c    | 18 +++++++++++++++++-\n 4 files changed, 25 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h\nindex 8226904..db32e58 100644\n--- a/include/hw/i386/pc.h\n+++ b/include/hw/i386/pc.h\n@@ -371,6 +371,11 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);\n \n #define PC_COMPAT_2_10 \\\n     HW_COMPAT_2_10 \\\n+    {\\\n+        .driver   = TYPE_X86_CPU,\\\n+        .property = \"hv_cpuid_limits_eax\",\\\n+        .value    = \"on\",\\\n+    },\\\n \n #define PC_COMPAT_2_9 \\\n     HW_COMPAT_2_9 \\\ndiff --git a/target/i386/cpu.c b/target/i386/cpu.c\nindex 69676e1..0d47bdd 100644\n--- a/target/i386/cpu.c\n+++ b/target/i386/cpu.c\n@@ -4145,6 +4145,7 @@ static Property x86_cpu_properties[] = {\n                      false),\n     DEFINE_PROP_BOOL(\"vmware-cpuid-freq\", X86CPU, vmware_cpuid_freq, true),\n     DEFINE_PROP_BOOL(\"tcg-cpuid\", X86CPU, expose_tcg, true),\n+    DEFINE_PROP_BOOL(\"hv-cpuid-limits-eax\", X86CPU, hv_cpuid_limits_eax, false),\n     DEFINE_PROP_END_OF_LIST()\n };\n \ndiff --git a/target/i386/cpu.h b/target/i386/cpu.h\nindex 525d35d..f8b455a 100644\n--- a/target/i386/cpu.h\n+++ b/target/i386/cpu.h\n@@ -1282,6 +1282,8 @@ struct X86CPU {\n     int32_t socket_id;\n     int32_t core_id;\n     int32_t thread_id;\n+\n+    bool hv_cpuid_limits_eax;\n };\n \n static inline X86CPU *x86_env_get_cpu(CPUX86State *env)\ndiff --git a/target/i386/kvm.c b/target/i386/kvm.c\nindex 6db7783..cf6ef96 100644\n--- a/target/i386/kvm.c\n+++ b/target/i386/kvm.c\n@@ -751,7 +751,23 @@ int kvm_arch_init_vcpu(CPUState *cs)\n \n         c = &cpuid_data.entries[cpuid_i++];\n         c->function = HYPERV_CPUID_IMPLEMENT_LIMITS;\n-        c->eax = 0x40;\n+\n+        if (!cpu->hv_cpuid_limits_eax) {\n+            /*\n+             * Starting with Windows Server 2012 and Windows 8, if\n+             * CPUID.40000005.EAX contains a value of -1, Windows\n+             * assumes specific limit to the number of VPs. In this case,\n+             * Windows Server 2012 guest VMs may use more than 64 VPs,\n+             * up to the maximum supported number of processors\n+             * applicable to the specific Windows version being used.\n+             *\n+             * https://docs.microsoft.com/en-us/virtualization/\n+             *    hyper-v-on-windows/reference/tlfs\n+             */\n+            c->eax = -1;\n+        } else {\n+            c->eax = 0x40;\n+        }\n         c->ebx = 0x40;\n \n         kvm_base = KVM_CPUID_SIGNATURE_NEXT;\n",
    "prefixes": [
        "2/2"
    ]
}