Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ly4Z8-0001Dg-TJ for qemu-devel@nongnu.org; Sun, 26 Apr 2009 09:38:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ly4Yw-00018Y-3c for qemu-devel@nongnu.org; Sun, 26 Apr 2009 09:38:42 -0400 Received: from [199.232.76.173] (port=49664 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ly4Yw-00018V-0O for qemu-devel@nongnu.org; Sun, 26 Apr 2009 09:38:30 -0400 Received: from [61.129.42.10] (port=54402 helo=mail.fudan.edu.cn) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ly4Yv-0001Qz-DO for qemu-devel@nongnu.org; Sun, 26 Apr 2009 09:38:29 -0400 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [10.132.143.14] by mail.fudan.edu.cn (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTPA id <0KIP004K2KN2ZNA0@mail.fudan.edu.cn> for qemu-devel@nongnu.org; Sun, 26 Apr 2009 20:42:38 +0800 (CST) Message-id: <49F4582E.1020300@fudan.edu.cn> Date: Sun, 26 Apr 2009 20:48:46 +0800 From: wuxi Subject: [Qemu-devel] Question: Qemu support up to 4GB physical memory? List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Qemu Development List Hi, all: I am hacking QEMU (for a course project) 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 210 * 210 * (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