From nobody Sun Apr 28 08:12:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1546592858513771.2246357020196; Fri, 4 Jan 2019 01:07:38 -0800 (PST) Received: from localhost ([127.0.0.1]:60453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfLRw-00040p-2Y for importer@patchew.org; Fri, 04 Jan 2019 04:07:28 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfLQw-0003Tz-SU for qemu-devel@nongnu.org; Fri, 04 Jan 2019 04:06:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfLQr-0006wn-MW for qemu-devel@nongnu.org; Fri, 04 Jan 2019 04:06:25 -0500 Received: from 6.mo3.mail-out.ovh.net ([188.165.43.173]:41813) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gfLQr-0006w1-Fg for qemu-devel@nongnu.org; Fri, 04 Jan 2019 04:06:21 -0500 Received: from player789.ha.ovh.net (unknown [10.109.159.132]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id B304F1EF7C2 for ; Fri, 4 Jan 2019 10:06:18 +0100 (CET) Received: from kaod.org (lfbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player789.ha.ovh.net (Postfix) with ESMTPSA id 893501466D61; Fri, 4 Jan 2019 09:06:12 +0000 (UTC) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: David Gibson Date: Fri, 4 Jan 2019 10:06:10 +0100 Message-Id: <20190104090610.652-1-clg@kaod.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Ovh-Tracer-Id: 2452772947449383910 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtledrvddugddtudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 188.165.43.173 Subject: [Qemu-devel] [PATCH] spapr: return from post_load method when RTC import fails X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The error value can be squashed by the section handling radix migration. Simply bail out if an error occurs when the RTC offset is imported. Fixes: d39c90f5f3ae ("spapr: Fix migration of Radix guests") Signed-off-by: C=C3=A9dric Le Goater --- hw/ppc/spapr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index f1725313e979..64397ee91ef0 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1748,12 +1748,17 @@ static int spapr_post_load(void *opaque, int versio= n_id) return err; } =20 - /* In earlier versions, there was no separate qdev for the PAPR + /* + * In earlier versions, there was no separate qdev for the PAPR * RTC, so the RTC offset was stored directly in sPAPREnvironment. * So when migrating from those versions, poke the incoming offset - * value into the RTC device */ + * value into the RTC device + */ if (version_id < 3) { err =3D spapr_rtc_import_offset(&spapr->rtc, spapr->rtc_offset); + if (err) { + return err; + } } =20 if (kvm_enabled() && spapr->patb_entry) { --=20 2.20.1