lkml.org 
[lkml]   [2010]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/10] xen/mmu: For 1-1 mapping, automatically set _PAGE_IOMAP.
On 12/21/2010 01:37 PM, Konrad Rzeszutek Wilk wrote:
> This means that for PFNs (specifically: those in any E820 gaps
> or non-RAM E820 regions) that have 1-1 mapping we set the
> _PAGE_IOMAP flag.
>
> Later on we could remove the _PAGE_IOMAP code handling, but
> for right now lets keep this in to not introduce any bisection
> failures across this patchset.
>
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> ---
> arch/x86/xen/mmu.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
> index 4ba7e4e..bd02e7d 100644
> --- a/arch/x86/xen/mmu.c
> +++ b/arch/x86/xen/mmu.c
> @@ -832,6 +832,9 @@ static pteval_t pte_pfn_to_mfn(pteval_t val)
> pteval_t flags = val & PTE_FLAGS_MASK;
> unsigned long mfn = pfn_to_mfn(pfn);
>
> + if (mfn == pfn)
> + flags |= _PAGE_IOMAP;

Why? Does it really make sense to set _PAGE_IOMAP if they just happen
to be the same value?

J


\
 
 \ /
  Last update: 2010-12-21 23:31    [W:0.226 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site