From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034865; cv=none; d=zohomail.com; s=zohoarc; b=AdGHJUyE1ijqJAOOquO6FF0sflwKOPtcdwAEyYvagZzvgsinegZkzrF2uWWjrEJY8XCwyu/1Qp4Qr/kKbfZ4MkHCQRItBRi5MIz8jIcFmV9tv+eTfMA+TD3EvhgjqYIKT5Aj6L2v7IMCHkOWRGe5ke0Pm2OzPF+UpWobqNdcA+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034865; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xizELMYQfmmT5ObcTxByFl2OFqT3bjOAHOsRsg1TW1Y=; b=nXNxqSDQ1AfIJF+E9V46kthJgDfGrGeBDhZE9HtH59F8xiRzprGEnbObROgixI662pK6PJSEx/csrDTsC7RhSK9gdfVB+gdi2JKyXEQXkYF6L21od3yYEGErXMgExHRnIY2Meks5jv3v8zCpS/OxP81CoUqyAYC9MEj72TWrCq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034865964788.066118809721; Wed, 21 Jan 2026 14:34:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1viglq-0007fv-Cr; Wed, 21 Jan 2026 17:33:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vigln-0007ew-Ha for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vigll-0003gn-6R for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:47 -0500 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-37-cbLtoMXSPNilzSYH8mp20A-1; Wed, 21 Jan 2026 17:33:42 -0500 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8c52c921886so42800985a.2 for ; Wed, 21 Jan 2026 14:33:42 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034823; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xizELMYQfmmT5ObcTxByFl2OFqT3bjOAHOsRsg1TW1Y=; b=PzNY7RVWtzvWeXQBBgSE2lJ2iqgHFE9JmsHMHoPa6gEP3xYsLT/pTdO22LuobezcjvA7qP KJVb3PEU3wLTatbv9Xnc6Cy3kqTLQOtFMLwpuj8DGYl160UdmKaRJU2podZAE7RvcPoUY1 cx4ALp1Iny53PHvAVnDaTPqhh30MLMc= X-MC-Unique: cbLtoMXSPNilzSYH8mp20A-1 X-Mimecast-MFC-AGG-ID: cbLtoMXSPNilzSYH8mp20A_1769034822 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034821; x=1769639621; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xizELMYQfmmT5ObcTxByFl2OFqT3bjOAHOsRsg1TW1Y=; b=a8aVECBeFpla21B/9/haTvAOOTGr0dHFwFeRAeR6PY8P6Ntu8YW7ydTkqNJFLmOGJP WlnddGn3rAP0D5Re26cnNQg2zgkIuw5/r6VMPOvt2iHm/v5jnUj8xUAlS2MASQ/sq8MH CwlDbRHEVtdWd6DSm5sospD1jltKNEk7AsEPtZWGAPYrb3wHtxcecdZQ2tRdJ/xQLx/J YtLwu4ch1dVTrAQ7HNveihluwmQWdiW+5SjjnEHMdgYss0O6p0n81W2taNVgATFyQcLL sZ8sQ+4XJgw8nP54v1LtsND6oJ/1tEXQ8iWgs1y0pQxYTKyIaOE/43QYXPacEx1AVulY ifgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034821; x=1769639621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=xizELMYQfmmT5ObcTxByFl2OFqT3bjOAHOsRsg1TW1Y=; b=QVN5lmnPCtqm3R+OrsciO1EU8Iyelcom/PY6wl5e/bZ+OVjiT87PskvEkEkWUDf2dq MUUCqACwT08bm///6Yu0x58xkVQ5Py9cbWR0lwWJwrC7cvmQYMgVHkxtEz4hbHQL7ays Bd8T36Kepz9/EL48A/C87TEzBMyX5SddBGwX4AVHPdbr6qXh+efjYJE0MOxXwkYzIdX6 ZdwZCr6DwYnpppyN/zAe1qpCvDU3X84o6i3Kxom9UbEy+PGnp9UhdLo0Ut6kpXDf+nvs 6GfpHx0CuXFMMMlauCHco+GFeoXQ0Eoh/0hUKBAxKY4dGRuFFZlH5lnQKdP6NXSU+D9B x++w== X-Gm-Message-State: AOJu0Yx0Azd9S/0DJeF31fwWWiJoffGo3dGJtAWwB/G0CqQSaqWDJvOx Jz+EGGNOeBZpcbfwRsVS/baRADKfaBUk/lgZzmwPt4kqrX3h4Ew5nIBDThrLrh4jEqcYTkN7SDC /F3mcbbc2gL5P3b3vMVoaitNt+o+GXjfh/bD8KqI3rc3ZUw/l3NENVE5IVOD6O3/ygUzYMUAC6F u237PV/aNsP+XEFLsehbXJUVCG/+y3r39zwG/5fw== X-Gm-Gg: AZuq6aLGatb9LXZbAlzfBz7pFwgCnWw5x2Jt/2cml2kSLlUMldg8HgvrnajTypS7z52 g9SRggXSMFY7WtPBInFnlV74ujsO/HxW4r4jmut6LmwxKtrnsjOAbbtNcY7SxyKYmcU30zkM49U 7eCPB1pAVVFXYn2YFIuYlVWdFA+2TpXFr1ODZ2401dFDJnRR+D+3gO+OrNRkClt1pUVpqgMXror Ytewd8OVCv13Fa2YDSsd61tZCw2E/HPg/suMGoBgjxJ7CS7zModA1oFvM4imqrm6v4nF6UeRyL9 ybSmCvghY6xnhb2EP1CU6O202Dwqfct7XNrr9aEdS5HbrII2ijXjgQMpYeKviHwCkHOb81XaM7i E X-Received: by 2002:a05:620a:4492:b0:8b2:ea3f:2fa5 with SMTP id af79cd13be357-8c6ccf223aemr801828885a.69.1769034821344; Wed, 21 Jan 2026 14:33:41 -0800 (PST) X-Received: by 2002:a05:620a:4492:b0:8b2:ea3f:2fa5 with SMTP id af79cd13be357-8c6ccf223aemr801824985a.69.1769034820747; Wed, 21 Jan 2026 14:33:40 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 01/10] migration: Introduce qemu_savevm_send_* helpers Date: Wed, 21 Jan 2026 17:33:26 -0500 Message-ID: <20260121223336.3381912-2-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034868818158500 Content-Type: text/plain; charset="utf-8" Split qemu_savevm_state_header() into two parts. This paves way for a reuse elsewhere. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/savevm.h | 1 + migration/savevm.c | 58 +++++++++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 24 deletions(-) diff --git a/migration/savevm.h b/migration/savevm.h index 125a2507b7..5d815af742 100644 --- a/migration/savevm.h +++ b/migration/savevm.h @@ -37,6 +37,7 @@ int qemu_savevm_state_prepare(Error **errp); int qemu_savevm_state_setup(QEMUFile *f, Error **errp); bool qemu_savevm_state_guest_unplug_pending(void); int qemu_savevm_state_resume_prepare(MigrationState *s); +void qemu_savevm_send_header(QEMUFile *f); void qemu_savevm_state_header(QEMUFile *f); int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy); void qemu_savevm_state_cleanup(void); diff --git a/migration/savevm.c b/migration/savevm.c index 3dc812a7bb..e26656cca3 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1282,38 +1282,48 @@ void qemu_savevm_non_migratable_list(strList **reas= ons) } } =20 -void qemu_savevm_state_header(QEMUFile *f) +void qemu_savevm_send_header(QEMUFile *f) { - MigrationState *s =3D migrate_get_current(); - JSONWriter *vmdesc =3D s->vmdesc; - Error *local_err =3D NULL; - trace_savevm_state_header(); qemu_put_be32(f, QEMU_VM_FILE_MAGIC); qemu_put_be32(f, QEMU_VM_FILE_VERSION); +} =20 - if (s->send_configuration) { - qemu_put_byte(f, QEMU_VM_CONFIGURATION); +static void qemu_savevm_send_configuration(MigrationState *s, QEMUFile *f) +{ + JSONWriter *vmdesc =3D s->vmdesc; + Error *local_err =3D NULL; =20 - if (vmdesc) { - /* - * This starts the main json object and is paired with the - * json_writer_end_object in - * qemu_savevm_state_complete_precopy_non_iterable - */ - json_writer_start_object(vmdesc, NULL); - json_writer_start_object(vmdesc, "configuration"); - } + qemu_put_byte(f, QEMU_VM_CONFIGURATION); =20 - vmstate_save_state(f, &vmstate_configuration, &savevm_state, - vmdesc, &local_err); - if (local_err) { - error_report_err(local_err); - } + if (vmdesc) { + /* + * This starts the main json object and is paired with the + * json_writer_end_object in + * qemu_savevm_state_complete_precopy_non_iterable + */ + json_writer_start_object(vmdesc, NULL); + json_writer_start_object(vmdesc, "configuration"); + } =20 - if (vmdesc) { - json_writer_end_object(vmdesc); - } + vmstate_save_state(f, &vmstate_configuration, &savevm_state, + vmdesc, &local_err); + if (local_err) { + error_report_err(local_err); + } + + if (vmdesc) { + json_writer_end_object(vmdesc); + } +} + +void qemu_savevm_state_header(QEMUFile *f) +{ + MigrationState *s =3D migrate_get_current(); + + qemu_savevm_send_header(f); + if (s->send_configuration) { + qemu_savevm_send_configuration(s, f); } } =20 --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034865; cv=none; d=zohomail.com; s=zohoarc; b=D7n3SlFHBOS++cyUeOWbLv/Ohl1GzxqTdzAK8i2DFy/PHwwCqmXxOPxnPlci1KR7UZ2I5WNKbjG3ZlBBP7lNUbt86L2yt/hT+U3dhyRdyRBzDI87H88Fqkp+Q6OPtk+nNSJ7ykAx8MDTjNcUXMpImK3EfsyKUsUBjbxqUm8Fmvk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034865; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BEWZVIKSCHJzFmzyUxO8KkGG7d5cJbi2hrksbi97pLg=; b=aiy0PG3BLNjrCqe4HdnGFgNlJYcNEWHnyDfdHs8pCz9OrL3jQdYaZ+mZqv3V09/XGI1b+jNC1/KKFiIW+hhIWZW2sqOIzPCn2EpthT2/hJ9au0/vGv6Q/arFDdPDBQQ3UIB7f3mRYLaA1cJuwTblIGBPJG9t/fluHCkncXeLcg0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034865352656.5691574019359; Wed, 21 Jan 2026 14:34:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1viglo-0007fS-Vd; Wed, 21 Jan 2026 17:33:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vigln-0007eu-Go for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vigll-0003gu-Nj for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:47 -0500 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-22-QgRYv9GnOfi4hyjmQHLSlQ-1; Wed, 21 Jan 2026 17:33:43 -0500 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-8823f4666abso9589566d6.0 for ; Wed, 21 Jan 2026 14:33:43 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BEWZVIKSCHJzFmzyUxO8KkGG7d5cJbi2hrksbi97pLg=; b=NXazk1jllzKTVGf2LeLCCKQyZutPmgzgGM2i0T2vlLqY46aRZwuup2DtFB5IzlEMpJ+3TJ r1IyJ9w7VvfHyAr3fnULzzooAvwcY4uzbi+icy0E7XqSqWkPzksp8EoCWE5L9RS73Hcavv xPhYqL5A7A2ZvtgHK4raVjH1IDpBNnE= X-MC-Unique: QgRYv9GnOfi4hyjmQHLSlQ-1 X-Mimecast-MFC-AGG-ID: QgRYv9GnOfi4hyjmQHLSlQ_1769034823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034823; x=1769639623; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BEWZVIKSCHJzFmzyUxO8KkGG7d5cJbi2hrksbi97pLg=; b=URRY7sGxM4Iq/V8dGi5ElNpHMkpr0yGFzLa/NWC1CPEZ80QelshPYa5+senxlujaVR 9v1Jj/l3z1jj2AmTSlV5a/xo4RWnfo439VGIRShrhUtucqksCESCtQBngwCkI2AEe/w4 6Fpa60ys1KKlifN2Kqy2LQis3pwbrly84eOol/4kpCBmSmqkS50xaQAgU3x2pkSIODLj of6ttq9qrq4Wf+G1aCVCpLBWPUAx1OXtId1w8GFgZaA1LGGfr6qDw+B3XSyjgVJcYLYw 0X/jvluF0B4aAd8REYlV+iFu1JYvK1Gl8cjCfm1XT1d8sgHfpJWBjTjAuKDKBucCujmV nV0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034823; x=1769639623; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BEWZVIKSCHJzFmzyUxO8KkGG7d5cJbi2hrksbi97pLg=; b=pbfE3Ict1KVVUH4e3gqTaEZgDAJ3BQX9x1EP80UqbfnBnb/fQ71ir6MMvICcfH1NoH U5GtVc/FM38YuJUnKaXPrIU1k2yusWtRQPVVb1nLKYMWE9Gq4Q+NPIXDY6xamcqZ9WWR Ax0fk02X9uwTVgb06tMMZ5swMz+UjEezHwVzaVWQT1HZDVW05gMeoDK7FKh/sM358gFX KEgU4oTPBHdtrKrijr0RfvMLA3EqETannt3nw4/C8CWA7PIXLwYJb8FhKUsIpNBfUtpF DuLiz69owEUhPEhmnLAurDagVpCbzY0tcWm14VnU+9pemkp8cKy6P0VFOTyu+/gcK/EK DvPQ== X-Gm-Message-State: AOJu0YxldTczREyXLVkF/IcEvGq6q3tTIWf8HimpMZb8OTdnIr/0CFh4 gzz/hImaWqL1qWm8MLXWn+z4Su0pnEwD/DkvcnE9aFtCP4jlxJEm7pfWlpXm6+HoV/q5FKKkbcB /kdzrxjRJPss0RkVk4dp0vSaRw6ooPNivzDTe8lJyS3w7ywDIXx9s6QS3+QFRCtfbYVPH6XYWOE 06b/RHd2EaJvW32Fi8e+7DQfEmmFc2G3a9jrandw== X-Gm-Gg: AZuq6aI72wE560kn1yEIBOhO1Lzk9zgU1DHatPndInXJ7WRBRVxavEkksClgNu3evRR LG37zhIt2wdoXqgfAYGvBZe1CKblai4i3vvcAA1bGJLSzLX+pyG5M3AlIMtBFTXvf1BxOoE1/nV xX/ExE+YRnrlz+Rb23DrnPN29gzWZJiYCS7RwtTP0X1LZbC2T3QuYiWhgt2DFSp2nWcbcH8jSKJ 8sQT04sFWwvYue7eD8AX1dP/5gmQzS86rLf7YZczGCjh8gp5pLdnGOX/I6lhr/kkJ34OF4uOKYd 190U0M+Wum2IjwOHYdFifDnXVOUQJD2zKj8ZZInjF16xvKk7qsSaIWPccvAoSi0Ksn4BcQvMs5B 0 X-Received: by 2002:a05:6214:f22:b0:894:7798:8f6 with SMTP id 6a1803df08f44-894779809c2mr39882546d6.5.1769034822928; Wed, 21 Jan 2026 14:33:42 -0800 (PST) X-Received: by 2002:a05:6214:f22:b0:894:7798:8f6 with SMTP id 6a1803df08f44-894779809c2mr39882196d6.5.1769034822439; Wed, 21 Jan 2026 14:33:42 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 02/10] migration: Use qemu_savevm_send_header() in qemu_save_device_state() Date: Wed, 21 Jan 2026 17:33:27 -0500 Message-ID: <20260121223336.3381912-3-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034867636154100 Content-Type: text/plain; charset="utf-8" Reduces duplication of the other path where we also send the same header. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/savevm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index e26656cca3..64bf445c98 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1872,8 +1872,7 @@ int qemu_save_device_state(QEMUFile *f) SaveStateEntry *se; =20 if (!migration_in_colo_state()) { - qemu_put_be32(f, QEMU_VM_FILE_MAGIC); - qemu_put_be32(f, QEMU_VM_FILE_VERSION); + qemu_savevm_send_header(f); } cpu_synchronize_all_states(); =20 --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034865; cv=none; d=zohomail.com; s=zohoarc; b=BevGSt+JCZoB91xZJihdGKK9VGQIjbGstQJiQDbmCxtcq9ifjOjHmqtYaSTKhtKkApfYCWDqzY7AG03daEWUpUOOkCg8Xprgf/xWC2Hchxbmul0NU5VQWRiyCdJkvmlN/cHjlRzrR7d5kamKGFRAtkZTpObCDPZe2nI6L1oTh9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034865; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mLN37lJdAgxBE/XKVFsvnOge/dkSRkaPBYJX0ABeB10=; b=Zc/11UjebtUpi96vYRgqCnEo9KBuyVhYiWcYf00+pAVvohqmHTenVWp2mBA9xJMMdshChEAWiw422Co4Q7HNra0dKL8ZzZixo43AJ1JKIL0GLl34YtLpJCM8gpn2tQgY2FgWvAfpj10d+wnXCEUcOjSO0/wMhT5FlP9c1XaExwE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034865301161.69249688404477; Wed, 21 Jan 2026 14:34:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vigls-0007ge-6r; Wed, 21 Jan 2026 17:33:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglr-0007gL-7g for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglp-0003hd-Pd for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:50 -0500 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-479-gyhcylW5Nu6JDTvQ_BT0QA-1; Wed, 21 Jan 2026 17:33:45 -0500 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8c6d9111960so78627185a.3 for ; Wed, 21 Jan 2026 14:33:45 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034829; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mLN37lJdAgxBE/XKVFsvnOge/dkSRkaPBYJX0ABeB10=; b=SpB6XW+gn1UVldfJWYEpM4+ohQbc/nCTww2XOMlF99osrOM/We+Ac1bfzmGAY7/DWRH0s9 3kXXMhMRg32VxMcAAq7roFY6mlQJwZqxlkgYtUvBDw6qla72at10HcksLmHcvjYezvbpF8 K3MtZfTC4DfireW/pCXi423o7DteCT8= X-MC-Unique: gyhcylW5Nu6JDTvQ_BT0QA-1 X-Mimecast-MFC-AGG-ID: gyhcylW5Nu6JDTvQ_BT0QA_1769034825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034825; x=1769639625; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mLN37lJdAgxBE/XKVFsvnOge/dkSRkaPBYJX0ABeB10=; b=aZaH59qBYLaKUgfK7DcLX+5/cazgXRXlLVw/Ka6GM1NedXUcFTX2m3LidUZCdyc2F3 qgLhEQxitdVDvpelISngp8QQNEtfpe0splnetTsaGeyqNS9lSqxswMP+K+rhrOoqt8qK fAOPGUbyGE3A9vZ/wVsOvraKosSE+nOIklBo1A0BLj12GaaklgUpRRv494BBSKjuCYrr JBhstju8sl3C3ipaS8BCgG3xn7vmofb2zwtJS8GTHWR4YS4JFUqiU/uHhDZT3LV2RB75 /21VzfZ7GJ0IhGjhk+umjy37fuwM9smjLC0o8iomCdAQ+2sNf8ATWnoYAgr/i4BADoUX EXBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034825; x=1769639625; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mLN37lJdAgxBE/XKVFsvnOge/dkSRkaPBYJX0ABeB10=; b=dOZc9FusKXnd6PmW2oLWmp2RhcAvMKLBmWE4Y6Lo7y46JNFM45urnvzWLqVkLLZW+j hVvBqklJTFmLH1+CWCEmu7fmhIxZ4H9scL5ed+ALx2F/NIzrPKUwaW6v5VEOExb0DCLi /AMq8OO+MPntFQluT2Xo+mze9kCCAsrs6eUsTJYP2WYYYV5LA004auiG8A+9YXPuCtsO eaHUR+010pfhDqa/aHA+4HZ1qVeATj1cnsV8MhuiihbLK25Apqwl/yA9MDt8XI3jexeL rQV4CPGgJuF8QZY/cFEFSs6Cuv5gLoWmY4+bxXSqzCsDU1pgF3guC49+xb0X6HWcidwu prJA== X-Gm-Message-State: AOJu0YwE7LfgFi+Vf/rwt0ek53HFfXnFIwC3AynS+9O/+uBQjZnIXfSB IimQvGSzrtmCeLBY+8LZF9SE8dOt+xIFAaKgyg70itbToK1RixDN0emImPsFBm0HRVJOdpg7Jsc vcNfSboAe+35U6kbcuoCgRjwu7PRtpo4xPueN21IRD2lK2W/YUY4A4xMzYp9oA3SWrbtSBvrX+K 4LGcaQeHVDQVvuzEwbdx3oDOFsv45tQbbHMHh1RQ== X-Gm-Gg: AZuq6aJlvQpO/Ob/vNJ7i5jF1G5pg+tEWR2Po45JoNXCR5coHwkT5s3J4MBqtZxROXh HdQ8gq95Mw5WkEg5UlwYY/h12nzukTmw5aKOZkUPGpXtfdTP8ZRF9tKlf9Iv/bEKE9BAnSjNFpq v08vZ6vhnzimZpJlq/Bt/N8EZpMmqMJZYorml2eh5hop+TbzIZtUYkw5t3h8CUYJ97g3Qr2vVhL BFCeqe6nTDf2smop/9m0TGL0ttq+5cCPcOEmE/VUnLQcEaYH5AwCkTCdnIbRVmRkuBJD08xruVM XsO7fs2H3ZzcEeeAwJeE8VGwiBPoQbVpnqA9ESiAT35YV30rKEsWQ69JNgOPTC1oK5NVLwqmuTh g X-Received: by 2002:a05:620a:4627:b0:8c6:253d:5187 with SMTP id af79cd13be357-8c6a68bd2a5mr2523061485a.11.1769034824597; Wed, 21 Jan 2026 14:33:44 -0800 (PST) X-Received: by 2002:a05:620a:4627:b0:8c6:253d:5187 with SMTP id af79cd13be357-8c6a68bd2a5mr2523057685a.11.1769034824095; Wed, 21 Jan 2026 14:33:44 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 03/10] migration: Remove one migration_in_colo_state() occurance Date: Wed, 21 Jan 2026 17:33:28 -0500 Message-ID: <20260121223336.3381912-4-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034895654158500 Content-Type: text/plain; charset="utf-8" Move the send header operation directly into Xen's QMP command, as COLO doesn't need it. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/savevm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 64bf445c98..61e873d90c 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1871,9 +1871,6 @@ int qemu_save_device_state(QEMUFile *f) Error *local_err =3D NULL; SaveStateEntry *se; =20 - if (!migration_in_colo_state()) { - qemu_savevm_send_header(f); - } cpu_synchronize_all_states(); =20 QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { @@ -3335,6 +3332,7 @@ void qmp_xen_save_devices_state(const char *filename,= bool has_live, bool live, qio_channel_set_name(QIO_CHANNEL(ioc), "migration-xen-save-state"); f =3D qemu_file_new_output(QIO_CHANNEL(ioc)); object_unref(OBJECT(ioc)); + qemu_savevm_send_header(f); ret =3D qemu_save_device_state(f); if (ret < 0 || qemu_fclose(f) < 0) { error_setg(errp, "saving Xen device state failed"); --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034923; cv=none; d=zohomail.com; s=zohoarc; b=QEWHWiBTt84BVgIZVJd7WeXduD07Asd++YAqK2vWi2I4HIg/nGAk/SnnNKQ4dkq76qpMUkc3IgqC0Q+F5Zb6FVp2j8lFU5kC0+ZF8D6Uw0MX8VyroC/zl9tq/mvNHrwdp+qP3sOcPc7zrwG0P4R0VD+Mn/7e0Uw0UZexTVRsNH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034923; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=C5Ii2DQrNf2yCfWhYk7gay4p6BIidDMzjtIYzEoVG08=; b=YlUMLWncteBGBpuv5tpfRP1Okkx3Od41r51gY2KF8tgTjGj3hUeCuT3PDMG3mHBFtf5VMB6qvbbV1p+Fzu9NZ1k9EhVDBQZBvKIZF8Th8zZFkp71Q/eODUmzbZVsbXE24Z0FPFSU6oJOFpo7Cjq1s4r6+xWqnCLO+yM/cyZGYM8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034923693535.6199822824012; Wed, 21 Jan 2026 14:35:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vigls-0007gY-0q; Wed, 21 Jan 2026 17:33:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglq-0007fy-Pg for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglp-0003hX-8t for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:50 -0500 Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-263-M5mJ8D_nPmyEB724Eut8kQ-1; Wed, 21 Jan 2026 17:33:47 -0500 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-8947c4398c4so11219186d6.3 for ; Wed, 21 Jan 2026 14:33:47 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C5Ii2DQrNf2yCfWhYk7gay4p6BIidDMzjtIYzEoVG08=; b=CAv8Oq+kcaci6ap3/NY4KAlSPy/n8utkECH5JVTACpapaTnY/B+oJJtPzT19sDmW2qelog QuLsTxqT9Z/ch/TqLjgJy9gz5nDYHVsOZrfQ2/v5zx8Y7u31w2Ei3vZEm/JyQhBWpw9sFM vmeeE2j0ZumarvctASZ+mUl4CD32Iew= X-MC-Unique: M5mJ8D_nPmyEB724Eut8kQ-1 X-Mimecast-MFC-AGG-ID: M5mJ8D_nPmyEB724Eut8kQ_1769034827 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034826; x=1769639626; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C5Ii2DQrNf2yCfWhYk7gay4p6BIidDMzjtIYzEoVG08=; b=UE0yakzMUnptftF4T3fCrQMH+e86xLaRRF+Cvj+g3zEbu+GwhdA+e7MzU1go8f9fNB zzyrSovoVKKODq2Tkloi4bW0DUSGl0/xhrh1rwVvxumOJnIqP0L2NdR/usJ0Q29Z8Nkt BbR1hA0T86F4kw2/m/JyEL9VMArcdEI7PIUBRXlq0LKlkZ3/k1pax8htupMLBz4GCqfc aB31hedpqdaCLY6ytvM3GlBX2SvL4ZJ0OEO9XD9YAJCHicQw3YYow6eH4i3RataI9h6d WsQOaL2AKVabzqDwurIZzp7mqRgev9R866AqQFDVzHRVAne4EglMAo0SC7yF1Kj4y6mE Exyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034826; x=1769639626; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=C5Ii2DQrNf2yCfWhYk7gay4p6BIidDMzjtIYzEoVG08=; b=nXMlfMYgu6hDyDjtpQxPLuEq2ByJJULdv265B8lxlfEv64VdOo/zB9t+6PJGpNe+Jg 5hMTCNAlutEWbYUXykby0fPHxXegqawRYHmmzgvo1Q9Qvjasor+EzVMjsJs1hLjJAioG Ufj1pza+nDtJREEZTrU2o+/8p2Ib9JLm4jtIdH86e1TYoTARHtHGwBZpv9lKOtDdIY7H 3Ymw1mQjZr7gAS+s3ciXFUjsj15hE74mu4gyq9i1Fl8D2ivMj1F1FdM94iROF925j80F 1r3WpnuWl70liRWYqdDFuL9hc8xjvDSRfP/vOyLYsdN6qh0T+qzGYVgwcCDQPf5+xlYJ SKog== X-Gm-Message-State: AOJu0YwNJ809QqM/+sD/G0w6rfK1CXRN/NuDuIcNEk4Hw0spolVOdaG8 bnD3fThwXGaf1NMbpemayj3oOud68MxWRotFTVcs7ohPfMK0Z/WaQIYokhdmKd99qIoIubEjPgh wkzM3EquuoFHM3JERqRgqOYycpbaxFTP2bSqP1jAPIkmaypPDidvAxD7clN0kpGzJp/v735qgpg No1JQqFwauA7YaI9SEjdut+yNjPW0PCZ8y0YrcMg== X-Gm-Gg: AZuq6aIVZnS5NduwZohu20nofDCKvE2r1XWxnpYp4PCPFy4a2kxZgrt45i9u2iSnk8c tj5mZXwkqEddtViapTuXudSHkBEvuXf/dVluW4fklUD79UueARAqGGs2MKRup+6+GVYoGtlB8EW N4fiKAMwsbqBCunshjlexR+ytQDWVQ9LiGzZbmy6xUq+xMJ/PdPf8aflqjfE/Qh56lLuC25vzlI WT+AjDR8oESW2E3SwlnkApPaJ/KLj1owKm7pYzxvAA7unFaWwCL4/SSL7gbhMTl8NUsm9UuaSwn /j0NWC/btl3I5NOpkWSFRue3QLQ0ddAhxarVlMA11ASon2McD4atY4ldlUsgbweVRydXTRb4MND r X-Received: by 2002:a05:6214:20e3:b0:894:6c7f:335d with SMTP id 6a1803df08f44-8946c7f366emr96276446d6.41.1769034826357; Wed, 21 Jan 2026 14:33:46 -0800 (PST) X-Received: by 2002:a05:6214:20e3:b0:894:6c7f:335d with SMTP id 6a1803df08f44-8946c7f366emr96275976d6.41.1769034825715; Wed, 21 Jan 2026 14:33:45 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 04/10] migration/savevm: Remove SaveStateEntry.is_ram Date: Wed, 21 Jan 2026 17:33:29 -0500 Message-ID: <20260121223336.3381912-5-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034924543158500 Content-Type: text/plain; charset="utf-8" It's neither accurate nor necessary. Use a proper helper to detect if it's an iterable savevm state entry instead. Signed-off-by: Peter Xu --- migration/savevm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/migration/savevm.c b/migration/savevm.c index 61e873d90c..f1cd8c913d 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -249,7 +249,6 @@ typedef struct SaveStateEntry { const VMStateDescription *vmsd; void *opaque; CompatEntry *compat; - int is_ram; } SaveStateEntry; =20 typedef struct SaveState { @@ -816,10 +815,6 @@ int register_savevm_live(const char *idstr, se->ops =3D ops; se->opaque =3D opaque; se->vmsd =3D NULL; - /* if this is a live_savem then set is_ram */ - if (ops->save_setup !=3D NULL) { - se->is_ram =3D 1; - } =20 pstrcat(se->idstr, sizeof(se->idstr), idstr); =20 @@ -1866,6 +1861,12 @@ void qemu_savevm_live_state(QEMUFile *f) qemu_put_byte(f, QEMU_VM_EOF); } =20 +/* Is a save state entry iterable (e.g. RAM)? */ +static bool qemu_savevm_se_iterable(SaveStateEntry *se) +{ + return se->ops && se->ops->save_setup; +} + int qemu_save_device_state(QEMUFile *f) { Error *local_err =3D NULL; @@ -1876,7 +1877,7 @@ int qemu_save_device_state(QEMUFile *f) QTAILQ_FOREACH(se, &savevm_state.handlers, entry) { int ret; =20 - if (se->is_ram) { + if (qemu_savevm_se_iterable(se)) { continue; } ret =3D vmstate_save(f, se, NULL, &local_err); @@ -2648,7 +2649,7 @@ qemu_loadvm_section_start_full(QEMUFile *f, uint8_t t= ype, Error **errp) se->load_section_id =3D section_id; =20 /* Validate if it is a device's state */ - if (xen_enabled() && se->is_ram) { + if (xen_enabled() && qemu_savevm_se_iterable(se)) { error_setg(errp, "loadvm: %s RAM loading not allowed on Xen", idst= r); return -EINVAL; } --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034934; cv=none; d=zohomail.com; s=zohoarc; b=YYkbe0wxXVuNbHVjeDidimVWEjBrKJLLT//JetZvCcVDlGGWqrD2bQIVgwkUQ7Tv2ddkzbjiUad3P01pfmBiYSy9koHu4ziTT6r2YrRtKw3ElUn0BjqyMrMdnY0OM55c1OFT+EhDMW0tYn68lnQipbsoeWAXgPVCc7Dn+E2cHLo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034934; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=jJr/v1k12nIBjKq07vpOQSzeaItwY+6aDw7MFBuDrBg=; b=jqiOmZf/iCHKmLjMu+Nc0J/X3rEUwpe+hTzI/SrvTSVmSBSJkY5Qv3Sivyix4J7mdSgdd9MRPXQ8cisEOTFxEkXVy29GMIx/CXoEKy5Uh7zsadVczXPMiE3LPZrjAHwsJeq3Gtaf8boK6y8YDtWiwOWXed+qLFpvpvBe3A1yJDk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034934844488.9294690397346; Wed, 21 Jan 2026 14:35:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1viglv-0007is-1M; Wed, 21 Jan 2026 17:33:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglt-0007i1-Jk for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vigls-0003i0-0Z for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:53 -0500 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-373-2VJAPOYCMj2mlXyTRI7DAA-1; Wed, 21 Jan 2026 17:33:48 -0500 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-89473f5a755so13185156d6.0 for ; Wed, 21 Jan 2026 14:33:48 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034831; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jJr/v1k12nIBjKq07vpOQSzeaItwY+6aDw7MFBuDrBg=; b=HEPK+VZ8bX9lhN0Ul1IgrnoElwpXjHTq/vJsnddsLN09NJiBGUODyvjFRc0M3T2EjmGeJg DUV9rPiU8eCC8rDpLqsWvcoka2l+lw7FRFekErjYa3wPj1dZzE8q6+wrcZqtWSmdDQjYPK wcdBwQoZKUg5iKOebYm4RkQq2AsV9Ms= X-MC-Unique: 2VJAPOYCMj2mlXyTRI7DAA-1 X-Mimecast-MFC-AGG-ID: 2VJAPOYCMj2mlXyTRI7DAA_1769034828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034828; x=1769639628; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=jJr/v1k12nIBjKq07vpOQSzeaItwY+6aDw7MFBuDrBg=; b=lXEHfv9Wq9p7ugUIiuc89rDSfWtZ/c2rW8m3T3FLscmd0u2zZG9hcCU/9kV58qkuqL UyzE2YcT4BzVddX2JwTFKdGELY/pug7MkQluboxyNZj7vWRMN4I6Dw5iM1s0PCVD6GHF B4ovwVd/vhiTNhn8hy/lDCKonH5xgHU0W8f7cMxOVrwft5kCkuO5WLRUKnH13Dql9o9P Wl12nUyf/aT0ZtXIdUSiHmzD+qe+/1LH/sXxIUOd4UYrzuux8fhWSXTDJ8D3277wGDKr LAC6kQ532/v2aShcO7xJ1xznCy9gyTVkJ5Gid40ftRJMBJdTwOUTEBCZjP9qcXG158aH tcDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034828; x=1769639628; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=jJr/v1k12nIBjKq07vpOQSzeaItwY+6aDw7MFBuDrBg=; b=TdFPS91HagbHqOmG6+8kA74Zyp9ExxqI1UCSEDaQGZscbqa4iEzuxVJxOFsWu8to+5 C6FslJR2SAmUuf+GaLV34MLclkcaMZl3O0OJgrm2YUTFC1dVKKeSDQXsNY9vR7lg430M UCkpEOVsda5R/s/TyjYOAWLh1HsrNTVlHbkBx63vbfG5VOPkxhouEE2SIdjk9tRo/3fJ Vkkx6+qu8KHel0kb7PkCWl8S0VitEJGOc1MNTp9lrYU9uYoJXA/BG89nAefwBD9O3P8z a6Y+1DvR56hQczicTA10XkgzYuiu+GO8eidbCD2jUffIv8n/2/IqP6B8+J+b6c2gl4zC reVw== X-Gm-Message-State: AOJu0YybK3Ukau3TnR++Ka7aiv+JenraIl+muquzlE7aiVNcAnIewI6N X/JhPIQgMKJjsfLLSuUeGIAWBtSysH0ttHISfcUSluXkERcACtStTd/J7NelJSIvXwS1V4OAh5B jbOVJK/Lo3sltO+KairwjSkhNRT1wqYMtc5O596EUqTLeNQMfbNcezdDDbaleLCw3icIZdERb/+ QSJlPKFjeueqNAL6ueuhxFk4v1aSO5o2YaPhI/UA== X-Gm-Gg: AZuq6aIPaNOcAwEC6F1eqzWYaJoU5mFVCENOzW3h6VxRDlgpeCylcpE4484OJR4Gmy6 EVvcTwDeI0zKidyVb4rhrsjsyhdGV7XOSS8UIM15fZ9T/vrFtwYF+52z8vdAoNvc5M3dbkueyZM 12djOQzcoXfK1MJosY3sUa+0c2Dt63fl+Z2Fd9i7+Um5YL4Wq0u38mFGmyD47OTE+fN1VX9PZ4r Fdg6iXbCNCuAZnZ5FoDV95Y6gssulVrzVtAAnQzS6fUjzl+kuWM9WWCluxSjKRVEvhNaubjDofE KFRYmVkpxTh4EdEXw6H5z72E95IFrRzKe/XBQWgqEtmN2KwZrldyDkjI4Mxaj/96ru5NoUJ5E3R j X-Received: by 2002:ad4:5ae8:0:b0:894:6eea:709c with SMTP id 6a1803df08f44-8946eea7214mr69174936d6.8.1769034827855; Wed, 21 Jan 2026 14:33:47 -0800 (PST) X-Received: by 2002:ad4:5ae8:0:b0:894:6eea:709c with SMTP id 6a1803df08f44-8946eea7214mr69174566d6.8.1769034827306; Wed, 21 Jan 2026 14:33:47 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 05/10] migration/colo: Unwrap qemu_savevm_live_state() Date: Wed, 21 Jan 2026 17:33:30 -0500 Message-ID: <20260121223336.3381912-6-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034936625158500 Content-Type: text/plain; charset="utf-8" It's only used in COLO path and only contains two calls. Unwrap the function. It paves way for further reduce special COLO paths on sync. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/savevm.h | 1 - migration/colo.c | 3 ++- migration/savevm.c | 7 ------- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/migration/savevm.h b/migration/savevm.h index 5d815af742..528607f09e 100644 --- a/migration/savevm.h +++ b/migration/savevm.h @@ -64,7 +64,6 @@ void qemu_savevm_send_postcopy_ram_discard(QEMUFile *f, c= onst char *name, uint64_t *start_list, uint64_t *length_list); void qemu_savevm_send_colo_enable(QEMUFile *f); -void qemu_savevm_live_state(QEMUFile *f); int qemu_save_device_state(QEMUFile *f); =20 int qemu_loadvm_state(QEMUFile *f, Error **errp); diff --git a/migration/colo.c b/migration/colo.c index db783f6fa7..e05736ecf0 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -471,7 +471,8 @@ static int colo_do_checkpoint_transaction(MigrationStat= e *s, * TODO: We may need a timeout mechanism to prevent COLO process * to be blocked here. */ - qemu_savevm_live_state(s->to_dst_file); + qemu_savevm_state_complete_precopy(s->to_dst_file, true); + qemu_put_byte(s->to_dst_file, QEMU_VM_EOF); =20 qemu_fflush(fb); =20 diff --git a/migration/savevm.c b/migration/savevm.c index f1cd8c913d..529cf310e0 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1854,13 +1854,6 @@ cleanup: return ret; } =20 -void qemu_savevm_live_state(QEMUFile *f) -{ - /* save QEMU_VM_SECTION_END section */ - qemu_savevm_state_complete_precopy(f, true); - qemu_put_byte(f, QEMU_VM_EOF); -} - /* Is a save state entry iterable (e.g. RAM)? */ static bool qemu_savevm_se_iterable(SaveStateEntry *se) { --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034873; cv=none; d=zohomail.com; s=zohoarc; b=dFmLkyb096hA/cz8/TlFiN/dgdzxb2jBkRLamStSs3f29VllKwFOajywIDh1sXB4ND+ImHKn4a8ULXNKQLehLNp5z3grFO3xCtYzKr9Jzce0CLV3jf/NkD7eFjuXCtLTWEKPHn74GCM8CnxDu0Lkx+EMAmALuz5Jkr0milXK6B4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034873; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2KwvTwTZNUx6XnV2kEuNhbSXL8eCltMIYuLBDkLqe2k=; b=hDTUKnZA+6oZSDsJUCcsIb6jlTVqBQHKBMpHdarA92gGdl30VIJh6ZE/wDnEygYkhR7Fc9HJAq8g8nnwp6dNWfbqCHGduhVdeMsTo+fhGO+YVPpQyyqNbtpmXvpAzSBRcNIKotp5L4LMFloBOWzDAwb9+GsFcDdmZhSAdAXEcUU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034873716408.05620075346155; Wed, 21 Jan 2026 14:34:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1viglu-0007iS-Ly; Wed, 21 Jan 2026 17:33:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vigls-0007hL-Tg for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:52 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglr-0003hq-Ic for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:52 -0500 Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-Huw-2kPROnGvPs5vemwCaw-1; Wed, 21 Jan 2026 17:33:49 -0500 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-88a2f8e7d8dso12273726d6.1 for ; Wed, 21 Jan 2026 14:33:49 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2KwvTwTZNUx6XnV2kEuNhbSXL8eCltMIYuLBDkLqe2k=; b=h/HtmXycMSWHzz1s4uSvS4Baki0oakVq8sZQmx79vg3/KG4Qk2hnlyy2TX9PS3BscoMOn8 kgsY65WbvgUbZLUUgjM+RPYUnD6KCbPsaoxtgUCbJBcVPYeFRwHozMqZq+0OdTXvKeopzq pKj6vqcZH+GbpxP+NqSpiWP0tRc3HlU= X-MC-Unique: Huw-2kPROnGvPs5vemwCaw-1 X-Mimecast-MFC-AGG-ID: Huw-2kPROnGvPs5vemwCaw_1769034829 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034829; x=1769639629; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2KwvTwTZNUx6XnV2kEuNhbSXL8eCltMIYuLBDkLqe2k=; b=R2kkvxJ1IyfWuHjr4I63jlPYCcH/kUJ6AQ6d0/ykKB+AjvdvPPwwa5HghpGpKlyseQ Kti+KPHiZnYHM3/PTyXB9Un3WGBwXivHHKltmzMfnKIZ1/xZV1f6595Tf55phxVuyOkh R4JRP8fjUQPsUAoSoNEEU4UZ+LD7RzMG5Sbk72IOQ8Gd60kswLdo2vJhezKt/SATP+xv 09qVPNaZXVNZA5DiZFsWAFb1b8Vx5UCDjz8pVhZiXjZl3ulld4xw+nM0c3vRp0jHN1cK AgiHZ4kikA6526yt4XGr+ipZjuM6vjqhG5nKiStSvDLKa4mmA8NEq1P4cY8ngxsmYLXk cVVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034829; x=1769639629; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=2KwvTwTZNUx6XnV2kEuNhbSXL8eCltMIYuLBDkLqe2k=; b=fPAyoDbs8zAaBd9Z92DWHQEpvyE6w1SJ1IvbF06KCWRdJQB8+e8FxMD0b1Vc7e6JcY tnpvDaWYM3TGLmNZ/HuLiooZ9yNthf2EE2QGNjI7/7ISZB2rt2JIXmf3jyS/gYX5p5x+ EJawMRBkDGoiYAxlh3p/IWiFuSTAMUdN6e4B32t1HQqt6s8NQvp/JU8vaX1asLm/Uq0p jAEb/ScbGgHEZy4532YuXjCIqweCrZw50T/hSsp19hOfKLsyPyJNmAekWGSH180hOOMk CSNu+4QJbP72C1UiT/JKO/pXRUSbo+wZs8d9tcp+afor4+LU/Kz534u+cGSPzth6RD5p wDrA== X-Gm-Message-State: AOJu0YyBEUTSxlIJ3k2KQpNJo9bVTo43ugiT0YbI9KWXFpDDl+jcLXlb nKQp/hQLMjW6RfzXc9wPjGMkmLmUcSAyFLmaAal78TmfJWn7KdAC7ahb2W9dJOIFw4kEYw5beSx qdxnLKGzZAcpiKd6HszE039dmhQXral+W57d2yO3/sSNzv3UI5vOJ54EelQCwkDLUofEEPqDq+l Xng47ZZ3yJH1B9GdGjbPhfCYLKqKrTsCT9c9plVA== X-Gm-Gg: AZuq6aLb6NDAMNou3Ym0xMXCF2UZ9dVXZ578Uk1CNkmOdixP0dvzDJWo4VT+gc7ULfu /UWzGQGnH5ANjRHy3MrxMn3eYOQLqKM65df3uSPe1fP6TWtLofcIoHvlxxZkyIxcsQhJwwWOkbd jnIewd9jz5FWMZO/7FGMtMNTw0/nbPnk05Yf8cca99xGhFjkgrpmVfIqbT+4UZ78WD4YHLObbex xFnd6Wjar6Io/FYuoJ0HkCUgo7naD6LnL+tqe3+7PzwlEf070o8n277Lzvi05hkBrA1zObAOKAz GmOhzjTJi9MD/ajMFFmSjFHEEbrqvdLM6FZsyt41y5+RTLaq2HHBBCRIL1IuSn7Sx/lRPTLAUyS T X-Received: by 2002:a05:6214:238b:b0:890:65fa:1ec2 with SMTP id 6a1803df08f44-8942dd3ff30mr303011176d6.29.1769034828813; Wed, 21 Jan 2026 14:33:48 -0800 (PST) X-Received: by 2002:a05:6214:238b:b0:890:65fa:1ec2 with SMTP id 6a1803df08f44-8942dd3ff30mr303010736d6.29.1769034828326; Wed, 21 Jan 2026 14:33:48 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 06/10] migration/colo: Remove call to send switchover start event Date: Wed, 21 Jan 2026 17:33:31 -0500 Message-ID: <20260121223336.3381912-7-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034876359158500 Content-Type: text/plain; charset="utf-8" COLO (in case of periodically checkpointing) already have switchover happened before hand. This switchover_start feature never applies to COLO. Remove it. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/colo.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index e05736ecf0..c344943173 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -453,8 +453,6 @@ static int colo_do_checkpoint_transaction(MigrationStat= e *s, goto out; } =20 - qemu_savevm_maybe_send_switchover_start(s->to_dst_file); - /* Note: device state is saved into buffer */ ret =3D qemu_save_device_state(fb); =20 --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034878; cv=none; d=zohomail.com; s=zohoarc; b=SdcrEF18GNKTPq2OEFR2ITr0zcnpKHsZf+3m8jXU7E+1PVFsl6i72/cwsMweGdCvPXs+TDzvWaVcs0fiFRfMlEm1m7kj+Os3Ms/1IDr82on5N564qCFuZsl27bFKs/inzowwOC8i2US0dyg9yAEAvc4OR7EDgo+wD6usHcToc/c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034878; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=WGRYLYJGZZIVkaUOB+J/cgVl22pX3OXzem58+/XJpsQ=; b=eazHA2SbSrZweJ0moCCDvBcDp9qQ5/6EjVmXHeTEjM9Qtemrzscj1Y0nIpHFEEWmKF67UQcaFUEPfO0yfqIR+U9TYoy+rY1UvgOvnhBjnFUlPfYO3XDqEG9/Ja5jjHcBquNydltxJ0a2Tk6ZgEtKablX8vIm2zq0JFyh15GdWxc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034878062865.5934887352513; Wed, 21 Jan 2026 14:34:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1viglv-0007j2-My; Wed, 21 Jan 2026 17:33:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglu-0007iD-8q for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vigls-0003i9-QY for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:54 -0500 Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-100-Rp8ueTAXMhuHoqv5e7cTmw-1; Wed, 21 Jan 2026 17:33:50 -0500 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8bb9f029f31so135917285a.2 for ; Wed, 21 Jan 2026 14:33:50 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WGRYLYJGZZIVkaUOB+J/cgVl22pX3OXzem58+/XJpsQ=; b=gKV3v61phv+CikoZ9NLxldfM2ndVIg4QoPegi0ytiZzCkfgTqgweTcT/j43MXcAWodaFio HBP7YWmgdxoKjJP1zE7GFntsOCBs0pbxtNhF4UKhWeM+B6uQDlRmZxqf2F3wBELfkPYWNE AzK0LHBXd4AE9TA1WeImX7gfjIpih98= X-MC-Unique: Rp8ueTAXMhuHoqv5e7cTmw-1 X-Mimecast-MFC-AGG-ID: Rp8ueTAXMhuHoqv5e7cTmw_1769034830 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034830; x=1769639630; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WGRYLYJGZZIVkaUOB+J/cgVl22pX3OXzem58+/XJpsQ=; b=cnWGLqMmsc9dixq3dF5rz73c1AuVezYPwHw1pvF2oYVN2/ie5Urs1OHhLgw9BkrKUF NKn+X0nbD3tNHvRBZRL7fyFmFb48J8JlX4m6m/Oe6Gk7mvBH2YMwMTuDkGCWcfwe81+N 4LChmwQl4s62sDhT2RfTW1qXaWCp8FrQB3RG0y+HbjkieD7IRstiXbOWIeh9keKZJy/6 YxRsfiQV/ETCyc2eSyaEUf4Hmrr/6FPBIrkowaDnfC5FNFNm0bAsfxmvUd81wY+Tl0Hx rCagywHWD5rI9T7O6GAjHfSzy2+/GoTgtg6OqvLxw1VgqaFyCJKzbKu3S56AmvNbmn6n 6GVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034830; x=1769639630; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=WGRYLYJGZZIVkaUOB+J/cgVl22pX3OXzem58+/XJpsQ=; b=AwVHww0TMXXOkc0H6b3bbRuGsjXA+LQTD+Dm4ZO1j2eNsM/XwZuEtJ6WfnJRokXWyS WUvTsiY/uOhqMgcBkFRdJRZx9ldBI67hq33EsWbB5WRA9+KWSh18eaZF+swI67Spw8Fp QoQLsTuoTqCmjfqmh7nmrOloppowTtNunSBjUfOA2FrErIoxTWTbX/kv+9i/GHAJHZIO vGhjdyM6dsSqv6GJ17n2la66t8JCg6aZifdzbi4sGj9X5Eqj1p92oOVyX0zGBPWcDoSb FR+baBnF4TeY32tdeEGo9eIu/2SIPZsBCaACSuJO3pYtSpvH8sX890Gi84dcHkjomLDj bt8w== X-Gm-Message-State: AOJu0YxYNq0aKb/baI2PUZixwMVAu3RpSdXVGfsEWJwPL7XABSHk5LiW /UoBuANBb1yupi3ooT8oooYpNwlMnb11fSogad7dAK0Yf9h5GIRvscWKbJkUFjE7YFmvdwXI5g2 QWCP9cDrxOH6bEhJp8Smnv4czgi9k6KLwlBqNqThb0aGxOCaokZuApYWJLzQ2QGjqP95KfnZMMk Sq9bb0FgPyNQjd48gdAZRvs9rR9W5SE7XwPV/wzQ== X-Gm-Gg: AZuq6aKFulNbQOiqYNadYkl7M9O35GoJL1hcwaeevv8d9ip2GGLU9LgY3kImceTQjnY iWo+2rVvJsZannOjKzJOw/VfvoTh39NtuQij4UxLQOI+UzMQUV//fdN9tADO/LyTGp95wHFESwv CAvIabP17nun9OY9DUNEWckERfXZzLymBHbeyh+ElSOkAE3EEb68x0ivOZIUqDFe1TijAZdPs+c IqAFuvTdYcXPGMswpHI7uDGMvdlZRKlH0VN48PGz6d9HObXOE0VGJSYCfVj4Yr91VZHq6el7u19 5in8oVNRmqqSyCV9PYmzvIPhFYnI2kPkDrElEP3HrR4qdd2TZcCEED//VcvuZMA996zyyN3Ef5K q X-Received: by 2002:a05:620a:4116:b0:8c0:cec4:b6fa with SMTP id af79cd13be357-8c6cce50011mr860303485a.65.1769034829713; Wed, 21 Jan 2026 14:33:49 -0800 (PST) X-Received: by 2002:a05:620a:4116:b0:8c0:cec4:b6fa with SMTP id af79cd13be357-8c6cce50011mr860300885a.65.1769034829285; Wed, 21 Jan 2026 14:33:49 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 07/10] colo: Forbid VM resume during checkpointing Date: Wed, 21 Jan 2026 17:33:32 -0500 Message-ID: <20260121223336.3381912-8-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034878337158501 Content-Type: text/plain; charset="utf-8" COLO will stop the VM during each checkpoint on either PVM or SVM. Accidentally resuming the VM during the window might be fatal because it may cause the RAM and devices state to misalign, corrupting the checkpoint. Hence forbid VM resume during the process. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- monitor/qmp-cmds.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 1ca44fbd72..0c409c27dc 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -84,6 +84,9 @@ void qmp_cont(Error **errp) } else if (runstate_check(RUN_STATE_FINISH_MIGRATE)) { error_setg(errp, "Migration is not finalized yet"); return; + } else if (runstate_check(RUN_STATE_COLO)) { + error_setg(errp, "COLO checkpoint in progress"); + return; } =20 for (blk =3D blk_next(NULL); blk; blk =3D blk_next(blk)) { --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034876; cv=none; d=zohomail.com; s=zohoarc; b=J7bF5oRZuemW7VO2CunCYaw2ohX/jPBqH3AFJfmawsN1DQj/tsGhQkps6z58mAsc3UsoO2Z/d9TABUg2Z22ub6UdYxzggrnedN4VHH2so3HfcRSMM6bch0N2K37qeIAo9l0KeoWX7SSQSZurdJ9f9uT7HY/WXAFQUk2LoHpG86k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034876; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0KwZQsjE4pN+swkzLDzKgsPZ0j9sLwHdgCl9FXQ/rm0=; b=PGDJ2hiNA+u5x5NvUgbUjfYqa7jLY89W6SsDkh9fl1GQegpYtbKzdigcaEaK9nbRaClg2yQKSyoJWjiheqa1oCyM+Uzx6gZjwClPKvnwe/001iyo5oXVRUWR5QKMBQS+zCIhoHmv7HOZEKMXAvCA+2gSmmr6AIuSOewKBkjt66I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034876967550.3896341413603; Wed, 21 Jan 2026 14:34:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1viglx-0007jz-7d; Wed, 21 Jan 2026 17:33:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglv-0007j6-Qa for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglu-0003il-G8 for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:55 -0500 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-495-x3F33G4yPfildKOGvc8wKA-1; Wed, 21 Jan 2026 17:33:51 -0500 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-5014d56a63aso7701501cf.0 for ; Wed, 21 Jan 2026 14:33:51 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0KwZQsjE4pN+swkzLDzKgsPZ0j9sLwHdgCl9FXQ/rm0=; b=hA+0+kmZ08b5NjpBqg5HcgdrApUAkcUSXGMdfEzmlfvuUYyx9WIeZdkNnhhkHtRJY7KaPI LZ8I9RwwUDG7v22SC5Nb4B2lhqlrf6VvIEt3QKa+hQ6ZFT4Ww13E8uAha49svQXko1TBDF EaJHLaWery3Gy1i+jZipKQvtH/odSLI= X-MC-Unique: x3F33G4yPfildKOGvc8wKA-1 X-Mimecast-MFC-AGG-ID: x3F33G4yPfildKOGvc8wKA_1769034831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034831; x=1769639631; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0KwZQsjE4pN+swkzLDzKgsPZ0j9sLwHdgCl9FXQ/rm0=; b=IEmkdceVggWhZ6DJCDKqIOClgtKjomKknsoKBIQH4EuirIYd+g+ozjjfUlpkf5/ZD8 RhkwSZu4jj87oDWqw2xPgIrFeVngmYNEPbf66/HWzO5EueSpWOKOuuUl/PQV4Hv+EoNd s9A5jZ7dHY/gyGhXzHAVibjpUyqQ2WyM+q0KDMkI2qOmKsiV5JzcQPGjgIoWn4aK/CwT k2tS+f2USWKOoFU05g4xxV/jlMQkwuWoVbbGJBrDEsZFaaktz2dWAJX9Bpxx0I6Oj2fY VOQrY3zFFzyjuOlAv9p9q8eBdTUenl18EtSstUFIzkuRudPHFClmYexNt3y7pxHMHTyO QiGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034831; x=1769639631; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0KwZQsjE4pN+swkzLDzKgsPZ0j9sLwHdgCl9FXQ/rm0=; b=XRTjUZANFAmBc0BAKqtgz88kEmmwzZTp/7ltLU4C0CNEgVnWwjJGI15eEHVlXWTl+8 OxgYU0FlBaCWsDDl+d4FpxJlHP74nShjmYWWFhFPQkOYC+lYD6iJtetChM1cZcI0/a80 yiUg31S96EXKX6yrm59ymaKQIAxV4ryMveE5gh41orogdB9vd5EObnHJuDOlOeNUA1ro bvvUOEdo+Eg4citV0jtCoIM8eKmT4DRrOwbSPGsuZhZM7b46kBc6LaUR/vPTuX9w5IrX JgBApjrPbEJKhheRiSCzKdua7ALCCPKpcMktGR3EqU3Vvd/bHBNe9b5kUj8x4p6qAwYI dorw== X-Gm-Message-State: AOJu0YwYlsnqVLH8V0U5Za5JRqcv0BC+O8hXVsYVpezwIsUzR/8ELiHY hJaISQCztnLb/plSnDKd89OCq4oN0Sqn2YYZACDgzTYbd/lkzEjkVMhudTvDdV1xcwi3agbNLVC PTJEOrFbrCzfFVxMWv9ikbsNS46JRCYCehbcf8WW+UkZMBgkIzbto2y/dWsWIZ/TAG7F0Nk2aAu IaUryr/Fo5LfhwVNVErEjfu9QuUm/7WdZEhc1YOw== X-Gm-Gg: AZuq6aL9Kk8qnOuzRcIeOEAHrLpw3/fS0kkN0bmbG35yOfGt2fMqYUwT4BD0JD0VZKn s31FJSGzwsOBuguWqaawaQvz/kfPXz+UD+PlGXKBr6sQA7eKGUUxtFm1EVMpmmAo+lSxC/r/jC3 ENaUjU/8R0EU1eI7I0hAYt545e433L01fc7qOc4L7t/seLOmY4UXjHncexOc188gM6JfD1aLkIP Fm/fKWVLr1/bXjLRvoRNIYi4lXyshvpF51yBRFjezDJlIfMPssIQ7W1IxZNhtivDegoxUzU97WU o8aPycNBfZxNNtFaPFvUqSJ9vtJChASKVfbIu3IatQ5XZoFU6nnY/EXhtNrtqXW//5ThZ1lGhBq 9 X-Received: by 2002:ac8:5a55:0:b0:4ed:8264:9199 with SMTP id d75a77b69052e-502a179c5bemr264430261cf.67.1769034830718; Wed, 21 Jan 2026 14:33:50 -0800 (PST) X-Received: by 2002:ac8:5a55:0:b0:4ed:8264:9199 with SMTP id d75a77b69052e-502a179c5bemr264429871cf.67.1769034830134; Wed, 21 Jan 2026 14:33:50 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 08/10] migration/colo: Use the RAM iterable helper directly Date: Wed, 21 Jan 2026 17:33:33 -0500 Message-ID: <20260121223336.3381912-9-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034879552154100 Content-Type: text/plain; charset="utf-8" qemu_savevm_state_complete_precopy() has a weird parameter called "iterable_only". It's needed because COLO saves device states in advance. To make dropping that weird parameter easier, let COLO directly use the RAM iterator helper instead, which should make the code easier to read too. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/colo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/colo.c b/migration/colo.c index c344943173..f92803dd29 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -469,7 +469,7 @@ static int colo_do_checkpoint_transaction(MigrationStat= e *s, * TODO: We may need a timeout mechanism to prevent COLO process * to be blocked here. */ - qemu_savevm_state_complete_precopy(s->to_dst_file, true); + qemu_savevm_state_complete_precopy_iterable(s->to_dst_file, false); qemu_put_byte(s->to_dst_file, QEMU_VM_EOF); =20 qemu_fflush(fb); --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034868; cv=none; d=zohomail.com; s=zohoarc; b=JH7KTaquCr7bjkoVHIZdHqdxjfKdcZrUhbdv0661B98J5enpWyxzLIDvt5X6vteTofM7By1XXSEkwzF3pesJ6b9sLsum21Qwkmr9fy8yIRgcZFsq0YvSzbDnAAx9c4QgJC15mcoA/FNhq0g7xvK3cXO3U6fcfR2YR90Piq64kQ0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034868; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CQXlbY1XO0ZC3utBeZ4/x+lzfr2Kk4C5uHBUNcqvbWk=; b=OJLlzxnurCMO3Yhgt295swI7Nxy2hjTIc2JVamtRLAPLdbU//emrz8rUVXAiIWXOHSCjnyVboaTHsWB/IhkHEcWMkeepGAOm4OAIBnbvUsbZXIzg/ZVw1ovgq0PXjg8dck11+BO///NzZOkLaw8w0qiQBlGk79Djm4H131EPS+U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034868268570.0533824993655; Wed, 21 Jan 2026 14:34:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1viglw-0007jY-HF; Wed, 21 Jan 2026 17:33:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglv-0007j0-KB for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglu-0003id-6S for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:55 -0500 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-86-CFwg4gK_OW6cPtuKtlNc3Q-1; Wed, 21 Jan 2026 17:33:52 -0500 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-8c6a4c50fe5so114276585a.3 for ; Wed, 21 Jan 2026 14:33:52 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CQXlbY1XO0ZC3utBeZ4/x+lzfr2Kk4C5uHBUNcqvbWk=; b=WJ8FtXakAOpn3a+1OwsB3M+XhBtbtHY2106HwuNxual14KS68zDgYhSzF6R3W484F5HpnQ nVMT+Vd52UXEi0Dx1i+Mpb9xaWsqQq8ZEGk2ffSG1w1QHLtmSgdIEl0nkyefBAxICEL0s7 d9AVG/s6CF2JlKUgMbs0LyqTyqaSYw8= X-MC-Unique: CFwg4gK_OW6cPtuKtlNc3Q-1 X-Mimecast-MFC-AGG-ID: CFwg4gK_OW6cPtuKtlNc3Q_1769034832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034831; x=1769639631; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CQXlbY1XO0ZC3utBeZ4/x+lzfr2Kk4C5uHBUNcqvbWk=; b=VBNTdeAnWJ8N84W9OZT5tkKz1CxQKYmUIDhjcOelMbwfc3ngFhlKZMF6RuxaN3fFwE aDr3+1UCU4A9wonPrhJwEXC9lCKZUDo0YZI5ngxs+lQ10d16ymwq9Y96yeBT3PUuKst4 kGnV3D4bHup0A6C0fW9Vu1GQNX+SUOdauJnsKQHIFPEa85naQGczYF155SH/N64Px4/l W6s5w79av2N3Ng4AT40I7X1TzrfemzbHgv9fUBMwaNqS/wyXxz8LF9d4kRzlhlg62z/7 1nu7QGu3jO4EhEd/c108lSAjxXBzbz/zaLD+vSRubO6enppzEB0e5tugRvGMhxXJuf9h cVIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034831; x=1769639631; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=CQXlbY1XO0ZC3utBeZ4/x+lzfr2Kk4C5uHBUNcqvbWk=; b=Jpus7VCZgZp+k0VhT5RaeJQf1IBXTIluhCa6c5nsErnXeC+jvJUj01o3zyzKwo4zNq B0K+9xr/TanCY7eYr6Sx5ezygWatSUmmEd2CnvGylv/sf8ymbiVmXzQKP0n7nCnvY9uy MnBkNhSTtFsgbVug1tVShCyduel6G1NCQV2EuxQ7djPrIEqAZEdLNy99R2dvqngc88bi dkfz7veRux0rMPUFlMAujiOLCXeNcoy3rwhe83Q9EIbhGAXBqr2oF4hLKXsf1BPlP1CL jHIcDpCHLsgt02FmxIVWru0pAjXoSXRbz6r+R1BmalTaXhUIDzqHReo7Fa1Z7bE2T8+h vykg== X-Gm-Message-State: AOJu0Yy6G5g3Dy0aJqujwMPemb81aWlEGziz5+p8qzoZEEsU5N0/M9do RXNMNHgjjkAjVys6qq2ITQiH29eEGqOLmHXkfRb06bSTHQdKjKSe58srrrhd5tQvvt01fEmRTcC W3hIuikwZDgr0vW9BdIVBRX7k4A6gQhBNfBhjogoP2B4YNnKEwA9D92Okv7isYnrEuT3vP318Tw ML5EKc4cRliaRgrjpyzYjD+8yItEQibavFYunSKA== X-Gm-Gg: AZuq6aKIx7QT8jlgweEimNxr2cS89tcuruICva4NkziYr567Hmh0Rv4V5bswYzqy18b K5eY3nFX2fhC3RpCF/jPfnOzxlHQeBwZQzfevUnmXF0ip+1Crx/0i+6kxy3TIbCC+jL/tjI9XaO Grh+JsdAOeiDF2fI941ffxjKKO5TZDTtRdvif9c63mQP1ZzEXK+ueqorSBP1YMHus2mthHvj4J1 0nAuJy2lAucemia3mDw5GF63Y7rkZ3eRU1MXBt2K57A50urQ/Wo7g5antsEDBpy9FruAFwWNfip BmnEopdz7XCXitObnQj9vXxZQxoLJBDgHzivse1SXNrVgy7tL5qMhGwPZ0Fr38wYFwtIPtN7Mtu j X-Received: by 2002:a05:620a:4004:b0:8b6:164e:e0c with SMTP id af79cd13be357-8c6a68ec429mr2823196885a.25.1769034831473; Wed, 21 Jan 2026 14:33:51 -0800 (PST) X-Received: by 2002:a05:620a:4004:b0:8b6:164e:e0c with SMTP id af79cd13be357-8c6a68ec429mr2823194185a.25.1769034831043; Wed, 21 Jan 2026 14:33:51 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 09/10] migration/colo: Move qemu_fflush() closer to its user for fb Date: Wed, 21 Jan 2026 17:33:34 -0500 Message-ID: <20260121223336.3381912-10-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034870396158500 Content-Type: text/plain; charset="utf-8" COLO caches all device states in a buffer channel `fb'. Flush it right before pushing the buffer to make sure everything needed will be flushed, add a comment explaning it. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/colo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/colo.c b/migration/colo.c index f92803dd29..e2307f1907 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -472,8 +472,6 @@ static int colo_do_checkpoint_transaction(MigrationStat= e *s, qemu_savevm_state_complete_precopy_iterable(s->to_dst_file, false); qemu_put_byte(s->to_dst_file, QEMU_VM_EOF); =20 - qemu_fflush(fb); - /* * We need the size of the VMstate data in Secondary side, * With which we can decide how much data should be read. @@ -484,6 +482,8 @@ static int colo_do_checkpoint_transaction(MigrationStat= e *s, goto out; } =20 + /* Flush to make sure everything lands bioc->data */ + qemu_fflush(fb); qemu_put_buffer(s->to_dst_file, bioc->data, bioc->usage); ret =3D qemu_fflush(s->to_dst_file); if (ret < 0) { --=20 2.50.1 From nobody Sun Jan 25 10:13:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1769034907; cv=none; d=zohomail.com; s=zohoarc; b=GwalQX3/eLoUWSlGCyCItXsbXHAaJvVouKUAsR6XZ5IgphJmbE1hrNOwQ0AhQ2tRN92LikNafnJS4r6PS2QKuDDx7hcMCnEubo0FuHhrscCjr2JEnWNoDmCvxEywQ5mOWM7P36sAXnG24KJFTO2sAMAfQ1x3Uw6uufpPu+Cju/g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769034907; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ofQMmuZcfwwZ+QpkUNutXrt2ubx9LxkcsFWNYdfsjvY=; b=D32/YqMcRepXKgXai4yRfn4RqNqxXtX/XM0t7w+x+HqFWoug2yhv7ewQEMW2KTvmgcM//byF/HemRZD5/wFDuJlKHKinYWwzHruGvRBYFEZhvE3D6s/CXQUJGFC89MzvnreoxY8tHx1JUDlrrgwagBdYmsOl0YZGTXRW8qI1mDE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1769034907437570.7629664265943; Wed, 21 Jan 2026 14:35:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vigly-0007kr-9t; Wed, 21 Jan 2026 17:33:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglx-0007jv-4U for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1viglv-0003jH-Nx for qemu-devel@nongnu.org; Wed, 21 Jan 2026 17:33:56 -0500 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-KP3b2RyiNoCziWTQHoezEQ-1; Wed, 21 Jan 2026 17:33:54 -0500 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-8bc4493d315so85627785a.1 for ; Wed, 21 Jan 2026 14:33:53 -0800 (PST) Received: from x1.com ([142.188.210.156]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-89470b0ac3fsm25598306d6.25.2026.01.21.14.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jan 2026 14:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769034835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ofQMmuZcfwwZ+QpkUNutXrt2ubx9LxkcsFWNYdfsjvY=; b=iIo8NU6tJTUy0LQ3iR69IpP6CMPzYg1cDdZ1qzta6mK8Y5FpzZUMG7YzrDQ3p8nTKt6wtQ r/5MK/e8wTkjEs8O+Dnx8DYeV2lvcGhybEZKXPPHPO2obA3G1WfA0PI4Ytu4Jj3aWATiRf M/Xph+bG75+B/Dp4OIq0IHXDHoZThE8= X-MC-Unique: KP3b2RyiNoCziWTQHoezEQ-1 X-Mimecast-MFC-AGG-ID: KP3b2RyiNoCziWTQHoezEQ_1769034833 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1769034833; x=1769639633; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ofQMmuZcfwwZ+QpkUNutXrt2ubx9LxkcsFWNYdfsjvY=; b=WS9ZwR9F9EW+iBPghpVgpJPygfhZzkyox04tY5B0yCT4ddHIuru9QHe/g9DofTqkcj OpPCEZ/+PB9WUnTgDV2ilEwl5zmGbvIyRVSbdrP/Ugk3mD/wyuQ9q8QJKR08VQv7ji34 X5DdtPBpPnMOp72OexoKwkPTv07eaeSZPjMVGFmTKY/zB23kTBzR4t5H0jbkgES5xrOw Ut5rNNz7re9ZQ5l3ik866tl2A/jvciBrIynPng2xByhAWmi5orZHCSHvs3+NfUINDRAx 8IhrdycKzYweVHRdZhPs/soIiaPUw+8Ca8pmjU2njxaVj+OXog86dc805a9yNYss5n7b MDyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769034833; x=1769639633; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ofQMmuZcfwwZ+QpkUNutXrt2ubx9LxkcsFWNYdfsjvY=; b=wKoybwiqM/n1KtSTb41A9aCUqzLBFGmAxXcWV/QelVNDsgB8/uSiucwJOrdsRqB+L+ cr3vC7Tghj97hch01bE+fRkg4bl6htIEo4gnf+6THQT5FSr/3ZcMtbaEolr19o2SdZl7 bWgbh1JG/5A6R+sJj+7Pq0x17IxuplsbodWxzd4nJOYdY7PF2MbwGt/grSAkH5O7vGa6 3q/QQRfI3QBScNB6Nrq4DjvHZc+9bug1mFXa9Ke3+FzrQRQULwcgxc723E1eQ43AaBwZ w0VgGDbhxjoWNFAjpl1Xbt1dGsilHIFJbDHrLNqpV77J+gguoviM3MKSDv/q8URHT5jc vV9g== X-Gm-Message-State: AOJu0YzCAZTGXdyJWKPwyimlmy14QHg7Ys67949qwGI1PYL7qsj/8ita aBOmOr3mjz9NrOkpm+qNJN2PNv/oUXo/SoKjXTd5o+bSEGpsr61NBB3SSCTFMvbozEWlueF6J+U pdjCxOIbyoDL6V7LE6P8yYM1LpQgBUEQxZ6QAadu3qOXSAEVG0wLnFgkUgzQ52YfY4y9S8gnt6q K8f8XpnT46/sIc+FLINtbReS7R2JWeTqfKjquCMg== X-Gm-Gg: AZuq6aIOm4TMsWwukQD5+YWz/dO8jMhd1gHyl2JZOisvjX5ZqITV4X84Ck5qqtqL8x8 IKaxpHDoosV/zObP9SPSm7M0szf2w9DbjsM7r2PW6KREejXLYLHcI7jxKIi9GSIdLnduyn+LzLi r0RSsNqkGCU18ed7H+xMr7ua7TYzyiAith8iFw1bI9Bn/u94gHFAZJlXXIYUIYYn+TRfg6ZkBms fgNs0sYJCjx5d1/MCElXJba2+ZUaFCS3oD4cdkCz7iOU9j6MCAyRZFMyvA6Amn+2Gq8DRVrawQZ j8wgNAmFFB/JSYLNjhuJs7vN4aAQmeT8xegIryoZx1sp4wqfeGGQ+M3b4Zk3OJ4lnuzEwEl8ZWQ 5 X-Received: by 2002:a05:620a:a305:b0:8c6:a80c:cf6a with SMTP id af79cd13be357-8c6a80ccf97mr2150214185a.81.1769034832936; Wed, 21 Jan 2026 14:33:52 -0800 (PST) X-Received: by 2002:a05:620a:a305:b0:8c6:a80c:cf6a with SMTP id af79cd13be357-8c6a80ccf97mr2150210585a.81.1769034832316; Wed, 21 Jan 2026 14:33:52 -0800 (PST) From: Peter Xu To: qemu-devel@nongnu.org Cc: Fabiano Rosas , Prasad Pandit , Lukas Straub , Juraj Marcin , peterx@redhat.com Subject: [PATCH 10/10] migration: Drop iterable_only in qemu_savevm_state_complete_precopy Date: Wed, 21 Jan 2026 17:33:35 -0500 Message-ID: <20260121223336.3381912-11-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260121223336.3381912-1-peterx@redhat.com> References: <20260121223336.3381912-1-peterx@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.069, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1769034910078154100 Content-Type: text/plain; charset="utf-8" Now after removing the special case in COLO, we can drop this parameter. Signed-off-by: Peter Xu Reviewed-by: Fabiano Rosas --- migration/savevm.h | 2 +- migration/migration.c | 2 +- migration/savevm.c | 12 +++++------- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/migration/savevm.h b/migration/savevm.h index 528607f09e..ea01ca63ec 100644 --- a/migration/savevm.h +++ b/migration/savevm.h @@ -42,7 +42,7 @@ void qemu_savevm_state_header(QEMUFile *f); int qemu_savevm_state_iterate(QEMUFile *f, bool postcopy); void qemu_savevm_state_cleanup(void); void qemu_savevm_state_complete_postcopy(QEMUFile *f); -int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only); +int qemu_savevm_state_complete_precopy(QEMUFile *f); void qemu_savevm_state_pending_exact(uint64_t *must_precopy, uint64_t *can_postcopy); void qemu_savevm_state_pending_estimate(uint64_t *must_precopy, diff --git a/migration/migration.c b/migration/migration.c index 1bcde301f7..5d21d6dc11 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -3018,7 +3018,7 @@ static int migration_completion_precopy(MigrationStat= e *s) goto out_unlock; } =20 - ret =3D qemu_savevm_state_complete_precopy(s->to_dst_file, false); + ret =3D qemu_savevm_state_complete_precopy(s->to_dst_file); out_unlock: bql_unlock(); return ret; diff --git a/migration/savevm.c b/migration/savevm.c index 529cf310e0..1bf1037ce1 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1717,7 +1717,7 @@ int qemu_savevm_state_complete_precopy_non_iterable(Q= EMUFile *f, return 0; } =20 -int qemu_savevm_state_complete_precopy(QEMUFile *f, bool iterable_only) +int qemu_savevm_state_complete_precopy(QEMUFile *f) { int ret; =20 @@ -1726,11 +1726,9 @@ int qemu_savevm_state_complete_precopy(QEMUFile *f, = bool iterable_only) return ret; } =20 - if (!iterable_only) { - ret =3D qemu_savevm_state_complete_precopy_non_iterable(f, false); - if (ret) { - return ret; - } + ret =3D qemu_savevm_state_complete_precopy_non_iterable(f, false); + if (ret) { + return ret; } =20 return qemu_fflush(f); @@ -1831,7 +1829,7 @@ static int qemu_savevm_state(QEMUFile *f, Error **err= p) ret =3D qemu_file_get_error(f); if (ret =3D=3D 0) { qemu_savevm_maybe_send_switchover_start(f); - qemu_savevm_state_complete_precopy(f, false); + qemu_savevm_state_complete_precopy(f); ret =3D qemu_file_get_error(f); } if (ret !=3D 0) { --=20 2.50.1