qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] x86-64 question - QEMU support up to 4GB physical memory?


From: wuxi
Subject: [Qemu-devel] x86-64 question - QEMU support up to 4GB physical memory?
Date: Sun, 26 Apr 2009 20:21:22 +0800
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Hi, all:
I am hacking QEMU (for fun) based on the 0.10.1 version on x86-64 architecture. My question arises when I was checking the code of PageDesc in QEMU. I found it uses a two level mapping (l1_map), and it seems that QEMU can support physical memory up to 2^10 * 2^10 * (4KB) = 4GB.

the related code is:

(L1_BITS = 10, L2_BITS=10, TARGET_PAGE_BITS=12)

#define L1_BITS (32 - L2_BITS - TARGET_PAGE_BITS)
#define L1_SIZE (1 << L1_BITS)
#define L2_SIZE (1 << L2_BITS)

static PageDesc *l1_map[L1_SIZE];

p = qemu_mallocz(sizeof(PageDesc) * L2_SIZE); (for each l1_map entry)

Is this true for QEMU x86-64 emulation? or I made some silly mistakes...

Thanks !

yours sincerely

Andrew






reply via email to

[Prev in Thread] Current Thread [Next in Thread]