{"id":807964,"url":"http://patchwork.ozlabs.org/api/1.2/patches/807964/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170830225225.27925-4-f4bug@amsat.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/1.2/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170830225225.27925-4-f4bug@amsat.org>","list_archive_url":null,"date":"2017-08-30T22:52:21","name":"[v2,3/7] mips: split cpu_mips_realize_env() out of cpu_mips_init()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"ae7871fdb732e22eb69691cba2103a5448d225d3","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/1.2/people/70924/?format=json","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20170830225225.27925-4-f4bug@amsat.org/mbox/","series":[{"id":718,"url":"http://patchwork.ozlabs.org/api/1.2/series/718/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=718","date":"2017-08-30T22:52:19","name":"[v2,1/7] mips: move hw/mips/cputimer.c to target/mips/","version":2,"mbox":"http://patchwork.ozlabs.org/series/718/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/807964/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807964/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"NLp0Qjsb\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjLTF2xb6z9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 08:56:01 +1000 (AEST)","from localhost ([::1]:53118 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1dnBtv-0005am-EJ\n\tfor incoming@patchwork.ozlabs.org; Wed, 30 Aug 2017 18:55:59 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:34706)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnBqv-0003RK-Td\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:52:55 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnBqr-0002FC-2g\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:52:53 -0400","from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:33595)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1dnBqq-0002F4-Us\n\tfor qemu-devel@nongnu.org; Wed, 30 Aug 2017 18:52:49 -0400","by mail-qk0-x242.google.com with SMTP id k126so3144037qkb.0\n\tfor <qemu-devel@nongnu.org>; Wed, 30 Aug 2017 15:52:48 -0700 (PDT)","from yoga.offpageads.com ([181.93.89.178])\n\tby smtp.gmail.com with ESMTPSA id\n\t54sm4449874qts.31.2017.08.30.15.52.45\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 30 Aug 2017 15:52:47 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=ONmHwbJZQbWdUMfwFZDvAsxolFWwTDLqOZWkKpEwQ2Q=;\n\tb=NLp0Qjsbn2GygeKhNMEqselJNdoQ6QM73J2qzlNiQ49zfHH8P4PYdnNaCaVsL0Qrvq\n\t80IPjl5MvmcyGbQR9FFl5d20TAEQRah6kPPkhUStfOWrBNRsTd/EPzvvA5Ma3cZieFrX\n\tqRJLYJSiVH1crGin+3iHinj39jEYVk+XBJiRjOICCoJyq5dCoWdClwSJs421uC1vnkzM\n\tEnplZH59TvcB3ysdUVcbeJrjFdYD5KIq316JidKGsokLXwunDNX6o7B0EjBw3Ep8BEfe\n\tCTET9WJcVKWIZKWqMgp7YgPI7ftFAbL1XDcG8VauFLMIKp3M2hSscm82LaGaLZLf6o7g\n\t7ugw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=ONmHwbJZQbWdUMfwFZDvAsxolFWwTDLqOZWkKpEwQ2Q=;\n\tb=Ahepyke5m/05KtVp9hqlMIJTS9Q2cMiyXRFVDt7FB12eTNVrLHyiLn+EHCIzRaNuK7\n\tTLE/OjgGpYl7tKyOW3lDTV6MiszlBrGO2F1EsAScqo7LfpQ+m39E79YdrqkTTrhif7Hy\n\tuOZ0B6jHaTdjIg/fJX10BeYN4lxGyYpL/N2OmzU9e7PPCHYuR+AQWIxTYZP6K0RH5dgr\n\tyvDRvsVjqYd1n9yWQu7clfwzzl/MOv0ejb2sAHu9pSgLy6MPFE1HNc+quIdgkq25krWz\n\t6O9bHp2AwUxz04uArKVdKC5KiB+GWuomI2SVWay0s+XBDp8pBEwLElIOL5Gkwdo6yp5E\n\tv9Vg==","X-Gm-Message-State":"AHPjjUiQZTV//j0c9NT12lz50qLOvVWGPpctlI753uMj6yajFHBWV4cN\n\tjyK0nLmM6zZC0Q==","X-Received":"by 10.55.57.77 with SMTP id g74mr1291740qka.186.1504133568262;\n\tWed, 30 Aug 2017 15:52:48 -0700 (PDT)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","To":"Igor Mammedov <imammedo@redhat.com>, =?utf-8?q?Herv=C3=A9_Poussineau?=\n\t<hpoussin@reactos.org>, \tAurelien Jarno <aurelien@aurel32.net>,\n\tEduardo Habkost <ehabkost@redhat.com>, \n\tMarcel Apfelbaum <marcel@redhat.com>,\n\tJames Hogan <james.hogan@imgtec.com>, Yongbok Kim\n\t<yongbok.kim@imgtec.com>","Date":"Wed, 30 Aug 2017 19:52:21 -0300","Message-Id":"<20170830225225.27925-4-f4bug@amsat.org>","X-Mailer":"git-send-email 2.14.1","In-Reply-To":"<20170830225225.27925-1-f4bug@amsat.org>","References":"<20170830225225.27925-1-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c09::242","Subject":"[Qemu-devel] [PATCH v2 3/7] mips: split cpu_mips_realize_env() out\n\tof cpu_mips_init()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Thomas Huth <thuth@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?=\n\t<f4bug@amsat.org>, \tqemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"so it can be used in mips_cpu_realizefn() in the next commit\n\nSigned-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\nTested-by: Igor Mammedov <imammedo@redhat.com>\nTested-by: James Hogan <james.hogan@imgtec.com>\n---\n target/mips/internal.h  |  1 +\n target/mips/translate.c | 19 ++++++++++++-------\n 2 files changed, 13 insertions(+), 7 deletions(-)","diff":"diff --git a/target/mips/internal.h b/target/mips/internal.h\nindex 91c2df4537..cf4c9db427 100644\n--- a/target/mips/internal.h\n+++ b/target/mips/internal.h\n@@ -132,6 +132,7 @@ void mips_tcg_init(void);\n \n /* TODO QOM'ify CPU reset and remove */\n void cpu_state_reset(CPUMIPSState *s);\n+void cpu_mips_realize_env(CPUMIPSState *env);\n \n /* cp0_timer.c */\n uint32_t cpu_mips_get_random(CPUMIPSState *env);\ndiff --git a/target/mips/translate.c b/target/mips/translate.c\nindex f0febaf1b2..5fc7979ac5 100644\n--- a/target/mips/translate.c\n+++ b/target/mips/translate.c\n@@ -20512,6 +20512,17 @@ void mips_tcg_init(void)\n \n #include \"translate_init.c\"\n \n+void cpu_mips_realize_env(CPUMIPSState *env)\n+{\n+    env->exception_base = (int32_t)0xBFC00000;\n+\n+#ifndef CONFIG_USER_ONLY\n+    mmu_init(env, env->cpu_model);\n+#endif\n+    fpu_init(env, env->cpu_model);\n+    mvp_init(env, env->cpu_model);\n+}\n+\n MIPSCPU *cpu_mips_init(const char *cpu_model)\n {\n     MIPSCPU *cpu;\n@@ -20524,13 +20535,7 @@ MIPSCPU *cpu_mips_init(const char *cpu_model)\n     cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU));\n     env = &cpu->env;\n     env->cpu_model = def;\n-    env->exception_base = (int32_t)0xBFC00000;\n-\n-#ifndef CONFIG_USER_ONLY\n-    mmu_init(env, def);\n-#endif\n-    fpu_init(env, def);\n-    mvp_init(env, def);\n+    cpu_mips_realize_env(env);\n \n     object_property_set_bool(OBJECT(cpu), true, \"realized\", NULL);\n \n","prefixes":["v2","3/7"]}