Andrew D. Ball
2006-Aug-11 14:30 UTC
[Xen-devel] stable format of e820map for HVM domU''s ?
I''m currently getting the amount of pseudo-physical memory allocated to the current domU in hvmloader by reading the e820map. Here''s a sample one for a domU w/ 128 meg: BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009f800 (usable) BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved) BIOS-e820: 00000000000a0000 - 00000000000c0000 type 16 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 0000000007ffd000 (usable) BIOS-e820: 0000000007ffd000 - 0000000007ffe000 type 19 BIOS-e820: 0000000007ffe000 - 0000000007fff000 type 18 BIOS-e820: 0000000007fff000 - 0000000008000000 type 17 BIOS-e820: 0000000008000000 - 0000000008003000 (ACPI NVS) BIOS-e820: 0000000008003000 - 000000000800d000 (ACPI data) BIOS-e820: 00000000fec00000 - 0000000100000000 type 16 What''s the least likely to change way to get what I want out of here? In this case, the type 17 entry''s ending address is the capacity. Can I always ignore the last 3 entries? Should I use the type 17 entry as the last pseudo-physical one? Some other way? Many thanks for your help. Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Aug-11 15:31 UTC
Re: [Xen-devel] stable format of e820map for HVM domU''s ?
On 11/8/06 3:30 pm, "Andrew D. Ball" <aball@us.ibm.com> wrote:> What''s the least likely to change way to get what I want out of here? > > In this case, the type 17 entry''s ending address is the capacity. Can I > always ignore the last 3 entries? Should I use the type 17 entry as the > last pseudo-physical one? Some other way?Scan the table and sum the ''usable'' (i.e. E820_RAM) areas. It might change a little bit in future, according to size of BIOS areas for example, but is about as good a value as you''re going to get. How accurate do you think this number needs to be? Do you have some dependency on its accuracy? -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel