[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] pc-dimm: remove realize callback
From: |
Wei Yang |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] pc-dimm: remove realize callback |
Date: |
Fri, 22 Feb 2019 16:17:13 +0800 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Feb 21, 2019 at 03:37:53PM +0100, Igor Mammedov wrote:
>On Tue, 19 Feb 2019 13:36:57 +0100
>Philippe Mathieu-Daudé <address@hidden> wrote:
>
>> On 2/19/19 7:07 AM, Wei Yang wrote:
>> > PCDIMM's realize callback is introduced to do proper setup for NVDIMM.
>> >
>> > Currently the NVDIMM setup task is nvdimm_prepare_memory_region(), which
>> > is done in pre_plug stage. This means related task has already been done
>> > at realize point.
>> >
>> > This patch remove PCDIMM realize callback.
>
>pre_plug is machine helper and that it calls nvdimm_prepare_memory_region()
>indirectly is just of side effect of current nvdimm impl. Another machine
>might choose to implement it's own pre_plug to use with nvdimms, in which
>case it might not call the function before realize, hence this patch makes
>nvdimm device model incomplete and less robust.
Sounds reasonable.
Call nvdimm_prepare_memory_region() two times is really ugly. Hmm... could we
improve this?
--
Wei Yang
Help you, Help me