get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195840,
    "url": "http://patchwork.ozlabs.org/api/patches/2195840/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212062522.99565-29-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-29-anisinha@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-12T06:25:12",
    "name": "[v4,28/31] kvm/vcpu: add notifiers to inform vcpu file descriptor change",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "dcd57c8b3af6cf4606f34e40c393b41624afd392",
    "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-29-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/2195840/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195840/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=SCMLHjoy;\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=Pep0k52v;\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 4fBQNX5Ndbz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 17:28:28 +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 1vqQBJ-0001r7-24; Thu, 12 Feb 2026 01:28:05 -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 1vqQAc-0000Vj-U1\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:27:27 -0500",
            "from us-smtp-delivery-124.mimecast.com ([170.10.133.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 1vqQAb-0005Mh-1f\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:27:22 -0500",
            "from mail-pj1-f71.google.com (mail-pj1-f71.google.com\n [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-502-nqrUuCPFO6apyK9dRyhlOg-1; Thu, 12 Feb 2026 01:27:17 -0500",
            "by mail-pj1-f71.google.com with SMTP id\n 98e67ed59e1d1-35641c14663so4472444a91.2\n for <qemu-devel@nongnu.org>; Wed, 11 Feb 2026 22:27:17 -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.27.13\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Feb 2026 22:27:15 -0800 (PST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770877639;\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=5baHEmSS1KnRdwjNGuB0g+ltPY1ZMuCXtAxZqqNbqAo=;\n b=SCMLHjoydYn2nwVOVf4GkGvViFSQGdzd8rBuy1ikINfFZBJihuK5aZEOTTSVABU8bejW2F\n oDeTNHrSqeNi55KF6InZ6Z6StZsad5OjHwlvTB8zYUGxw5EVuIcLVllcZs+QaR1KInHfrT\n 7Qn36A4hJLIJR+LWeNsoj39ajxQqYbg=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1770877636; x=1771482436; 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=5baHEmSS1KnRdwjNGuB0g+ltPY1ZMuCXtAxZqqNbqAo=;\n b=Pep0k52vQzvCJS5n54U+Z3ru/hMXFeT6hxMedsUKc+11j0IHusoWYwzkl2UuiGZBAK\n wZimpkShRGo4b15U1hXHWQeWhvClUx80Yd6HsRl/8K/d5wXzS6+iPFx3/WjzwcIof1bJ\n 2NHpFAbMla9pdQf7zNwqSHsa7KOSGZ2pAvLuBmd1fq9lSFThuJ80Oc2QWjzKu/UWi27T\n bxQi9xhzAb0an6+EesQxedVoh3f/Tr4lZMezP2UiuPm1/mVnR59xVmz0yUqahz5nWR2C\n /x79/qh0JOdqQFBlCwrLzqKywfYULvyC6EmfRSGLi6tPGsrtf+hoccI+AO0BlAl188jA\n 5FpA=="
        ],
        "X-MC-Unique": "nqrUuCPFO6apyK9dRyhlOg-1",
        "X-Mimecast-MFC-AGG-ID": "nqrUuCPFO6apyK9dRyhlOg_1770877636",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770877636; x=1771482436;\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=5baHEmSS1KnRdwjNGuB0g+ltPY1ZMuCXtAxZqqNbqAo=;\n b=vqz1kbFjwHjQ8W6aNxyDpw/R8urYuZpNpvOFNFrJyIEDFy12/Eul6nCUBRn2pti9T0\n YN0c3Hm96aK3AYnUWyIG2g2hqeXaLi0MTFvuYnJD41caAwRvXSk/Nw6iHwWSl5kb5rJD\n 7m3PnH1LGjxLIKusWtwar3d2oAEaoPEbWIylQ+DoPp88Vr9pNvXwkX+5JuUQYLNPGYUy\n 0UiPTM3BRH6AMSPh2rE0nlppoQNuucMI6O6J3r/wph6gPO12OBg5OZTpem4BDQ+VRhuk\n 1nRVsRX3eYUAvZxHBDrafqouvCwtuuG6JHhTRAG03RmHwMAoMaLRtBxdUdwAajub1H/x\n Mcbg==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCVHmthH4fEfFsUu8zRx8M3JTt168A5mk0A8K6UhsLf+znM4yAyCNLQPDToXQtMa5L175uguE+Ves6yw@nongnu.org",
        "X-Gm-Message-State": "AOJu0Yxe4NDY216T6Qikr8WIGslpBxF5cykDOO/UuSiCDkr1xGnmA2fq\n +oh1rpAtZZyVenUPbRfX4Mh+cC1ZYUOUe01cJA3GOUk0vBmDKOW7gOImOFcBSOAwusb24hqMPGi\n YenlS52zfGeZGGtbNIPibw0xXK9N0vCEiiHLoHTbnuLnFRP2LBunsEiKe",
        "X-Gm-Gg": "AZuq6aLiJ++7XmufZcOnXMFtKA74NEfVi96l4s/paRin4m89YRiMydnjiXkOVgcqB0Z\n 2yvCwlaJFYonMiIi9c3YPNXfY8hZrDdXaH+uQia3C4KZoDb6/V6tG7QcOE9gnNdEB6thsRp6Ss7\n /j7S3Q5RFf7jQLoaf0YJ7BUwd3CJ5V299Tm0h2YDMxkmm/NkNhCeKvuUJpXC+e1AyxEM3qXJIkF\n A/yiyfM8fDaqXlM09AymhIj26g3aROLBntXqJ4nwseyQLDIWTexyn9Gpg6jgUOKiGC/3aEgFbhG\n eHK9NQ/DCHETEQOTV6lasXagoEBhV9NXCVH812WJBGckm1dL00NPiyxuzVQQ2DlNqhkdgwOlqyK\n SCV0z/uprJG60HGHS7g5Ih3Z8Lok+0fttfsspLsqwFgIcU94lHNaZaVs=",
        "X-Received": [
            "by 2002:a17:90b:3851:b0:34a:e9b:26b1 with SMTP id\n 98e67ed59e1d1-3568f40232dmr1584981a91.26.1770877636223;\n Wed, 11 Feb 2026 22:27:16 -0800 (PST)",
            "by 2002:a17:90b:3851:b0:34a:e9b:26b1 with SMTP id\n 98e67ed59e1d1-3568f40232dmr1584965a91.26.1770877635918;\n Wed, 11 Feb 2026 22:27:15 -0800 (PST)"
        ],
        "From": "Ani Sinha <anisinha@redhat.com>",
        "To": "Paolo Bonzini <pbonzini@redhat.com>",
        "Cc": "kraxel@redhat.com, Ani Sinha <anisinha@redhat.com>, kvm@vger.kernel.org,\n qemu-devel@nongnu.org",
        "Subject": "[PATCH v4 28/31] kvm/vcpu: add notifiers to inform vcpu file\n descriptor change",
        "Date": "Thu, 12 Feb 2026 11:55:12 +0530",
        "Message-ID": "<20260212062522.99565-29-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.133.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_H2=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": "When new vcpu file descriptors are created and bound to the new kvm file\ndescriptor as a part of the confidential guest reset mechanism, various\nsubsystems needs to know about it. This change adds notifiers so that various\nsubsystems can take appropriate actions when vcpu fds change by registering\ntheir handlers to this notifier.\nSubsequent changes will register specific handlers to this notifier.\n\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n accel/kvm/kvm-all.c    | 26 ++++++++++++++++++++++++++\n accel/stubs/kvm-stub.c | 10 ++++++++++\n include/system/kvm.h   | 17 +++++++++++++++++\n 3 files changed, 53 insertions(+)",
    "diff": "diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c\nindex 5e81bf8ad2..4d4d361708 100644\n--- a/accel/kvm/kvm-all.c\n+++ b/accel/kvm/kvm-all.c\n@@ -127,6 +127,9 @@ static NotifierList kvm_irqchip_change_notifiers =\n static NotifierWithReturnList register_vmfd_changed_notifiers =\n     NOTIFIER_WITH_RETURN_LIST_INITIALIZER(register_vmfd_changed_notifiers);\n \n+static NotifierWithReturnList register_vcpufd_changed_notifiers =\n+    NOTIFIER_WITH_RETURN_LIST_INITIALIZER(register_vcpufd_changed_notifiers);\n+\n static int map_kvm_run(KVMState *s, CPUState *cpu, Error **errp);\n static int map_kvm_dirty_gfns(KVMState *s, CPUState *cpu, Error **errp);\n static int vcpu_unmap_regions(KVMState *s, CPUState *cpu);\n@@ -2314,6 +2317,22 @@ static int kvm_vmfd_change_notify(Error **errp)\n                                             &vmfd_notifier, errp);\n }\n \n+void kvm_vcpufd_add_change_notifier(NotifierWithReturn *n)\n+{\n+    notifier_with_return_list_add(&register_vcpufd_changed_notifiers, n);\n+}\n+\n+void kvm_vcpufd_remove_change_notifier(NotifierWithReturn *n)\n+{\n+    notifier_with_return_remove(n);\n+}\n+\n+static int kvm_vcpufd_change_notify(Error **errp)\n+{\n+    return notifier_with_return_list_notify(&register_vcpufd_changed_notifiers,\n+                                            &vmfd_notifier, errp);\n+}\n+\n int kvm_irqchip_get_virq(KVMState *s)\n {\n     int next_virq;\n@@ -2838,6 +2857,13 @@ static int kvm_reset_vmfd(MachineState *ms)\n     }\n     assert(!err);\n \n+    /* notify everyone that vcpu fd has changed. */\n+    ret = kvm_vcpufd_change_notify(&err);\n+    if (ret < 0) {\n+        return ret;\n+    }\n+    assert(!err);\n+\n     /* these can be only called after ram_block_rebind() */\n     memory_listener_register(&kml->listener, &address_space_memory);\n     memory_listener_register(&kvm_io_listener, &address_space_io);\ndiff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c\nindex a6e8a6e16c..c4617caac6 100644\n--- a/accel/stubs/kvm-stub.c\n+++ b/accel/stubs/kvm-stub.c\n@@ -87,6 +87,16 @@ void kvm_vmfd_remove_change_notifier(NotifierWithReturn *n)\n {\n }\n \n+void kvm_vcpufd_add_change_notifier(NotifierWithReturn *n)\n+{\n+    return;\n+}\n+\n+void kvm_vcpufd_remove_change_notifier(NotifierWithReturn *n)\n+{\n+    return;\n+}\n+\n int kvm_irqchip_add_irqfd_notifier_gsi(KVMState *s, EventNotifier *n,\n                                        EventNotifier *rn, int virq)\n {\ndiff --git a/include/system/kvm.h b/include/system/kvm.h\nindex fbe23608a1..4b0e1b4ab1 100644\n--- a/include/system/kvm.h\n+++ b/include/system/kvm.h\n@@ -590,4 +590,21 @@ void kvm_vmfd_add_change_notifier(NotifierWithReturn *n);\n  */\n void kvm_vmfd_remove_change_notifier(NotifierWithReturn *n);\n \n+/**\n+ * kvm_vcpufd_add_change_notifier - register a notifier to get notified when\n+ * a KVM vcpu file descriptors changes as a part of the confidential guest\n+ * \"reset\" process. Various subsystems should use this mechanism to take\n+ * actions such as re-issuing vcpu ioctls as a part of setting up vcpu\n+ * features.\n+ * @n: notifier with return value.\n+ */\n+void kvm_vcpufd_add_change_notifier(NotifierWithReturn *n);\n+\n+/**\n+ * kvm_vcpufd_remove_change_notifier - de-register a notifer previously\n+ * registered with kvm_vcpufd_add_change_notifier call.\n+ * @n: notifier that was previously registered.\n+ */\n+void kvm_vcpufd_remove_change_notifier(NotifierWithReturn *n);\n+\n #endif\n",
    "prefixes": [
        "v4",
        "28/31"
    ]
}