Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195838/?format=api
{ "id": 2195838, "url": "http://patchwork.ozlabs.org/api/patches/2195838/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212062522.99565-17-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-17-anisinha@redhat.com>", "list_archive_url": null, "date": "2026-02-12T06:25:00", "name": "[v4,16/31] i386/tdx: add a pre-vmfd change notifier to reset tdx state", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "cca89313e66c76c35d3b1a329d29d8b35f5d21bd", "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-17-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/2195838/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195838/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=A3NhNfBD;\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=CH1JpQQI;\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 4fBQMy28wCz1xwL\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 17:27:58 +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 1vqQ9m-0007qM-KZ; Thu, 12 Feb 2026 01:26:30 -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 1vqQ9l-0007qE-U4\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:26:29 -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 1vqQ9k-0005Gn-KH\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:26:29 -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-507-1re6DG6JMFybbm4PjIuCag-1; Thu, 12 Feb 2026 01:26:26 -0500", "by mail-pj1-f71.google.com with SMTP id\n 98e67ed59e1d1-354c7febaefso5792037a91.3\n for <qemu-devel@nongnu.org>; Wed, 11 Feb 2026 22:26:26 -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.22\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Feb 2026 22:26:24 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770877588;\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=bPhZf11AJ6OznTneTjtivFAiVtwbcW8pDml41uWPO3Y=;\n b=A3NhNfBDB5ZwFLkZypugI0rN4zUe5OU7WZ/ArY2YtGXxK6k5XrZeoLjNdviA+dN2+crx5Q\n tzpFlGjVyZUvbmmVG15O8jAWjI1fBboZEF9jiDETYNsW5KfdG/kmF71/GxTmFrdpB+POoD\n pvG8FJX8ZonpXu5wqENU6c9P3YZ+/WU=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1770877585; x=1771482385; 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=bPhZf11AJ6OznTneTjtivFAiVtwbcW8pDml41uWPO3Y=;\n b=CH1JpQQIPUwmKk9zZkC2O68HIfjm1Rk4ECflAMum467A1jwjqphqqd5d1hWdht+FrA\n hXrqnvqvcjiq20JqrQln/1T6+akiH0gr18OmNPAhDa5Ga6mKjxyUZskcU3UyQCdYkG2Y\n rWRRAmv7ohl9WLhnF2/ToV+tF2agme9YJ27EfYonfaU9wwBZX9ByLckCh9VHx49ZlxfJ\n sLQe7PybsBaSin7XcKsAgKB2z1wmcsufgLdMAVULMYoUs9C8r9Hrtcegy15HXNzGxqBo\n x8FTqapyq//JCHeZ+z+b8Y1MBKrrGDC0JMzab34gOE9iIn7TMBDQHNAqHlzeNtLw84Yb\n e+KA==" ], "X-MC-Unique": "1re6DG6JMFybbm4PjIuCag-1", "X-Mimecast-MFC-AGG-ID": "1re6DG6JMFybbm4PjIuCag_1770877585", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770877585; x=1771482385;\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=bPhZf11AJ6OznTneTjtivFAiVtwbcW8pDml41uWPO3Y=;\n b=RF43A9eZFE2DMDo6y/5FxYS9Hl3FyweGNEoJpvbeWymso9lRBOK0Q7EF+NGwYb85dv\n hnaOHJd1Lc/rPF5oklTG4fhjajKr0m7eg1ZTjVJg1YdZutLZHqxlDwtUQeEV3bp7A98f\n E1FlGnTCHzsNuFaHDlOMLZF1060gOBSTEdopxYf5/+BZUis7DYmOlyDQfOx3VVtoP9a+\n ZxGepFNiuVpUhzBraprYGG6kr94z6KIjY+HbW921Me76ZiY9+6OmeK/wNJOOHpG0cyOH\n +XERAcaccBtc27SWDyD9M8pMN1PcewTypdck4trYavNcj0YmVTRhHCrhnac6rAydAUwG\n nM5Q==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCV8y9i7/XZLfTw4SkA28KVyGZkQDM8YXqaipiFSVtBjGn0zwqAb2EIDtsYiwtsjKMzQj0h+crvPK+J5@nongnu.org", "X-Gm-Message-State": "AOJu0YxSbiBSV64e5OdvbrNvvueb9EKs/IpKRbKvtF+8x8MaIx9p7VVo\n NOXMg+dal/fdD3lSw/zGGbjln3ExWehNnhIe4soFovIzC17dD5XuaFB+k16sd2Bi6IKy7ivIeA5\n /cZU6D3P8OSq1ve9cREP+EVoPsafpdL48Y+lvvcrV/gAMfXcRlxckcM++", "X-Gm-Gg": "AZuq6aIdFAu1fnqumKuskDsS6VPhalemjXCiZGvBWDDTRii9vt60XiWvEUVZvcl+xDR\n ZO+vIG1Wt+Be4QDuzycQzQG+ZMDVO77y8PVQ3uHuXj8VOylJK3IMpEdwV2FGb+W2BBboShc+I3b\n nTShO5TTJRgqX2isknh7F/a3wc5paLx6RpczCWbvg/2TG8EBN4MMAfGk62zAd4hZ5eXoCmfHHs9\n C4tZvyNw+ebg+5WQv+fv+3vRfUQWnMVV018iCVRh6QN20N6wWBGEZVn6FsDuUBQ9DXRSP8TW2eN\n ru2KqFelenTt04iTsKoLixe8qgcLOKqpp5bq2WDamXZiWPqKYT0+eFOPkAVExEZVlz4wxVvKK7B\n YOMxfVYBm/fPruvB7p+I6GsAKp29GxBTsbOxIppsZpRT5CovY9fBNBMM=", "X-Received": [ "by 2002:a17:90b:3f8c:b0:354:c7f8:6d7b with SMTP id\n 98e67ed59e1d1-35693dbbc2cmr1055216a91.27.1770877585310;\n Wed, 11 Feb 2026 22:26:25 -0800 (PST)", "by 2002:a17:90b:3f8c:b0:354:c7f8:6d7b with SMTP id\n 98e67ed59e1d1-35693dbbc2cmr1055206a91.27.1770877584981;\n Wed, 11 Feb 2026 22:26:24 -0800 (PST)" ], "From": "Ani Sinha <anisinha@redhat.com>", "To": "Paolo Bonzini <pbonzini@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>", "Cc": "kraxel@redhat.com, Ani Sinha <anisinha@redhat.com>, kvm@vger.kernel.org,\n qemu-devel@nongnu.org", "Subject": "[PATCH v4 16/31] i386/tdx: add a pre-vmfd change notifier to reset\n tdx state", "Date": "Thu, 12 Feb 2026 11:55:00 +0530", "Message-ID": "<20260212062522.99565-17-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": "During reset, when the VM file descriptor is changed, the TDX state needs to be\nre-initialized. A notifier callback is implemented to reset the old\nstate and free memory before the new state is initialized post VM file\ndescriptor change.\n\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n target/i386/kvm/tdx.c | 31 +++++++++++++++++++++++++++++++\n 1 file changed, 31 insertions(+)", "diff": "diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c\nindex 37e91d95e1..4cae99c281 100644\n--- a/target/i386/kvm/tdx.c\n+++ b/target/i386/kvm/tdx.c\n@@ -405,6 +405,36 @@ static void tdx_handle_reset(Object *obj, ResetType type)\n trace_tdx_handle_reset();\n }\n \n+/* TDX guest reset will require us to reinitialize some of tdx guest state. */\n+static int set_tdx_vm_uninitialized(NotifierWithReturn *notifier,\n+ void *data, Error** errp)\n+{\n+ TdxFirmware *fw = &tdx_guest->tdvf;\n+\n+ if (!((VmfdChangeNotifier *)data)->pre) {\n+ return 0;\n+ }\n+\n+ if (tdx_guest->initialized) {\n+ tdx_guest->initialized = false;\n+ }\n+\n+ g_free(tdx_guest->ram_entries);\n+\n+ /*\n+ * the firmware entries will be parsed again, see\n+ * x86_firmware_configure() -> tdx_parse_tdvf()\n+ */\n+ fw->entries = 0;\n+ g_free(fw->entries);\n+\n+ return 0;\n+}\n+\n+static NotifierWithReturn tdx_vmfd_change_notifier = {\n+ .notify = set_tdx_vm_uninitialized,\n+};\n+\n /*\n * Some CPUID bits change from fixed1 to configurable bits when TDX module\n * supports TDX_FEATURES0.VE_REDUCTION. e.g., MCA/MCE/MTRR/CORE_CAPABILITY.\n@@ -1549,6 +1579,7 @@ static void tdx_guest_init(Object *obj)\n \n tdx->event_notify_vector = -1;\n tdx->event_notify_apicid = -1;\n+ kvm_vmfd_add_change_notifier(&tdx_vmfd_change_notifier);\n qemu_register_resettable(obj);\n }\n \n", "prefixes": [ "v4", "16/31" ] }