From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjLiE-0005mk-AC for qemu-devel@nongnu.org; Tue, 08 Apr 2008 17:50:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjLiD-0005lS-Ix for qemu-devel@nongnu.org; Tue, 08 Apr 2008 17:50:41 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjLiC-0005l9-VZ for qemu-devel@nongnu.org; Tue, 08 Apr 2008 17:50:41 -0400 Received: from hall.aurel32.net ([88.191.38.19]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JjLiC-0004EE-9A for qemu-devel@nongnu.org; Tue, 08 Apr 2008 17:50:40 -0400 Date: Tue, 8 Apr 2008 23:50:41 +0200 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 1/5] Use correct types to enable > 2G support (v3) Message-ID: <20080408215041.GD11492@volta.aurel32.net> References: <1202137865-20232-1-git-send-email-aliguori@us.ibm.com> <1202137865-20232-2-git-send-email-aliguori@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1202137865-20232-2-git-send-email-aliguori@us.ibm.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm-devel@lists.sourceforge.net, Anthony Liguori , Paul Brook On Mon, Feb 04, 2008 at 09:11:01AM -0600, Anthony Liguori wrote: > KVM supports more than 2GB of memory for x86_64 hosts. The following patch > fixes a number of type related issues where int's were being used when they > shouldn't have been. It also introduces CMOS support so the BIOS can build > the appropriate e820 tables. Is this already supported in bochsbios? If not, do you have a patch at hand? > For v2 of this patch, I've moved ram_addr_t to cpu-all.h and switched > ram_size to be a ram_addr_t. I've also removed the memory limit check for > x86_64 (provided kqemu isn't enabled) and enabled the use of a 'M' or 'G' > suffix for the -m option. I've also tried to do a more thorough job of > updating the code to use the proper types. > > This patch also includes support for setting up > 2GB of memory for > TARGET_I386. KVM works quite happily with 5GB of ram but I suspect there > are still some uint32_t's in the non-KVM does not work when using more than > 3GB of RAM. My tests show that qemu crashes very early for memory sizes > 3500MB. But that's already an improvement compared to the current limit. Maybe we should set a limit in the code until this problem is solved. > Since v2, I got rid of an improper declaration of ram_size by moving it from > sysemu.h to cpu-all.h. I also added some code to handle wrap around in the > '-m' option. I also eliminated the unnecessary change to TARGET_PAGE_SIZE. > >>From my point of view the patch looks good, except the part that parses the memory size, which does actually nothing ;) The small patch below is needed to fix that. Does someone has still comments on this patch? If not I plan to commit it to the SVN. diff --git a/vl.c b/vl.c index ec29fa2..d3a293a 100644 --- a/vl.c +++ b/vl.c @@ -8566,6 +8566,8 @@ int main(int argc, char **argv) fprintf(stderr, "qemu: ram size too large\n"); exit(1); } + else + ram_size = value; /* On 32-bit hosts, QEMU is limited by virtual address space */ if (ram_size > (2047 << 20) -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net