qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 08/20] pc-dimm: implement memory device class


From: David Hildenbrand
Subject: Re: [Qemu-devel] [PATCH v2 08/20] pc-dimm: implement memory device class function set_addr()
Date: Mon, 17 Sep 2018 12:52:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

Am 13.09.18 um 14:14 schrieb Igor Mammedov:
> On Wed, 29 Aug 2018 17:36:12 +0200
> David Hildenbrand <address@hidden> wrote:
> 
>> Keep it simple for now and simply set the static property, that will
>> fail once realized.
> I'd merge this with previous patch and mention that set_addr will replace
> 'addr' property setting in the next patch where preliminary steps during
> memory hotplug are factored out into _preplug handler

Sounds good to me, thanks!

> 
>> Signed-off-by: David Hildenbrand <address@hidden>
>> ---
>>  hw/mem/pc-dimm.c | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
>> index a208b17c64..d4e8a415bf 100644
>> --- a/hw/mem/pc-dimm.c
>> +++ b/hw/mem/pc-dimm.c
>> @@ -236,6 +236,12 @@ static uint64_t pc_dimm_md_get_addr(const 
>> MemoryDeviceState *md)
>>      return dimm->addr;
>>  }
>>  
>> +static void pc_dimm_md_set_addr(MemoryDeviceState *md, uint64_t addr,
>> +                                Error **errp)
>> +{
>> +    object_property_set_uint(OBJECT(md), addr, PC_DIMM_ADDR_PROP, errp);
>> +}
>> +
>>  static uint64_t pc_dimm_md_get_plugged_size(const MemoryDeviceState *md,
>>                                              Error **errp)
>>  {
>> @@ -307,6 +313,7 @@ static void pc_dimm_class_init(ObjectClass *oc, void 
>> *data)
>>      ddc->get_vmstate_memory_region = pc_dimm_get_memory_region;
>>  
>>      mdc->get_addr = pc_dimm_md_get_addr;
>> +    mdc->set_addr = pc_dimm_md_set_addr;
>>      mdc->get_plugged_size = pc_dimm_md_get_plugged_size;
>>      mdc->get_memory_region = pc_dimm_md_get_memory_region;
>>      mdc->fill_device_info = pc_dimm_md_fill_device_info;
> 


-- 

Thanks,

David / dhildenb



reply via email to

[Prev in Thread] Current Thread [Next in Thread]