All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: convert pt_base to a physical address before converting to PFN
@ 2009-03-11 13:26 Ian Campbell
  2009-03-11 14:34 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Campbell @ 2009-03-11 13:26 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: xen-devel

(applies to xen/dom0/hackery)

Otherwise xen_map_identity_early can try and creating a mapping which extends
too far into invalid PFN territory creating invalid page tables:
  mapping kernel into physical memory
  (XEN) mm.c:703:d50 Non-privileged (50) attempt to map I/O space 7fffffff
  (XEN) mm.c:1093:d50 Failure in alloc_l1_table: entry 0
  (XEN) mm.c:2008:d50 Error while validating mfn de047 (pfn 497) for type 2000000000000000: caf=8000000000000003 taf=2000000000000001
  (XEN) mm.c:770:d50 Attempt to create linear p.t. with write perms
  (XEN) mm.c:1253:d50 Failure in alloc_l2_table: entry 48
  (XEN) mm.c:2008:d50 Error while validating mfn de074 (pfn 46a) for type 4400000000000000: caf=8000000000000003 taf=4400000000000001
  (XEN) mm.c:1342:d50 Failure in alloc_l3_table: entry 3
  (XEN) mm.c:2008:d50 Error while validating mfn df405 (pfn 3d9) for type 6000000000000000: caf=8000000000000003 taf=6000000000000001
  (XEN) mm.c:848:d50 Attempt to create linear p.t. with write perms
  (XEN) mm.c:2375:d50 Error while installing new compat baseptr df405

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 arch/x86/xen/mmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 6c24275..375548f 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -1819,7 +1819,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
 	l2 = m2v(l3[pud_index(__START_KERNEL_map + PMD_SIZE)].pud);
 	memcpy(level2_fixmap_pgt, l2, sizeof(pmd_t) * PTRS_PER_PMD);
 
-	max_pfn_mapped = PFN_DOWN(xen_start_info->pt_base +
+	max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) +
 				  xen_start_info->nr_pt_frames * PAGE_SIZE +
 				  512*1024);
 
@@ -1871,7 +1871,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
 
 	level2_kernel_pgt = extend_brk(PAGE_SIZE, PAGE_SIZE);
 
-	max_pfn_mapped = PFN_DOWN(xen_start_info->pt_base +
+	max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) +
 				  xen_start_info->nr_pt_frames * PAGE_SIZE +
 				  512*1024);
 
-- 
1.5.6.5

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

* Re: [PATCH] xen: convert pt_base to a physical address before converting to PFN
  2009-03-11 13:26 [PATCH] xen: convert pt_base to a physical address before converting to PFN Ian Campbell
@ 2009-03-11 14:34 ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Fitzhardinge @ 2009-03-11 14:34 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell wrote:
> (applies to xen/dom0/hackery)
>   

Oops, thanks.   Perils of hand-editing patches...

    J
> Otherwise xen_map_identity_early can try and creating a mapping which extends
> too far into invalid PFN territory creating invalid page tables:
>   mapping kernel into physical memory
>   (XEN) mm.c:703:d50 Non-privileged (50) attempt to map I/O space 7fffffff
>   (XEN) mm.c:1093:d50 Failure in alloc_l1_table: entry 0
>   (XEN) mm.c:2008:d50 Error while validating mfn de047 (pfn 497) for type 2000000000000000: caf=8000000000000003 taf=2000000000000001
>   (XEN) mm.c:770:d50 Attempt to create linear p.t. with write perms
>   (XEN) mm.c:1253:d50 Failure in alloc_l2_table: entry 48
>   (XEN) mm.c:2008:d50 Error while validating mfn de074 (pfn 46a) for type 4400000000000000: caf=8000000000000003 taf=4400000000000001
>   (XEN) mm.c:1342:d50 Failure in alloc_l3_table: entry 3
>   (XEN) mm.c:2008:d50 Error while validating mfn df405 (pfn 3d9) for type 6000000000000000: caf=8000000000000003 taf=6000000000000001
>   (XEN) mm.c:848:d50 Attempt to create linear p.t. with write perms
>   (XEN) mm.c:2375:d50 Error while installing new compat baseptr df405
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  arch/x86/xen/mmu.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 6c24275..375548f 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -1819,7 +1819,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
>  	l2 = m2v(l3[pud_index(__START_KERNEL_map + PMD_SIZE)].pud);
>  	memcpy(level2_fixmap_pgt, l2, sizeof(pmd_t) * PTRS_PER_PMD);
>  
> -	max_pfn_mapped = PFN_DOWN(xen_start_info->pt_base +
> +	max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) +
>  				  xen_start_info->nr_pt_frames * PAGE_SIZE +
>  				  512*1024);
>  
> @@ -1871,7 +1871,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,
>  
>  	level2_kernel_pgt = extend_brk(PAGE_SIZE, PAGE_SIZE);
>  
> -	max_pfn_mapped = PFN_DOWN(xen_start_info->pt_base +
> +	max_pfn_mapped = PFN_DOWN(__pa(xen_start_info->pt_base) +
>  				  xen_start_info->nr_pt_frames * PAGE_SIZE +
>  				  512*1024);
>  
>   

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

end of thread, other threads:[~2009-03-11 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-11 13:26 [PATCH] xen: convert pt_base to a physical address before converting to PFN Ian Campbell
2009-03-11 14:34 ` Jeremy Fitzhardinge

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.