qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Qemu devel] Question: Qemu support up to 4GB physical memory?
@ 2009-04-26 12:32 wuxi
  2009-04-26 12:41 ` [Qemu-devel] " 吴曦
  0 siblings, 1 reply; 2+ messages in thread
From: wuxi @ 2009-04-26 12:32 UTC (permalink / raw)
  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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Qemu-devel] Question: Qemu support up to 4GB physical memory?
  2009-04-26 12:32 [Qemu-devel] [Qemu devel] Question: Qemu support up to 4GB physical memory? wuxi
@ 2009-04-26 12:41 ` 吴曦
  0 siblings, 0 replies; 2+ messages in thread
From: 吴曦 @ 2009-04-26 12:41 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-04-26 12:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-26 12:32 [Qemu-devel] [Qemu devel] Question: Qemu support up to 4GB physical memory? wuxi
2009-04-26 12:41 ` [Qemu-devel] " 吴曦

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).