From: Alexander Graf <agraf@suse.de>
To: Hu Tao <hutao@cn.fujitsu.com>
Cc: "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com>,
"<qemu-ppc@nongnu.org>" <qemu-ppc@nongnu.org>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for 2.1] ppc: fix -mem-path failure
Date: Tue, 22 Jul 2014 12:59:05 +0200 [thread overview]
Message-ID: <53CE43F9.6010403@suse.de> (raw)
In-Reply-To: <1405935017-15390-1-git-send-email-hutao@cn.fujitsu.com>
On 07/21/2014 11:30 AM, Hu Tao wrote:
> commit e938ba0c tried to enable -mem-path for ppc but breaked some ppc
> boards.
>
> The problems are:
>
> 1. it fails when allocating memory for rom, sram whose sizes are less
> than huge page size:
>
> ./ppc-softmmu/qemu-system-ppc -m 512 -mem-path /hugepages/ \
> -kernel /home/hutao/Downloads/vmlinux-ppc -initrd \
> /home/hutao/Downloads/initrd-ppc.gz
> qemu-system-ppc: /mnt/data/projects/qemu/exec.c:1184: qemu_ram_set_idstr: Assertion `new_block' failed.
>
> 2. if there is a numa node backed by memory backend object, qemu fails
> with message:
>
> ./ppc-softmmu/qemu-system-ppc -m 512 \
> -object memory-backend-file,size=512M,mem-path=/hugepages,id=f0 \
> -numa node,nodeid=0,memdev=f0 \
> -kernel /home/hutao/Downloads/vmlinux-ppc \
> -initrd /home/hutao/Downloads/initrd-ppc.gz
> qemu-system-ppc: memory backend f0 is used multiple times. Each -numa option must use a different memdev value.
>
> This patch does following:
>
> 1. replaces memory_region_allocate_system_memory() with
> memory_region_init_ram() for rom, sram. Then only system memory
> is backed by hugepages when specifying mem-path.
>
> 2. for memory banks, allocates all ram with
> one memory_region_allocate_system_memory(), and use
> memory_region_init_alias() to initialize memory banks.
>
> Tested machines: default(g3beige), mac99, taihu, bamboo, ref405ep.
>
> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Thanks, this makes a lot of sense.
I've applied this to ppc-next (for 2.1) and kicked off an autotest run.
If that's successful, I'll send a pull request to Peter ASAP.
Alex
prev parent reply other threads:[~2014-07-22 10:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-21 9:30 [Qemu-devel] [PATCH for 2.1] ppc: fix -mem-path failure Hu Tao
2014-07-22 10:59 ` Alexander Graf [this message]
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=53CE43F9.6010403@suse.de \
--to=agraf@suse.de \
--cc=hutao@cn.fujitsu.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=shreyas@linux.vnet.ibm.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).