From nobody Sun Feb 8 05:54:06 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=none dis=none) header.from=linux.dev ARC-Seal: i=1; a=rsa-sha256; t=1709971163; cv=none; d=zohomail.com; s=zohoarc; b=eC4L2CzVYjF7nTV7cgmmaKfcJq+343sVNM4YDz5s3Uo16XdMvHIAb8wnQy3PtAvGAvODGqeXAXQ+UENdBBgAwTsNoOwJrWUAarD2I+Dmx+diUQfocF138Ps4e1+IHfLNbSr3Tyt7qjpzg1l/kdWkUglVmQ4srQhpSl7SjjCDGuo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1709971163; h=Content-Transfer-Encoding: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:Cc; bh=SXSrRNKG2y6mw2kCVZivpNphMeBgf6+dzpwgsitq+4E=; b=hEwiLmQa42HniCvsS+aH/w7bvGDaccvK5TxQV+XgBc2VL8wNhMUDpATWYJn6XXsdmT3FsgldQ3ooB/R4zsFnXTT+XzvJDGmuDQTa/0FsZnlW5xQ17mRgcxL+HRe1ZSqLA+mpkvivnmxXFf2+USNsh16ASr6D2+rw9hBor0YJ7YQ= 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=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1709971163067455.6432537220477; Fri, 8 Mar 2024 23:59:23 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rirbG-00063c-KU; Sat, 09 Mar 2024 02:58:34 -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 1rirbE-00062o-VQ for qemu-devel@nongnu.org; Sat, 09 Mar 2024 02:58:32 -0500 Received: from out-181.mta1.migadu.com ([2001:41d0:203:375::b5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rirbD-00010x-A4 for qemu-devel@nongnu.org; Sat, 09 Mar 2024 02:58:32 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709971106; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SXSrRNKG2y6mw2kCVZivpNphMeBgf6+dzpwgsitq+4E=; b=P5oHATd+QOsFFZ9jzWI8MhfzRbhODIDTc5y7AZbS4t1ivzdoZdkQSclmAqLl9XGu1zrZm/ /sdXClSXS9qypSgewFLEoK9UDKqhI4bXQeij4gO/116zvKwBdULC8c3b67xEoI4WCse05l GcM56ZIGImJXKe7vlBBj/j9CFqeKgSM= From: Hao Xiang To: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, peterx@redhat.com, farosas@suse.de, eblake@redhat.com, armbru@redhat.com, thuth@redhat.com, lvivier@redhat.com, jdenemar@redhat.com, marcel.apfelbaum@gmail.com, philmd@linaro.org, wangyanan55@huawei.com, qemu-devel@nongnu.org Subject: [PATCH v5 1/7] migration/multifd: Allow zero pages in file migration Date: Sat, 9 Mar 2024 07:57:22 +0000 Message-Id: <20240309075728.1487211-2-hao.xiang@linux.dev> In-Reply-To: <20240309075728.1487211-1-hao.xiang@linux.dev> References: <20240309075728.1487211-1-hao.xiang@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT 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=2001:41d0:203:375::b5; envelope-from=hao.xiang@linux.dev; helo=out-181.mta1.migadu.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: 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 @linux.dev) X-ZM-MESSAGEID: 1709971165265100001 Content-Type: text/plain; charset="utf-8" From: Fabiano Rosas Currently, it's an error to have no data pages in the multifd file migration because zero page detection is done in the migration thread and zero pages don't reach multifd. This is enforced with the pages->num assert. We're about to add zero page detection on the multifd thread. Fix the file_write_ramblock_iov() to stop considering p->iovs_num=3D0 an error. Signed-off-by: Fabiano Rosas --- migration/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/file.c b/migration/file.c index 164b079966..5075f9526f 100644 --- a/migration/file.c +++ b/migration/file.c @@ -159,7 +159,7 @@ void file_start_incoming_migration(FileMigrationArgs *f= ile_args, Error **errp) int file_write_ramblock_iov(QIOChannel *ioc, const struct iovec *iov, int niov, RAMBlock *block, Error **errp) { - ssize_t ret =3D -1; + ssize_t ret =3D 0; int i, slice_idx, slice_num; uintptr_t base, next, offset; size_t len; --=20 2.30.2