diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-11 17:15:54 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-11 17:15:54 +0000 |
commit | 94a6b54fd6d2d3321066cb4db7abeeb417af9365 (patch) | |
tree | 84da517c725b42e93cc4d25750bca57f655d9f81 /kqemu.c | |
parent | b0457b69209fca3fb40a85bd54d7f27eb4bad7e7 (diff) | |
download | qemu-94a6b54fd6d2d3321066cb4db7abeeb417af9365.tar.gz qemu-94a6b54fd6d2d3321066cb4db7abeeb417af9365.tar.bz2 qemu-94a6b54fd6d2d3321066cb4db7abeeb417af9365.zip |
Implement dynamic guest ram allocation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7088 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'kqemu.c')
-rw-r--r-- | kqemu.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -91,6 +91,8 @@ unsigned int nb_modified_ram_pages; uint8_t *modified_ram_pages_table; int qpi_io_memory; uint32_t kqemu_comm_base; /* physical address of the QPI communication page */ +ram_addr_t kqemu_phys_ram_size; +uint8_t *kqemu_phys_ram_base; #define cpuid(index, eax, ebx, ecx, edx) \ asm volatile ("cpuid" \ @@ -214,13 +216,14 @@ int kqemu_init(CPUState *env) sizeof(uint64_t)); if (!modified_ram_pages) goto fail; - modified_ram_pages_table = qemu_mallocz(phys_ram_size >> TARGET_PAGE_BITS); + modified_ram_pages_table = + qemu_mallocz(kqemu_phys_ram_size >> TARGET_PAGE_BITS); if (!modified_ram_pages_table) goto fail; memset(&kinit, 0, sizeof(kinit)); /* set the paddings to zero */ - kinit.ram_base = phys_ram_base; - kinit.ram_size = phys_ram_size; + kinit.ram_base = kqemu_phys_ram_base; + kinit.ram_size = kqemu_phys_ram_size; kinit.ram_dirty = phys_ram_dirty; kinit.pages_to_flush = pages_to_flush; kinit.ram_pages_to_update = ram_pages_to_update; |