All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel <xen-devel@lists.xensource.com>
Subject: Re: [PATCH] xen: convert pt_base to a physical address before	converting to PFN
Date: Wed, 11 Mar 2009 07:34:23 -0700	[thread overview]
Message-ID: <49B7CBEF.9050104@goop.org> (raw)
In-Reply-To: <1236778014.12283.213.camel@zakaz.uk.xensource.com>

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);
>  
>   

      reply	other threads:[~2009-03-11 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49B7CBEF.9050104@goop.org \
    --to=jeremy@goop.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.