Skip to content
Snippets Groups Projects
Commit 2a4e02d1 authored by Igor Mammedov's avatar Igor Mammedov Committed by Paolo Bonzini
Browse files

hostmem: set default prealloc_threads to valid value


Commit 4ebc74db removed default prealloc_threads initialization
by mistake, and that makes QEMU crash with division on zero at
  numpages_per_thread = numpages / memset_num_threads;
when QEMU is started with following backend
  -object memory-backend-ram,id=ram-node0,prealloc=yes,size=128M

Return back initialization removed by 4ebc74db to fix issue.

Fixes: 4ebc74db
Reported-by: default avatarRaphael Norwitz <raphael.norwitz@nutanix.com>
Signed-off-by: default avatarIgor Mammedov <imammedo@redhat.com>
Reviewed-by: default avatarLaurent Vivier <lvivier@redhat.com>
Message-Id: <20200325094423.24293-2-imammedo@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 267514b3
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment