xen: correct size of level2_kernel_pgt
Subsystems (2)
PATCH 1/1 xen: correct size of level2_kernel_pgt
sizeof(pmd_t *) is 4 bytes on PAE leading to an allocation of only 2048 bytes. The correct size is sizeof(pmd_t) giving us a full page allocation.
---
Applies to mainline since 2.6.36 and to xen.git 2.6.32 based trees
arch/x86/xen/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/xen/mmu.c +1 -1
@@ -2126,7 +2126,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, {pmd_t *kernel_pmd; - level2_kernel_pgt =extend_brk (sizeof (pmd_t *) *PTRS_PER_PMD ,PAGE_SIZE ); + level2_kernel_pgt =extend_brk (sizeof (pmd_t) *PTRS_PER_PMD ,PAGE_SIZE ); max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) + xen_start_info->nr_pt_frames * PAGE_SIZE +
Signature · 1 line
1.5.6.5
Quoted 3 lines · Ian Campbell
sizeof(pmd_t *)is 4 bytes on PAE leading to an allocation of only 2048 bytes. The correct size issizeof(pmd_t)giving us a full page allocation.
Oooooh. Nasty.
J
Quoted 22 lines
Signed-off-by Ian Campbell <[email protected]>Cc Jeremy Fitzhardinge <[email protected]>---
Applies to mainline since 2.6.36 and to xen.git 2.6.32 based trees
arch/x86/xen/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/xen/mmu.c +1
-1@@ -2126,7 +2126,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, {pmd_t *kernel_pmd; - level2_kernel_pgt =extend_brk (sizeof (pmd_t *) *PTRS_PER_PMD ,PAGE_SIZE ); + level2_kernel_pgt =extend_brk (sizeof (pmd_t) *PTRS_PER_PMD ,PAGE_SIZE ); max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) + xen_start_info->nr_pt_frames * PAGE_SIZE +
Quoted 9 lines · Ian Campbell
sizeof(pmd_t *)is 4 bytes on PAE leading to an allocation of only 2048 bytes. The correct size issizeof(pmd_t)giving us a full page allocation.Signed-off-by Ian Campbell <[email protected]>Cc Jeremy Fitzhardinge <[email protected]>---
Applies to mainline since 2.6.36 and to xen.git 2.6.32 based trees
This is just for 2.6.37?
J
Quoted 16 lines
arch/x86/xen/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/xen/mmu.c +1
-1@@ -2126,7 +2126,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, {pmd_t *kernel_pmd; - level2_kernel_pgt =extend_brk (sizeof (pmd_t *) *PTRS_PER_PMD ,PAGE_SIZE ); + level2_kernel_pgt =extend_brk (sizeof (pmd_t) *PTRS_PER_PMD ,PAGE_SIZE ); max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) + xen_start_info->nr_pt_frames * PAGE_SIZE +
Quoted 5 lines · Jeremy Fitzhardinge
Quoted 4 lines · Ian Campbell
sizeof(pmd_t *)is 4 bytes on PAE leading to an allocation of only 2048 bytes. The correct size issizeof(pmd_t)giving us a full page allocation.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Ian Campbell <[email protected]>Cc Jeremy Fitzhardinge <[email protected]>---
Applies to mainline since 2.6.36 and to xen.git 2.6.32 based trees
This is just for 2.6.37?
2.6.36.stable too, I think. I added [email protected] to my patch header but didn't "guilt refresh" so it didn't show up here.
Ian.
Quoted 20 lines
J
Quoted 16 lines
arch/x86/xen/mmu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/xen/mmu.c +1
-1@@ -2126,7 +2126,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, {pmd_t *kernel_pmd; - level2_kernel_pgt =extend_brk (sizeof (pmd_t *) *PTRS_PER_PMD ,PAGE_SIZE ); + level2_kernel_pgt =extend_brk (sizeof (pmd_t) *PTRS_PER_PMD ,PAGE_SIZE ); max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) + xen_start_info->nr_pt_frames * PAGE_SIZE +
Quoted 6 lines · Ian Campbell
Quoted 5 lines · Jeremy Fitzhardinge
Quoted 4 lines · Ian Campbell
sizeof(pmd_t *)is 4 bytes on PAE leading to an allocation of only 2048 bytes. The correct size issizeof(pmd_t)giving us a full page allocation.
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Signed-off-by Ian Campbell <[email protected]>Cc Jeremy Fitzhardinge <[email protected]>---
Applies to mainline since 2.6.36 and to xen.git 2.6.32 based trees
This is just for 2.6.37?
2.6.36.stable too, I think. I added [email protected] to my patch header but didn't "guilt refresh" so it didn't show up here.
The extend_brk() stuff was all merged this merge window. I checked out .36 to confirm, and there's nothing there for your patch to apply to...
J
Quoted 11 lines · Jeremy Fitzhardinge
Quoted 10 lines · Ian Campbell
Quoted 9 lines · Jeremy Fitzhardinge
Quoted 8 lines · Ian Campbell
sizeof(pmd_t *)is 4 bytes on PAE leading to an allocation of only 2048 bytes. The correct size issizeof(pmd_t)giving us a full page allocation.Signed-off-by Ian Campbell <[email protected]>Cc Jeremy Fitzhardinge <[email protected]>---
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
Applies to mainline since 2.6.36 and to xen.git 2.6.32 based trees
This is just for 2.6.37?
2.6.36.stable too, I think. I added [email protected] to my patch header but didn't "guilt refresh" so it didn't show up here.
The
extend_brk()stuff was all merged this merge window. I checked out .36 to confirm, and there's nothing there for your patch to apply to...
Ah, I was suffering the classic confusion regarding a branch from before a release getting merged after. Thanks!
Ian.