Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195859/?format=api
{ "id": 2195859, "url": "http://patchwork.ozlabs.org/api/patches/2195859/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212062522.99565-19-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-19-anisinha@redhat.com>", "list_archive_url": null, "date": "2026-02-12T06:25:02", "name": "[v4,18/31] i386/sev: add notifiers only once", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "664c561377be43c936f5b869537d11805195678a", "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-19-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/2195859/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195859/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=N91RSOog;\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=JBU0BMyz;\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 4fBQQ85r2Rz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 17:29:52 +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 1vqQAA-0008JS-Ag; Thu, 12 Feb 2026 01:26:54 -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 1vqQ9t-00088D-Mo\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:26:37 -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 1vqQ9q-0005Hg-RJ\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:26:36 -0500", "from mail-pj1-f70.google.com (mail-pj1-f70.google.com\n [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-550-rl7rtaKFN32K6QnAzU6ddg-1; Thu, 12 Feb 2026 01:26:32 -0500", "by mail-pj1-f70.google.com with SMTP id\n 98e67ed59e1d1-3545cc84ab1so19431821a91.0\n for <qemu-devel@nongnu.org>; Wed, 11 Feb 2026 22:26:32 -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.28\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Feb 2026 22:26:31 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770877594;\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=N2v6djobNSdTdF+YCpvzDQ17kkQi5jILZoPxzgDYLR8=;\n b=N91RSOogkor8hu4JuMLwNZd8DlGmGkooV474rc8tsq0fIADtW7tkplXofivGA1M2CkpyWT\n vuTTVZ02JHIgY/W8l0ydUcrtNeMKmOVxxJWS3oFjRLUwk7MIuR6W47NxbW7U9bQPuACLKd\n yvwQUce9cKFYIslXQY62gYQE8q20ftc=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1770877592; x=1771482392; 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=N2v6djobNSdTdF+YCpvzDQ17kkQi5jILZoPxzgDYLR8=;\n b=JBU0BMyzeegtxubNxyf5TWdESxO8A7/tQKZuWqCZJZmqUsnA34VpLrwvRxm2QJaSn9\n r+7bvjrZFjeCfs2JJoU6BZrwtFuPf4+1lAld8dIjr25lc49CDVIjyxiMVE2QSKbkDhva\n iz3b6tTLVx5ICRQqCCNOh+O/XdDTZzEdYTZxGXDtoA4i6NZPCe3cX04ISkgYfSPGwmXh\n Pma0fjt7tJt1La2gD7j/dHJO1OE6y7D+La+/XOc/fRd92+VW1L7ls51yvAwTLkmkYxv2\n zYkPLkN9wtrAq9YSsc4MerDpua9WmWqgTFhcNK8078iwfG01xIAWiHLGTRMhBtP7wXyP\n JR/g==" ], "X-MC-Unique": "rl7rtaKFN32K6QnAzU6ddg-1", "X-Mimecast-MFC-AGG-ID": "rl7rtaKFN32K6QnAzU6ddg_1770877592", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770877592; x=1771482392;\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=N2v6djobNSdTdF+YCpvzDQ17kkQi5jILZoPxzgDYLR8=;\n b=Puyt9NFIbww/OvzdoPyLa7DRZia9zj0vW09iyireN2eA/pAOvUq1djn27VJSOJ79sT\n UCJ/bBRcQ6PQr7tjuwqoDZTvU1eqUhn6/F/fEQFc6K/AIfqpltlSunYhIc2DL/+VDXk0\n qtx5F2AeU5eRN8+uy/uDL9ydZECOj/ow1Zjk6hQbJtLjSHaa8eNnMX/Ylx9MZqAFJbUu\n 9WXFZt+f7wrunN5KcunpbilvNPASqVD2bQ5kt4DZxKBS/UftOTnoHCXeyc8JqcRNbQgw\n OIc5hPwpZUSpf35kkkGvAgkx5CflgAQvcMjfGox+KEMLN7JdWAQJSodmnsSwFBAks2Yy\n HL5g==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCVEgb54NbT75TLwQZ01RwNP/dmWd+y5BUO46hGnUeTwfhJStVrjbD3nXRn/cKeBLR1aj+AwV1SMznH6@nongnu.org", "X-Gm-Message-State": "AOJu0YyVUaprweKjIVM3T5ODgAF6DuM/LfGpGKjNGMo12OkHwPp1MovN\n 44UaoT6Y/gb2NbNWc7duWHiib/2uY4nh0z0DuuW7yliwlkJ+3rSoS8+O9VFq80V1mTKkihx6b3I\n RmfOuWnwZZWA+xf2EHQS4rTBYAQKSOMnQASbpjpNIfLALDc3dKWS/0nQG", "X-Gm-Gg": "AZuq6aLJwJgQ4vI2aaBr8m8NtijBZbNVoh4/3ASotLWNYjBnuj9Z5hXmVQgTILx6EHF\n G0zkliNNEHD3YcSQnnsU9sJ6if8CtCqVbC3n5yeOz8DlzsPmiZ0PH4hWVR7xXJ9foJ1NxnN3w7N\n m0tdNIxUGS/2DNA/72wM0lBWn8qDS9jvEo3Gjtr99jWRQvUZsp4ZS+u4bsLESjwv88ER94HmJ1E\n bHTi2sBTVCTfXkcsIWQvA82Av/28GcxlsgvfhH0xcvDh9snlP0UfIjV8SRGFLY1TFlrae8JP1jk\n GYqcVvhzbs789CCK7L5lNaTPk3Jc6VR/pyj2gBD+OtnGKJES1hufKw+YCvLdV/ZP+xZnMIpujp/\n JOWUNMY4ZLfyMx0PAHTQhyZpFM/ClZAWloRIokaEr1C/w22Z4mhDaMS8=", "X-Received": [ "by 2002:a17:90b:350c:b0:353:883:affc with SMTP id\n 98e67ed59e1d1-3568f3e4ccdmr1651316a91.18.1770877591667;\n Wed, 11 Feb 2026 22:26:31 -0800 (PST)", "by 2002:a17:90b:350c:b0:353:883:affc with SMTP id\n 98e67ed59e1d1-3568f3e4ccdmr1651305a91.18.1770877591360;\n Wed, 11 Feb 2026 22:26:31 -0800 (PST)" ], "From": "Ani Sinha <anisinha@redhat.com>", "To": "Paolo Bonzini <pbonzini@redhat.com>, Zhao Liu <zhao1.liu@intel.com>,\n 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 18/31] i386/sev: add notifiers only once", "Date": "Thu, 12 Feb 2026 11:55:02 +0530", "Message-ID": "<20260212062522.99565-19-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": "The various notifiers that are used needs to be installed only once not on\nevery initialization. This includes the vm state change notifier and others.\nThis change uses 'cgs->ready' flag to install the notifiers only one time,\nthe first time.\n\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n target/i386/sev.c | 36 +++++++++++++++++++-----------------\n 1 file changed, 19 insertions(+), 17 deletions(-)", "diff": "diff --git a/target/i386/sev.c b/target/i386/sev.c\nindex 260d8ef88b..647f4bf63d 100644\n--- a/target/i386/sev.c\n+++ b/target/i386/sev.c\n@@ -1920,8 +1920,9 @@ static int sev_common_kvm_init(ConfidentialGuestSupport *cgs, Error **errp)\n return -1;\n }\n \n- qemu_add_vm_change_state_handler(sev_vm_state_change, sev_common);\n-\n+ if (!cgs->ready) {\n+ qemu_add_vm_change_state_handler(sev_vm_state_change, sev_common);\n+ }\n cgs->ready = true;\n \n return 0;\n@@ -1943,22 +1944,23 @@ static int sev_kvm_init(ConfidentialGuestSupport *cgs, Error **errp)\n return -1;\n }\n \n- /*\n- * SEV uses these notifiers to register/pin pages prior to guest use,\n- * but SNP relies on guest_memfd for private pages, which has its\n- * own internal mechanisms for registering/pinning private memory.\n- */\n- ram_block_notifier_add(&sev_ram_notifier);\n-\n- /*\n- * The machine done notify event is used for SEV guests to get the\n- * measurement of the encrypted images. When SEV-SNP is enabled, the\n- * measurement is part of the guest attestation process where it can\n- * be collected without any reliance on the VMM. So skip registering\n- * the notifier for SNP in favor of using guest attestation instead.\n- */\n- qemu_add_machine_init_done_notifier(&sev_machine_done_notify);\n+ if (!cgs->ready) {\n+ /*\n+ * SEV uses these notifiers to register/pin pages prior to guest use,\n+ * but SNP relies on guest_memfd for private pages, which has its\n+ * own internal mechanisms for registering/pinning private memory.\n+ */\n+ ram_block_notifier_add(&sev_ram_notifier);\n \n+ /*\n+ * The machine done notify event is used for SEV guests to get the\n+ * measurement of the encrypted images. When SEV-SNP is enabled, the\n+ * measurement is part of the guest attestation process where it can\n+ * be collected without any reliance on the VMM. So skip registering\n+ * the notifier for SNP in favor of using guest attestation instead.\n+ */\n+ qemu_add_machine_init_done_notifier(&sev_machine_done_notify);\n+ }\n return 0;\n }\n \n", "prefixes": [ "v4", "18/31" ] }