From patchwork Thu Jul 13 10:40:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Borntraeger X-Patchwork-Id: 9838177 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 E3EFD603F3 for ; Thu, 13 Jul 2017 10:41:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D32E92867D for ; Thu, 13 Jul 2017 10:41:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7CA5286E7; Thu, 13 Jul 2017 10:41:44 +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 6C3C9286E2 for ; Thu, 13 Jul 2017 10:41:44 +0000 (UTC) Received: from localhost ([::1]:58620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVbZ1-00056q-MV for patchwork-qemu-devel@patchwork.kernel.org; Thu, 13 Jul 2017 06:41:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dVbXy-00054w-7V for qemu-devel@nongnu.org; Thu, 13 Jul 2017 06:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dVbXv-0002Fq-5a for qemu-devel@nongnu.org; Thu, 13 Jul 2017 06:40:38 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55707 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dVbXu-0002Fg-Vs for qemu-devel@nongnu.org; Thu, 13 Jul 2017 06:40:35 -0400 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6DAdi62049738 for ; Thu, 13 Jul 2017 06:40:34 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2bp61fk0r0-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 13 Jul 2017 06:40:34 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 13 Jul 2017 11:40:32 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 13 Jul 2017 11:40:30 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v6DAeUwq39583920; Thu, 13 Jul 2017 10:40:30 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EF0852049; Thu, 13 Jul 2017 10:36:48 +0100 (BST) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTPS id 8E0865203F; Thu, 13 Jul 2017 10:36:48 +0100 (BST) Received: by tuxmaker.boeblingen.de.ibm.com (Postfix, from userid 25651) id D535820F69C; Thu, 13 Jul 2017 12:40:29 +0200 (CEST) From: Christian Borntraeger To: qemu-devel Date: Thu, 13 Jul 2017 12:40:27 +0200 X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499942429-55449-1-git-send-email-borntraeger@de.ibm.com> References: <1499942429-55449-1-git-send-email-borntraeger@de.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 17071310-0020-0000-0000-000003A17B4A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071310-0021-0000-0000-00004226C8B5 Message-Id: <1499942429-55449-2-git-send-email-borntraeger@de.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-13_05:, , 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-1706020000 definitions=main-1707130166 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH/s390-next 1/3] s390x: initialize cpu firstly 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: Halil Pasic , Yi Min Zhao , Cornelia Huck , Pierre Morel , Alexander Graf , Christian Borntraeger , Thomas Huth , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Yi Min Zhao By initializing the CPU firstly, we are able to retrieve and use the CPU model features when initializing other subsystem or devices. Signed-off-by: Yi Min Zhao Reviewed-by: Pierre Morel Signed-off-by: Christian Borntraeger Reviewed-by: Cornelia Huck --- hw/s390x/s390-virtio-ccw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index e086cb5..23e9658 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -122,6 +122,9 @@ static void ccw_init(MachineState *machine) s390_sclp_init(); s390_memory_init(machine->ram_size); + /* init CPUs */ + s390_init_cpus(machine); + s390_flic_init(); /* get a BUS */ @@ -138,9 +141,6 @@ static void ccw_init(MachineState *machine) /* register hypercalls */ virtio_ccw_register_hcalls(); - /* init CPUs */ - s390_init_cpus(machine); - if (kvm_enabled()) { kvm_s390_enable_css_support(s390_cpu_addr2state(0)); }