Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195843/?format=api
{ "id": 2195843, "url": "http://patchwork.ozlabs.org/api/patches/2195843/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260212062522.99565-5-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-5-anisinha@redhat.com>", "list_archive_url": null, "date": "2026-02-12T06:24:48", "name": "[v4,04/31] system/physmem: add helper to reattach existing memory after KVM VM fd change", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9aeb1509bc3ef147ec4d000dc8fcc1791abd343b", "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-5-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/2195843/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195843/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=UA/8+BUz;\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=LcR6n4HX;\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 4fBQNy4gwjz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 17:28:50 +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 1vqQ9Q-0007b9-B6; Thu, 12 Feb 2026 01:26:10 -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 1vqQ9H-0007aP-OW\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:25:59 -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 1vqQ9D-0005Cy-IE\n for qemu-devel@nongnu.org; Thu, 12 Feb 2026 01:25:59 -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-131-qxpI8AkIMnaIe5PGyGXssA-1; Thu, 12 Feb 2026 01:25:49 -0500", "by mail-pj1-f70.google.com with SMTP id\n 98e67ed59e1d1-352de7a89e1so2597503a91.1\n for <qemu-devel@nongnu.org>; Wed, 11 Feb 2026 22:25:48 -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.25.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 11 Feb 2026 22:25:47 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770877551;\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=CftdgO1HF5JRk8FcUFdEbJ2ICGVN5WChV4mkQQejD6c=;\n b=UA/8+BUzd5t4aralgdZgzJO8S0faIpabSpWs1bSkd9+0LD3RAIG3L0gXhZh087mNfUyMp4\n y0qCcsWxR5rKVAJBrRTq39Tts1KziQAJDrpiVcVCz0ASNoNIUc81QfepwDOpnj3A9/Am7m\n 8k1A/qk3s2CTBiQpblvajdFOOLrifxE=", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com; s=google; t=1770877548; x=1771482348; 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=CftdgO1HF5JRk8FcUFdEbJ2ICGVN5WChV4mkQQejD6c=;\n b=LcR6n4HXpcgdzNuK9X2ewFpR8tlstAQcdjqPJztnhIJdTUfXhB9ImtKtg2QVWUWRxA\n tlR/1H3k4iinkRDcJcuJoBhq0lm1ujd4rumD/B/sz0ot1HjiBwJ366Xer5us35x6mIfF\n UX8wLCf2OugomjFOttElXyrBTtzyTL6iQ+AA4dERf6oIimxgF3Oxv6ioqdzKKSKFBfoT\n UiylrgQrT0UNq3ioauUR3iCRT8Ug4hS25okZxZFqvgYQnTIAy6DVc5P3gO1PXzePZyFu\n cQsGpsu0qoZQ24IT+D6ThQGls65Z6mFrc2Ov9jHPtOn2Ri6/hc7jGuk1lpAJmGYQxT4I\n VE4g==" ], "X-MC-Unique": "qxpI8AkIMnaIe5PGyGXssA-1", "X-Mimecast-MFC-AGG-ID": "qxpI8AkIMnaIe5PGyGXssA_1770877548", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770877548; x=1771482348;\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=CftdgO1HF5JRk8FcUFdEbJ2ICGVN5WChV4mkQQejD6c=;\n b=iGCka8XYapVSFtCF3A6lLoJ1RBRQZYWvpLGST94CgNpiX708X+GZm9FVrcqELbetlL\n JieM5VnH8lMR7KlAfqjJOp1NYEa1OmkgCE6AGfojaxZoLiplpJul5EIqLaSeE4HdTWul\n 6fiA1Sz07wc/y1UcDQt93MhN5Nmi4mUhDsSAIsVemhkBtzuvQRT4bMCsWsViEbNT2GR3\n /2aEp6wK3MpLLj+4PloVhC+Nn9qWZxaHkMMXwsCXIj9r2CRggliulG1NPvPko7kT0iSA\n SVQcE7KMBeX79W0QI4FTY8x7eSuLO1gQBP+/DN6nQ8NU06hVs5sMpEnEwNyJOK1TqP6r\n GpDQ==", "X-Forwarded-Encrypted": "i=1;\n AJvYcCXlk1zJJr6W/kQKNEAFSaZBt0HjFG28QEDo7rzwQzK5YOT2/Gq2iVmLJcvP7zSN/5udMTe4zheFos1N@nongnu.org", "X-Gm-Message-State": "AOJu0YzQUM6qmm9xJ2/YQvOaXLDRmuId3tCnCzz7Kbe0xA6JL22LkZcE\n 6SH+QzqXt0lAFl40hnIBUKc/egrOFLrfKUmhE+AR1iy++YHecs1KjPNAmh6Ie/fbqeSqhhJPa56\n Sk6ZPHmWpN2U8KekOMzHxYl77tDRTGnZb98Die2QQrra4S7W9VpLmzIhs", "X-Gm-Gg": "AZuq6aIwxNj2PmB3i3SyGfeRNhONyibI4A6IQDqQsXrpbnTCb4IHwVoUegtZLfEW4zb\n AY9CDwy+SrciAF+YHt3Rs4iXU0oCtvMKqA0wrQzzwDnHeZ5djjrhDr3BAdF3OPScLdijIrnc7Ub\n GcKyomeqjbvSZBxg6ytmBoHl1xLiEnHiipD9H2yJh8Hrecc8b/pwhjxSDq9dU9/8yAHmzpNcMlJ\n mjzUEXh4X9mtKzKRflQ8YnhKos/x2HOi2LOjF0/2vuBeYFxPHQRvweWEG4fCpf+VG+ZbaLqeg9A\n YdMYJw12e97GX216LePA+hthbGkp6LTgmM+iGuzvGEBFjStqDskjcb++sfH3WbQU8BF7CCFGsLC\n HfR7Sir5VEIuDvLOpfuGjO8LJb4u+Mty9WS+cA3P8uqJIYIPiUtQ43KM=", "X-Received": [ "by 2002:a17:90b:4d84:b0:343:684c:f8ad with SMTP id\n 98e67ed59e1d1-35693c924e2mr1222981a91.4.1770877548125;\n Wed, 11 Feb 2026 22:25:48 -0800 (PST)", "by 2002:a17:90b:4d84:b0:343:684c:f8ad with SMTP id\n 98e67ed59e1d1-35693c924e2mr1222970a91.4.1770877547789;\n Wed, 11 Feb 2026 22:25:47 -0800 (PST)" ], "From": "Ani Sinha <anisinha@redhat.com>", "To": "Paolo Bonzini <pbonzini@redhat.com>, Peter Xu <peterx@redhat.com>,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "Cc": "kraxel@redhat.com, Ani Sinha <anisinha@redhat.com>, qemu-devel@nongnu.org", "Subject": "[PATCH v4 04/31] system/physmem: add helper to reattach existing\n memory after KVM VM fd change", "Date": "Thu, 12 Feb 2026 11:54:48 +0530", "Message-ID": "<20260212062522.99565-5-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": "After the guest KVM file descriptor has changed as a part of the process of\nconfidential guest reset mechanism, existing memory needs to be reattached to\nthe new file descriptor. This change adds a helper function ram_block_rebind()\nfor this purpose. The next patch will make use of this function.\n\nSigned-off-by: Ani Sinha <anisinha@redhat.com>\n---\n include/system/physmem.h | 1 +\n system/physmem.c | 28 ++++++++++++++++++++++++++++\n 2 files changed, 29 insertions(+)", "diff": "diff --git a/include/system/physmem.h b/include/system/physmem.h\nindex 7bb7d3e154..da91b77bd9 100644\n--- a/include/system/physmem.h\n+++ b/include/system/physmem.h\n@@ -51,5 +51,6 @@ physical_memory_snapshot_and_clear_dirty(MemoryRegion *mr, hwaddr offset,\n bool physical_memory_snapshot_get_dirty(DirtyBitmapSnapshot *snap,\n ram_addr_t start,\n ram_addr_t length);\n+int ram_block_rebind(Error **errp);\n \n #endif\ndiff --git a/system/physmem.c b/system/physmem.c\nindex 2fb0c25c93..e5ff26acec 100644\n--- a/system/physmem.c\n+++ b/system/physmem.c\n@@ -2826,6 +2826,34 @@ found:\n return block;\n }\n \n+/*\n+ * Creates new guest memfd for the ramblocks and closes the\n+ * existing memfd.\n+ */\n+int ram_block_rebind(Error **errp)\n+{\n+ RAMBlock *block;\n+\n+ qemu_mutex_lock_ramlist();\n+\n+ RAMBLOCK_FOREACH(block) {\n+ if (block->flags & RAM_GUEST_MEMFD) {\n+ if (block->guest_memfd >= 0) {\n+ close(block->guest_memfd);\n+ }\n+ block->guest_memfd = kvm_create_guest_memfd(block->max_length,\n+ 0, errp);\n+ if (block->guest_memfd < 0) {\n+ qemu_mutex_unlock_ramlist();\n+ return -1;\n+ }\n+\n+ }\n+ }\n+ qemu_mutex_unlock_ramlist();\n+ return 0;\n+}\n+\n /*\n * Finds the named RAMBlock\n *\n", "prefixes": [ "v4", "04/31" ] }