From nobody Sat Nov 15 05:35:26 2025 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=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1755643221; cv=none; d=zohomail.com; s=zohoarc; b=gfP80xkYWA988SbU43+6WhljjXioF3+x9Ouz4k18NjbWHRGaXCJ1dHitg3qBwkU3eBxOk4J3GHKxoDFUFngaj/SupZdDYisPKc1E/KIJ7ztwveDTWy8i7h0+LX+iSpfFi6DSbpWEYOHGDf2X2vT3JuyRm7JS0G16GzObrhaYWMI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755643221; h=Content-Type: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=SGMs/cXmMsU9KIWBRfHaZ4oTboSJQO3fYScnCEcgy6Y=; b=U2srYckOkQ2DJBVISxC5bs3m/UkmPXKP4xed3XZDLwgb7rZVnBVN8RaZANN75oL9eFjbd/MyJKFnURBoirCC3XSZI5fAJ9o/fQqdEGw80qhG0c+1QvWdx295x/ohHzTZ56p5UkQoOhFN/ewiCX0R7RmZ2OZOhKB+Gw5XREh9Eqs= 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 1755643221108691.9466662999323; Tue, 19 Aug 2025 15:40:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uoUzC-00083U-7K; Tue, 19 Aug 2025 18:39: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 1uoUzA-00082d-Nx for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:20 -0400 Received: from smtp-out2.suse.de ([2a07:de40:b251:101:10:150:64:2]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoUz9-00083q-1R for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:20 -0400 Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 3A18A1F76B; Tue, 19 Aug 2025 22:39:17 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B326E139B3; Tue, 19 Aug 2025 22:39:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EKTbGhL9pGh+TgAAD6G6ig (envelope-from ); Tue, 19 Aug 2025 22:39:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643157; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SGMs/cXmMsU9KIWBRfHaZ4oTboSJQO3fYScnCEcgy6Y=; b=YcvGie6Pt53yRq7hfIzRXFnr2xAiXDLRUacaLZg6Lmc7emYcKbwy2EDOZlRVcxrgfV9wXH mc8uSxNgYI5abzigU8LsBaig8mWWUFbtRTGby1PyfaL+AGhq02ahTdkai8popcmO9bPvEW ZN4zYQxse5clXEOHqAKJ6t7npb3zeC4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643157; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SGMs/cXmMsU9KIWBRfHaZ4oTboSJQO3fYScnCEcgy6Y=; b=LnutVre2Zj0nch06pQG0zvx7nySX3KYoQbD4ic0Xvgcg1Hq/kEQiQkBrkVwMrkqjVJeFGr WmlmxoNoLDLFGOCQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=YcvGie6P; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=LnutVre2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643157; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SGMs/cXmMsU9KIWBRfHaZ4oTboSJQO3fYScnCEcgy6Y=; b=YcvGie6Pt53yRq7hfIzRXFnr2xAiXDLRUacaLZg6Lmc7emYcKbwy2EDOZlRVcxrgfV9wXH mc8uSxNgYI5abzigU8LsBaig8mWWUFbtRTGby1PyfaL+AGhq02ahTdkai8popcmO9bPvEW ZN4zYQxse5clXEOHqAKJ6t7npb3zeC4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643157; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SGMs/cXmMsU9KIWBRfHaZ4oTboSJQO3fYScnCEcgy6Y=; b=LnutVre2Zj0nch06pQG0zvx7nySX3KYoQbD4ic0Xvgcg1Hq/kEQiQkBrkVwMrkqjVJeFGr WmlmxoNoLDLFGOCQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Thomas Huth , Fabian Vogt , Peter Xu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Harsh Prateek Bora Subject: [PATCH 1/4] hw/intc/xics: Add missing call to register vmstate_icp_server Date: Tue, 19 Aug 2025 19:39:02 -0300 Message-Id: <20250819223905.2247-2-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20250819223905.2247-1-farosas@suse.de> References: <20250819223905.2247-1-farosas@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-3.51 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCPT_COUNT_SEVEN(0.00)[7]; FUZZY_RATELIMITED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,redhat.com,suse.de,linaro.org,linux.ibm.com]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:dkim,suse.de:email]; URIBL_BLOCKED(0.00)[linaro.org:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:mid,suse.de:dkim,suse.de:email]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Queue-Id: 3A18A1F76B X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.51 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=2a07:de40:b251:101:10:150:64:2; envelope-from=farosas@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=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: 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 @suse.de) X-ZM-MESSAGEID: 1755643223493124100 From: Fabian Vogt An obsolete wrapper function with a workaround was removed entirely, without restoring the call it wrapped. Without this, the guest is stuck after savevm/loadvm. Fixes: 24ee9229fe31 ("ppc/spapr: remove deprecated machine pseries-2.9") Signed-off-by: Fabian Vogt Reviewed-by: Philippe Mathieu-Daud=C3=A9 Link: https://lore.kernel.org/qemu-devel/6187781.lOV4Wx5bFT@fvogt-thinkpad Signed-off-by: Fabiano Rosas Reviewed-by: Gautam Menghani --- hw/intc/xics.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index d9a199e883..200710eb6c 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -335,6 +335,8 @@ static void icp_realize(DeviceState *dev, Error **errp) return; } } + + vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp); } =20 static void icp_unrealize(DeviceState *dev) --=20 2.35.3 From nobody Sat Nov 15 05:35:26 2025 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=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1755643232; cv=none; d=zohomail.com; s=zohoarc; b=NOs6MFAHHt2Z629ZgM8zbhxyM0+OWB9CfQySFmW4dt+cIo7Dg4wdRd9pSaFnlC6ggy7GCtueDvZ8QlKjj83oRyYT37LtIDSE1lMXor9pzxowcXygaqtesBsgFNHKczJGXlFklRJBSHdNkZQtm4QZKi4eAgfRp3wvQ+W/Rvy/Hcw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755643232; 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=Qof2tviqk9/UtEZ8Cs0/3hHezkIEH6rDjKvvD3EJJlM=; b=h1KjGgcfqA+rUtL8EALSB72DG2ElwIg0mYoBL16maboNPGK63xp5xOMzStcrpBNgAXyHNiBh5cTPXHGH3Ov/0sfbrJSuGXNfzL3Mf9I5pdITyi8QcNvSERzV1Ms+3DOENme2asKmGEwC4cQ2ynCupMaKIqcI0IqPsFlCF7OUPXo= 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 1755643232956943.5133979114553; Tue, 19 Aug 2025 15:40:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uoUzI-00084C-7w; Tue, 19 Aug 2025 18:39:28 -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 1uoUzG-00083u-CK for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:26 -0400 Received: from smtp-out2.suse.de ([195.135.223.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoUzE-00084S-LS for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:26 -0400 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BE7671F785; Tue, 19 Aug 2025 22:39:20 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C6060139B3; Tue, 19 Aug 2025 22:39:17 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id AK8IIBX9pGh+TgAAD6G6ig (envelope-from ); Tue, 19 Aug 2025 22:39:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643160; h=from:from:reply-to: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=Qof2tviqk9/UtEZ8Cs0/3hHezkIEH6rDjKvvD3EJJlM=; b=LDS1Wp3akw76WKkVcOsAk0nSaBRnA2CTLuihJ6sstOoB44I3I21CSyxYk6NZ7Ctnp60z// MEEyQxAwHHHdCkLQp0P8SqOejjwByBzuVgsx7ub5Vo0KsV9VN8Ui71QMHcy7CHG8HGYBka NUI641Sx66J0LOBng67ViVmMqZxGk/c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643160; h=from:from:reply-to: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=Qof2tviqk9/UtEZ8Cs0/3hHezkIEH6rDjKvvD3EJJlM=; b=4I73zOc1lM3xymIZSEGKhWCSiSJkMW1giNtbayU2ZWoRZX2SHdLhT80rPw2JjtoJZajZxZ Abn7CXey3zLB8JCg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643160; h=from:from:reply-to: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=Qof2tviqk9/UtEZ8Cs0/3hHezkIEH6rDjKvvD3EJJlM=; b=LDS1Wp3akw76WKkVcOsAk0nSaBRnA2CTLuihJ6sstOoB44I3I21CSyxYk6NZ7Ctnp60z// MEEyQxAwHHHdCkLQp0P8SqOejjwByBzuVgsx7ub5Vo0KsV9VN8Ui71QMHcy7CHG8HGYBka NUI641Sx66J0LOBng67ViVmMqZxGk/c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643160; h=from:from:reply-to: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=Qof2tviqk9/UtEZ8Cs0/3hHezkIEH6rDjKvvD3EJJlM=; b=4I73zOc1lM3xymIZSEGKhWCSiSJkMW1giNtbayU2ZWoRZX2SHdLhT80rPw2JjtoJZajZxZ Abn7CXey3zLB8JCg== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Thomas Huth , Fabian Vogt , Peter Xu , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [RFC PATCH 2/4] tests/functional: Extract migration code into a new class Date: Tue, 19 Aug 2025 19:39:03 -0300 Message-Id: <20250819223905.2247-3-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20250819223905.2247-1-farosas@suse.de> References: <20250819223905.2247-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_CC(0.00)[gmail.com,redhat.com,suse.de,linaro.org]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_DN_SOME(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Spam-Score: -2.80 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=195.135.223.131; envelope-from=farosas@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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 @suse.de) X-ZM-MESSAGEID: 1755643234021116600 Content-Type: text/plain; charset="utf-8" Move some of the code from test_migration.py to a new class so it can be reused to invoke migrations from other tests. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- I see this conflicts with Thomas' series, I'll update accordingly. --- tests/functional/qemu_test/migration.py | 40 +++++++++++++++++++++++++ tests/functional/test_migration.py | 24 ++------------- 2 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 tests/functional/qemu_test/migration.py diff --git a/tests/functional/qemu_test/migration.py b/tests/functional/qem= u_test/migration.py new file mode 100644 index 0000000000..37988704e8 --- /dev/null +++ b/tests/functional/qemu_test/migration.py @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Migration test +# +# Copyright (c) 2019 Red Hat, Inc. +# +# Authors: +# Cleber Rosa +# Caio Carrara +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import time + + +class Migration(): + + @staticmethod + def migration_finished(vm): + return vm.cmd('query-migrate')['status'] in ('completed', 'failed') + + def assert_migration(self, test, src_vm, dst_vm, timeout): + + end =3D time.monotonic() + timeout + while time.monotonic() < end and not self.migration_finished(src_v= m): + time.sleep(0.1) + + end =3D time.monotonic() + timeout + while time.monotonic() < end and not self.migration_finished(dst_v= m): + time.sleep(0.1) + + test.assertEqual(src_vm.cmd('query-migrate')['status'], 'completed= ') + test.assertEqual(dst_vm.cmd('query-migrate')['status'], 'completed= ') + test.assertEqual(dst_vm.cmd('query-status')['status'], 'running') + test.assertEqual(src_vm.cmd('query-status')['status'],'postmigrate= ') + + def migrate(self, test, source_vm, dest_vm, src_uri, timeout): + source_vm.qmp('migrate', uri=3Dsrc_uri) + self.assert_migration(test, source_vm, dest_vm, timeout) diff --git a/tests/functional/test_migration.py b/tests/functional/test_mig= ration.py index c4393c3543..1c75a98330 100755 --- a/tests/functional/test_migration.py +++ b/tests/functional/test_migration.py @@ -15,6 +15,7 @@ import time =20 from qemu_test import QemuSystemTest, skipIfMissingCommands +from qemu_test.migration import Migration from qemu_test.ports import Ports =20 =20 @@ -22,25 +23,6 @@ class MigrationTest(QemuSystemTest): =20 timeout =3D 10 =20 - @staticmethod - def migration_finished(vm): - return vm.cmd('query-migrate')['status'] in ('completed', 'failed') - - def assert_migration(self, src_vm, dst_vm): - - end =3D time.monotonic() + self.timeout - while time.monotonic() < end and not self.migration_finished(src_v= m): - time.sleep(0.1) - - end =3D time.monotonic() + self.timeout - while time.monotonic() < end and not self.migration_finished(dst_v= m): - time.sleep(0.1) - - self.assertEqual(src_vm.cmd('query-migrate')['status'], 'completed= ') - self.assertEqual(dst_vm.cmd('query-migrate')['status'], 'completed= ') - self.assertEqual(dst_vm.cmd('query-status')['status'], 'running') - self.assertEqual(src_vm.cmd('query-status')['status'],'postmigrate= ') - def select_machine(self): target_machine =3D { 'aarch64': 'quanta-gsj', @@ -67,8 +49,8 @@ def do_migrate(self, dest_uri, src_uri=3DNone): source_vm =3D self.get_vm(name=3D"source-qemu") source_vm.add_args('-nodefaults') source_vm.launch() - source_vm.qmp('migrate', uri=3Dsrc_uri) - self.assert_migration(source_vm, dest_vm) + + Migration().migrate(self, source_vm, dest_vm, src_uri, self.timeou= t) =20 def _get_free_port(self, ports): port =3D ports.find_free_port() --=20 2.35.3 From nobody Sat Nov 15 05:35:26 2025 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=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1755643243; cv=none; d=zohomail.com; s=zohoarc; b=VJOLEVe57S8Via5PkBMFYDw/b5FU/bp3sROzaajYgsn3445cuQAwvBLagUkz6N1Vf0a90Ekf0d4JxdrTTy5ZX658EHgcarlQ17JJrA7DGKbYOEjIcGsSvrHN5mdLuTJiJj5S3D1PQaW5pDZ6Su+r0dxK9BhXJYa0u4fgl4H2vEM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755643243; 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=A7Q+vHJrkoIS5nodu487oIR3vGFuAoT1ZNVE6THVqGA=; b=RTWHJssDlqn1B8M3mhFLFluds3rLv6pcTSKIDay/JWKbKLqyUo+wg5EGtwaLL164HWTVQXexjDs6Eb1jZ5bu+2f0Q4WoPmm3LKaMWOaCI1R5OKu8FGIX9aZ8E2bY2PShYQvsRc+NjrybLKdBpDJvNhvqhXl6xZy8TZbvxbSv0LE= 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 1755643243406231.71336323141043; Tue, 19 Aug 2025 15:40:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uoUzN-00087c-1o; Tue, 19 Aug 2025 18:39:33 -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 1uoUzL-00086G-Ss for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:31 -0400 Received: from smtp-out2.suse.de ([195.135.223.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoUzK-00085D-7F for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:31 -0400 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 8A8D71F76B; Tue, 19 Aug 2025 22:39:24 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CD8AB139B3; Tue, 19 Aug 2025 22:39:21 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id yP1YBBn9pGh+TgAAD6G6ig (envelope-from ); Tue, 19 Aug 2025 22:39:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643164; h=from:from:reply-to: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=A7Q+vHJrkoIS5nodu487oIR3vGFuAoT1ZNVE6THVqGA=; b=gIRCsKMpxIGeL9LLrZIoUHzjUnJLDX0KNEwpG4hx9iny8gDxQjrlsQstt9pVAikTFF+WEF sPD268Vsr5L+YPS2BUFFlK8ODmvMdSDASdjUl9Ku5WJXPHLgtbtiYUF3vq+jfup1xC/f2E SqExgmLisK/Zjx+ntS2gnkUE0YgReUg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643164; h=from:from:reply-to: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=A7Q+vHJrkoIS5nodu487oIR3vGFuAoT1ZNVE6THVqGA=; b=vzqL3KjzeA08k68zr8lVWgT+7ncHgYXsW6gkQM9l+0j75oQ3D9/tYSLLu/nJJTePyoIzto aBDQEr9DBq79DSDQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643164; h=from:from:reply-to: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=A7Q+vHJrkoIS5nodu487oIR3vGFuAoT1ZNVE6THVqGA=; b=gIRCsKMpxIGeL9LLrZIoUHzjUnJLDX0KNEwpG4hx9iny8gDxQjrlsQstt9pVAikTFF+WEF sPD268Vsr5L+YPS2BUFFlK8ODmvMdSDASdjUl9Ku5WJXPHLgtbtiYUF3vq+jfup1xC/f2E SqExgmLisK/Zjx+ntS2gnkUE0YgReUg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643164; h=from:from:reply-to: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=A7Q+vHJrkoIS5nodu487oIR3vGFuAoT1ZNVE6THVqGA=; b=vzqL3KjzeA08k68zr8lVWgT+7ncHgYXsW6gkQM9l+0j75oQ3D9/tYSLLu/nJJTePyoIzto aBDQEr9DBq79DSDQ== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Thomas Huth , Fabian Vogt , Peter Xu , Harsh Prateek Bora Subject: [RFC PATCH 3/4] tests/functional: Add a OS level migration test for pseries Date: Tue, 19 Aug 2025 19:39:04 -0300 Message-Id: <20250819223905.2247-4-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20250819223905.2247-1-farosas@suse.de> References: <20250819223905.2247-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; URIBL_BLOCKED(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,redhat.com,suse.de,linux.ibm.com]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Spam-Score: -2.80 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=195.135.223.131; envelope-from=farosas@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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 @suse.de) X-ZM-MESSAGEID: 1755643243990116600 Content-Type: text/plain; charset="utf-8" There's currently no OS level test for ppc64le. Add one such test by reusing the boot level tests that are already present. The test boots the source machine, waits for it to reach a mid-boot message, migrates and checks that the destination has reached the final boot message (VFS error due to no disk). Signed-off-by: Fabiano Rosas --- tests/functional/test_ppc64_pseries.py | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/functional/test_ppc64_pseries.py b/tests/functional/test= _ppc64_pseries.py index 67057934e8..7a7e0fe8ae 100755 --- a/tests/functional/test_ppc64_pseries.py +++ b/tests/functional/test_ppc64_pseries.py @@ -9,6 +9,8 @@ =20 from qemu_test import QemuSystemTest, Asset from qemu_test import wait_for_console_pattern +from qemu_test.migration import Migration +from qemu_test.ports import Ports =20 class pseriesMachine(QemuSystemTest): =20 @@ -87,5 +89,44 @@ def test_ppc64_linux_big_boot(self): wait_for_console_pattern(self, console_pattern, self.panic_message) wait_for_console_pattern(self, self.good_message, self.panic_messa= ge) =20 + def test_ppc64_linux_migration(self): + with Ports() as ports: + port =3D ports.find_free_port() + if port is None: + self.skipTest('Failed to find a free port') + uri =3D 'tcp:localhost:%u' % port + + kernel_path =3D self.ASSET_KERNEL.fetch() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + + self.set_machine('pseries') + + dest_vm =3D self.get_vm('-incoming', uri, name=3D"dest-qemu") + dest_vm.add_args('-smp', '4') + dest_vm.add_args('-nodefaults') + dest_vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + dest_vm.set_console() + dest_vm.launch() + + source_vm =3D self.get_vm(name=3D"source-qemu") + source_vm.add_args('-smp', '4') + source_vm.add_args('-nodefaults') + source_vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + source_vm.set_console() + source_vm.launch() + + # ensure the boot has reached Linux + console_pattern =3D 'smp: Brought up 1 node, 4 CPUs' + wait_for_console_pattern(self, console_pattern, self.panic_message, + vm=3Dsource_vm) + + Migration().migrate(self, source_vm, dest_vm, uri, self.timeout) + + # ensure the boot proceeds after migration + wait_for_console_pattern(self, self.good_message, self.panic_messa= ge, + vm=3Ddest_vm) + if __name__ =3D=3D '__main__': QemuSystemTest.main() --=20 2.35.3 From nobody Sat Nov 15 05:35:26 2025 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=suse.de ARC-Seal: i=1; a=rsa-sha256; t=1755643218; cv=none; d=zohomail.com; s=zohoarc; b=cuqVkZ/mRUET9icqgdQcegKXmQ6Myy9Gm/zB9H7I50CMnIbiqm0OEhadGfpcyq0wvG8sOAnUiOUQeyYJJwsDH32G87aYb+kkp26HHnEyIDNsVas7uSyZxxMGbYcUGXMDUf4gRPc6n7z9dJcsXy035idwvmMgjTqXu/6eIh5gwjE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1755643218; 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=p8kEHn7XP+NAUtU/aFlLtbSkRyq65oqBZT43awiHQvc=; b=IlrhfFvaiWJM3/Ys5YJ1kn1Ns5fQnKCnnNyqH6KZY8mA+RXy4rr3rd3HbnZpxBmpl8Klw9TBFBP2xZy9a8h+zlky0cszy/Ph8NzUHI+bHnYnO0FKw2tm4/bQPVKsqaHM6nInKeGZ6cNBxXUuwP6kbs9mfxbopr401IX+BnMIjhE= 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 1755643218552740.004818854593; Tue, 19 Aug 2025 15:40:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uoUzS-00088c-T0; Tue, 19 Aug 2025 18:39:38 -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 1uoUzR-00088M-ID for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:37 -0400 Received: from smtp-out2.suse.de ([195.135.223.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uoUzP-00085d-Az for qemu-devel@nongnu.org; Tue, 19 Aug 2025 18:39:37 -0400 Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 42F541F785; Tue, 19 Aug 2025 22:39:30 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2493E139B3; Tue, 19 Aug 2025 22:39:24 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 8CwxNBz9pGh+TgAAD6G6ig (envelope-from ); Tue, 19 Aug 2025 22:39:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643170; h=from:from:reply-to: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=p8kEHn7XP+NAUtU/aFlLtbSkRyq65oqBZT43awiHQvc=; b=G2TlwxzPPIB6H7v8zi8GvCjgcXQ/LL5bhC5xlNwRzh8LScJUGE8snYKBMR5Q5mDo4gg93l Q3rGjeJhV+TnahnqknRNKrGSuZNx9quLXHyQQPjiVNe+P+K1i0vnyho2c9OWWuPLIwLelr 3uaaVCiTKqN3JMTPbSjiI7HGIOngWfI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643170; h=from:from:reply-to: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=p8kEHn7XP+NAUtU/aFlLtbSkRyq65oqBZT43awiHQvc=; b=psqrAPN1XAOQgKhMxQAwcxYz6IE4e63/cZZH87jE3hkFZSilzIexDm9fM1AIsVBIKEiofS w5vOB6/Zj/wxN5Bg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1755643170; h=from:from:reply-to: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=p8kEHn7XP+NAUtU/aFlLtbSkRyq65oqBZT43awiHQvc=; b=G2TlwxzPPIB6H7v8zi8GvCjgcXQ/LL5bhC5xlNwRzh8LScJUGE8snYKBMR5Q5mDo4gg93l Q3rGjeJhV+TnahnqknRNKrGSuZNx9quLXHyQQPjiVNe+P+K1i0vnyho2c9OWWuPLIwLelr 3uaaVCiTKqN3JMTPbSjiI7HGIOngWfI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1755643170; h=from:from:reply-to: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=p8kEHn7XP+NAUtU/aFlLtbSkRyq65oqBZT43awiHQvc=; b=psqrAPN1XAOQgKhMxQAwcxYz6IE4e63/cZZH87jE3hkFZSilzIexDm9fM1AIsVBIKEiofS w5vOB6/Zj/wxN5Bg== From: Fabiano Rosas To: qemu-devel@nongnu.org Cc: Nicholas Piggin , Thomas Huth , Fabian Vogt , Peter Xu , Eduardo Habkost , Marcel Apfelbaum , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yanan Wang , Zhao Liu , Chinmay Rath Subject: [PATCH 4/4] target/ppc: Fix env->quiesced migration Date: Tue, 19 Aug 2025 19:39:05 -0300 Message-Id: <20250819223905.2247-5-farosas@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20250819223905.2247-1-farosas@suse.de> References: <20250819223905.2247-1-farosas@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spamd-Result: default: False [-1.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TAGGED_RCPT(0.00)[]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; RCPT_COUNT_SEVEN(0.00)[11]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,redhat.com,suse.de,habkost.net,linaro.org,huawei.com,intel.com,linux.ibm.com]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid]; RCVD_COUNT_TWO(0.00)[2]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Spam-Score: -1.30 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=195.135.223.131; envelope-from=farosas@suse.de; helo=smtp-out2.suse.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=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: 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 @suse.de) X-ZM-MESSAGEID: 1755643219995116600 Content-Type: text/plain; charset="utf-8" The commit referenced (from QEMU 10.0) has changed the way the pseries machine marks a cpu as quiesced. Previously, the cpu->halted value from QEMU common cpu code was (incorrectly) used. With the fix, the env->quiesced variable starts being used, which improves on the original situation, but also causes a side effect after migration: The env->quiesced is set at reset and never migrated, which causes the destination QEMU to stop delivering interrupts and hang the machine. To fix the issue from this point on, start migrating the env->quiesced value. For QEMU versions < 10.0, sending the new element on the stream would cause migration to be aborted, so add the appropriate compatibility property to omit the new subsection. Independently of this patch, all migrations from QEMU versions < 10.0 will result in a hang since the older QEMU never migrates env->quiesced. This is bad because it leaves machines already running on the old QEMU without a migration path into newer versions. As a workaround, clear env->quiesced in the new QEMU whenever cpu->halted is also clear. This assumes rtas_stop_self() always sets both flags at the same time. Migrations during secondaries bringup (i.e. before rtas-start-cpu) will still cause a hang, but those are early enough that requiring reboot would not be unreasonable. Note that this was tested with -cpu power9 and -machine ic-mode=3Dxive due to another bug affecting migration of XICS guests. Tested both forward and backward migration and savevm/loadvm from 9.2 and 10.0. Reported-by: Fabian Vogt Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3079 Fixes: fb802acdc8b ("ppc/spapr: Fix RTAS stopped state") Signed-off-by: Fabiano Rosas --- The choice of PowerPCCPU to hold the compat property is dubious. This only affects pseries, but it seems like a layering violation to access SpaprMachine from target/ppc/, suggestions welcome. --- hw/core/machine.c | 1 + target/ppc/cpu.h | 1 + target/ppc/cpu_init.c | 7 +++++++ target/ppc/machine.c | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index bd47527479..ea83c0876b 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -42,6 +42,7 @@ GlobalProperty hw_compat_10_0[] =3D { { "vfio-pci", "x-migration-load-config-after-iter", "off" }, { "ramfb", "use-legacy-x86-rom", "true"}, { "vfio-pci-nohotplug", "use-legacy-x86-rom", "true" }, + { "powerpc64-cpu", "rtas-stopped-state", "false" }, }; const size_t hw_compat_10_0_len =3D G_N_ELEMENTS(hw_compat_10_0); =20 diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h index 6b90543811..8ff453024b 100644 --- a/target/ppc/cpu.h +++ b/target/ppc/cpu.h @@ -1470,6 +1470,7 @@ struct ArchCPU { void *machine_data; int32_t node_id; /* NUMA node this CPU belongs to */ PPCHash64Options *hash64_opts; + bool rtas_stopped_state; =20 /* Those resources are used only during code translation */ /* opcode handlers */ diff --git a/target/ppc/cpu_init.c b/target/ppc/cpu_init.c index a0e77f2673..4380c6eb14 100644 --- a/target/ppc/cpu_init.c +++ b/target/ppc/cpu_init.c @@ -55,6 +55,11 @@ /* #define PPC_DEBUG_SPR */ /* #define USE_APPLE_GDB */ =20 +static const Property powerpc_cpu_properties[] =3D { + DEFINE_PROP_BOOL("rtas-stopped-state", PowerPCCPU, + rtas_stopped_state, true), +}; + static inline void vscr_init(CPUPPCState *env, uint32_t val) { /* Altivec always uses round-to-nearest */ @@ -7525,6 +7530,8 @@ static void ppc_cpu_class_init(ObjectClass *oc, const= void *data) &pcc->parent_unrealize); pcc->pvr_match =3D ppc_pvr_match_default; =20 + device_class_set_props(dc, powerpc_cpu_properties); + resettable_class_set_parent_phases(rc, NULL, ppc_cpu_reset_hold, NULL, &pcc->parent_phases); =20 diff --git a/target/ppc/machine.c b/target/ppc/machine.c index d72e5ecb94..8797233ebe 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -257,6 +257,23 @@ static int cpu_post_load(void *opaque, int version_id) ppc_store_sdr1(env, env->spr[SPR_SDR1]); } =20 + if (!cpu->rtas_stopped_state) { + /* + * The source QEMU doesn't have fb802acdc8 and still uses halt + * + PM bits in LPCR to implement RTAS stopped state. The new + * QEMU will have put the newly created vcpus in that state, + * waiting for the start-cpu RTAS call. Clear the quiesced + * flag if possible, otherwise the newly-loaded machine will + * hang indefinitely due to quiesced state ignoring + * interrupts. + */ + + if (!CPU(cpu)->halted) { + /* not halted, so definitely not in RTAS stopped state */ + env->quiesced =3D 0; + } + } + post_load_update_msr(env); =20 if (tcg_enabled()) { @@ -649,6 +666,28 @@ static const VMStateDescription vmstate_reservation = =3D { } }; =20 +static bool rtas_stopped_needed(void *opaque) +{ + PowerPCCPU *cpu =3D opaque; + + return cpu->rtas_stopped_state && !cpu->env.quiesced; +} + +static const VMStateDescription vmstate_rtas_stopped =3D { + .name =3D "cpu/rtas_stopped", + .version_id =3D 1, + .minimum_version_id =3D 1, + .needed =3D rtas_stopped_needed, + .fields =3D (const VMStateField[]) { + /* + * "RTAS stopped" state, independent of halted state. For QEMU + * < 10.0, this is taken from cpu->halted at cpu_post_load() + */ + VMSTATE_BOOL(env.quiesced, PowerPCCPU), + VMSTATE_END_OF_LIST() + } +}; + #ifdef TARGET_PPC64 static bool bhrb_needed(void *opaque) { @@ -715,6 +754,7 @@ const VMStateDescription vmstate_ppc_cpu =3D { &vmstate_tlbmas, &vmstate_compat, &vmstate_reservation, + &vmstate_rtas_stopped, NULL } }; --=20 2.35.3