On 31/5/24 17:10, Michal Privoznik wrote:
If memory-backend-{file,ram} has a size that's not aligned to
underlying page size it is not only wasteful, but also may lead
to hard to debug behaviour. For instance, in case
memory-backend-file and hugepages, madvise() and mbind() fail.
Rightfully so, page is the smallest unit they can work with. And
even though an error is reported, the root cause it not very
clear:

   qemu-system-x86_64: Couldn't set property 'dump' on 'memory-backend-file': 
Invalid argument

After this commit:

   qemu-system-x86_64: backend 'memory-backend-file' memory size must be 
multiple of 2 MiB

Thanks!

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>

Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
  backends/hostmem.c | 10 ++++++++++
  1 file changed, 10 insertions(+)


Reply via email to