qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 06/22] memory-device: document Mem


From: David Hildenbrand
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH v3 06/22] memory-device: document MemoryDeviceClass
Date: Mon, 24 Sep 2018 15:24:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 24/09/2018 15:19, Igor Mammedov wrote:
> On Mon, 24 Sep 2018 14:40:24 +0200
> David Hildenbrand <address@hidden> wrote:
> 
>> On 24/09/2018 14:39, Igor Mammedov wrote:
>>> On Mon, 24 Sep 2018 14:26:23 +0200
>>> David Hildenbrand <address@hidden> wrote:
>>>   
>>>> On 24/09/2018 14:22, Igor Mammedov wrote:  
>>>>> On Thu, 20 Sep 2018 12:32:27 +0200
>>>>> David Hildenbrand <address@hidden> wrote:
>>>>>     
>>>>>> Document the functions and when to not expect errors.
>>>>>>
>>>>>> Signed-off-by: David Hildenbrand <address@hidden>
>>>>>> ---
>>>>>>  include/hw/mem/memory-device.h | 13 +++++++++++++
>>>>>>  1 file changed, 13 insertions(+)
>>>>>>
>>>>>> diff --git a/include/hw/mem/memory-device.h 
>>>>>> b/include/hw/mem/memory-device.h    
>>>>> [...]
>>>>>     
>>>>>> + * @get_plugged_size: The amount of memory provided by this @md 
>>>>>> currently
>>>>>> + * usable ("plugged") by the guest.
>>>>>> + * @get_region_size: The size of the memory region of the @md that's 
>>>>>> mapped
>>>>>> + * in guest physical memory at @get_addr    
>>>>> Tried to read it several times,
>>>>> but still description of hooks makes them look like they are doing the 
>>>>> same thing,
>>>>> so what's the difference?    
>>>>
>>>> That's a preparation mainly for virtio-mem, where we manage the amount
>>>> of memory that is actually accessible and visible by the guest (plugged)
>>>> inside a memory region dynamically. The difference exists purely for
>>>> stats. (could have been introduced later, but it made sense to split
>>>> this off right when factoring this stuff out into memory-device code).  
>>> Purpose might be obvious (for you) right now, but later when reader
>>> would be reading history it's confusing.
>>> I'd postpone it until there is an actual user for it.
>>>   
>>
>> What to postpone? The doc update? get_plugged_size is already upstream.
> We can't do anything to merged stuff (unless one would remove it :/),
> but doc update as is, just adding more confusion.
> 
> Alternatively clarify distinction referring to future devices that
> might return different values for both hooks.

Yes, I will add more details then, thanks!

-- 

Thanks,

David / dhildenb



reply via email to

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