From patchwork Thu Sep 4 06:06:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharata B Rao X-Patchwork-Id: 385731 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id AE7B01401EC for ; Thu, 4 Sep 2014 16:08:01 +1000 (EST) Received: from localhost ([::1]:48904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPQD9-0005QX-FT for incoming@patchwork.ozlabs.org; Thu, 04 Sep 2014 02:07:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPQCB-0003fm-A0 for qemu-devel@nongnu.org; Thu, 04 Sep 2014 02:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPQBx-0004Hf-Sx for qemu-devel@nongnu.org; Thu, 04 Sep 2014 02:06:59 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:57344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPQBw-0004Gf-Lw for qemu-devel@nongnu.org; Thu, 04 Sep 2014 02:06:45 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Sep 2014 11:36:41 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp03.in.ibm.com (192.168.1.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 4 Sep 2014 11:36:40 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 3E3B5E006B for ; Thu, 4 Sep 2014 11:38:57 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id s8468vGk4456844 for ; Thu, 4 Sep 2014 11:38:58 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s8466Y8S017810 for ; Thu, 4 Sep 2014 11:36:34 +0530 Received: from bharata.in.ibm.com ([9.193.66.19]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s8466Rdr017213; Thu, 4 Sep 2014 11:36:33 +0530 From: Bharata B Rao To: qemu-devel@nongnu.org Date: Thu, 4 Sep 2014 11:36:19 +0530 Message-Id: <1409810785-12391-10-git-send-email-bharata@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1409810785-12391-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1409810785-12391-1-git-send-email-bharata@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14090406-0009-0000-0000-000000EFE2B6 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 122.248.162.3 Cc: mdroth@linux.vnet.ibm.com, Bharata B Rao Subject: [Qemu-devel] [RFC PATCH v0 09/15] ppc: Consider max_cpus during xics initialization X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use max_cpus instead of smp_cpus when intializating xics system. Also report max_cpus in ibm,interrupt-server-ranges device tree property of interrupt controller node. Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index fc6b923..b2ca527 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -633,7 +633,7 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base, GString *hypertas = g_string_sized_new(256); GString *qemu_hypertas = g_string_sized_new(256); uint32_t refpoints[] = {cpu_to_be32(0x4), cpu_to_be32(0x4)}; - uint32_t interrupt_server_ranges_prop[] = {0, cpu_to_be32(smp_cpus)}; + uint32_t interrupt_server_ranges_prop[] = {0, cpu_to_be32(max_cpus)}; int smt = kvmppc_smt_threads(); unsigned char vec5[] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x80}; QemuOpts *opts = qemu_opts_find(qemu_find_opts("smp-opts"), NULL); @@ -1684,7 +1684,7 @@ static void ppc_spapr_init(MachineState *machine) } /* Set up Interrupt Controller before we create the VCPUs */ - spapr->icp = xics_system_init(smp_cpus * kvmppc_smt_threads() / smp_threads, + spapr->icp = xics_system_init(max_cpus * kvmppc_smt_threads() / smp_threads, XICS_IRQS); spapr_init_drc_table();