On Mon, Aug 02, 2021 at 05:22:38PM +0200, David Hildenbrand wrote: > When adding RAM_NORESERVE, we forgot to remove the old assertion when > adding the updated one, most probably when reworking the patches or > rebasing. We can easily crash QEMU by adding > -object memory-backend-ram,id=mem0,size=500G,reserve=off > to the QEMU cmdline: > qemu-system-x86_64: ../softmmu/physmem.c:2146: qemu_ram_alloc_internal: > Assertion `(ram_flags & ~(RAM_SHARED | RAM_RESIZEABLE | RAM_PREALLOC)) > == 0' failed. > > Fix it by removing the old assertion. > > Fixes: 8dbe22c6868b ("memory: Introduce RAM_NORESERVE and wire it up in > qemu_ram_mmap()") > Cc: Paolo Bonzini <pbonz...@redhat.com> > Cc: Peter Xu <pet...@redhat.com> > Cc: Philippe Mathieu-Daudé <phi...@redhat.com> > Signed-off-by: David Hildenbrand <da...@redhat.com>
Reviewed-by: Peter Xu <pet...@redhat.com> -- Peter Xu