From patchwork Tue Jul 12 12:15:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 9225177 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 78DCC60868 for ; Tue, 12 Jul 2016 12:16:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 68A9927CDF for ; Tue, 12 Jul 2016 12:16:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D6C827EED; Tue, 12 Jul 2016 12:16:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 27F5027CDF for ; Tue, 12 Jul 2016 12:16:05 +0000 (UTC) Received: from localhost ([::1]:39987 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMwbc-0005o3-9q for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Jul 2016 08:16:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMwb6-0005fP-9m for qemu-devel@nongnu.org; Tue, 12 Jul 2016 08:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMwb0-0006MB-Je for qemu-devel@nongnu.org; Tue, 12 Jul 2016 08:15:31 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:51077 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMwb0-0006M4-Cr for qemu-devel@nongnu.org; Tue, 12 Jul 2016 08:15:26 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6CCFJ3w037179 for ; Tue, 12 Jul 2016 08:15:21 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx0b-001b2d01.pphosted.com with ESMTP id 243ej28qf2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 12 Jul 2016 08:15:20 -0400 Received: from localhost by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Jul 2016 06:15:08 -0600 Received: from d03dlp01.boulder.ibm.com (9.17.202.177) by e31.co.us.ibm.com (192.168.1.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 12 Jul 2016 06:15:07 -0600 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: groug@kaod.org Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d03dlp01.boulder.ibm.com (Postfix) with ESMTP id CE1521FF0049; Tue, 12 Jul 2016 06:14:49 -0600 (MDT) Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u6CCF8la12648760; Tue, 12 Jul 2016 12:15:08 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 213B8AE03C; Tue, 12 Jul 2016 08:15:06 -0400 (EDT) Received: from bahia.lan (unknown [9.164.146.113]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP id 8D19CAE034; Tue, 12 Jul 2016 08:15:04 -0400 (EDT) From: Greg Kurz To: David Gibson Date: Tue, 12 Jul 2016 14:15:02 +0200 In-Reply-To: <146832546271.14159.13423837073754447992.stgit@bahia.lan> References: <146832546271.14159.13423837073754447992.stgit@bahia.lan> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16071212-8235-0000-0000-000008C549B2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16071212-8236-0000-0000-000033063667 Message-Id: <146832564976.14159.546213803318298318.stgit@bahia.lan> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-07-12_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1607120113 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v4 5/5] ppc: drop vcpu_idt_id bits from the target code 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, Bharata B Rao Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Now that all machine types provide vcpu_dt_id, we can safely drop these bits from the target code. Signed-off-by: Greg Kurz --- v4: keep max_smt needed by smp_threads sanity checks --- target-ppc/translate_init.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 31120a5aaf33..9b3acd55d7fb 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -9529,9 +9529,7 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp) Error *local_err = NULL; #if !defined(CONFIG_USER_ONLY) int max_smt = kvmppc_smt_threads(); -#endif -#if !defined(CONFIG_USER_ONLY) if (smp_threads > max_smt) { error_setg(errp, "Cannot support more than %d threads on PPC with %s", max_smt, kvm_enabled() ? "KVM" : "TCG"); @@ -9551,19 +9549,6 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error **errp) return; } -#if !defined(CONFIG_USER_ONLY) - cpu->cpu_dt_id = (cs->cpu_index / smp_threads) * max_smt - + (cs->cpu_index % smp_threads); - - if (kvm_enabled() && !kvm_vcpu_id_is_valid(cpu->cpu_dt_id)) { - error_setg(errp, "Can't create CPU with id %d in KVM", cpu->cpu_dt_id); - error_append_hint(errp, "Adjust the number of cpus to %d " - "or try to raise the number of threads per core\n", - cpu->cpu_dt_id * smp_threads / max_smt); - return; - } -#endif - if (tcg_enabled()) { if (ppc_fixup_cpu(cpu) != 0) { error_setg(errp, "Unable to emulate selected CPU with TCG");