[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 03/27] target/s390x: get rid of next_core_id
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [PATCH v1 03/27] target/s390x: get rid of next_core_id |
Date: |
Tue, 26 Sep 2017 14:40:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 26.09.2017 10:49, Igor Mammedov wrote:
> On Mon, 25 Sep 2017 16:14:16 -0700
> Richard Henderson <address@hidden> wrote:
>
>> On 09/18/2017 08:59 AM, David Hildenbrand wrote:
>>> /* sync cs->cpu_index and env->core_id. The latter is needed for TCG.
>>> */
>>> - cs->cpu_index = env->core_id;
>>> + cs->cpu_index = cpu->env.core_id;
>>> +#endif
>>
>> Any reason not to drop core_id entirely in favour of cpu_index?
>> (Since cpu_index itself is generic and can't be dropped.)
> I prefer core_id vs cpu_index as the later is too generic
> (and we were trying to decouple target specific attributes
> /coreid/cpuid/whatnot from cpu_index as much as possible
> so it would be more clear what they mean and if possible
> make them in-depended of QEMU internal cpu_index which is
> essentially not owned by target).
>
As x86 also has this split I also prefer to keep it for now as it is.
cpu_index just has to match our core id, otherwise e.g. migration could
break (cpu_index is used as identifier for cpus in the migration stream).
If we would drop core_id, we would have to implement a handler for the
STAP instruction, as the CPU object is not accessible from translate.c.
(not a big problem, just another reason to simply leave it as is for
now), and also a new property handler, so only a uint16_t can be set
using "core-id" onto a CPU object.
--
Thanks,
David
- [Qemu-devel] [PATCH v1 01/27] s390x: raise CPU hotplug irq after really hotplugged, (continued)
- [Qemu-devel] [PATCH v1 05/27] s390/tcg: turn INTERRUPT_EXT into a mask, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 06/27] s390x/tcg: injection of emergency signals and extarnal calls, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 08/27] s390x/tcg: a CPU cannot switch state due to an interrupt, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 07/27] s390x/tcg: STOPPED cpus can never wake up, David Hildenbrand, 2017/09/18
- [Qemu-devel] [PATCH v1 09/27] target/s390x: factor out handling of WAIT PSW into handle_wait(), David Hildenbrand, 2017/09/18