Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.0/patches/2197709/?format=api
{ "id": 2197709, "url": "http://patchwork.ozlabs.org/api/1.0/patches/2197709/?format=api", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.0/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": "" }, "msgid": "<20260218114233.266178-8-anisinha@redhat.com>", "date": "2026-02-18T11:42:00", "name": "[v5,07/34] accel/kvm: notify when KVM VM file fd is about to be changed", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a67e0d8dbf1bed70c12d1a93bbc177711ed794e8", "submitter": { "id": 86030, "url": "http://patchwork.ozlabs.org/api/1.0/people/86030/?format=api", "name": "Ani Sinha", "email": "anisinha@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260218114233.266178-8-anisinha@redhat.com/mbox/", "series": [ { "id": 492541, "url": "http://patchwork.ozlabs.org/api/1.0/series/492541/?format=api", "date": "2026-02-18T11:41:56", "name": "Introduce support for confidential guest reset (x86)", "version": 5, "mbox": "http://patchwork.ozlabs.org/series/492541/mbox/" } ], "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2197709/checks/", "tags": {}, "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=PM7iPAvq;\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=R7oR5AzF;\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 4fGF6x05tGz1xpl\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 18 Feb 2026 22:44:57 +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 1vsfxm-0003GJ-0G; Wed, 18 Feb 2026 06:43:26 -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 1vsfxf-0003Cq-7r\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 06:43:19 -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 1vsfxZ-0007p9-U9\n for qemu-devel@nongnu.org; Wed, 18 Feb 2026 06:43:16 -0500", "from mail-pl1-f200.google.com (mail-pl1-f200.google.com\n [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-241-3hdTVLgxPOCTqnk0q6VXlA-1; Wed, 18 Feb 2026 06:43:09 -0500", "by mail-pl1-f200.google.com with SMTP id\n d9443c01a7336-2a7a98ba326so11880665ad.1\n for <qemu-devel@nongnu.org>; Wed, 18 Feb 2026 03:43:08 -0800 (PST)", "from rhel9-box.lan ([117.99.83.54])\n by smtp.googlemail.com with ESMTPSA id\n d9443c01a7336-2ad1aaeab38sm127803425ad.82.2026.02.18.03.43.05\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 18 Feb 2026 03:43:07 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1771414990;\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=JrYkaI8zWucrcUWEd6p2dGFw5Tm5nOCoxE1XNnZbb4k=;\n b=PM7iPAvq3DG/KQx595EK1neyb0OGwWUlz9Fl/ZFRLGfHrRALyo31jSHam+HvGi0xAcGoEx\n gSXTrFaznBsEOtFSbp/NG2S+/G7+NFMDz0WfLI6QnImBvSPp8HIOm9qcoZ5rI2HSCBGB3i\n +qUw/vzMUXsZTQCKwhdgilPGxfRzSk0=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1771414988; x=1772019788; 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=JrYkaI8zWucrcUWEd6p2dGFw5Tm5nOCoxE1XNnZbb4k=;\n b=R7oR5AzFEwuX5lQwdzH5fAes3EDkzcrIOIok8U6uQGrIXvo+Yg/QfybJ06g5BKnKZP\n hskY/iQRAvfCiGUejcr6+D0V82s+OTDqZZKEuUH0x9Az5oetNrlVCOuG9TI9JBOIp0sP\n xZYRiWwwg7peKSAo1eKz+BjWP98uOEazyXv6FabxIoN+IwxNMrfezd5xQcL4uPokXh6g\n Tj4j0tz8RO8Qa5aEqa4J19wtuVkM2VaT3VIV/C4QEBtKZlTrW2eXKy9CrLh06+4ShI24\n B6yPQshp5r4VU4feSEJHTVTzDCkuBU1NG3sso6EHdNjP4pCb1lPfxEeXshP6H0lQykAY\n HO8A==" ], "X-MC-Unique": "3hdTVLgxPOCTqnk0q6VXlA-1", "X-Mimecast-MFC-AGG-ID": "3hdTVLgxPOCTqnk0q6VXlA_1771414988", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1771414988; x=1772019788;\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=JrYkaI8zWucrcUWEd6p2dGFw5Tm5nOCoxE1XNnZbb4k=;\n b=IK8eEJupfbtpC6fOfa+V6fzKtXNprsvcEe+kHWpJeFQXrPfs8bbJzTLTeMqKyf2UGL\n UC8OTjJaGRprAZrsnSEHVd/ft4bw5LuKm/2cmyBv63yWKfs3D8+IwHu22VneoWhgy040\n s73TPebQFxD9z+Ondga1IYsaB4CT3bPYtGYPuCAbazmzkczIEWpz+02K9AvXONz9zK8v\n OMWh2/bq58XCfIvqSFuqcsjam1UD1+R3ZY/7jlip1vz/bw8X6oyl3fj49t51n5mnrVmG\n Q+FtqekNHPT5XJly/AlhMQFzJXnI0cT5Q+m26oONIvKtVcISCffs9mLqd3EhQljHISKb\n s77w==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCWo0yEI5guzUaRfOXUPFpVMNCPoLimAxgaynFMfacRtSEjmUr3kKXT9bn6Y0GCMsifCr55Jl7e+ZRjF@nongnu.org", "X-Gm-Message-State": "AOJu0YyWOEXbDAR6kCj7u8EeYpnl3uA8SlqmgrgvvDsZMQLgS1KiLRdZ\n hCxnLLBi0wBQcPot7VfgSQln5tMG+u4AduxE44Ri370SrL0wZXq6UgJrSKy8WMX1Lvi+k4ervYy\n fSPtLUNVh5Vq1YZQaZHiv63tsdqI0Eu07KnUis2gygLkFmRnBJ47m4jec", "X-Gm-Gg": "AZuq6aJUpKbz76f30oP0r9ohPzDax2NBbVyJNErVfc+u8z3gVh+Bmkf/3FdlFOprV8V\n uCds9T4D1HMqGXu1Y8BNGdxWHVITkoqIDdtbs1D5Xqq7AJsIW/8/zGehmuqp+mRr8FnCSLhexxm\n dLjcXelSJ5iUEEKLV4q+iBa3vDnSjHpyYqIqDIs4jYoCQKFN4HJPY8GesX2gbJPsizFjQJ/aCG8\n EtZjV3r2/v0xNjaSUFLdl2NFHDLPQe7Sumx4VP38IcnKmvJUYFz+jrjbZEc/nymbWiD6NL9fwlP\n wY5l5WS4bXSaU6nr3yH7pjCDSjGlYD2MJtP3HwD3lgKH6DNGm+BObMZj2Qsqpa6w+4Mto3S2EP9\n lja2xfg3PL3NQRpprIzIX+Bjj/SeLzpOFOC/Prs9oeaDgBNv3G25t", "X-Received": [ "by 2002:a17:903:2f81:b0:2aa:d605:a314 with SMTP id\n d9443c01a7336-2ad50b5a413mr16656375ad.4.1771414987867;\n Wed, 18 Feb 2026 03:43:07 -0800 (PST)", "by 2002:a17:903:2f81:b0:2aa:d605:a314 with SMTP id\n d9443c01a7336-2ad50b5a413mr16656135ad.4.1771414987404;\n Wed, 18 Feb 2026 03:43:07 -0800 (PST)" ], "From": "Ani Sinha <anisinha@redhat.com>", "To": "Paolo Bonzini <pbonzini@redhat.com>", "Cc": "Ani Sinha <anisinha@redhat.com>, kraxel@redhat.com, kvm@vger.kernel.org,\n qemu-devel@nongnu.org", "Subject": "[PATCH v5 07/34] accel/kvm: notify when KVM VM file fd is about to be\n changed", "Date": "Wed, 18 Feb 2026 17:12:00 +0530", "Message-ID": "<20260218114233.266178-8-anisinha@redhat.com>", "X-Mailer": "git-send-email 2.42.0", "In-Reply-To": "<20260218114233.266178-1-anisinha@redhat.com>", "References": "<20260218114233.266178-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.043,\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 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": "Various subsystems might need to take some steps before the KVM file descriptor\nfor a virtual machine is changed. So a new boolean attribute is added to the\nvmfd_notifier structure which is passed to the notifier callbacks.\nvmfd_notifer.pre is true for pre-notification of vmfd change and false for\npost notification. Notifier callback implementations can simply check\nthe boolean value for (vmfd_notifer*)->pre and can take actions for pre or\npost vmfd change based on the value.\n\nSubsequent patches will add callback implementations for specific components\nthat need this pre-notification.\n\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n accel/kvm/kvm-all.c | 9 +++++++++\n include/system/kvm.h | 6 ++++--\n 2 files changed, 13 insertions(+), 2 deletions(-)", "diff": "diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c\nindex b8a0685f7a..47589f92e2 100644\n--- a/accel/kvm/kvm-all.c\n+++ b/accel/kvm/kvm-all.c\n@@ -2654,6 +2654,13 @@ static int kvm_reset_vmfd(MachineState *ms)\n memory_listener_unregister(&kml->listener);\n memory_listener_unregister(&kvm_io_listener);\n \n+ vmfd_notifier.pre = true;\n+ ret = kvm_vmfd_change_notify(&err);\n+ if (ret < 0) {\n+ return ret;\n+ }\n+ assert(!err);\n+\n if (s->vmfd >= 0) {\n close(s->vmfd);\n }\n@@ -2692,6 +2699,8 @@ static int kvm_reset_vmfd(MachineState *ms)\n * notify everyone that vmfd has changed.\n */\n vmfd_notifier.vmfd = s->vmfd;\n+ vmfd_notifier.pre = false;\n+\n ret = kvm_vmfd_change_notify(&err);\n if (ret < 0) {\n return ret;\ndiff --git a/include/system/kvm.h b/include/system/kvm.h\nindex f11729f432..fbe23608a1 100644\n--- a/include/system/kvm.h\n+++ b/include/system/kvm.h\n@@ -571,12 +571,14 @@ int kvm_convert_memory(hwaddr start, hwaddr size, bool to_private);\n /* argument to vmfd change notifier */\n typedef struct VmfdChangeNotifier {\n int vmfd;\n+ bool pre;\n } VmfdChangeNotifier;\n \n /**\n * kvm_vmfd_add_change_notifier - register a notifier to get notified when\n- * a KVM vm file descriptor changes as a part of the confidential guest \"reset\"\n- * process. Various subsystems should use this mechanism to take actions such\n+ * a KVM vm file descriptor changes or about to be changed as a part of the\n+ * confidential guest \"reset\" process.\n+ * Various subsystems should use this mechanism to take actions such\n * as creating new fds against this new vm file descriptor.\n * @n: notifier with return value.\n */\n", "prefixes": [ "v5", "07/34" ] }