pradeep singh rautela
2008-Apr-11 06:14 UTC
[Xen-devel] query on physical memory map for Xen?
Hi All, Based on my understanding of the Xen code, I have a small query for you all. Xen hypervisor can access only a max of 16GB of physical memory directly on x86 architecture. Is this correct inference? So does Xen hypervisor cannot touch memory about 16G directly? Does it employ some kind of temporary mapping like linux kernel to access memory above 16G then? Any help will be appreciated. Thanks, -- Pradeep Singh Rautela http://eagain.wordpress.com http://emptydomain.googlepages.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 11/4/08 07:14, "pradeep singh rautela" <rautelap@gmail.com> wrote:> Based on my understanding of the Xen code, I have a small query for you all. > > Xen hypervisor can access only a max of 16GB of physical memory > directly on x86 architecture. > Is this correct inference? > > So does Xen hypervisor cannot touch memory about 16G directly? Does it > employ some kind of temporary mapping like linux kernel to access > memory above 16G then?32-bit Xen does not use memory above 16GB at all. 64-bit Xen can use any amount of memory, and is able to keep a permanent mapping of all of it. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
pradeep singh rautela
2008-Apr-11 07:13 UTC
Re: [Xen-devel] query on physical memory map for Xen?
On Fri, Apr 11, 2008 at 12:24 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote: [...]> > 32-bit Xen does not use memory above 16GB at all. 64-bit Xen can use any > amount of memory, and is able to keep a permanent mapping of all of it.Thanks for the reply Keir. Is that a deliberate feature or a limitation of Xen hypervisor? --Pradeep> > -- Keir > > >-- Pradeep Singh Rautela http://eagain.wordpress.com http://emptydomain.googlepages.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 11/4/08 08:13, "pradeep singh rautela" <rautelap@gmail.com> wrote:>> 32-bit Xen does not use memory above 16GB at all. 64-bit Xen can use any >> amount of memory, and is able to keep a permanent mapping of all of it. > > Thanks for the reply Keir. > Is that a deliberate feature or a limitation of Xen hypervisor?It''s a limitation due to the way that 32-bit Xen handles memory management. We don''t intend to lift the restriction since users are better off moving to 64-bit Xen. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
pradeep singh rautela
2008-Apr-11 07:48 UTC
Re: [Xen-devel] query on physical memory map for Xen?
Ok. Thanks for your time Keir. --Pradeep On Fri, Apr 11, 2008 at 12:57 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:> On 11/4/08 08:13, "pradeep singh rautela" <rautelap@gmail.com> wrote: > > >> 32-bit Xen does not use memory above 16GB at all. 64-bit Xen can use any > >> amount of memory, and is able to keep a permanent mapping of all of it. > > > > Thanks for the reply Keir. > > Is that a deliberate feature or a limitation of Xen hypervisor? > > It''s a limitation due to the way that 32-bit Xen handles memory management. > We don''t intend to lift the restriction since users are better off moving to > 64-bit Xen. > > -- Keir > > >-- Pradeep Singh Rautela http://eagain.wordpress.com http://emptydomain.googlepages.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Just curious, can anyone give a hint on where this 16GB max physical memory is defined? Doing some random search by strings I found these: #define MAXMEM 0x3fffffffffffUL #define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE) #define MAXMEM_PFN PFN_DOWN(MAXMEM) #define ACPI_MEM_LIST_MAX 6 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) #define EFI_MAX_MEMORY_TYPE 14 #define PCI_X_CMD_MAX_READ 0x000c /* Max Memory Read Byte Count */ #define PCI_X_STATUS_MAX_READ 0x00600000 /* Designed Max Memory Read Count */ #define GEO_TYPE_MAX (GEO_TYPE_MEM+1) #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) *max_mfn = xc_memory_op(xc_handle, XENMEM_maximum_ram_page, NULL); #define EFI_MAX_MEMORY_TYPE 14 #define MAXMEM 0x3fffffffffffUL * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. #define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE) #define MAXMEM_PFN PFN_DOWN(MAXMEM) * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. #define ACPI_MEM_LIST_MAX 6 #define XENMEM_maximum_ram_page 2 #define XENMEM_maximum_reservation 4 #define XENMEM_maximum_gpfn 14 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) #define EFI_MAX_MEMORY_TYPE 14 #define GEO_TYPE_MAX (GEO_TYPE_MEM+1) #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) Not sure which one maps to this 16GB thing? Thanks for the sharing :-). On Fri, Apr 11, 2008 at 2:54 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote:> On 11/4/08 07:14, "pradeep singh rautela" <rautelap@gmail.com> wrote: > > > Based on my understanding of the Xen code, I have a small query for you all. > > > > Xen hypervisor can access only a max of 16GB of physical memory > > directly on x86 architecture. > > Is this correct inference? > > > > So does Xen hypervisor cannot touch memory about 16G directly? Does it > > employ some kind of temporary mapping like linux kernel to access > > memory above 16G then? > > 32-bit Xen does not use memory above 16GB at all. 64-bit Xen can use any > amount of memory, and is able to keep a permanent mapping of all of it. > > -- Keir > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel >-- Regards, Peter Teoh _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
pradeep singh rautela
2008-Apr-14 05:51 UTC
Re: [Xen-devel] query on physical memory map for Xen?
Nada, this is definetly the wrong piece of code you are looking at.:-) Let me check once again for you ... Ahh...got something. see xen/include/asm-x86/config.h 296 #ifdef CONFIG_X86_PAE 297 # define LINEARPT_MBYTES 8 298 # define MACHPHYS_MBYTES 16 /* 1 MB needed per 1 GB memory */ 299 # define FRAMETABLE_MBYTES (MACHPHYS_MBYTES * 6) 300 #else 301 # define LINEARPT_MBYTES 4 302 # define MACHPHYS_MBYTES 4 303 # define FRAMETABLE_MBYTES 24 a 32 bit kernel/hypervisor cannot access more than 4GB of physical memory.So if PAE is enabled while compiling the kernel/hypervisor you get the first part of the above conditional macro. for each GB you have 1MB of memory for a m2p table.isn''t it? 16MB means 16GB of physical mem max you can address in 32 bit xen hypervisor. Thanks, On Mon, Apr 14, 2008 at 11:13 AM, Peter Teoh <htmldeveloper@gmail.com> wrote:> Just curious, can anyone give a hint on where this 16GB max physical > memory is defined? > > Doing some random search by strings I found these: > > #define MAXMEM 0x3fffffffffffUL > #define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE) > #define MAXMEM_PFN PFN_DOWN(MAXMEM) > #define ACPI_MEM_LIST_MAX 6 > #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) > #define EFI_MAX_MEMORY_TYPE 14 > #define PCI_X_CMD_MAX_READ 0x000c /* Max Memory Read Byte Count */ > #define PCI_X_STATUS_MAX_READ 0x00600000 /* Designed Max Memory > Read Count */ > #define GEO_TYPE_MAX (GEO_TYPE_MEM+1) > #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) > *max_mfn = xc_memory_op(xc_handle, XENMEM_maximum_ram_page, NULL); > #define EFI_MAX_MEMORY_TYPE 14 > #define MAXMEM 0x3fffffffffffUL > * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. > #define MAXMEM (__FIXADDR_TOP-__PAGE_OFFSET-__VMALLOC_RESERVE) > #define MAXMEM_PFN PFN_DOWN(MAXMEM) > * KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return. > #define ACPI_MEM_LIST_MAX 6 > #define XENMEM_maximum_ram_page 2 > #define XENMEM_maximum_reservation 4 > #define XENMEM_maximum_gpfn 14 > #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) > #define EFI_MAX_MEMORY_TYPE 14 > #define GEO_TYPE_MAX (GEO_TYPE_MEM+1) > #define NR_NODE_MEMBLKS (MAX_NUMNODES*2) > > Not sure which one maps to this 16GB thing? Thanks for the sharing :-). > > > > On Fri, Apr 11, 2008 at 2:54 PM, Keir Fraser <keir.fraser@eu.citrix.com> wrote: > > On 11/4/08 07:14, "pradeep singh rautela" <rautelap@gmail.com> wrote: > > > > > Based on my understanding of the Xen code, I have a small query for you all. > > > > > > Xen hypervisor can access only a max of 16GB of physical memory > > > directly on x86 architecture. > > > Is this correct inference? > > > > > > So does Xen hypervisor cannot touch memory about 16G directly? Does it > > > employ some kind of temporary mapping like linux kernel to access > > > memory above 16G then? > > > > 32-bit Xen does not use memory above 16GB at all. 64-bit Xen can use any > > amount of memory, and is able to keep a permanent mapping of all of it. > > > > -- Keir > > > > > > > > > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > > > > > -- > Regards, > Peter Teoh >-- Pradeep Singh Rautela http://eagain.wordpress.com http://emptydomain.googlepages.com _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel