WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH 5/5] vl.c: Check the asked ram_size later.

To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH 5/5] vl.c: Check the asked ram_size later.
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Date: Fri, 15 Jul 2011 16:52:26 +0200
Cc: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, QEMU-devel <qemu-devel@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Alexander Graf <agraf@xxxxxxx>
Delivery-date: Fri, 15 Jul 2011 07:56:27 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:newsgroups:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=i6hpD8UGAy8b+V4pVlO1o1y1zrC5u4Mryf2HGCriY8k=; b=fdJl1TOOXbJP6jjp3hZh9kebJ3VPwFmcgRyXr8oOysc0GoD4/ZtCP/ag+RgGdCH0/P jeOt3BUbVec3ATPTXmePnJin8zRXYJS1fwqV92zpo5kXiYkO/NrBYxGJTbDKHHfNS5zu WzgAQqyUr+hMODKsbfN8+et1IY6QpqDJ3l5qA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1310740376-13323-6-git-send-email-anthony.perard@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: gmane.comp.emulators.xen.devel, gmane.comp.emulators.qemu
References: <1310740376-13323-1-git-send-email-anthony.perard@xxxxxxxxxx> <1310740376-13323-6-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Mnenhy/0.8.3 Thunderbird/3.1.10
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@xxxxxxxxxx>
---
  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@xxxxxxxxxx>

Paolo

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>