Received: from eggs.gnu.org ([2001:4830:134:3::10]:44014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ787-00027O-0x for qemu-devel@nongnu.org; Fri, 01 Jul 2016 18:41:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJ781-0003PB-Om for qemu-devel@nongnu.org; Fri, 01 Jul 2016 18:41:46 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:8186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJ781-0003Os-FE for qemu-devel@nongnu.org; Fri, 01 Jul 2016 18:41:41 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u61Md1kU008419 for ; Fri, 1 Jul 2016 18:41:40 -0400 Received: from e18.ny.us.ibm.com (e18.ny.us.ibm.com [129.33.205.208]) by mx0a-001b2d01.pphosted.com with ESMTP id 23wag1ad8p-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 01 Jul 2016 18:41:40 -0400 Received: from localhost by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 1 Jul 2016 18:41:39 -0400 From: Greg Kurz Date: Sat, 02 Jul 2016 00:41:32 +0200 In-Reply-To: <146741287399.948.15988269239450224065.stgit@bahia.lan> References: <146741287399.948.15988269239450224065.stgit@bahia.lan> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <146741289262.948.5461692071180511385.stgit@bahia.lan> Subject: [Qemu-devel] [PATCH v2 2/7] ppc: simplify max_smt initialization in ppc_cpu_realizefn() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: Benjamin Herrenschmidt , qemu-devel@nongnu.org, Alexander Graf , qemu-ppc@nongnu.org, Cedric Le Goater , Bharata B Rao , Scott Wood , Igor Mammedov kvmppc_smt_threads() returns 1 if KVM is not enabled. Signed-off-by: Greg Kurz --- target-ppc/translate_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 843f19b748fb..a06bf50b65d4 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -9516,7 +9516,7 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp) PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu); Error *local_err = NULL; #if !defined(CONFIG_USER_ONLY) - int max_smt = kvm_enabled() ? kvmppc_smt_threads() : 1; + int max_smt = kvmppc_smt_threads(); #endif #if !defined(CONFIG_USER_ONLY)