From patchwork Fri May 25 08:17:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 920300 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu 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 40sfV84tH6z9s19 for ; Fri, 25 May 2018 18:26:24 +1000 (AEST) Received: from localhost ([::1]:42421 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM83K-00081u-BZ for incoming@patchwork.ozlabs.org; Fri, 25 May 2018 04:26:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fM7ve-0001mf-TN for qemu-devel@nongnu.org; Fri, 25 May 2018 04:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fM7va-0008Hj-2K for qemu-devel@nongnu.org; Fri, 25 May 2018 04:18:26 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:40425) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fM7vZ-0008Ft-Pi for qemu-devel@nongnu.org; Fri, 25 May 2018 04:18:22 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.183]) with ESMTPSA (Nemesis) id 0MNtBT-1fRvUP0DrH-007TaI; Fri, 25 May 2018 10:18:10 +0200 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Fri, 25 May 2018 10:17:44 +0200 Message-Id: <20180525081754.29506-4-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180525081754.29506-1-laurent@vivier.eu> References: <20180525081754.29506-1-laurent@vivier.eu> X-Provags-ID: V03:K1:Rmiz2ttCCN0tqn9VWk01+9Yf+cRQEkeKYyyEOj+g9z6/7LQz5Zh wc49/ukbCyLxxBDTKNr3N7z+FJAgUaYJATOQjDMM+7hzzsI981FyxpImKp0pslcBkoGZNQl RljEij1EKveJk0KRGOC2oHdJYPy1Z6ZX04n2yc/3rzBhsYEkD9XiXshForbbFK6vwcXRBXK iN74fSCrvGE77Iisz+k3Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:9DkWXaP77I0=:uIoEREDATBuukndiHzt3rl TeL87jdCmP+zXcYlfU4yqH1HfBUvN60WnKz2tsefe4x3zhrK4d1Vb5b2m9Y7ODHLbMTtstdDP WvvHGqS0azToa6XytKVBNdolEX2BQtr7sS6GDZ311yXx60KGGyXQlGcT43ZrpfljTMyROWBy5 xs888cHmjqtjyCpIopKaasPLXPv+Bc+ZETzQ16NNCJBWv2oYyMIr/YW2AiMEQlItW6sB/3hqs GYb7lYFC8uFAPFn1j6ykmAOCyfEm6fed4VcrhhmIvpR2mYGewm+LFKCnUlV5NXjPP/v4/WMBv +xk67Q7Mhxf2iznhZhG4LctchmNozz9j/gAfQNXGXzsWqlE3lpf5ZRQNky3JrlW3RX0CUN2Mc +wh3j9hxtkwJaVbi49mg2jP3PWmMbTYqXmbs2+5l166gNL9C8DxCwC9kd1C2yLiJuXT2vlreN S7NK2ytzTmhTwdDiX9sVuBd3WSwOVQOnjdWYJi/OGeJ9zTDsSkWgxKwWrzHxEzkv0REEJ5jPB pawj9mU/yNyvgRpNcix+VU2t02visY9ymqP79BKWRsLqP2lTdq3yZ/lAJDTBWLfg6AD/IWSML fMuZo2A9lXb4iRKBRadpXuVqTNW8vuc8hxj2D48MLJknpeOf3srf6KdmcbmrY8JZg6VTEDsif SWLrgG5w+uCsa1JYHjFxaO6Dk/uUN07kAPZEiDjswbR/Y0i76ARgUsZ0UXNZUaWV0wyU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.17.10 Subject: [Qemu-devel] [PULL 03/13] linux-user: update comments to point to tcg_exec_init() 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: Igor Mammedov , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Igor Mammedov cpu_init() was replaced by cpu_create() since 2.12 but comments weren't updated. So update stale comments to point that page sizes arei actually initialized by tcg_exec_init(). Also move another qemu_host_page_size related comment before tcg_exec_init() where it belongs. Signed-off-by: Igor Mammedov Reviewed-by: Laurent Vivier Message-Id: <1526557877-293151-1-git-send-email-imammedo@redhat.com> Signed-off-by: Laurent Vivier --- bsd-user/main.c | 7 ++++--- linux-user/main.c | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 283dc6fd25..da3b833975 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -898,9 +898,10 @@ int main(int argc, char **argv) cpu_model = "any"; #endif } + + /* init tcg before creating CPUs and to get qemu_host_page_size */ tcg_exec_init(0); - /* NOTE: we need to init the CPU at this stage to get - qemu_host_page_size */ + cpu_type = parse_cpu_model(cpu_model); cpu = cpu_create(cpu_type); env = cpu->env_ptr; @@ -917,7 +918,7 @@ int main(int argc, char **argv) envlist_free(envlist); /* - * Now that page sizes are configured in cpu_init() we can do + * Now that page sizes are configured in tcg_exec_init() we can do * proper page alignment for guest_base. */ guest_base = HOST_PAGE_ALIGN(guest_base); diff --git a/linux-user/main.c b/linux-user/main.c index 32347545c9..78d6d3e7eb 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -671,9 +671,8 @@ int main(int argc, char **argv, char **envp) } cpu_type = parse_cpu_model(cpu_model); + /* init tcg before creating CPUs and to get qemu_host_page_size */ tcg_exec_init(0); - /* NOTE: we need to init the CPU at this stage to get - qemu_host_page_size */ cpu = cpu_create(cpu_type); env = cpu->env_ptr; @@ -693,7 +692,7 @@ int main(int argc, char **argv, char **envp) envlist_free(envlist); /* - * Now that page sizes are configured in cpu_init() we can do + * Now that page sizes are configured in tcg_exec_init() we can do * proper page alignment for guest_base. */ guest_base = HOST_PAGE_ALIGN(guest_base);