From nobody Wed Nov 5 17:50:38 2025 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.zoho.com; dkim=fail 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 (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496717919132375.5340201660938; Mon, 5 Jun 2017 19:58:39 -0700 (PDT) Received: from localhost ([::1]:35975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI4hZ-0001Rk-Og for importer@patchew.org; Mon, 05 Jun 2017 22:58:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dI4ay-0003VD-7s for qemu-devel@nongnu.org; Mon, 05 Jun 2017 22:51:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dI4aw-0002yt-QL for qemu-devel@nongnu.org; Mon, 05 Jun 2017 22:51:48 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:45879) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dI4aw-0002xg-Db; Mon, 05 Jun 2017 22:51:46 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 3whbmr0PlMz9sCZ; Tue, 6 Jun 2017 12:51:39 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1496717500; bh=lrgklUQR3GKpS80be22pGygSkmZ+LLoAeZ3407/cRiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yhx8f8vm5IHmMY0vCh5N8eJlmiRMFG7X616HiBOFJ0bahhJ394q5w5IAZocKYjXqi 8nADE5adnSI4VobzVj+D7qYAUw66yBarvrOK8bFtpQLXTnk8SaY8JMuUaGXLt1u1Kp JzRcB2ANUim9xST/E6FLQ4wk/h6aE30RK1sTl5rI= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 6 Jun 2017 12:51:30 +1000 Message-Id: <20170606025135.2685-13-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170606025135.2685-1-david@gibson.dropbear.id.au> References: <20170606025135.2685-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 12/17] spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs 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: agraf@suse.de, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, Greg Kurz , qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Greg Kurz As explained in commit 5c0139a8c2f0 ("spapr: fix default DRC state for coldplugged LMBs"), guests expect cold-plugged LMBs to be pre-allocated and unisolated. The same goes for cold-plugged CPUs. While here, let's convert g_assert(false) to the better self documenting g_assert_not_reached(). Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr_drc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c index a35314e..c1d4b10 100644 --- a/hw/ppc/spapr_drc.c +++ b/hw/ppc/spapr_drc.c @@ -546,20 +546,16 @@ static bool spapr_drc_needed(void *opaque) */ switch (drc->type) { case SPAPR_DR_CONNECTOR_TYPE_PCI: - rc =3D !((drc->isolation_state =3D=3D SPAPR_DR_ISOLATION_STATE_UNI= SOLATED) && - (drc->allocation_state =3D=3D SPAPR_DR_ALLOCATION_STATE_USA= BLE) && - drc->configured && drc->signalled && !drc->awaiting_release= ); - break; case SPAPR_DR_CONNECTOR_TYPE_CPU: case SPAPR_DR_CONNECTOR_TYPE_LMB: - rc =3D !((drc->isolation_state =3D=3D SPAPR_DR_ISOLATION_STATE_ISO= LATED) && - (drc->allocation_state =3D=3D SPAPR_DR_ALLOCATION_STATE_UNU= SABLE) && + rc =3D !((drc->isolation_state =3D=3D SPAPR_DR_ISOLATION_STATE_UNI= SOLATED) && + (drc->allocation_state =3D=3D SPAPR_DR_ALLOCATION_STATE_USA= BLE) && drc->configured && drc->signalled && !drc->awaiting_release= ); break; case SPAPR_DR_CONNECTOR_TYPE_PHB: case SPAPR_DR_CONNECTOR_TYPE_VIO: default: - g_assert(false); + g_assert_not_reached(); } return rc; } --=20 2.9.4