From: Igor Mammedov <imammedo@redhat.com>
To: Hu Tao <hutao@cn.fujitsu.com>
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 2/4] check if we have space left for hotplugged memory
Date: Mon, 16 Jun 2014 12:47:52 +0200 [thread overview]
Message-ID: <20140616124752.0ab49149@nial.usersys.redhat.com> (raw)
In-Reply-To: <74c6e9c8f1b968bab55148a45862f19a3fc7c27b.1402912665.git.hutao@cn.fujitsu.com>
On Mon, 16 Jun 2014 18:05:42 +0800
Hu Tao <hutao@cn.fujitsu.com> wrote:
> If pc-dimm is specified on qemu command line, but only with
> -m size (aka not -m size,maxmem,slots) then qemu will core dump.
>
> This patch fixes the problem.
>
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
> hw/mem/pc-dimm.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c
> index 8c26568..a57b9a3 100644
> --- a/hw/mem/pc-dimm.c
> +++ b/hw/mem/pc-dimm.c
> @@ -107,6 +107,13 @@ uint64_t pc_dimm_get_free_addr(uint64_t address_space_start,
another suggestion is to put check in pc_dimm_plug() hotplug handler.
> uint64_t new_addr, ret = 0;
> uint64_t address_space_end = address_space_start + address_space_size;
>
> + if (address_space_size == 0) {
> + error_setg(errp, "no space left for hotplugged memory. did you forget "
> + "maxmem and slots on "
> + "-m(aka -m size,maxmem=maxmem,slots=slots)?");
> + goto out;
> + }
> +
> assert(address_space_end > address_space_size);
> object_child_foreach(qdev_get_machine(), pc_dimm_built_list, &list);
>
next prev parent reply other threads:[~2014-06-16 10:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-16 10:05 [Qemu-devel] [PATCH v2 0/4] fixes for pci tree, v2 Hu Tao
2014-06-16 10:05 ` [Qemu-devel] [PATCH v2 1/4] qmp: add query-memdev Hu Tao
2014-06-16 17:38 ` Eric Blake
2014-06-16 10:05 ` [Qemu-devel] [PATCH v2 2/4] check if we have space left for hotplugged memory Hu Tao
2014-06-16 10:44 ` Igor Mammedov
2014-06-16 10:47 ` Igor Mammedov [this message]
2014-06-16 10:05 ` [Qemu-devel] [PATCH v2 3/4] memory-backend-file: improve error handling Hu Tao
2014-06-17 10:03 ` Igor Mammedov
2014-06-17 10:09 ` Hu Tao
2014-06-17 10:56 ` Michael S. Tsirkin
2014-06-16 10:05 ` [Qemu-devel] [PATCH v2 4/4] fixup! numa: add -numa node, memdev= option Hu Tao
2014-06-16 11:09 ` [Qemu-devel] [PATCH v2 0/4] fixes for pci tree, v2 Michael S. Tsirkin
2014-06-17 8:47 ` Hu Tao
2014-06-17 10:55 ` Michael S. Tsirkin
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=20140616124752.0ab49149@nial.usersys.redhat.com \
--to=imammedo@redhat.com \
--cc=hutao@cn.fujitsu.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=y-goto@jp.fujitsu.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).