From: Eric Blake <eblake@redhat.com>
To: Hu Tao <hutao@cn.fujitsu.com>, qemu-devel@nongnu.org
Cc: Yasunori Goto <y-goto@jp.fujitsu.com>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling
Date: Thu, 03 Jul 2014 06:33:28 -0600 [thread overview]
Message-ID: <53B54D98.2060800@redhat.com> (raw)
In-Reply-To: <e0f979deab3d5785bc7d7dab64b962131a8491d1.1404367199.git.hutao@cn.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]
On 07/03/2014 12:10 AM, Hu Tao wrote:
> This patch fixes two problems of memory-backend-file:
>
> 1. If user adds a memory-backend-file object using object_add command,
> specifying a non-existing directory for property mem-path, qemu
> will core dump with message:
>
> /nonexistingdir: No such file or directory
> Bad ram offset fffffffffffff000
> Aborted (core dumped)
>
> 2. If user adds a memory-backend-file object using object_add command,
> specifying a size that is less than huge page size, qemu
> will core dump with message:
>
> Bad ram offset fffffffffffff000
> Aborted (core dumped)
>
Might be nice if the commit message also shows the new message issued
for the same cases after the patch is applied.
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
> ---
> exec.c | 16 +++++++++-------
> 1 file changed, 9 insertions(+), 7 deletions(-)
>
>
> if (memory < hpagesize) {
> - return NULL;
> + error_setg(errp, "memory size 0x" RAM_ADDR_FMT " should be larger "
> + "than huge page size 0x%" PRIx64, memory, hpagesize);
> + goto error;
Isn't exactly equal also allowed? Maybe a better wording is "should be
a multiple of the huge page size"
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2014-07-03 12:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 6:10 [Qemu-devel] [PATCH for 2.1 0/2] bug fixs for memory backend Hu Tao
2014-07-03 6:10 ` [Qemu-devel] [PATCH for 2.1 1/2] memory: introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail() Hu Tao
2014-07-03 6:51 ` Michael S. Tsirkin
2014-07-04 2:50 ` Hu Tao
2014-07-03 6:10 ` [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling Hu Tao
2014-07-03 12:33 ` Eric Blake [this message]
2014-07-04 2:56 ` Hu Tao
2014-07-04 4:05 ` Eric Blake
2014-07-04 7:43 ` Hu Tao
2014-07-04 7:47 ` Paolo Bonzini
2014-07-06 6:42 ` Michael S. Tsirkin
2014-07-07 2:23 ` Hu Tao
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=53B54D98.2060800@redhat.com \
--to=eblake@redhat.com \
--cc=hutao@cn.fujitsu.com \
--cc=imammedo@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.