From: Laurent Vivier <lvivier@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>, qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, thuth@redhat.com, ehabkost@redhat.com
Subject: Re: [PATCH for-5.0 1/2] hostmem: set default prealloc_threads to valid value
Date: Wed, 25 Mar 2020 10:55:07 +0100 [thread overview]
Message-ID: <1cb2c813-cab5-e02c-b035-5ba33ccbc5ef@redhat.com> (raw)
In-Reply-To: <20200325094423.24293-2-imammedo@redhat.com>
On 25/03/2020 10:44, Igor Mammedov wrote:
> Commit 4ebc74dbbf 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 4ebc74dbbf to fix issue.
>
> Fixes: 4ebc74dbbf7ad50e4101629f3f5da5fdc1544051
> Reported-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> backends/hostmem.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/backends/hostmem.c b/backends/hostmem.c
> index a70867b255..327f9eebc3 100644
> --- a/backends/hostmem.c
> +++ b/backends/hostmem.c
> @@ -280,6 +280,7 @@ static void host_memory_backend_init(Object *obj)
> /* TODO: convert access to globals to compat properties */
> backend->merge = machine_mem_merge(machine);
> backend->dump = machine_dump_guest_core(machine);
> + backend->prealloc_threads = 1;
> }
>
> static void host_memory_backend_post_init(Object *obj)
>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
next prev parent reply other threads:[~2020-03-25 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 9:44 [PATCH for-5.0 0/2] fix qemu crash with memory-backend-* prealloc=yes Igor Mammedov
2020-03-25 9:44 ` [PATCH for-5.0 1/2] hostmem: set default prealloc_threads to valid value Igor Mammedov
2020-03-25 9:55 ` Laurent Vivier [this message]
2020-03-25 9:44 ` [PATCH for-5.0 2/2] tests: numa: test one backend with prealloc enabled Igor Mammedov
2020-04-09 13:03 ` [PATCH for-5.0 0/2] fix qemu crash with memory-backend-* prealloc=yes Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1cb2c813-cab5-e02c-b035-5ba33ccbc5ef@redhat.com \
--to=lvivier@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).