[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace cpu_s390x_init
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [PATCH for-2.11 v4 08/25] s390x: replace cpu_s390x_init() with cpu_generic_init() |
Date: |
Thu, 31 Aug 2017 18:20:06 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 31.08.2017 16:04, Igor Mammedov wrote:
> On Thu, 31 Aug 2017 15:44:38 +0200
> David Hildenbrand <address@hidden> wrote:
>
>> On 31.08.2017 15:19, Igor Mammedov wrote:
>>> cpu_s390x_init() is used only *-user targets indirectly
>>> via cpu_init() macro and has a hack to assign ids to created
>>> cpus (I'm not sure if 'id' really matters to *-user emulation).
>>
>> It only has one cpu, right? With the below mentioned patch, the default
>> "id"/ (the cpu_addr) will be 0. So you can create one CPU without any
>> hacks. Or can it create more than 1?
> As I understand it creates only one cpu,
> but then there is fork related cpu_copy() which creates a cpu
> and the rewrites new CPUArchState with old cpu data
>
> CPUState *new_cpu = cpu_init(cpu_model);
>
> CPUArchState *new_env = new_cpu->env_ptr;
>
> ...
> memcpy(new_env, env, sizeof(CPUArchState));
>
> so I couldn't decide if id is of importance for *-user target
> (well, I'm not really interested in *-user), and opted for
> keeping current behavior (i.e. not breaking) in this patch
> just without cpu_s390x_init().
>
> So if 'id' isn't really needed for *-user target, hunk 2 could be
> dropped but it ought to be another patch on top as this change isn't
> related to the topic of this patch/series.
>
Indeed, it seems to create a new cpu for every fork. So this is necessary.
--
Thanks,
David
- [Qemu-devel] [PATCH for-2.11 v4 06/25] sparc: make cpu feature parsing property based, (continued)
- [Qemu-devel] [PATCH for-2.11 v3 07/25] sparc: replace cpu_sparc_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
- [Qemu-devel] [PATCH for-2.11 v3 09/25] alpha: replace cpu_alpha_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
- [Qemu-devel] [PATCH for-2.11 v3 13/25] nios2: replace cpu_nios2_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
- [Qemu-devel] [PATCH for-2.11 v3 10/25] hppa: replace cpu_hppa_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
- [Qemu-devel] [PATCH for-2.11 v3 08/25] s390x: replace cpu_s390x_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 11/25] m68k: replace cpu_m68k_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 14/25] tilegx: replace cpu_tilegx_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 15/25] xtensa: replace cpu_xtensa_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 12/25] microblaze: replace cpu_mb_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 18/25] arm: replace cpu_arm_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 16/25] tricore: replace cpu_tricore_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 17/25] sh4: replace cpu_sh4_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 19/25] cris: replace cpu_cris_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 22/25] moxie: replace cpu_moxie_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24
[Qemu-devel] [PATCH for-2.11 v3 23/25] openrisc: replace cpu_openrisc_init() with cpu_generic_init(), Igor Mammedov, 2017/08/24