get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195833,
    "url": "http://patchwork.ozlabs.org/api/patches/2195833/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212062522.99565-18-anisinha@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": "<20260212062522.99565-18-anisinha@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-12T06:25:01",
    "name": "[v4,17/31] i386/sev: add migration blockers only once",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "7e0d1386098cacb9cb5f152126580e1303d0e533",
    "submitter": {
        "id": 86030,
        "url": "http://patchwork.ozlabs.org/api/people/86030/?format=api",
        "name": "Ani Sinha",
        "email": "anisinha@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212062522.99565-18-anisinha@redhat.com/mbox/",
    "series": [
        {
            "id": 491935,
            "url": "http://patchwork.ozlabs.org/api/series/491935/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=491935",
            "date": "2026-02-12T06:24:45",
            "name": "Introduce support for confidential guest reset (x86)",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/491935/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195833/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195833/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=UABHAlq0;\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=GTqX+k7T;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.gnu.org (lists.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 4fBQMh2rfWz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 17:27:44 +1100 (AEDT)",
            "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1vqQ9v-000895-OQ; Thu, 12 Feb 2026 01:26:39 -0500",
            "from eggs.gnu.org ([2001:470:142:3::10])\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <anisinha@redhat.com>)\n id 1vqQ9q-0007qm-46\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:26:34 -0500",
            "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 <anisinha@redhat.com>)\n id 1vqQ9o-0005HI-PC\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:26:33 -0500",
            "from mail-pj1-f72.google.com (mail-pj1-f72.google.com\n [209.85.216.72]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-223-e_VCarWfNDSnPbfqHNC5Dw-1; Thu, 12 Feb 2026 01:26:29 -0500",
            "by mail-pj1-f72.google.com with SMTP id\n 98e67ed59e1d1-354c44bf176so5391282a91.0\n for <qemu-devel@nongnu.org>; Wed, 11 Feb 2026 22:26:29 -0800 (PST)",
            "from rhel9-box.lan ([122.164.27.113])\n by smtp.googlemail.com with ESMTPSA id\n 98e67ed59e1d1-3567e7d95d8sm4894122a91.2.2026.02.11.22.26.25\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Feb 2026 22:26:27 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770877592;\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=8zpSCPimmyA0e0qP7Kcivb9yeJXq4znZSTQUpfrxyiE=;\n b=UABHAlq0PpfeQMQHoTOolnwfzXaiTB3q7/d4YlrM1xa8U0Tv1nM/uULPoT3K/JAe5zbCzk\n OgwdRfUsqUDZEvb4ifhNu9cPHGDNE07NjL6bQitUvZ8Qcy3e+dHY2VdkouMDXPKIx191cE\n wLMNjHxQjaTNr5rHNEsuKR60pq3uomE=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1770877588; x=1771482388; 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=8zpSCPimmyA0e0qP7Kcivb9yeJXq4znZSTQUpfrxyiE=;\n b=GTqX+k7T75a2wPzxcLtZVBrJA/OMlqExTYG3gk6c8dhgzC8VSfPSgKFJv+7xik05v8\n BR22StZFY67C+JGRJ9YVxfQJpk/AluVumHSO0qwWi9CxhIT+UXLrRfWheQk1iWrkGQ4j\n OO3zpYzboBkcVpkSCGPtJE6HpEbaKoGCTLgqLHdFLOoJogQeAxkDhN6LMB2O1MM7m2kX\n WLMTfpOPIcEmqt2p63G7Ko0JV6f1NMbwoehOaKTSNnvp06JzAvQeUJOGfUEJ9f6L0T2J\n vN/MP6sgCm8cDmWJpLAMDnh+qBWQqEdaHkid/fqLduUi02jknmj5uNiPomyl9H+yv3Bv\n SnSw=="
        ],
        "X-MC-Unique": "e_VCarWfNDSnPbfqHNC5Dw-1",
        "X-Mimecast-MFC-AGG-ID": "e_VCarWfNDSnPbfqHNC5Dw_1770877588",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770877588; x=1771482388;\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=8zpSCPimmyA0e0qP7Kcivb9yeJXq4znZSTQUpfrxyiE=;\n b=gVClAPTiMOwkdJ07i9Ccxq589X4gf8kXX2rQqWfgjptL9K8+zPHk3KF3mU+eKg0B13\n G7zr5Uc/Im2UUT+72TyMoo8KlXV43OWVBrNAF+sJOkRPSOV18doQSSGxNt9gsSb0XjyL\n hvoAAy7+/rTFV+DbJX4iripWL1VL+IFD6NTQoScbNhm9JDgTOVoI5Rm3ijaQ8stRDDH+\n 54tF2ZlUDEg1jBuRgEWEK8XRvZoplBBGY1Ou0Q7kYMFTYQk3qc8dPKDK4Q7ZMvMf4Y3Z\n OvepJfuGLfR1V/891j0vr2rKEt7RdV+AGSJrzS1d93+vVubbwIhiiWQo1MycylBRcU8V\n GhpQ==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCVkJ7Q+i6Hc8HyRRgaqipNmPX2WA5SPYeNV7+pPZhCjSu9psM8VG9Mi3nihuiLRitCD0l0u35yBo6Nq@nongnu.org",
        "X-Gm-Message-State": "AOJu0YzfU24ACV4QwUsSafU//DxtrmHdSvSw/781AuoaFAE8IBgSB6ks\n A5OdgdTa4nUPtl++M36KZlxO1Y5LTG2IC9YnD9TQPudf0vKxkvNct076WpyDZctYxmP4vQaEg4/\n 0BquMZ2vN87XnRGheEPK8X6VquOlnFGaBJYPyU5NMm2gmh79igudlAkXV",
        "X-Gm-Gg": "AZuq6aLrSoIfCt8VAAR/XAS1eKXMYj+jaGNO41/X42gSAtAByMiY8wZfY0x9haLPpyl\n ntkZxcpWCTztX8ExrhksjYe6tYq4lVsHAyDJdrLTadFk8fu7p4/rgKBZ0O99oVkFbprNsZiI2cu\n vILae5kC34DgOxmaczAXsmPAPfn69+4LGf+wEqMrYlsM/TWokVvSx9tARzAaOICPqMz/8D8Ar4j\n NY6B08wigX2epYI+SUnEh70DPnaqdWHTM/HI4murhale0cdT4RmkUm+M/4JalkHRvT/zZKl7ww6\n 1bJ4ToSuVdyJoNkl7HxpRfIw2NoVNXkDq+kz4bpTpzglW0fy+oB8Nx+zAb/PI5VlfSaoDFnGJXt\n 0ZP9jW8W6VNETFwvCR2MKRgAV2qShityVmI4gcIH1Z0ZpcWxfa5/VlDI=",
        "X-Received": [
            "by 2002:a17:90b:3503:b0:352:c995:808a with SMTP id\n 98e67ed59e1d1-3568f327382mr1457960a91.14.1770877588516;\n Wed, 11 Feb 2026 22:26:28 -0800 (PST)",
            "by 2002:a17:90b:3503:b0:352:c995:808a with SMTP id\n 98e67ed59e1d1-3568f327382mr1457945a91.14.1770877588157;\n Wed, 11 Feb 2026 22:26:28 -0800 (PST)"
        ],
        "From": "Ani Sinha <anisinha@redhat.com>",
        "To": "Paolo Bonzini <pbonzini@redhat.com>,\n Marcelo Tosatti <mtosatti@redhat.com>,\n Zhao Liu <zhao1.liu@intel.com>",
        "Cc": "kraxel@redhat.com, Ani Sinha <anisinha@redhat.com>, kvm@vger.kernel.org,\n qemu-devel@nongnu.org",
        "Subject": "[PATCH v4 17/31] i386/sev: add migration blockers only once",
        "Date": "Thu, 12 Feb 2026 11:55:01 +0530",
        "Message-ID": "<20260212062522.99565-18-anisinha@redhat.com>",
        "X-Mailer": "git-send-email 2.42.0",
        "In-Reply-To": "<20260212062522.99565-1-anisinha@redhat.com>",
        "References": "<20260212062522.99565-1-anisinha@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=anisinha@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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,\n RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=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": "sev_launch_finish() and sev_snp_launch_finish() could be called multiple times\nwhen the confidential guest is being reset/rebooted. The migration\nblockers should not be added multiple times, once per invocation. This change\nmakes sure that the migration blockers are added only one time by adding the\nmigration blockers to the vm state change handler when the vm transitions to\nthe running state. Subsequent reboots do not change the state of the vm.\n\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n target/i386/sev.c | 20 +++++---------------\n 1 file changed, 5 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/target/i386/sev.c b/target/i386/sev.c\nindex 66e38ca32e..260d8ef88b 100644\n--- a/target/i386/sev.c\n+++ b/target/i386/sev.c\n@@ -1421,11 +1421,6 @@ sev_launch_finish(SevCommonState *sev_common)\n     }\n \n     sev_set_guest_state(sev_common, SEV_STATE_RUNNING);\n-\n-    /* add migration blocker */\n-    error_setg(&sev_mig_blocker,\n-               \"SEV: Migration is not implemented\");\n-    migrate_add_blocker(&sev_mig_blocker, &error_fatal);\n }\n \n static int snp_launch_update_data(uint64_t gpa, void *hva, size_t len,\n@@ -1608,7 +1603,6 @@ static void\n sev_snp_launch_finish(SevCommonState *sev_common)\n {\n     int ret, error;\n-    Error *local_err = NULL;\n     OvmfSevMetadata *metadata;\n     SevLaunchUpdateData *data;\n     SevSnpGuestState *sev_snp = SEV_SNP_GUEST(sev_common);\n@@ -1655,15 +1649,6 @@ sev_snp_launch_finish(SevCommonState *sev_common)\n \n     kvm_mark_guest_state_protected();\n     sev_set_guest_state(sev_common, SEV_STATE_RUNNING);\n-\n-    /* add migration blocker */\n-    error_setg(&sev_mig_blocker,\n-               \"SEV-SNP: Migration is not implemented\");\n-    ret = migrate_add_blocker(&sev_mig_blocker, &local_err);\n-    if (local_err) {\n-        error_report_err(local_err);\n-        exit(1);\n-    }\n }\n \n \n@@ -1676,6 +1661,11 @@ sev_vm_state_change(void *opaque, bool running, RunState state)\n     if (running) {\n         if (!sev_check_state(sev_common, SEV_STATE_RUNNING)) {\n             klass->launch_finish(sev_common);\n+\n+            /* add migration blocker */\n+            error_setg(&sev_mig_blocker,\n+                       \"SEV: Migration is not implemented\");\n+            migrate_add_blocker(&sev_mig_blocker, &error_fatal);\n         }\n     }\n }\n",
    "prefixes": [
        "v4",
        "17/31"
    ]
}