get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231437,
    "url": "http://patchwork.ozlabs.org/api/patches/2231437/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-43-pbonzini@redhat.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": "<20260430172204.1006673-43-pbonzini@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-30T17:21:48",
    "name": "[PULL,42/58] target/i386: emulate, hvf: rdmsr/wrmsr GPF handling",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "bdd3e2f03524f68b9c34a77098806baf249c06e5",
    "submitter": {
        "id": 2701,
        "url": "http://patchwork.ozlabs.org/api/people/2701/?format=api",
        "name": "Paolo Bonzini",
        "email": "pbonzini@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430172204.1006673-43-pbonzini@redhat.com/mbox/",
    "series": [
        {
            "id": 502347,
            "url": "http://patchwork.ozlabs.org/api/series/502347/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502347",
            "date": "2026-04-30T17:21:16",
            "name": "[PULL,01/58] pythondeps: bump to meson 1.11.1",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502347/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231437/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231437/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@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=itc5Svt8;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=google header.b=Rm17YPoD;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g61N13FWpz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 03:28:01 +1000 (AEST)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wIV7n-0007pv-9J; Thu, 30 Apr 2026 13:24:31 -0400",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV7i-0007Gd-9v\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:24:26 -0400",
            "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <pbonzini@redhat.com>)\n id 1wIV7f-0004s3-PV\n for qemu-devel@nongnu.org; Thu, 30 Apr 2026 13:24:25 -0400",
            "from mail-qv1-f72.google.com (mail-qv1-f72.google.com\n [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-583-z7QRvY3yMT6i-0l2pctvHw-1; Thu, 30 Apr 2026 13:24:20 -0400",
            "by mail-qv1-f72.google.com with SMTP id\n 6a1803df08f44-8acb26fbbb2so19372036d6.2\n for <qemu-devel@nongnu.org>; Thu, 30 Apr 2026 10:24:20 -0700 (PDT)",
            "from [192.168.10.48] ([151.49.85.67])\n by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-5103d1c6bb7sm649231cf.5.2026.04.30.10.24.16\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Apr 2026 10:24:17 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777569862;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=cqWwjTx+0ttmQaI1B24B0fZSc2nNrkhkxV8siWtbPhw=;\n b=itc5Svt8fP2fXpbGjozF15vpnTg95CRTbRlIMJ13MXtEivjbMrahGQZv8CscSBeDCUnq8W\n FgA8QghuCq5MKNBDO9JFuhYdHNlfBK/sd+00f8bioUrWN+Vkr0WZ6AW5S5D9Jz5sxmn38N\n fJdknlWxn20aDXMMoIcFkl24ttFLPKI=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1777569859; x=1778174659; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=cqWwjTx+0ttmQaI1B24B0fZSc2nNrkhkxV8siWtbPhw=;\n b=Rm17YPoD359XWTK8lR04obCr5k7gXnduXgn1hcj6qHIKqoR2vYSg+lnNeqJAu40W0G\n gEsnyhckP0lBgCG8cPkCaEWEamPG0pcaLEVOjQIXdH9uZC6WKikrsDMpO5+CYEg8gMJw\n pbZ5qdzUeaNKjksCtAjyD481bDUnakqdRE01hOiW6bXyEOZz/3b+GEbkPEmpfoetpMHS\n HoSCi4VoYt8J1TxuFZCz6aQI92Bhq8xwam0YtaD0yNFam/ta/+6rQgYXS1W4GXW15t+y\n wB8qFkej5kaMl+vkERPevESIEBcuwdn8pHGfEZTFWPrFgcAZ0XZYE2WVjULjxLnVYypE\n MGSQ=="
        ],
        "X-MC-Unique": "z7QRvY3yMT6i-0l2pctvHw-1",
        "X-Mimecast-MFC-AGG-ID": "z7QRvY3yMT6i-0l2pctvHw_1777569860",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777569859; x=1778174659;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=cqWwjTx+0ttmQaI1B24B0fZSc2nNrkhkxV8siWtbPhw=;\n b=BbOzOXwSp5AkyYyfdQXxvkCocvVOJCye8eYVoCJjGC8vC7l3x51esJcPNqOduVEeT8\n k8xcPw1OV6rX51+EaoUo9TOmlLw9If+UypEEtQlkuZ935Sfuq7Tlzp1tEGqAS6ZqKy+0\n DVJLi++h9So/2Iw9/dxvyeIGfzlpwqXtfmqkuYLO/L2K6TtGPT8X9xxNPhXSfHsJXjEx\n b5CsIGnwBCWV31Wzdkg95ewpDlhl2qA/2IGQXRc0KzHrNICINi3uLnQR7Fp2mutkNMQd\n YuiapJ261aTVN6sbSgSoYqvlPTETnddRqWrMtr9zZrTlInTXrhPfNncYZMdGfY1cU73+\n mXhA==",
        "X-Gm-Message-State": "AOJu0YynztzWPn5HcTkl16mfn6PJX7OmCw4RbNuhASOdntw5c/2hFDXM\n s5NnMG56bIskPa9FCnE6ldYgN0R54VFEWigzkSy0prVpmtnBSO8q9Z/onwwX2Zc9oHytywp5E4l\n i0hO+q77mk5Ing7Qdxd9Ywx5PQ8k7twXXrFH+FPYUq0aCd7ZZkMV1VpDrKPHsKJ/uJlvB/verbp\n 44C9xaZvjTjJDlB4zPbQI4EOo7ycl6GQUT5bL8/Rkx",
        "X-Gm-Gg": "AeBDiesYJXCoizxdx9IU5QIm0au7/tejTO3HFnjFTs9q5SzO9sHnh50BR6ImdTOuGA1\n J3mC5j1Jji3I2TiJawAzhRpPZJhe2uWT2j7IRbe1d6UXtvOyJ9+e8DLE9+q8uwTeiam5ouDT3s7\n FPefRjonktPc0U7E9KOlqNbrTv/x8etPyzIFaxa62TynUVf3dnK8NLLyLilFp1zFvlfoKgN/jvx\n TPrvNmGUBQljIoloS1+WAlBwP5Ows1p7VMVc8xaxXl1BF/Qefo3i8c20Ihwsl+Z7dtok8u+ofdT\n QUE5yhhbTaX+QK5pV61xlTmy/NFJ5kfuiCu9o0CzXZx8wSbEWKqrah90vF9ADT7FtpQOcGhoUU1\n et24NY1VI2kUkm0XJlv0Bf+JYTRs7WVOp8m1pTKRJvb1n+OCWIZV9zpCn0zDjUpJ8vRqmSc8Akb\n 8hpyHPWXEKVWSVNcSA0tgTYRYShT2hIQaCRLc=",
        "X-Received": [
            "by 2002:a05:622a:199d:b0:50d:863d:b50e with SMTP id\n d75a77b69052e-5102ab1c200mr54010491cf.3.1777569859301;\n Thu, 30 Apr 2026 10:24:19 -0700 (PDT)",
            "by 2002:a05:622a:199d:b0:50d:863d:b50e with SMTP id\n d75a77b69052e-5102ab1c200mr54009721cf.3.1777569858579;\n Thu, 30 Apr 2026 10:24:18 -0700 (PDT)"
        ],
        "From": "Paolo Bonzini <pbonzini@redhat.com>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "Mohamed Mediouni <mohamed@unpredictable.fr>",
        "Subject": "[PULL 42/58] target/i386: emulate, hvf: rdmsr/wrmsr GPF handling",
        "Date": "Thu, 30 Apr 2026 19:21:48 +0200",
        "Message-ID": "<20260430172204.1006673-43-pbonzini@redhat.com>",
        "X-Mailer": "git-send-email 2.54.0",
        "In-Reply-To": "<20260430172204.1006673-1-pbonzini@redhat.com>",
        "References": "<20260430172204.1006673-1-pbonzini@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=pbonzini@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no",
        "X-Spam_action": "no action",
        "X-BeenThere": "qemu-devel@nongnu.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "qemu development <qemu-devel.nongnu.org>",
        "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>",
        "List-Archive": "<https://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 <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": "From: Mohamed Mediouni <mohamed@unpredictable.fr>\n\nIn that case, the instruction pointer mustn't be incremented.\n\nSigned-off-by: Mohamed Mediouni <mohamed@unpredictable.fr>\nLink: https://lore.kernel.org/r/20260422214225.2242-34-mohamed@unpredictable.fr\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>\n---\n target/i386/emulate/x86_emu.h |  4 ++--\n target/i386/hvf/hvf-i386.h    |  4 ++--\n target/i386/emulate/x86_emu.c | 10 ++++++----\n target/i386/hvf/hvf.c         |  9 +++++++--\n 4 files changed, 17 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/target/i386/emulate/x86_emu.h b/target/i386/emulate/x86_emu.h\nindex a8d4c93098d..b985240b90e 100644\n--- a/target/i386/emulate/x86_emu.h\n+++ b/target/i386/emulate/x86_emu.h\n@@ -31,8 +31,8 @@ struct x86_emul_ops {\n     target_ulong (*read_cr) (CPUState *cpu, int cr);\n     void (*handle_io)(CPUState *cpu, uint16_t port, void *data, int direction,\n                       int size, int count);\n-    void (*simulate_rdmsr)(CPUState *cs);\n-    void (*simulate_wrmsr)(CPUState *cs);\n+    bool (*simulate_rdmsr)(CPUState *cs);\n+    bool (*simulate_wrmsr)(CPUState *cs);\n     bool (*is_protected_mode)(CPUState *cpu);\n     bool (*is_long_mode)(CPUState *cpu);\n     bool (*is_user_mode)(CPUState *cpu);\ndiff --git a/target/i386/hvf/hvf-i386.h b/target/i386/hvf/hvf-i386.h\nindex 8c42ae6b013..b91c17e2fc2 100644\n--- a/target/i386/hvf/hvf-i386.h\n+++ b/target/i386/hvf/hvf-i386.h\n@@ -19,8 +19,8 @@\n uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx, int reg);\n \n void hvf_handle_io(CPUState *, uint16_t, void *, int, int, int);\n-void hvf_simulate_rdmsr(CPUState *cpu);\n-void hvf_simulate_wrmsr(CPUState *cpu);\n+bool hvf_simulate_rdmsr(CPUState *cpu);\n+bool hvf_simulate_wrmsr(CPUState *cpu);\n \n /* Host specific functions */\n int hvf_inject_interrupt(CPUArchState *env, int vector);\ndiff --git a/target/i386/emulate/x86_emu.c b/target/i386/emulate/x86_emu.c\nindex c2da1a133f3..c6ea8542902 100644\n--- a/target/i386/emulate/x86_emu.c\n+++ b/target/i386/emulate/x86_emu.c\n@@ -792,15 +792,17 @@ void x86_emul_raise_exception(CPUX86State *env, int exception_index, int error_c\n \n static bool exec_rdmsr(CPUX86State *env, struct x86_decode *decode)\n {\n-    emul_ops->simulate_rdmsr(env_cpu(env));\n-    env->eip += decode->len;\n+    if (!emul_ops->simulate_rdmsr(env_cpu(env))) {\n+        env->eip += decode->len;\n+    }\n     return 0;\n }\n \n static bool exec_wrmsr(CPUX86State *env, struct x86_decode *decode)\n {\n-    emul_ops->simulate_wrmsr(env_cpu(env));\n-    env->eip += decode->len;\n+    if (!emul_ops->simulate_wrmsr(env_cpu(env))) {\n+        env->eip += decode->len;\n+    }\n     return 0;\n }\n \ndiff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c\nindex cdc8bd19504..2d1a943b96c 100644\n--- a/target/i386/hvf/hvf.c\n+++ b/target/i386/hvf/hvf.c\n@@ -536,7 +536,7 @@ void hvf_store_regs(CPUState *cs)\n     macvm_set_rip(cs, env->eip);\n }\n \n-void hvf_simulate_rdmsr(CPUState *cs)\n+bool hvf_simulate_rdmsr(CPUState *cs)\n {\n     X86CPU *cpu = X86_CPU(cs);\n     CPUX86State *env = &cpu->env;\n@@ -557,6 +557,7 @@ void hvf_simulate_rdmsr(CPUState *cs)\n         ret = apic_msr_read(cpu->apic_state, index, &val);\n         if (ret < 0) {\n             x86_emul_raise_exception(env, EXCP0D_GPF, 0);\n+            return 1;\n         }\n \n         break;\n@@ -639,9 +640,10 @@ void hvf_simulate_rdmsr(CPUState *cs)\n \n     RAX(env) = (uint32_t)val;\n     RDX(env) = (uint32_t)(val >> 32);\n+    return 0;\n }\n \n-void hvf_simulate_wrmsr(CPUState *cs)\n+bool hvf_simulate_wrmsr(CPUState *cs)\n {\n     X86CPU *cpu = X86_CPU(cs);\n     CPUX86State *env = &cpu->env;\n@@ -657,6 +659,7 @@ void hvf_simulate_wrmsr(CPUState *cs)\n         r = cpu_set_apic_base(cpu->apic_state, data);\n         if (r < 0) {\n             x86_emul_raise_exception(env, EXCP0D_GPF, 0);\n+            return 1;\n         }\n \n         break;\n@@ -668,6 +671,7 @@ void hvf_simulate_wrmsr(CPUState *cs)\n         ret = apic_msr_write(cpu->apic_state, index, data);\n         if (ret < 0) {\n             x86_emul_raise_exception(env, EXCP0D_GPF, 0);\n+            return 1;\n         }\n \n         break;\n@@ -746,6 +750,7 @@ void hvf_simulate_wrmsr(CPUState *cs)\n          g_hypervisor_iface->wrmsr_handler(cs, msr, data);\n \n     printf(\"write msr %llx\\n\", RCX(cs));*/\n+    return 0;\n }\n \n static int hvf_handle_vmexit(CPUState *cpu)\n",
    "prefixes": [
        "PULL",
        "42/58"
    ]
}