From nobody Mon Feb 9 23:03:39 2026 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; 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 1545372111177731.4682282883911; Thu, 20 Dec 2018 22:01:51 -0800 (PST) Received: from localhost ([::1]:42455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaDsb-0003i3-LY for importer@patchew.org; Fri, 21 Dec 2018 01:01:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gaDdo-0000a6-Fl for qemu-devel@nongnu.org; Fri, 21 Dec 2018 00:46:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gaDdn-0007IS-Kg for qemu-devel@nongnu.org; Fri, 21 Dec 2018 00:46:32 -0500 Received: from ozlabs.org ([203.11.71.1]:50149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gaDdn-0007Ea-2n; Fri, 21 Dec 2018 00:46:31 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 43Ld0P6tvDz9sNs; Fri, 21 Dec 2018 16:46:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1545371173; bh=2yW7SIw+Wq9RiQKJ65DhckdYGOIbFbN6i8EO/7Nj4x4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dxTYuhtssNhzFeN3dwkebMsTj13yYm0dTUnnUXw2NgxajOolvTRKZ/9QcClMr8uof B2Ppp/Eei3UmAgNyYVgPZ7il8FZgzV8K+UcmyZLOeYFu4erJKRleLVQotL4xZMXZTc a1k5qMT3bbuqY5NJZkCx+H8zicfNuyRAvt8nX2pA= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 21 Dec 2018 16:45:46 +1100 Message-Id: <20181221054606.22007-21-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181221054606.22007-1-david@gibson.dropbear.id.au> References: <20181221054606.22007-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 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: 203.11.71.1 Subject: [Qemu-devel] [PULL 20/40] spapr: initialize VSMT before initializing the IRQ backend 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: gkurz@redhat.com, lvivier@redhat.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.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) Content-Type: text/plain; charset="utf-8" From: C=C3=A9dric Le Goater We will need to use xics_max_server_number() to create the sPAPRXive object modeling the interrupt controller of the machine which is created before the CPUs. Signed-off-by: C=C3=A9dric Le Goater Reviewed-by: Greg Kurz [dwg: Fix style nit] Signed-off-by: David Gibson --- hw/ppc/spapr.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 051d080fe5..2b2df6b848 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2464,11 +2464,6 @@ static void spapr_init_cpus(sPAPRMachineState *spapr) boot_cores_nr =3D possible_cpus->len; } =20 - /* VSMT must be set in order to be able to compute VCPU ids, ie to - * call xics_max_server_number() or spapr_vcpu_id(). - */ - spapr_set_vsmt_mode(spapr, &error_fatal); - if (smc->pre_2_10_has_unused_icps) { int i; =20 @@ -2591,6 +2586,12 @@ static void spapr_machine_init(MachineState *machine) /* Setup a load limit for the ramdisk leaving room for SLOF and FDT */ load_limit =3D MIN(spapr->rma_size, RTAS_MAX_ADDR) - FW_OVERHEAD; =20 + /* + * VSMT must be set in order to be able to compute VCPU ids, ie to + * call xics_max_server_number() or spapr_vcpu_id(). + */ + spapr_set_vsmt_mode(spapr, &error_fatal); + /* Set up Interrupt Controller before we create the VCPUs */ smc->irq->init(spapr, &error_fatal); =20 --=20 2.19.2