[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/5] Use correct types to enable > 2G support (v
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH 1/5] Use correct types to enable > 2G support (v3) |
Date: |
Tue, 8 Apr 2008 23:50:41 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
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
`. `' address@hidden | address@hidden
`- people.debian.org/~aurel32 | www.aurel32.net
- Re: [Qemu-devel] [PATCH 1/5] Use correct types to enable > 2G support (v3),
Aurelien Jarno <=