[{"id":1761010,"web_url":"http://patchwork.ozlabs.org/comment/1761010/","msgid":"<94cbb70c-5d33-c638-9826-277a359d178e@redhat.com>","list_archive_url":null,"date":"2017-08-31T13:44:38","subject":"Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace\n\tcpu_s390x_init() with cpu_generic_init()","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"On 31.08.2017 15:19, Igor Mammedov wrote:\n> cpu_s390x_init() is used only *-user targets indirectly\n> via cpu_init() macro and has a hack to assign ids to created\n> cpus (I'm not sure if 'id' really matters to *-user emulation).\n\nIt only has one cpu, right? With the below mentioned patch, the default\n\"id\"/ (the cpu_addr) will be 0. So you can create one CPU without any\nhacks. Or can it create more than 1?\n\n> \n> So to on safe side, instead of having custom wrapper to do numbering\n> replace it with cpu_generic_init() and use S390CPUClass::next_cpu_id\n> which could serve the same purpose as static variable and move cpu->id\n> initialization to s390_cpu_initfn for CONFIG_USER_ONLY use-case.\n> \n> PS:\n> ifdef is ugly but it allows us to hide s390x detail that isn't\n> set by *-user targets and reuse generic cpu creation utility\n> for btoh machine and user emulation.\n> \n> Signed-off-by: Igor Mammedov <imammedo@redhat.com>\n> Acked-by: Cornelia Huck <cohuck@redhat.com>\n> ---\n> v2:\n>   - fix merge conflict in target/s390x/cpu.h caused by moving\n>     cpu_init/cpu_s390x_init with the file in commit\n>     (c862bddbc target/s390x: cleanup cpu.h)\n> \n> CC: Cornelia Huck <cohuck@redhat.com>\n> CC: david@redhat.com\n> CC: Eduardo Habkost <ehabkost@redhat.com>\n> \n> perhaps cpu->id isn't need by CONFIG_USER_ONLY but I'd leave to it\n> s390x maintainers to deal with it.\n\nWill most probably be dropped in\n\nhttps://lists.gnu.org/archive/html/qemu-devel/2017-08/msg06158.html\n\n> ---\n>  target/s390x/cpu.h    |  3 +--\n>  target/s390x/cpu.c    |  7 +++++++\n>  target/s390x/helper.c | 14 --------------\n>  3 files changed, 8 insertions(+), 16 deletions(-)\n> \n> diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h\n> index 4ec3380..0bd97a5 100644\n> --- a/target/s390x/cpu.h\n> +++ b/target/s390x/cpu.h\n> @@ -688,8 +688,7 @@ const char *s390_default_cpu_model_name(void);\n>  \n>  \n>  /* helper.c */\n> -S390CPU *cpu_s390x_init(const char *cpu_model);\n> -#define cpu_init(model) CPU(cpu_s390x_init(model))\n> +#define cpu_init(cpu_model) cpu_generic_init(TYPE_S390_CPU, cpu_model)\n>  S390CPU *s390x_new_cpu(const char *cpu_model, int64_t id, Error **errp);\n>  /* you can call this signal handler from your SIGBUS and SIGSEGV\n>     signal handlers to inform the virtual CPU of exceptions. non zero\n> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c\n> index 7267b60..74b3e4f 100644\n> --- a/target/s390x/cpu.c\n> +++ b/target/s390x/cpu.c\n> @@ -306,6 +306,13 @@ static void s390_cpu_initfn(Object *obj)\n>          inited = true;\n>          s390x_translate_init();\n>      }\n> +\n> +#if defined(CONFIG_USER_ONLY)\n> +    {\n> +        S390CPUClass *scc = S390_CPU_GET_CLASS(obj);\n> +        cpu->id = scc->next_cpu_id;\n> +    }\n> +#endif\n>  }\n>  \n>  static void s390_cpu_finalize(Object *obj)\n> diff --git a/target/s390x/helper.c b/target/s390x/helper.c\n> index 3adb9de..ba29504 100644\n> --- a/target/s390x/helper.c\n> +++ b/target/s390x/helper.c\n> @@ -129,20 +129,6 @@ out:\n>      return cpu;\n>  }\n>  \n> -S390CPU *cpu_s390x_init(const char *cpu_model)\n> -{\n> -    Error *err = NULL;\n> -    S390CPU *cpu;\n> -    /* Use to track CPU ID for linux-user only */\n> -    static int64_t next_cpu_id;\n> -\n> -    cpu = s390x_new_cpu(cpu_model, next_cpu_id++, &err);\n> -    if (err) {\n> -        error_report_err(err);\n> -    }\n> -    return cpu;\n> -}\n> -\n>  #ifndef CONFIG_USER_ONLY\n>  \n>  hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)\n>","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>)","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx08.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=david@redhat.com"],"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 3xjkCL5Qbcz9sPm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 23:45:18 +1000 (AEST)","from localhost ([::1]:55885 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 1dnPmW-0007hF-Sv\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 09:45:16 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:33186)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnPm3-0007fP-Sh\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 09:44:49 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnPlz-0002Lc-62\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 09:44:47 -0400","from mx1.redhat.com ([209.132.183.28]:6434)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <david@redhat.com>) id 1dnPly-0002LE-SV\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 09:44:43 -0400","from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 7F446C0587C6\n\tfor <qemu-devel@nongnu.org>; Thu, 31 Aug 2017 13:44:41 +0000 (UTC)","from [10.36.118.11] (unknown [10.36.118.11])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 07254A2492;\n\tThu, 31 Aug 2017 13:44:39 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 7F446C0587C6","To":"Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org","References":"<1503592308-93913-9-git-send-email-imammedo@redhat.com>\n\t<1504185578-80843-1-git-send-email-imammedo@redhat.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<94cbb70c-5d33-c638-9826-277a359d178e@redhat.com>","Date":"Thu, 31 Aug 2017 15:44:38 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1504185578-80843-1-git-send-email-imammedo@redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.13","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.32]);\n\tThu, 31 Aug 2017 13:44:41 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace\n\tcpu_s390x_init() with cpu_generic_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":"Cornelia Huck <cohuck@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>","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>"}},{"id":1761030,"web_url":"http://patchwork.ozlabs.org/comment/1761030/","msgid":"<20170831160440.04b5827d@nial.brq.redhat.com>","list_archive_url":null,"date":"2017-08-31T14:04:40","subject":"Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace\n\tcpu_s390x_init() with cpu_generic_init()","submitter":{"id":11305,"url":"http://patchwork.ozlabs.org/api/people/11305/","name":"Igor Mammedov","email":"imammedo@redhat.com"},"content":"On Thu, 31 Aug 2017 15:44:38 +0200\nDavid Hildenbrand <david@redhat.com> wrote:\n\n> On 31.08.2017 15:19, Igor Mammedov wrote:\n> > cpu_s390x_init() is used only *-user targets indirectly\n> > via cpu_init() macro and has a hack to assign ids to created\n> > cpus (I'm not sure if 'id' really matters to *-user emulation).  \n> \n> It only has one cpu, right? With the below mentioned patch, the default\n> \"id\"/ (the cpu_addr) will be 0. So you can create one CPU without any\n> hacks. Or can it create more than 1?\nAs I understand it creates only one cpu,\nbut then there is fork related cpu_copy() which creates a cpu\nand the rewrites new CPUArchState with old cpu data\n\n    CPUState *new_cpu = cpu_init(cpu_model);                                     \n    CPUArchState *new_env = new_cpu->env_ptr;                                    \n    ...                                                    \n    memcpy(new_env, env, sizeof(CPUArchState));\n\nso I couldn't decide if id is of importance for *-user target\n(well, I'm not really interested in *-user), and opted for\nkeeping current behavior (i.e. not breaking) in this patch\njust without cpu_s390x_init().\n\nSo if 'id' isn't really needed for  *-user target, hunk 2 could be\ndropped but it ought to be another patch on top as this change isn't\nrelated to the topic of this patch/series.\n \n\n> > So to on safe side, instead of having custom wrapper to do numbering\n> > replace it with cpu_generic_init() and use S390CPUClass::next_cpu_id\n> > which could serve the same purpose as static variable and move cpu->id\n> > initialization to s390_cpu_initfn for CONFIG_USER_ONLY use-case.\n> > \n> > PS:\n> > ifdef is ugly but it allows us to hide s390x detail that isn't\n> > set by *-user targets and reuse generic cpu creation utility\n> > for btoh machine and user emulation.\n> > \n> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>\n> > Acked-by: Cornelia Huck <cohuck@redhat.com>\n> > ---\n> > v2:\n> >   - fix merge conflict in target/s390x/cpu.h caused by moving\n> >     cpu_init/cpu_s390x_init with the file in commit\n> >     (c862bddbc target/s390x: cleanup cpu.h)\n> > \n> > CC: Cornelia Huck <cohuck@redhat.com>\n> > CC: david@redhat.com\n> > CC: Eduardo Habkost <ehabkost@redhat.com>\n> > \n> > perhaps cpu->id isn't need by CONFIG_USER_ONLY but I'd leave to it\n> > s390x maintainers to deal with it.  \n> \n> Will most probably be dropped in\n> \n> https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg06158.html\n> \n> > ---\n> >  target/s390x/cpu.h    |  3 +--\n> >  target/s390x/cpu.c    |  7 +++++++\n> >  target/s390x/helper.c | 14 --------------\n> >  3 files changed, 8 insertions(+), 16 deletions(-)\n> > \n> > diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h\n> > index 4ec3380..0bd97a5 100644\n> > --- a/target/s390x/cpu.h\n> > +++ b/target/s390x/cpu.h\n> > @@ -688,8 +688,7 @@ const char *s390_default_cpu_model_name(void);\n> >  \n> >  \n> >  /* helper.c */\n> > -S390CPU *cpu_s390x_init(const char *cpu_model);\n> > -#define cpu_init(model) CPU(cpu_s390x_init(model))\n> > +#define cpu_init(cpu_model) cpu_generic_init(TYPE_S390_CPU, cpu_model)\n> >  S390CPU *s390x_new_cpu(const char *cpu_model, int64_t id, Error **errp);\n> >  /* you can call this signal handler from your SIGBUS and SIGSEGV\n> >     signal handlers to inform the virtual CPU of exceptions. non zero\n> > diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c\n> > index 7267b60..74b3e4f 100644\n> > --- a/target/s390x/cpu.c\n> > +++ b/target/s390x/cpu.c\n> > @@ -306,6 +306,13 @@ static void s390_cpu_initfn(Object *obj)\n> >          inited = true;\n> >          s390x_translate_init();\n> >      }\n> > +\n> > +#if defined(CONFIG_USER_ONLY)\n> > +    {\n> > +        S390CPUClass *scc = S390_CPU_GET_CLASS(obj);\n> > +        cpu->id = scc->next_cpu_id;\n> > +    }\n> > +#endif\n> >  }\n> >  \n> >  static void s390_cpu_finalize(Object *obj)\n> > diff --git a/target/s390x/helper.c b/target/s390x/helper.c\n> > index 3adb9de..ba29504 100644\n> > --- a/target/s390x/helper.c\n> > +++ b/target/s390x/helper.c\n> > @@ -129,20 +129,6 @@ out:\n> >      return cpu;\n> >  }\n> >  \n> > -S390CPU *cpu_s390x_init(const char *cpu_model)\n> > -{\n> > -    Error *err = NULL;\n> > -    S390CPU *cpu;\n> > -    /* Use to track CPU ID for linux-user only */\n> > -    static int64_t next_cpu_id;\n> > -\n> > -    cpu = s390x_new_cpu(cpu_model, next_cpu_id++, &err);\n> > -    if (err) {\n> > -        error_report_err(err);\n> > -    }\n> > -    return cpu;\n> > -}\n> > -\n> >  #ifndef CONFIG_USER_ONLY\n> >  \n> >  hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr vaddr)\n> >   \n> \n>","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>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=imammedo@redhat.com"],"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 3xjkfQ2GC0z9sD5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 00:05:17 +1000 (AEST)","from localhost ([::1]:55961 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 1dnQ5q-0006hm-UA\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 10:05:14 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:38527)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <imammedo@redhat.com>) id 1dnQ5T-0006hP-Fo\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 10:04:52 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <imammedo@redhat.com>) id 1dnQ5P-0000zS-3k\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 10:04:51 -0400","from mx1.redhat.com ([209.132.183.28]:56216)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <imammedo@redhat.com>) id 1dnQ5O-0000zH-Qq\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 10:04:47 -0400","from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 9373781DEE\n\tfor <qemu-devel@nongnu.org>; Thu, 31 Aug 2017 14:04:45 +0000 (UTC)","from nial.brq.redhat.com (unknown [10.43.2.241])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 718A6114BFF;\n\tThu, 31 Aug 2017 14:04:42 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 9373781DEE","Date":"Thu, 31 Aug 2017 16:04:40 +0200","From":"Igor Mammedov <imammedo@redhat.com>","To":"David Hildenbrand <david@redhat.com>","Message-ID":"<20170831160440.04b5827d@nial.brq.redhat.com>","In-Reply-To":"<94cbb70c-5d33-c638-9826-277a359d178e@redhat.com>","References":"<1503592308-93913-9-git-send-email-imammedo@redhat.com>\n\t<1504185578-80843-1-git-send-email-imammedo@redhat.com>\n\t<94cbb70c-5d33-c638-9826-277a359d178e@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.14","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]);\n\tThu, 31 Aug 2017 14:04:45 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace\n\tcpu_s390x_init() with cpu_generic_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":"Cornelia Huck <cohuck@redhat.com>, qemu-devel@nongnu.org,\n\tEduardo Habkost <ehabkost@redhat.com>","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>"}},{"id":1761164,"web_url":"http://patchwork.ozlabs.org/comment/1761164/","msgid":"<f9058fac-b053-8347-da74-33d7eebed8c1@redhat.com>","list_archive_url":null,"date":"2017-08-31T16:20:06","subject":"Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace\n\tcpu_s390x_init() with cpu_generic_init()","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"On 31.08.2017 16:04, Igor Mammedov wrote:\n> On Thu, 31 Aug 2017 15:44:38 +0200\n> David Hildenbrand <david@redhat.com> wrote:\n> \n>> On 31.08.2017 15:19, Igor Mammedov wrote:\n>>> cpu_s390x_init() is used only *-user targets indirectly\n>>> via cpu_init() macro and has a hack to assign ids to created\n>>> cpus (I'm not sure if 'id' really matters to *-user emulation).  \n>>\n>> It only has one cpu, right? With the below mentioned patch, the default\n>> \"id\"/ (the cpu_addr) will be 0. So you can create one CPU without any\n>> hacks. Or can it create more than 1?\n> As I understand it creates only one cpu,\n> but then there is fork related cpu_copy() which creates a cpu\n> and the rewrites new CPUArchState with old cpu data\n> \n>     CPUState *new_cpu = cpu_init(cpu_model);                                     \n>     CPUArchState *new_env = new_cpu->env_ptr;                                    \n>     ...                                                    \n>     memcpy(new_env, env, sizeof(CPUArchState));\n> \n> so I couldn't decide if id is of importance for *-user target\n> (well, I'm not really interested in *-user), and opted for\n> keeping current behavior (i.e. not breaking) in this patch\n> just without cpu_s390x_init().\n> \n> So if 'id' isn't really needed for  *-user target, hunk 2 could be\n> dropped but it ought to be another patch on top as this change isn't\n> related to the topic of this patch/series.\n>  \n\nIndeed, it seems to create a new cpu for every fork. So this is necessary.","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=208.118.235.17; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=david@redhat.com"],"Received":["from lists.gnu.org (lists.gnu.org [208.118.235.17])\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 3xjnhL6P4fz9ryk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 02:22:10 +1000 (AEST)","from localhost ([::1]:56645 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 1dnSEK-0006rq-QO\n\tfor incoming@patchwork.ozlabs.org; Thu, 31 Aug 2017 12:22:08 -0400","from eggs.gnu.org ([2001:4830:134:3::10]:49144)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnSCU-0005pI-Bf\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:20:15 -0400","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <david@redhat.com>) id 1dnSCP-0008W5-Mb\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:20:14 -0400","from mx1.redhat.com ([209.132.183.28]:41758)\n\tby eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)\n\t(Exim 4.71) (envelope-from <david@redhat.com>) id 1dnSCP-0008Uj-G9\n\tfor qemu-devel@nongnu.org; Thu, 31 Aug 2017 12:20:09 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 95F38C047B86\n\tfor <qemu-devel@nongnu.org>; Thu, 31 Aug 2017 16:20:08 +0000 (UTC)","from [10.36.118.11] (unknown [10.36.118.11])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id ACABE92BBA;\n\tThu, 31 Aug 2017 16:20:07 +0000 (UTC)"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 95F38C047B86","To":"Igor Mammedov <imammedo@redhat.com>","References":"<1503592308-93913-9-git-send-email-imammedo@redhat.com>\n\t<1504185578-80843-1-git-send-email-imammedo@redhat.com>\n\t<94cbb70c-5d33-c638-9826-277a359d178e@redhat.com>\n\t<20170831160440.04b5827d@nial.brq.redhat.com>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<f9058fac-b053-8347-da74-33d7eebed8c1@redhat.com>","Date":"Thu, 31 Aug 2017 18:20:06 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170831160440.04b5827d@nial.brq.redhat.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.31]);\n\tThu, 31 Aug 2017 16:20:08 +0000 (UTC)","X-detected-operating-system":"by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]\n\t[fuzzy]","X-Received-From":"209.132.183.28","Subject":"Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace\n\tcpu_s390x_init() with cpu_generic_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":"Cornelia Huck <cohuck@redhat.com>, qemu-devel@nongnu.org,\n\tEduardo Habkost <ehabkost@redhat.com>","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>"}}]