[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 06/22] memory-device: document MemoryDeviceCl
Re: [Qemu-devel] [PATCH v3 06/22] memory-device: document MemoryDeviceClass
Mon, 24 Sep 2018 15:19:53 +0200
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.
Re: [Qemu-devel] [PATCH v3 06/22] memory-device: document MemoryDeviceClass, Igor Mammedov, 2018/09/25
[Qemu-devel] [PATCH v3 07/22] memory-device: add and use memory_device_get_region_size(), David Hildenbrand, 2018/09/20
- Re: [Qemu-devel] [PATCH v3 04/22] memory-device: introduce separate config option, (continued)