[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region(
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail |
Date: |
Fri, 15 Jun 2018 12:29:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 |
>>> pre_plug isn't part of device, it's a separate part that might vary
>>> depending on machine and which might modify device properties along
>>> the way and then exaggerating we would need 'prepare2()' and after
>>> that 'pre_plug2()' and ...
>>
>> That's how two parties (device vs hotplug handler) work together to get
>> results done ... Just like inititalize() -> realized() vs. pre_plug ->
>> plug(). There has to be some hand shaking.
> In general hotplug handler is optional, for example a board might
> create initial memory wit fixed layout as:
> dev = object_new(dimm)
> set memdev + set addr
> qdev_init_no_fail()
>
> generalized pc-dimm helpers for hotplug handler is just impl. detail,
> a board might have other ideas how to use pc-dimm and choose to
> implement wiring differently. So device model should do sanity checks
> independently from whomever uses it.
In general, I am not a fan of implementing things the "what if someday
..." way. It overcomplicates code and you can be sure that usually
something is missed either way (as there is no concrete use case, not
even in somebodys mind).
But I can see that for pc-dimms that can actually make sense (in
contrast to other, more specific devices).
--
Thanks,
David / dhildenb
- [Qemu-ppc] [PATCH v1 09/11] pc-dimm: remove pc_dimm_get_vmstate_memory_region(), (continued)
- [Qemu-ppc] [PATCH v1 09/11] pc-dimm: remove pc_dimm_get_vmstate_memory_region(), David Hildenbrand, 2018/06/11
- [Qemu-ppc] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, David Hildenbrand, 2018/06/11
- Re: [Qemu-ppc] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, David Gibson, 2018/06/11
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, Igor Mammedov, 2018/06/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, David Hildenbrand, 2018/06/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, David Hildenbrand, 2018/06/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, Igor Mammedov, 2018/06/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, David Hildenbrand, 2018/06/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail, Igor Mammedov, 2018/06/15
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 07/11] pc-dimm: get_memory_region() can never fail,
David Hildenbrand <=
[Qemu-ppc] [PATCH v1 10/11] pc-dimm: introduce and use pc_dimm_memory_pre_plug(), David Hildenbrand, 2018/06/11
[Qemu-ppc] [PATCH v1 11/11] pc-dimm: assign and verify the "slot" property during pre_plug, David Hildenbrand, 2018/06/11
Re: [Qemu-ppc] [Qemu-devel] [PATCH v1 00/11] pc-dimm: next bunch of cleanups, Igor Mammedov, 2018/06/13