From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Allocate translation buffer before guest RAM, in case guest RAM is too large on 64 bit hosts
Date: Tue, 21 Oct 2008 09:27:06 -0500 [thread overview]
Message-ID: <48FDE6BA.4070102@codemonkey.ws> (raw)
In-Reply-To: <20081018210508.GA51078@saturn.kn-bremen.de>
Juergen Lock wrote:
> Hi!
>
> The following patch appears to fix -m >= 1024 on recent FreeBSD/amd64 hosts
> (RELENG_7/HEAD) that no longer return high addresses for allocations by
> default (which was the original reason for r5331.) As this makes sense
> in any case when you pass something like -m 4096 on hosts that allocate
> from low addresses by default (there would be no room left for the
> translation buffer in the low vm where it needs to be), I patched it like
> this instead of conditionalizing the mmap hack from r5331 on the FreeBSD
> version.
>
I fear there is too much magic here. Does FreeBSD not have a flag to
mmap from high memory? What is the the original problem?
Regards,
Anthony Liguori
> Index: qemu/vl.c
> @@ -9850,15 +9850,15 @@
> phys_ram_size += ram_size;
> }
>
> + /* init the dynamic translator */
> + cpu_exec_init_all(tb_size * 1024 * 1024);
> +
> phys_ram_base = qemu_vmalloc(phys_ram_size);
> if (!phys_ram_base) {
> fprintf(stderr, "Could not allocate physical memory\n");
> exit(1);
> }
>
> - /* init the dynamic translator */
> - cpu_exec_init_all(tb_size * 1024 * 1024);
> -
> bdrv_init(emulate_aio);
>
> /* we always create the cdrom drive, even if no disk is there */
>
> Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
>
>
>
next prev parent reply other threads:[~2008-10-21 14:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-18 21:05 [Qemu-devel] [PATCH] Allocate translation buffer before guest RAM, in case guest RAM is too large on 64 bit hosts Juergen Lock
2008-10-21 14:27 ` Anthony Liguori [this message]
2008-10-21 21:59 ` Juergen Lock
2008-10-22 15:12 ` Anthony Liguori
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=48FDE6BA.4070102@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/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).