From patchwork Thu Jun 22 12:15:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2B9BEB64DA for ; Thu, 22 Jun 2023 12:16:15 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJEB-0002l3-My; Thu, 22 Jun 2023 08:16:04 -0400 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 1qCJE1-0002h4-94 for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:15:46 -0400 Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJDv-0004hs-Aj for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:15:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436118; x=1688040918; i=lukasstraub2@web.de; bh=hbQnc5B7sbqpBhLG2YXl+AmDHf0JZy8xQ3zAuAgPEFE=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=Zta5rK+6aWtKk9i/ES2/LlWRpn2iqs7c30IQaaEgw+eC3KK7hZ8JdRexehJtZfDqLoU9Bpw v+79kF0DQNyn3JXQNi8oWKdlXY1SF/50zaBD0DkdpWyBYCizzXBH5i5qkbWTvZwsA4xOg/Q0n jbuC9/VZ5BRYOE50qHj+JObphVkzrB91cO0CFKR02ZpJ3u0H7K5++vGBzRRnDZ2AxyruTlrnE XRo1NjeMILKxKEueJ0DosT3zNRHA4LsRyc5ykRBp4FGCg2qZM7jv34kmXw2x/Yr7A30G37uNy 2VmFvGG+QnDEOk+ASkS4FTdoqAriYlMubAoxwmwC6t0EIoyM7J0g== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MG9DE-1qHkjq1mQu-00GdW4; Thu, 22 Jun 2023 14:15:18 +0200 Date: Thu, 22 Jun 2023 14:15:15 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 1/8] colo: Only support the same qemu version on source and destination Message-ID: <9acf84c3a558357d1c834923b832ddc1d2aa7548.1687429356.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:WAigrmgCJtNl1jf36bTojW5mU+hYAnVCsaGmXJIGNN+YHawfduJ bmHmbz41v/dzet2s2tji3pxrG0/0NctwRMTUr7uo5Xvf1UjeNHp/MbGbcvkstTThnPHi0BH FS8ElZQggMNGUYOtIysyx1uDCafOye2o2/y5ScWbNKyj3HPDqn1gnuWadHQWEvPZf4WFtbF AlMgu9herPfHjBRfmk4/A== UI-OutboundReport: notjunk:1;M01:P0:6w/8k4xe6qw=;QFqcGMjcsATc4xv1dNbEo2Yl6An z+TOsUsmUe81ARzPgsHgZTZF7So5ZfA8gDbwiFSeaxPilloPPVjo+6OipwYLMLEZQ6kszDJxX bwDJovKY+V/lJTmBraWr8FNn/lj+RODh031qrGo5A+b0c4w5O5M4NyRTgjeM+T/ByTT0bBbLo vKbGuGprxAJH0ftirScreFwak6y9a0MM6CrK3zWbPyjsHnV8v3fLXzUe+8RXk2uCiFBvUvLqh oF5ajuMPUqTf8E+pkE2Gq5DsnBMb74RGAUtmZWtvwd0+1gl0g1jc9+LBIFMqufHpjqU01R/rN PkWlPXxYDSVj9LsUf3KGrjDEuOQdAgHF7CHvaPGx281Be0ILbA5B3VkDfmtkP8Hk2cFdnD9b9 tLnpdgsFZlMwUL5P4h/KKSJvnFtEMNmMyYCFEga4gp81SFZTF+K/E6DCIgY+cavK8U6tET90K Vt5SA98xPbl33LWbsSvF2Ms+KEIggxIGlYx2OA3NepU/QGeM/QqowpNtnUCIdQKQt8U+3t+Xi CrbgrX8/bDks5ui5Ip0eWMEDEM2chPYTIvciDx0UO7MLMsX+mPcaT0FYpPjxIjriMW4gFnzWU 5XYENlQc4Qp+/TiyAmkuVRe8xk25ee/+gyD/S0PqJA12aEITFJx/tsdNoIlk3+QXaQZmwJSOt m509ftCZbdv9B4knmdZeVCBtmrR6Y1uFb/nvKRqJ2G9P9qJUmPLhj2C9h13IH0MadjYBCHE5I aXEeTG4Wa+i02FF6rIP8mlNJSuL+zBSsugeFg0Pf5tPNpGHPeKUXk9RebXYDrWEpN9BZ69Wgw e3wi2+rA7hjXr6ruxkWVine2Phcl/TNrj2zcSyCRBbWCc7JIcFVbOFGMdNz6ayLUTYz0vxpNv 5OdS9Qzabu4Uh65M7OWnd9czn/fTLtglIMbkwlogFm2lK8WrVkZQwol0jXogW9Pp9xw6Vhq+F fn1m5Vvu2k7jbFs6Dbr52Vz+MSo= Received-SPF: pass client-ip=212.227.15.14; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Lukas Straub --- docs/COLO-FT.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/COLO-FT.txt b/docs/COLO-FT.txt index 2e760a4aee..8e64480dbd 100644 --- a/docs/COLO-FT.txt +++ b/docs/COLO-FT.txt @@ -148,6 +148,8 @@ in test procedure. Note: Here we are running both instances on the same host for testing, change the IP Addresses if you want to run it on two hosts. Initially 127.0.0.1 is the Primary Host and 127.0.0.2 is the Secondary Host. +Note: COLO is a experimental feature, so currently is should only be used +with the same qemu version on sourcee and target. == Startup qemu == 1. Primary: From patchwork Thu Jun 22 12:15:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289087 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5246EEB64DA for ; Thu, 22 Jun 2023 12:17:01 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJEd-0003HA-0Y; Thu, 22 Jun 2023 08:16:23 -0400 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 1qCJE5-0002jQ-1h for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:15:51 -0400 Received: from mout.web.de ([212.227.15.4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJE1-0004ja-2I for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:15:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436129; x=1688040929; i=lukasstraub2@web.de; bh=eqH2U4fEnluonyQhABHLQ3e0x8Vrc66j24B8XUKpzfc=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=FAfJRoLnZEvBI7lf5TCSOJbSfgq+RSAesiWuSlLtCxEcgYGKa+HwQ2NIEZq19Gw0rqJSj+Q coOQqhsvdu2KEJpZMo/xdTuETK4xqT8A74Jc2kIdx2ZJIv/cLrlDd3pFd9PGYTPB755Q6TpxA rAo7qnmbU4L7YcxgrxdvSeo0Mp0z68JXfbZtkUC3t3zCZI6gVyrnaSaOOJjdKFOmegAoWqoZn 9be5pXaQ9j9ZQUArHS6zoM/8HMGodx/yldnbxRwnwU4TEQqJ4OiK0wwgz4ihVffTYQISzaDKY QoDtX1wS6CTdkbNQ98yi5qeK87F7Dw2/qNGbdFDQEyEOMZKZi6lw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MmQYX-1pmHvU34uP-00iIdA; Thu, 22 Jun 2023 14:15:29 +0200 Date: Thu, 22 Jun 2023 14:15:26 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 2/8] colo: Setup ram cache in normal migration path Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:KsusEnZSB//mYFcbOAwad4HTUx904f4PvvJ/5P4rrjZmIP7+6yy gaz2f7/QLFJzmpndOciVGWQqEROMh8AvsSdy+yEaWY/iqrHHHtInJotXLjDvhwCApwavh8K Q+VtPrHwCCpcuVB1Zn93unLdatPKkQK2MydN2LvLRPfOpyW/FpwgyOjEiII7HP1deAAwwm2 lFzEYfVBCX6cAMWDYBYCw== UI-OutboundReport: notjunk:1;M01:P0:8GT7lOm08sU=;oW5W61uBO350/hoTqC93xBLkmTk wUkkgiQwvgr/0FeaYInqpcTRhbIVMDlA0+/eL8YNoQYAKLHzQeBaCo7FhUSJlj+bXB6VCDYTC cdCYaISNwlRJdVWRBnEHUQajE9COU3vZBCnQOJMtQlawQmcBa4VvqIonVuKnus+tEyDASeVdv 474v3NUneLqHtq+x8/lbBkikG+AQGpC2C5wuJ0o20cQzicAC2/HxUyrG+LhAywHz/IXj8tL7E xO+24dNkZcw9pyDBlRhfS/LVTunkTXL/vyw4MQrATtSe5htpMLezCw6k61qsVHpoaPdnRO5Ze gLjrYORwcu1begUYVdWTn5eZpug/TdlofJCaBqRXRR8O77iOwiq3hY9Gkj0LjBru2U8cCPzm9 EJh7Cil6KsRBfd57c2+Kro7FQUleoVTHOsYYguHCLZQDQVO82T3ZONtgB5E+VTHrgElzccw8W cW5Utp3ERBbm/v8GLIVY8289WfY4Ti5hF9rUHEjLiaRUtZU5YEEtVXAonaqGCXhz9T5wSYBfc Mgag3ll3/b74Wdu1W+kc4ixQ0csxIjlpFyzjDRSFotjF5v0RdYQ87BsbQ1HLHM27YuTLhZAGU FX6H8gTNFZuKOHEiaUMlAk/YlstvQwsl7uGoBMcHFgFOo50YL2OLQbn7Tqv0sAHppjgF6RGAV rXQzxJiYRq31EY9MRHGFz5oXqygXRN4BRtlqY76lE2YoiiPAPEjUoNXdhohyA/UXl0mBUhDIJ uq9QDpYBHSTcTxalHZdt/5QQD9B3IcGnT3E5dLXG0voHhqZ6gmWGwoj9V41PlgSrVCB8R7KRe K+gY629hGWhZZNQqkh2JnF4RY5b5hcYDAVbq4Sj6904yu8zDC05yZjrsMCXvT4By68PB/qfe1 QnbGjt6S0+jQ0R1SsWEMw55qpZt06GyQ8UeRE2rOKLcjw/DuY8FH9OSe/0Ema6BMF+gHXM1cK wGYoew== Received-SPF: pass client-ip=212.227.15.4; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Now that x-colo capability needs to be always enabled on the incoming side we can use that to initialize the ram cache in the normal migration path. Signed-off-by: Lukas Straub --- migration/migration.c | 16 ++++++++++++---- migration/savevm.c | 10 +--------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index dc05c6f6ea..050bd8ffc8 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -404,10 +404,6 @@ int migration_incoming_enable_colo(void) return -EINVAL; } - if (ram_block_discard_disable(true)) { - error_report("COLO: cannot disable RAM discard"); - return -EBUSY; - } migration_colo_enabled = true; return 0; } @@ -519,6 +515,18 @@ process_incoming_migration_co(void *opaque) goto fail; } + if (migrate_colo()) { + if (ram_block_discard_disable(true)) { + error_report("COLO: cannot disable RAM discard"); + goto fail; + } + + if (colo_init_ram_cache() < 0) { + error_report("Init ram cache failed"); + goto fail; + } + } + mis->largest_page_size = qemu_ram_pagesize_largest(); postcopy_state_set(POSTCOPY_INCOMING_NONE); migrate_set_state(&mis->state, MIGRATION_STATUS_NONE, diff --git a/migration/savevm.c b/migration/savevm.c index bc284087f9..155abb0fda 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2302,15 +2302,7 @@ static int loadvm_handle_recv_bitmap(MigrationIncomingState *mis, static int loadvm_process_enable_colo(MigrationIncomingState *mis) { - int ret = migration_incoming_enable_colo(); - - if (!ret) { - ret = colo_init_ram_cache(); - if (ret) { - migration_incoming_disable_colo(); - } - } - return ret; + return migration_incoming_enable_colo(); } /* From patchwork Thu Jun 22 12:15:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289090 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96D43EB64D8 for ; Thu, 22 Jun 2023 12:18:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJEz-0003kG-Ev; Thu, 22 Jun 2023 08:16:45 -0400 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 1qCJE8-0002l1-SN for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:15:53 -0400 Received: from mout.web.de ([212.227.15.4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJE4-0004kL-RB for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:15:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436137; x=1688040937; i=lukasstraub2@web.de; bh=OClwFk1QdVOr62kEg2FxJDxzv/XBVt3YzwoglM/RjDs=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=amg6OTA4drXAOQJJlNGQurMl4HCeYG5Vn1L6EGq3bu/dilspZFSn6YBtUZoYwSgqGOQU4bb Kdt/1TIkdBD2c9PLZ1EzF5zNKXjKOBM+FfhOnkDmEDesZY5luwe30Je5ERDhj0PS+sJI9CYGb Fq7g3lasitw2NBF4dPswcpAeLQxiOho39TKGB8jtJbkYyMk2ZzrkZpCwZybEnh0qdDsk6mvZv MRAFWisl1rqv386P0SRcBDv+bLSn47VoIWaECRfyBC8LMCHxl5FlI9PmJw6w2+DlByt2/su+a GZii6bVT6UdnXpjLJdEIs58MJPmhGAZxWKP7rCIKFxZjRT5EujFg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MoNZM-1pjmxV2xei-00obHZ; Thu, 22 Jun 2023 14:15:37 +0200 Date: Thu, 22 Jun 2023 14:15:34 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 3/8] colo: Replace migration_incoming_colo_enabled() with migrate_colo() Message-ID: <1e6ab707c554a5ae8aa7497cc988f5032a2d1351.1687429356.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:mUZnEJfguqMtFbYK2OgayIraqHIGf4uDj6rgbT4/3VLiT7UO1hS r5kvZaePRAzlrUA7uWSqIRAKrRL/ZpH26Re90HwOJiWsMDl8EEXf/C68bTVtO+pKGqEzoLd xC4gODeRdiKw4RL28R0KWngT3APnUq5nh9hFOM7g1mMAVqLEY2Nfoy8BKina6noTEk9mFmq N6oXefg7iVxs2jSQcarTA== UI-OutboundReport: notjunk:1;M01:P0:QYi0jRSvt2A=;tp72257pT2Izp7lMKvbsnLGskfD w5itNrK62lZNAWYDZDAhUMH+8EsiUm7u0WLjkTDC2wYSohMgFOoF0mZHYr8cgGULgpAY8j0vN uOKar6W91LIBZvyJpmRmPWDs0NHSzwpCw72guIaa57ctO+Rk2NGPrpjtf82b2JR5qzV9/BoE3 L0rsudulnZEnK5dwIVBnliqLeWMXqeTrg0+LqQhh1ooz04KdlfV2JhW8j7CmJFXtUAz9l0ptr uP9rrk+lfX/p1VPlhVTTdIvQksR2VtcdchpteVO1BpmSHhVWeUbnM84uWvWUfwxJuvA97Nbhd zA6o2xdKHe7n0TIJqe7vkznaE/Lcm///2JYDpeTZ8m3jLpJYlhMhjcC3Yv/56vJ27BrV3OLGb pJp9iqNp9+EPQnK4JFvdl50tcMj5E0RgSKbLdqrMMyycI3G8FuTeXLNJ9nmFB96I2U+DRJdBa tt2KOhHZOTwjyd5UiGscjIaG6Vzmq11PiDR3BjEaNKyZh7eNcBXRQFZaC7sS/kBor1xuQToWx 0DBmM/27yRZINiZIN1Fvs9XwwFvLd8VktidUAAZ94DK+jsXPSb/cBQ732CC5AkRxi0K6FiDQX 6Kdn5IfjCEeYJE/DVV6oEZb1V4KOxCVxJ3AmxrgAWr6rSTNiU8LZrvtQ9BMBqSe+caajMLHuG vPpJbjIdZb1dkUtqXTyKpFoKazFUeAxfUUiI5soI2C0gDf4U4uFKJllS5f17Zd6CpUpXff+xT QbIfQLvnhFQuLJcj4Mw4AWVVr6VA+qUnYP13czKT0ZXyJpAMZN3dDUpl4IW7hpDknzTtydLSu VIs6MnwI1wHS28eX2YMQBAoU4aAsOqwsBpG14e8ru2JUOwB9UdqjlIjQF8KxoH+0FSNX7MzNw tUHZYrwpaTwR216QkNf2OyZzWnzRCM9eTA5mZAD1H/bsQAdL8q1iyDg9i9CqHnkgF543flEOt w84DTG0YFukGUIU4qBPZ9I4vlAw= Received-SPF: pass client-ip=212.227.15.4; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Lukas Straub --- include/migration/colo.h | 1 - migration/colo.c | 2 +- migration/migration.c | 7 +------ migration/ram.c | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/include/migration/colo.h b/include/migration/colo.h index eaac07f26d..4a1955067b 100644 --- a/include/migration/colo.h +++ b/include/migration/colo.h @@ -27,7 +27,6 @@ bool migration_in_colo_state(void); /* loadvm */ int migration_incoming_enable_colo(void); void migration_incoming_disable_colo(void); -bool migration_incoming_colo_enabled(void); bool migration_incoming_in_colo_state(void); COLOMode get_colo_mode(void); diff --git a/migration/colo.c b/migration/colo.c index 72f4f7b37e..8b0e7c9af3 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -927,7 +927,7 @@ int coroutine_fn colo_incoming_co(void) assert(qemu_mutex_iothread_locked()); - if (!migration_incoming_colo_enabled()) { + if (!migrate_colo()) { return 0; } diff --git a/migration/migration.c b/migration/migration.c index 050bd8ffc8..2506fd63f7 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -379,11 +379,6 @@ int migrate_send_rp_req_pages(MigrationIncomingState *mis, } static bool migration_colo_enabled; -bool migration_incoming_colo_enabled(void) -{ - return migration_colo_enabled; -} - void migration_incoming_disable_colo(void) { ram_block_discard_disable(false); @@ -484,7 +479,7 @@ static void process_incoming_migration_bh(void *opaque) } else { runstate_set(RUN_STATE_PAUSED); } - } else if (migration_incoming_colo_enabled()) { + } else if (migrate_colo()) { migration_incoming_disable_colo(); vm_start(); } else { diff --git a/migration/ram.c b/migration/ram.c index 5283a75f02..e3eadd08cd 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -3892,7 +3892,7 @@ static int ram_load_precopy(QEMUFile *f) * speed of the migration, but it obviously reduce the downtime of * back-up all SVM'S memory in COLO preparing stage. */ - if (migration_incoming_colo_enabled()) { + if (migrate_colo()) { if (migration_incoming_in_colo_state()) { /* In COLO stage, put all pages into cache temporarily */ host = colo_cache_from_block_offset(block, addr, true); From patchwork Thu Jun 22 12:15:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 83E9DEB64D8 for ; Thu, 22 Jun 2023 12:17:07 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJF1-0003wX-13; Thu, 22 Jun 2023 08:16:47 -0400 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 1qCJEN-0002vp-GD for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:09 -0400 Received: from mout.web.de ([212.227.15.3]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJEK-0004oG-Qd for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436150; x=1688040950; i=lukasstraub2@web.de; bh=ea7VwcjFFAVHqWFdORSqpLl0iTAREXn2aHg2ceqegUA=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=YRplzXbFyj6v5Bz3764QVejYFwJLlEZCcziKJuICUKUuACxzYS6Nl/UOZvFKDUn/pFvR77O B82T1otwXZQ6as/JhPCVGkUqJYxH4uaKTwf2JTgPKyrI8TvbXJ2s7kq2eGDMHGi4NlosS8923 T3QRegvdfauj+IfTS8by2p2zXIwy8UiufXYH8yklPjKDjzVNTMCVbtpusGD47p3XCRqhY288J HHaWQvELqXeF/PNa9mNL2RuJ5a9LYlZ1mpQD1UmfBap2Qjj3xX3UzGUn6CtDEZJqtfFkeqA/z 0lbhIRun1UhejNkC/d2Yr0QCnDtFwfBXjcLAVNEUHVVv5+jLveTA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MNORC-1qSIZg16x0-00Omjr; Thu, 22 Jun 2023 14:15:50 +0200 Date: Thu, 22 Jun 2023 14:15:46 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 4/8] colo: Remove ENABLE_COLO loadvm command functions Message-ID: <5628c538ff7b35246b5acb09d82420abbadccf02.1687429356.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:rHf2CjxAyFfBTIw421O2e/9f41n+xaSpBVwxOgdOFs4sBT9d0RI ur+hHtg4f3+4kvOEgf9wadssPCPSe0bWeDZYAxMMzkFttjGAQaVoN1z2/tm1C953RzQpXsF sSwa9mz0JIaHBdFoLo+DR3b5eKj4YDNmG7w4X+U4kfoSbiEMxfhKV3Yuqba8w4/n3UfOQVs 8tf0sp6rFm1Cf26lTwwcA== UI-OutboundReport: notjunk:1;M01:P0:ErDGgjUG4O8=;iCVAnIzWattqwr2fWBa+rITyFLY 2eJh319jrngPEx7hIo17e3jFrIii3bsrDVMgt91f8HsL6T3c1ysk0R4XLV3iOhYpSug9u6NFx 5iqjsrH+GpY4aq9cODhnn5qs4oAI4DWWl28eaJEp+trkTqpSjqc23u6uWvTDSGEIgMFycGNXk lpQLxT7K8umOQqMM2RWAxiryzzjfu5ASLMjvob36JQD19s9AnvFs2+URHniXJlsfAxUZ/IfoT FtxU0eGu76XkO/gLBkqhjpjdnGe+DO2mE9/Vext9Bhecn0ZqPLsVjR80krf0JGSRp6jPU5oqJ 9uJCvTYUaVHbVG1u4z5/KDKaYjyjminOiqWMF3/vqzWxyc/1au/nDNHEXnkhrfKxAaG2WD1Uy 1sbW9wy6Lx32x56zC3u56SoDYejEkQITxDGtnc0FhN2m5PfweWmSBV/a3Ugr8sIJ+Gvosq6Hi tHsqU0/SO28iB/+zF0/IjH51+HCmhCRMocg2L4xAy5H1ffCBfKhZsnjp5xAPsB8ojbc5N7Vlp GWMIlbxssrrKeegnZH1NuTWg2BzGmal4BcY6B4a4S62mS+5higpvY/VYfz27GWPAadlc6d5BQ +mJF8zLZqp96f6DVdevnHqOQPxURfhhdJIdlduUlf6qR8VejhPepaFKRJbUyp7uc3aSpYjrOa 5UhHuFgyNFIEbF2TahNAb9Gl/2pOTQ5HaUg7maS1xRd/ZNGWyCkTDs31I/BNIFU33kFS6Crhs GIYijHrQu+53noiEQI6E8vmfCva/HKl5KELn6+V9ZQDFZszQLaT9ozncH3HRYR6j7Tlq7q6KN lNt3vEhJjCnIAdYJVBdzu+Y9IuX5BODAV/NOXnt/ou0QQCrLPDdoR0tmWnaYN90TEnqaImK81 chCbWRRPm1a//FueJShZSC82x09owp0HqI3qpBr1tEHNG07C/UM3Oi3v0KIxUXUDE1CeuA/Co 7qMZ8HxhtAB68MrhLYU1pcLCG/Y= Received-SPF: pass client-ip=212.227.15.3; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org No need for it anymore now that x-colo capability is required on incoming side. Still accept the command as noop, for compatibility with older qemu. Signed-off-by: Lukas Straub --- include/migration/colo.h | 2 -- migration/migration.c | 26 -------------------------- migration/savevm.c | 7 +------ 3 files changed, 1 insertion(+), 34 deletions(-) diff --git a/include/migration/colo.h b/include/migration/colo.h index 4a1955067b..addbc24fcf 100644 --- a/include/migration/colo.h +++ b/include/migration/colo.h @@ -25,8 +25,6 @@ void migrate_start_colo_process(MigrationState *s); bool migration_in_colo_state(void); /* loadvm */ -int migration_incoming_enable_colo(void); -void migration_incoming_disable_colo(void); bool migration_incoming_in_colo_state(void); COLOMode get_colo_mode(void); diff --git a/migration/migration.c b/migration/migration.c index 2506fd63f7..1d347533f9 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -378,31 +378,6 @@ int migrate_send_rp_req_pages(MigrationIncomingState *mis, return migrate_send_rp_message_req_pages(mis, rb, start); } -static bool migration_colo_enabled; -void migration_incoming_disable_colo(void) -{ - ram_block_discard_disable(false); - migration_colo_enabled = false; -} - -int migration_incoming_enable_colo(void) -{ -#ifndef CONFIG_REPLICATION - error_report("ENABLE_COLO command come in migration stream, but COLO " - "module is not built in"); - return -ENOTSUP; -#endif - - if (!migrate_colo()) { - error_report("ENABLE_COLO command come in migration stream, but c-colo " - "capability is not set"); - return -EINVAL; - } - - migration_colo_enabled = true; - return 0; -} - void migrate_add_address(SocketAddress *address) { MigrationIncomingState *mis = migration_incoming_get_current(); @@ -480,7 +455,6 @@ static void process_incoming_migration_bh(void *opaque) runstate_set(RUN_STATE_PAUSED); } } else if (migrate_colo()) { - migration_incoming_disable_colo(); vm_start(); } else { runstate_set(global_state_get_runstate()); diff --git a/migration/savevm.c b/migration/savevm.c index 155abb0fda..3a1de15bd0 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -2300,11 +2300,6 @@ static int loadvm_handle_recv_bitmap(MigrationIncomingState *mis, return 0; } -static int loadvm_process_enable_colo(MigrationIncomingState *mis) -{ - return migration_incoming_enable_colo(); -} - /* * Process an incoming 'QEMU_VM_COMMAND' * 0 just a normal return @@ -2387,7 +2382,7 @@ static int loadvm_process_command(QEMUFile *f) return loadvm_handle_recv_bitmap(mis, len); case MIG_CMD_ENABLE_COLO: - return loadvm_process_enable_colo(mis); + return 0; } return 0; From patchwork Thu Jun 22 12:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289086 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3C594EB64D8 for ; Thu, 22 Jun 2023 12:17:01 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJEv-0003UO-N3; Thu, 22 Jun 2023 08:16:43 -0400 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 1qCJET-0002yv-VV for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:15 -0400 Received: from mout.web.de ([212.227.15.4]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJEP-0004pK-RS for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436158; x=1688040958; i=lukasstraub2@web.de; bh=LHTPFx26nLfuCo78D/NfUSFHYtAmB2Ipa3ilByNTIqI=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=tABNQIRMB7zNJ6FXBBk3LMzfV11QXWy3p98Y/19JRpW/XSzBTpocHr5VnoZ6rZqxsJhtlEd n/3fn+6nP8gmKAuPh5o1n1FlEF6fz+FwuXLH/L4EU1+pWflAwajOIzVFXeP8dO0qV5J1zglmm ZwGGsLJ4BIzn61p2CSCTJNiEpjdqLmEuhXOgWTjEGG2lmdnYK9f2cz8LBn9gIDUfViVGdXEtc Tqlzd1razHU20bN2/m85fVuUkCnyMOrWdeEhfUUlCLTG8GAiiKwhLVE8ZBoVSja3yPFUh8v6q +FiPgU7TM8EVyOwzGv6On1Fk+y7YIwgME5gBhDiZB0JkrcvYrnMw== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MElVH-1qJfbZ1A8h-00GMmM; Thu, 22 Jun 2023 14:15:58 +0200 Date: Thu, 22 Jun 2023 14:15:55 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 5/8] colo: Don't send ENABLE_COLO command Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:MYV703HeTQioXgtgsJKYkXs2I42pDTlRQ++aQLb+ToeUh8NraYu c0fe9SfJ2qfWhuTZLg7+P5ghHxnyRtGU2hUuDhIOZAYTiR9UucPqjMkkJCikimzXPyiw//t /X1U6ABA9WcFkN9kvriDJowTQj5Y3v9b9XGksopWVvUvGp610lv4bbwevvGWIrci6ekR5gP qQik9oGvpuaZM+xWPr8FQ== UI-OutboundReport: notjunk:1;M01:P0:C4saCdPCwJE=;UXUowXWHhVTZH3pOmVUMQYD7+Tb uk/Z04L6COcG+WYMBuBMfGQ+cNwwNPcwMfpYybxGzmSHqnUqtwLNdHgwMmDqgLo72iUM9hovL ZLCIa8f1n4+H+Z4rTfmB7Iv4rpjf/+rPeAfHgKE8vHRPTq5AXfOx7hUzcnOUZZXul4DgUx+ne c0NUDPsPDQJ/iOeb16NjKfGenKXOiAuybdrefX5EsRH9MRRSOJagVOohACUTsGdKy4iGoGiYV u2yWa3GH3R9MUoQnEdGfAwu4yc74+HTA1J7sSr7rlvWOjISAHapbRIRMubCvXH/pZh/zuUFJ5 2HZFWSjzJS5eI692Om9nuv3IHg3UdKBaHHQsEjeOD/e4EJYRIw81jVzTjI+RwTcKBT+fGSCpF BWozS64Wmxlyzwq1qhbyWvvdHV+qZJBw/avEmRNRzCTQsPlIMS1KkUH1B8gJiKXRf4JU6E5CM dEEh/wDM84XkItoMnT8NF3xANhmCWSfiiwBbmH3iGx0jvS7QpGxMLYFETQKOW507B1MklBimE OJCpKaX6pLp+zzeiPoS4CRKjGKqg7Cy2D1MlylgSEqAs33HPYlqUPvLfUp/QooVLYNXYj2YMg XxNVSKH1DszISSYC5rlfK18+jmTTNxw6UaDlc92ojJaF/MIf4m1+zM+eiamOAI+NunBsvPYXl eHW9pbb+sZ10hMFwitTO/KJaEO2mnvd+Bu56+aapSzDPEC+3fY+GNEHZiHIMWX32DkClnDmih HlzVhqryEas9id9nvj4slfeOp5fJtIILkKQUKGk8VYj1sSuSX0G/ndGNBh7koJlIKW03qZKKv 02xGZplik9ttexiNxIFbRLL4ISqAvP4eyjfOM22eK/tS8EWLWy7WpLs+Om3sribRr5Dw4iP2A vnPY4dEMOE0cMq5jrjulmwwhAnsReyT8xIHXOYcEhDm6j66oCp/+/HPBucNi07ex2Um1u5VbC AXnsby4ALWIAV++DjrSJSuez9kU= Received-SPF: pass client-ip=212.227.15.4; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org We should only migrate to qemu with newer version, and there it's not needed anymore. Signed-off-by: Lukas Straub --- migration/migration.c | 5 ----- migration/savevm.c | 6 ------ migration/savevm.h | 1 - migration/trace-events | 1 - 4 files changed, 13 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 1d347533f9..a954ff4f7d 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2929,11 +2929,6 @@ static void *migration_thread(void *opaque) qemu_savevm_send_postcopy_advise(s->to_dst_file); } - if (migrate_colo()) { - /* Notify migration destination that we enable COLO */ - qemu_savevm_send_colo_enable(s->to_dst_file); - } - qemu_savevm_state_setup(s->to_dst_file); qemu_savevm_wait_unplug(s, MIGRATION_STATUS_SETUP, diff --git a/migration/savevm.c b/migration/savevm.c index 3a1de15bd0..5986f852b2 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -1035,12 +1035,6 @@ static void qemu_savevm_command_send(QEMUFile *f, qemu_fflush(f); } -void qemu_savevm_send_colo_enable(QEMUFile *f) -{ - trace_savevm_send_colo_enable(); - qemu_savevm_command_send(f, MIG_CMD_ENABLE_COLO, 0, NULL); -} - void qemu_savevm_send_ping(QEMUFile *f, uint32_t value) { uint32_t buf; diff --git a/migration/savevm.h b/migration/savevm.h index fb636735f0..cb3318e9e2 100644 --- a/migration/savevm.h +++ b/migration/savevm.h @@ -57,7 +57,6 @@ void qemu_savevm_send_postcopy_ram_discard(QEMUFile *f, const char *name, uint16_t len, 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); diff --git a/migration/trace-events b/migration/trace-events index cdaef7a1ea..bd3ec40e31 100644 --- a/migration/trace-events +++ b/migration/trace-events @@ -36,7 +36,6 @@ savevm_send_ping(uint32_t val) "0x%x" savevm_send_postcopy_listen(void) "" savevm_send_postcopy_run(void) "" savevm_send_postcopy_resume(void) "" -savevm_send_colo_enable(void) "" savevm_send_recv_bitmap(char *name) "%s" savevm_state_setup(void) "" savevm_state_resume_prepare(void) "" From patchwork Thu Jun 22 12:16:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289092 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F187DEB64D8 for ; Thu, 22 Jun 2023 12:19:57 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJF0-0003ro-4x; Thu, 22 Jun 2023 08:16:46 -0400 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 1qCJEe-0003OE-OE for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:33 -0400 Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJEc-0004sA-Ly for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436166; x=1688040966; i=lukasstraub2@web.de; bh=Px+Y/tVB+Oj9OhJDFyDlzeSvmWStrMZ2B884l15ZcAw=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=oOliFi2qcu3+QMRZDA6tq2v0Tt7o8asXtMF6XSafsA08Dq6JtiB/H57bkeS3G/DQVSpeBDv 8d4llqhkP0IwozvBKkPdpkXosNAbEx/PAe84hjD1PQaEq2CK9WuKTCgP5Htp1gS3oBUiimXT4 1gZW9kHSZvx7HLtLSsFX0pPGo+7SF37t0uZM2NvYBCYkUdQEPV48ryCbPIqA3BP8UutECmnao 6ArzYzLNoPNjNHkHuGlhnBg2cGb6t9tTPt0SgRyp81Esc3yAPg3NjcUJJMilr2+RU0Al43AFo h09SwFubSgrH6G0ovtkj0KGhASxgF++UM5wy8hVKfu6lWTBQTuKA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1Movne-1pjExE3538-00qFRh; Thu, 22 Jun 2023 14:16:06 +0200 Date: Thu, 22 Jun 2023 14:16:03 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 6/8] colo: Reject colo with postcopy capability enabled Message-ID: <1054ff7b2410ce8ec05a8b60cdc8faf306a7374d.1687429356.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:y4DshqWHV2DQ2aDrKmbjEuvEL37cnBwpv5al7mJPhqpX1B5al2q LYEWV9L73GzQen9vFlcmnVVWAKsAst6UlYos+Av1M+abG9Qt2oRttLUZnzCsts8dCu42PxC 3EWS9XVTJGY1l5Q8EpzrwrDtFHfbN1Rs+CF4I7cfHPXXMjDz42ccCUMtkn8ROyXvHaKPNQD dBLbjLoYw9JptR+SWNK/g== UI-OutboundReport: notjunk:1;M01:P0:xOoR/uL/bQ8=;15XvXhvdrGu2H3D5uhVAx1PdiQc LIpN/dz62oOJfXYW8oPRMEGrl/WA2Vq+a7zNsnynCQ7IPqU6vccLw0EQi2S2O7cMjoLOs2ivg tQ2ZBGhboMWm1V1bW131nRZRrjeZW5GfhH3pw0EQg4MCGkR1165HeRBmCpEKm9VcG3yOR5Dvt Sh1cx0m2LPBhUXAToytYyggXcG4ORLWgJQIOiAlz7zVLUy57sDzDJio+kjeE4kdeKSdceKi4c YexEEsogsiaPcEIP8k3k3p8EZmmweTcLTg3vEQOJqSOd7O+xZuCithFvcFwxtFXezxEXjKT0z ZvHSDFCv03vKnrld5pCfD4p188bmwSaNDOtYdfUKLWgQ4s7tSxnbN31bT3ab63U5jzWCl/X3x +U2Mp9SF9d0tj9XWC1IwFd+gMUlK7RIj8Z74meW08lBctUW4mTmItnHoHNLooB3Ream3iXYH/ E1AHsR57Z4f07h/Ka8KIAht9ZeeGLeZbsCAS3efL3vuHxwt+C0BJdDDvqu5yULakx+lzyMsSg ZljLnXQGNmiCAqIp1oHYn9kUjLYlx3Wb9WBP+qdgheJLPWOOn5q+SpaiY84Bbi2YUt+/OYJJk wUNH6HvQ1z7724olc7u6V2NbWebKE2b/FF4ip+/VvdyvZBKAIlnzZIiLRXG3rp3c4wfKWlztC xZAQ9IwYENXSAcue35ytflTY3cjzCUHcMJDeI9BHaf+HMNJk2eFhPOpjfdLaS2dIWsiHVKJ9d 2+NHmZ6L8suLPzUPyahShbCw/6yR+C12IwaN21IjvqwdFekMVa/EPTt7tc1AfWsffZ2SxY25D mQsduIW9/hWeP3y/wtKxFVV5gvEoVqfT8QzxVcQ5IyEWCpW7MgcRbvWdyH88U2KkDTZdNsCxW FZ45Npwi7A4/EYKl1j9gomKHJmjalbIPnpFnM4PV2GOMvZcYoHGmlS6aHlOmAwTtR+kxhUWRT v15JHzth2ugnsW+Ok3URRvhUp1w= Received-SPF: pass client-ip=212.227.15.14; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Lukas Straub --- migration/migration.c | 5 +++-- migration/options.c | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index a954ff4f7d..9860f960f2 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -2333,9 +2333,10 @@ static void migration_completion(MigrationState *s) goto fail; } - if (migrate_colo() && s->state == MIGRATION_STATUS_ACTIVE) { + if (migrate_colo()) { /* COLO does not support postcopy */ - migrate_set_state(&s->state, MIGRATION_STATUS_ACTIVE, + assert(s->state != MIGRATION_STATUS_POSTCOPY_ACTIVE); + migrate_set_state(&s->state, current_active_state, MIGRATION_STATUS_COLO); } else { migrate_set_state(&s->state, current_active_state, diff --git a/migration/options.c b/migration/options.c index b62ab30cd5..d3d4525d40 100644 --- a/migration/options.c +++ b/migration/options.c @@ -445,8 +445,17 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp) error_append_hint(errp, "Please enable replication before COLO.\n"); return false; } +#else + if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { + if (new_caps[MIGRATION_CAPABILITY_POSTCOPY_RAM]) { + error_setg(errp, "COLO is not compatible with postcopy"); + return false; + } + } #endif + + if (new_caps[MIGRATION_CAPABILITY_POSTCOPY_RAM]) { /* This check is reasonably expensive, so only when it's being * set the first time, also it's only the destination that needs From patchwork Thu Jun 22 12:16:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289091 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 39B54EB64D8 for ; Thu, 22 Jun 2023 12:19:09 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJFa-0004VY-3k; Thu, 22 Jun 2023 08:17:22 -0400 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 1qCJF5-0004Dg-4C for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:54 -0400 Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJF2-0004xw-8n for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:16:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436192; x=1688040992; i=lukasstraub2@web.de; bh=OXl53ydPaLHEO9W6L9zf0yph3Okbtg2KEAYvqSFOuWc=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=pS0WGnPPhz9BT8pM+Jop69Cku8NcEzMaSSaG+Lxj+n447MYgBr/rOZPAalo2CR6bW8/aeX2 H77y/9A5pmXRiIcOrb7A8V17aulhmF6KraneacpvDWaBB7xd39OZ3wrLIFe5sH6xq5U/iKWa4 rZ2k8Alu/ub/4fCfDja9t6dEhgKEHmjhy5rX/VVOQ+HVzN/FmAUFf0FDQZe9+6y7RsOP5Ad5X lFk3z9OOEv3o5ehOcVFUMYYvVMpANyhQ4sLC/fYy4Zv5oUJpDgtnc7Cc/aDPqBEBiNJQJgLhM bz4l7KVNMxvWiymKWBzSNzWH9ZGLkIeuIoqBVpnAc+wxVVpu23PQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MDvDU-1qJykV4A8i-00A4PA; Thu, 22 Jun 2023 14:16:32 +0200 Date: Thu, 22 Jun 2023 14:16:28 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 7/8] colo: Reject colo with block migration capability enabled Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:s/YoV9zE25RIi3G82I/rJwAND2jDra5jR5vkSsIJUB9vOo6Dt95 dbf1L3WSHlUcJohkIWxX8+DcXiIRlyPdIPJZlm0Kt4Be0Oicsos79zZvadI1rTvc75hXTrA Iqz9R+J+zEN4o4I4guIR+IhCIQRgAqCtDBHjMh6zJDDXEYhrRUhCtdK6mxlBdlJdKKuEsfZ dA50JJeiibu0WjdyCnxHg== UI-OutboundReport: notjunk:1;M01:P0:CPhDQX7JfzE=;6GdoBkR2G7yc6WK2L2D5JeTbVA7 PKP0Ya4sn6W6vLbk315AFovGBt9ypbXU8I1A3amNeGaby5gD8/GIclHU95YfvcVf/Xi3y72SS vriurfG9hQcXgLtx5VAWwyPe5mqCO42NDK+OjQ2pYFwm5ohMI6JDqj6uxHTnK2d4B/4A/sWmq Km2H6KPqFq1NMsOTrt4eD34bRq3ZYF21ri3+T0ePYI8jAvOxUJ0cGFlgwbLpUxYI0PcqjK+SW xGTpIALSbE4j13TBzcloZ3z14Vy7suin5Da0SrceN6SUeaTp7D8JI01YrFZQPyHZ0wpWF5Y07 tjH+HpwJ5jDxcvfhK1gfe+uS4+Yl/r46KI79GTRJsQwiAcNMsAqDXm/4mut31Gmjy1Vis6Rzm Qvx2iFlFFM8YeABdaR7MzO4qXJeiQuVELLz0TTuTP4ZyI7N6EENqd4jIzFKZdkMJYDPMkUYfY 9GdVW88UCrtgOLtCFMv06X9LpoAfYqAW0kKPxI3GAiegwcdl96mv7k35UY3d0z9HZi1cYAI6U zfO7x2VPdqBOK42bN2IJGRrWX6TuCdF0rQvpIj3uEErLFPOWzeDkpxxHVz7sbopIZMG7Ul+WH PlwTUiRbAOXyZJuB7IdsFsKIuEVdEKXV6i8VjEsF7k6J+2AGTUpU/wT+D8w7n3DZ32ZAYUH91 SroElE5f26l/qMEjzt2eIcGMDoLx/QbgPigBiQZHswSm2HIw9tr552Xs3oxGiZh6xemZQhL2H 7IAIBop02fRxA51UiZuD7cZUlxCeFc3lL/Jf3xwUNoCcAVKfK+CYeJUapTiklbxgCL4cTJ+sC 6ihmdiAOFx0N26kKR1Bj2B7wiaQQ2PxsvnAFJJD2fxwHDdsNgGeJ/ys7SmLjCYDlGQWUN9BTJ S9u3C3mZHte8M8zjOJtJaNaGRY71b9lClVCXueGcd59SrL3dZ1O8g+yLVX+xZ2EEwIYZwpe47 EhENgOfUN7BWk6eGp0ywpJYM/cI= Received-SPF: pass client-ip=212.227.15.14; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Lukas Straub --- migration/migration.c | 4 ---- migration/options.c | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 9860f960f2..270130579f 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1571,10 +1571,6 @@ static bool migrate_prepare(MigrationState *s, bool blk, bool blk_inc, } if (blk || blk_inc) { - if (migrate_colo()) { - error_setg(errp, "No disk migration is required in COLO mode"); - return false; - } if (migrate_block() || migrate_block_incremental()) { error_setg(errp, "Command options are incompatible with " "current migration capabilities"); diff --git a/migration/options.c b/migration/options.c index d3d4525d40..1e9659fcb3 100644 --- a/migration/options.c +++ b/migration/options.c @@ -451,6 +451,11 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp) error_setg(errp, "COLO is not compatible with postcopy"); return false; } + + if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { + error_setg(errp, "COLO is not compatible with block migration"); + return false; + } } #endif From patchwork Thu Jun 22 12:16:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Straub X-Patchwork-Id: 13289089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9FD4EB64DB for ; Thu, 22 Jun 2023 12:18:34 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCJFe-0004rd-L4; Thu, 22 Jun 2023 08:17:26 -0400 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 1qCJFH-0004PG-Fz for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:17:07 -0400 Received: from mout.web.de ([212.227.15.14]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCJFD-0004zW-1w for qemu-devel@nongnu.org; Thu, 22 Jun 2023 08:17:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1687436207; x=1688041007; i=lukasstraub2@web.de; bh=g6yu7GvQieWk9mfhwl3BdPKipbnnXa0sMfY+/YG0PfQ=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:In-Reply-To:References; b=tsQPWgMCqzqIP+5K/wJS/jpiCLfv7kDfCo70nVE3GVcVfry6/hdSm0v+uXOVJr+e2ZEUJsY TYs5TrVs4hcnKWZ0dGV0FFrqHkZNCV8TBo6JoZus5zGoNAp5UQZ4b76F6Akn0NgSJhD0UJQen Ab2FxyRjUSfDddrlKIO3frHGWDYLumFYRujTJfMu1Aai6w7WA35i7xsYeNeKuwBr8cQmPRt4R WY0JYgSlbF9lBDuBQ5BJETirqgBEQQ0JNPMKXcGLU1sw5sRM31h5IXJo+BTE/Pk1RTfM+nM5g 5UWT+mWcjnNrtOxx4c8YJya3okdKQdCsQF9nGBEagslN5Z1UfEEQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from mobian ([141.58.32.133]) by smtp.web.de (mrweb005 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MgRQJ-1pakV61y75-00hy1w; Thu, 22 Jun 2023 14:16:47 +0200 Date: Thu, 22 Jun 2023 14:16:44 +0200 From: Lukas Straub To: qemu-devel Cc: Hailiang Zhang , Juan Quintela , Peter Xu , Leonardo Bras , "Zhang, Chen" Subject: [PATCH 8/8] ram: Remove useless colo special-casing Message-ID: <5f9a18890044d4c9801c47e9e49a35cbb882a523.1687429356.git.lukasstraub2@web.de> In-Reply-To: References: MIME-Version: 1.0 X-Provags-ID: V03:K1:/mVDHitdH5qFmz2RRtRVeYMsw/TyLcn/V8/+XMuQCI5T7zGftjU gklaM3Da65ErO5vv1+rtIHpahtXvuE49ATRqoYHCAAFTOdQAps/wb2Z11me/qQwt3+s19Pl qU46nan++MSqPC/QEfHKdbWb+NoGUoM2DNS4fo2rj/Kw7tWBQ6kWbMFAbKWGF01zK/DufdS wuoN/gTwE39jTgQjYjMqg== UI-OutboundReport: notjunk:1;M01:P0:yszvcjABKu8=;/rAD5DSxCL0ypr59SHZ79fhYYsj bIDYBKY0Y2I0gJ6v8ZW1/SEYYBWhZikHdPso+LAFcH+WgdUStZ+dAAV7Y7WXkXOXN5V8Cojqp 4S54WUssOf2IsvEw2VnkByM3/VRGQ/0Z7hbtGPVl90GOZmGe9XaVZR8iiuyRX8BPUf42vlDIH eo7+MwXLPkNtl/H43HVmO0SXaYov9sD47S9LO8rDKMW0HLNIEBYJqjCmEblzYS6zdSOtDr6Ok RKeacBLFP2S/TFZvPP9jU7Xtl56cx+fnRnu/L4TA7Gye9hUoN4CsGTyAikic4/sNNRGeX41gs BaRi8s8dNYeRoBieFVdkeHtmIV4HDSQaBqmiy9Mm/z9VwOgHhlFZOTfGzMrfjHVZhK4wivZke dV3/b19bQbXpS0EsnuR8WO8AqhG10/D/8WGxf1yd0RyNzDK9MmMcpaANitgmO0aplmWPs/OPE bBPSVRGXi708v/aX0tn6x9y+xVnavVZblJjc6g+97XmbaYlRl9Ry8kcKNMMjIcKZIliJ3m6B7 pOuLHPdYWZGwtn0mM//nhv0y2raxmlE+iWwxETGWgeb4ynYyUPOeQwdCH6aj3MhQy9jD8/SvR U+7omvW495ytFBQgFxuJVUr6Kpb/+bnD7F4zOAsBzWij3vLdgB9eF3eqNacTZ57NMZTerazNa AVdz0NUBO5QU+g44AWplMdXJVPda8EC9osI91+xLKAodhvVJpEH8Lg8hPIyf9rY+HKGmYfyvY tv3fe05Aa5ESdGjizh/Z8VXva6qNV1pWyCYkBmhH45jHp5VvyWZ5M8sFF6b+nIzZI5z/H79J7 XR/ASL3286e7SvOUQKCFkABRxfGhfxilQnOKdfUbXSNeW2Wp6TMrGNYqRhZAMvAQtDsbqeceL uCHzj+4bcZbp/aU0RoF+12qOeMNyZQwdHY+3pV0txGHHWyAWKwoBs3xns9vilp0fM3H/SyjNN Zu5QVXvgsYjdFJaBth1PoUdCKvs= Received-SPF: pass client-ip=212.227.15.14; envelope-from=lukasstraub2@web.de; helo=mout.web.de X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This is not needed, as colo primary side everything is more or less a new migration for every checkpoint. Also, we only enter colo mode after the precopy migration is finished so this if is always taken. Still add an assert just in case. Signed-off-by: Lukas Straub --- migration/ram.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index e3eadd08cd..e5c1146360 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -2994,17 +2994,17 @@ static int ram_save_setup(QEMUFile *f, void *opaque) RAMBlock *block; int ret; + assert(!migration_in_colo_state()); + if (compress_threads_save_setup()) { return -1; } - /* migration has already setup the bitmap, reuse it. */ - if (!migration_in_colo_state()) { - if (ram_init_all(rsp) != 0) { - compress_threads_save_cleanup(); - return -1; - } + if (ram_init_all(rsp) != 0) { + compress_threads_save_cleanup(); + return -1; } + (*rsp)->pss[RAM_CHANNEL_PRECOPY].pss_channel = f; WITH_RCU_READ_LOCK_GUARD() {