From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Xen Devel <xen-devel@lists.xensource.com>,
QEMU-devel <qemu-devel@nongnu.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 5/5] vl.c: Check the asked ram_size later.
Date: Fri, 15 Jul 2011 16:52:26 +0200 [thread overview]
Message-ID: <4E20542A.1070506@redhat.com> (raw)
In-Reply-To: <1310740376-13323-6-git-send-email-anthony.perard@citrix.com>
On 07/15/2011 04:32 PM, Anthony PERARD wrote:
> As a Xen guest can have more than 2GB of RAM on a 32bit host, we move
> the conditions after than we now if we run one Xen or not.
>
> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
> ---
> vl.c | 14 ++++++++------
> 1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index fcd7395..c2efedf 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2433,11 +2433,6 @@ int main(int argc, char **argv, char **envp)
> exit(1);
> }
>
> - /* On 32-bit hosts, QEMU is limited by virtual address space */
> - if (value> (2047<< 20)&& HOST_LONG_BITS == 32) {
> - fprintf(stderr, "qemu: at most 2047 MB RAM can be simulated\n");
> - exit(1);
> - }
> if (value != (uint64_t)(ram_addr_t)value) {
> fprintf(stderr, "qemu: ram size too large\n");
> exit(1);
> @@ -3091,8 +3086,15 @@ int main(int argc, char **argv, char **envp)
> exit(1);
>
> /* init the memory */
> - if (ram_size == 0)
> + if (ram_size == 0) {
> ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
> + } else if (!xen_enabled()) {
> + /* On 32-bit hosts, QEMU is limited by virtual address space */
> + if (ram_size> (2047<< 20)&& HOST_LONG_BITS == 32) {
> + fprintf(stderr, "qemu: at most 2047 MB RAM can be simulated\n");
> + exit(1);
> + }
> + }
>
> /* init the dynamic translator */
> cpu_exec_init_all(tb_size * 1024 * 1024);
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: Xen Devel <xen-devel@lists.xensource.com>,
QEMU-devel <qemu-devel@nongnu.org>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Alexander Graf <agraf@suse.de>
Subject: Re: [PATCH 5/5] vl.c: Check the asked ram_size later.
Date: Fri, 15 Jul 2011 16:52:26 +0200 [thread overview]
Message-ID: <4E20542A.1070506@redhat.com> (raw)
In-Reply-To: <1310740376-13323-6-git-send-email-anthony.perard@citrix.com>
On 07/15/2011 04:32 PM, Anthony PERARD wrote:
> As a Xen guest can have more than 2GB of RAM on a 32bit host, we move
> the conditions after than we now if we run one Xen or not.
>
> Signed-off-by: Anthony PERARD<anthony.perard@citrix.com>
> ---
> vl.c | 14 ++++++++------
> 1 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index fcd7395..c2efedf 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2433,11 +2433,6 @@ int main(int argc, char **argv, char **envp)
> exit(1);
> }
>
> - /* On 32-bit hosts, QEMU is limited by virtual address space */
> - if (value> (2047<< 20)&& HOST_LONG_BITS == 32) {
> - fprintf(stderr, "qemu: at most 2047 MB RAM can be simulated\n");
> - exit(1);
> - }
> if (value != (uint64_t)(ram_addr_t)value) {
> fprintf(stderr, "qemu: ram size too large\n");
> exit(1);
> @@ -3091,8 +3086,15 @@ int main(int argc, char **argv, char **envp)
> exit(1);
>
> /* init the memory */
> - if (ram_size == 0)
> + if (ram_size == 0) {
> ram_size = DEFAULT_RAM_SIZE * 1024 * 1024;
> + } else if (!xen_enabled()) {
> + /* On 32-bit hosts, QEMU is limited by virtual address space */
> + if (ram_size> (2047<< 20)&& HOST_LONG_BITS == 32) {
> + fprintf(stderr, "qemu: at most 2047 MB RAM can be simulated\n");
> + exit(1);
> + }
> + }
>
> /* init the dynamic translator */
> cpu_exec_init_all(tb_size * 1024 * 1024);
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Paolo
next prev parent reply other threads:[~2011-07-15 14:52 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-15 14:32 [Qemu-devel] [PATCH 0/5] Enable QEMU to handle more than 2GB with Xen Anthony PERARD
2011-07-15 14:32 ` Anthony PERARD
2011-07-15 14:32 ` [Qemu-devel] [PATCH 1/5] xen: Fix xen_enabled() Anthony PERARD
2011-07-15 14:32 ` Anthony PERARD
2011-07-15 14:46 ` [Qemu-devel] " Paolo Bonzini
2011-07-15 14:46 ` Paolo Bonzini
2011-07-18 12:43 ` [Qemu-devel] " Alexander Graf
2011-07-18 12:43 ` Alexander Graf
2011-07-15 14:32 ` [Qemu-devel] [PATCH 2/5] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...) Anthony PERARD
2011-07-15 14:32 ` Anthony PERARD
2011-07-15 14:46 ` [Qemu-devel] " Paolo Bonzini
2011-07-15 14:46 ` Paolo Bonzini
2011-07-15 14:32 ` [Qemu-devel] [PATCH 3/5] cpu-common: Have a ram_addr_t of uint64 with Xen Anthony PERARD
2011-07-15 14:32 ` Anthony PERARD
2011-07-18 12:30 ` [Qemu-devel] " Alexander Graf
2011-07-18 12:30 ` Alexander Graf
2011-07-18 14:46 ` [Qemu-devel] [Xen-devel] " Anthony PERARD
2011-07-18 14:46 ` Anthony PERARD
2011-07-18 19:42 ` [Qemu-devel] [Xen-devel] " Anthony PERARD
2011-07-18 19:42 ` Anthony PERARD
2011-07-15 14:32 ` [Qemu-devel] [PATCH 4/5] xen: Fix the memory registration to reflect of what is done by Xen Anthony PERARD
2011-07-15 14:32 ` Anthony PERARD
2011-07-15 14:55 ` [Qemu-devel] " Paolo Bonzini
2011-07-15 14:55 ` Paolo Bonzini
2011-07-15 17:05 ` [Qemu-devel] " Stefano Stabellini
2011-07-15 17:05 ` Stefano Stabellini
2011-07-15 17:51 ` [Qemu-devel] [Xen-devel] " Anthony PERARD
2011-07-15 17:51 ` Anthony PERARD
2011-07-18 11:14 ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2011-07-18 11:14 ` Stefano Stabellini
2011-07-18 15:29 ` [Qemu-devel] [Xen-devel] " Anthony PERARD
2011-07-18 15:29 ` Anthony PERARD
2011-07-18 16:14 ` [Qemu-devel] " Stefano Stabellini
2011-07-18 16:14 ` Stefano Stabellini
2011-07-15 14:32 ` [Qemu-devel] [PATCH 5/5] vl.c: Check the asked ram_size later Anthony PERARD
2011-07-15 14:32 ` Anthony PERARD
2011-07-15 14:52 ` Paolo Bonzini [this message]
2011-07-15 14:52 ` Paolo Bonzini
2011-07-15 17:05 ` [Qemu-devel] [PATCH 0/5] Enable QEMU to handle more than 2GB with Xen Stefano Stabellini
2011-07-15 17:05 ` Stefano Stabellini
2011-07-18 12:32 ` [Qemu-devel] " Alexander Graf
2011-07-18 12:32 ` Alexander Graf
2011-07-22 7:20 ` jiageng_yu
2011-07-22 11:22 ` Anthony PERARD
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=4E20542A.1070506@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=anthony.perard@citrix.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.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.