ia64/xen-unstable

changeset 18433:c9db93b0660a

x86: Fix interpretation of get_l*e_linear_pagetable().

Broken by get_page_type() preemption patch (c/s 18412).

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Sep 03 14:56:08 2008 +0100 (2008-09-03)
parents 1e98ea5c8604
children bed1b98b63cc
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Wed Sep 03 14:16:35 2008 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Wed Sep 03 14:56:08 2008 +0100
     1.3 @@ -762,9 +762,8 @@ get_page_from_l2e(
     1.4  
     1.5      rc = get_page_and_type_from_pagenr(
     1.6          l2e_get_pfn(l2e), PGT_l1_page_table, d, 0);
     1.7 -    if ( unlikely(rc) && rc != -EAGAIN &&
     1.8 -         get_l2_linear_pagetable(l2e, pfn, d) )
     1.9 -        rc = -EINVAL;
    1.10 +    if ( unlikely(rc == -EINVAL) && get_l2_linear_pagetable(l2e, pfn, d) )
    1.11 +        rc = 0;
    1.12  
    1.13      return rc;
    1.14  }
    1.15 @@ -788,9 +787,8 @@ get_page_from_l3e(
    1.16  
    1.17      rc = get_page_and_type_from_pagenr(
    1.18          l3e_get_pfn(l3e), PGT_l2_page_table, d, preemptible);
    1.19 -    if ( unlikely(rc) && rc != -EAGAIN && rc != -EINTR &&
    1.20 -         get_l3_linear_pagetable(l3e, pfn, d) )
    1.21 -        rc = -EINVAL;
    1.22 +    if ( unlikely(rc == -EINVAL) && get_l3_linear_pagetable(l3e, pfn, d) )
    1.23 +        rc = 0;
    1.24  
    1.25      return rc;
    1.26  }
    1.27 @@ -814,9 +812,8 @@ get_page_from_l4e(
    1.28  
    1.29      rc = get_page_and_type_from_pagenr(
    1.30          l4e_get_pfn(l4e), PGT_l3_page_table, d, preemptible);
    1.31 -    if ( unlikely(rc) && rc != -EAGAIN && rc != -EINTR &&
    1.32 -         get_l4_linear_pagetable(l4e, pfn, d) )
    1.33 -        rc = -EINVAL;
    1.34 +    if ( unlikely(rc == -EINVAL) && get_l4_linear_pagetable(l4e, pfn, d) )
    1.35 +        rc = 0;
    1.36  
    1.37      return rc;
    1.38  }