On 9.11.2023 15:51, Peter Maydell wrote:
On Mon, 6 Nov 2023 at 14:23, Maciej S. Szmigiero
<m...@maciej.szmigiero.name> wrote:

From: "Maciej S. Szmigiero" <maciej.szmigi...@oracle.com>

One of advantages of using this protocol over ACPI-based PC DIMM hotplug is
that it allows hot-adding memory in much smaller granularity because the
ACPI DIMM slot limit does not apply.

In order to enable this functionality a new memory backend needs to be
created and provided to the driver via the "memdev" parameter.

This can be achieved by, for example, adding
"-object memory-backend-ram,id=mem1,size=32G" to the QEMU command line and
then instantiating the driver with "memdev=mem1" parameter.

The device will try to use multiple memslots to cover the memory backend in
order to reduce the size of metadata for the not-yet-hot-added part of the
memory backend.

Co-developed-by: David Hildenbrand <da...@redhat.com>
Acked-by: David Hildenbrand <da...@redhat.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigi...@oracle.com>

Hi; I was looking at this code because Coverity reported an
issue in it. I think that's because Coverity has got confused
about the way you're doing memory allocation here. But
in looking at the code I see that you're using alloca() in
this function.

Please could you rewrite this not to do that -- we don't use
alloca() or variable-length-arrays in QEMU except in a few
cases which we're trying to get rid of, so we'd like not to
add new uses to the code base.


Sure, will do - I didn't know alloca() is frowned upon
(and David probably didn't either).

thanks
-- PMM

Thanks,
Maciej


Reply via email to