[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 06/11] target/s390x: cleanup cpu number/addre
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v1 06/11] target/s390x: cleanup cpu number/address handling |
Date: |
Thu, 31 Aug 2017 16:49:38 +0200 |
On Thu, 31 Aug 2017 16:41:47 +0200
David Hildenbrand <address@hidden> wrote:
> On 31.08.2017 16:35, Cornelia Huck wrote:
> > On Wed, 30 Aug 2017 19:05:56 +0200
> > David Hildenbrand <address@hidden> wrote:
> >
> >> Some time ago we discussed that using "id" as property name is not the
> >> right thing to do, as it is a reserved property for other devices.
> >>
> >> Switch to the term "addr" instead, which matches the definition in the
> >> PoP called "CPU address". There is no such thing as cpu number, so
> >> rename env.cpu_num to env.cpu_addr.
> >>
> >> We can get rid of cpu->id now. Keep cpu->index and env->cpu_addr in sync.
> >> cpu->index was already implicitly used by e.g. cpu_exists(), so keeping
> >> both in sync seems to be the right thing to do.
> >>
> >> cpu->index will now no longer automatically get set via
> >> cpu_exec_realizefn(). For now, we were lucky that both implicitly stayed
> >> in sync.
> >>
> >> Our new cpu property "addr" can be a static property. Range checks can
> >> be avoided by using the correct type and the "setting after realized"
> >> check is done implicitly.
> >>
> >> AFAIK, s390x only supports cpu_add and not device_add for cpus. So we
> >> should be able to safely rename that property (no the "id" property
> >> could properly be used for device_add, which needs an artificial id for
> >> identification purposes).
> >
> > I cannot parse the sentence in the brackets...
>
> Me too :)
>
> ...So we should be able to safely rename that property. device_add will
> later need the reserved "id" property. Hotplugging a CPU would then look
> like this: "device_add host-s390-cpu id=cpu2 addr=2".
Yup, that's understandable :)
- Re: [Qemu-devel] [PATCH v1 03/11] s390x: store cpu states inside machine state, (continued)
[Qemu-devel] [PATCH v1 04/11] s390x: get rid of s390-virtio.c, David Hildenbrand, 2017/08/30
[Qemu-devel] [PATCH v1 06/11] target/s390x: cleanup cpu number/address handling, David Hildenbrand, 2017/08/30
[Qemu-devel] [PATCH v1 05/11] s390x: rename s390-virtio.h to s390-virtio-hcall.h, David Hildenbrand, 2017/08/30
[Qemu-devel] [PATCH v1 07/11] target/s390x: rename next_cpu_id to next_cpu_addr, David Hildenbrand, 2017/08/30
[Qemu-devel] [PATCH v1 08/11] s390x: allow only 1 CPU with TCG, David Hildenbrand, 2017/08/30