From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ly3YM-0004uK-Gm for qemu-devel@nongnu.org; Sun, 26 Apr 2009 08:33:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ly3YH-0004nI-KE for qemu-devel@nongnu.org; Sun, 26 Apr 2009 08:33:49 -0400 Received: from [199.232.76.173] (port=46359 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ly3YH-0004n5-H5 for qemu-devel@nongnu.org; Sun, 26 Apr 2009 08:33:45 -0400 Received: from rv-out-0708.google.com ([209.85.198.246]:42083) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ly3YH-0001ka-55 for qemu-devel@nongnu.org; Sun, 26 Apr 2009 08:33:45 -0400 Received: by rv-out-0708.google.com with SMTP id c5so1226262rvf.22 for ; Sun, 26 Apr 2009 05:33:43 -0700 (PDT) Message-ID: <49F4546D.60300@gmail.com> Date: Sun, 26 Apr 2009 20:32:45 +0800 From: wuxi MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [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