ia64/xen-unstable

changeset 6313:bd5533956fb0

Fix NORMAL_PT_UPDATE for PAE when page is not pinned.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat Aug 20 20:05:21 2005 +0000 (2005-08-20)
parents 349c15288793
children 19ef6202d75f
files xen/arch/x86/mm.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Sat Aug 20 11:51:50 2005 +0000
     1.2 +++ b/xen/arch/x86/mm.c	Sat Aug 20 20:05:21 2005 +0000
     1.3 @@ -2176,7 +2176,7 @@ int do_mmu_update(
     1.4                          }
     1.5                      }
     1.6  
     1.7 -                    *(unsigned long *)va = req.val;
     1.8 +                    *(intpte_t *)va = req.val;
     1.9                      okay = 1;
    1.10  
    1.11                      if ( shadow_mode_enabled(d) )
    1.12 @@ -2386,7 +2386,7 @@ int clear_grant_pte_mapping(
    1.13      }
    1.14  
    1.15      /* Delete pagetable entry. */
    1.16 -    if ( unlikely(__put_user(0, (unsigned long *)va)))
    1.17 +    if ( unlikely(__put_user(0, (intpte_t *)va)))
    1.18      {
    1.19          DPRINTK("Cannot delete PTE entry at %p.\n", va);
    1.20          put_page_type(page);
    1.21 @@ -2446,12 +2446,11 @@ int update_grant_va_mapping(
    1.22  
    1.23  int clear_grant_va_mapping(unsigned long addr, unsigned long frame)
    1.24  {
    1.25 -    l1_pgentry_t *pl1e;
    1.26 -    unsigned long _ol1e;
    1.27 +    l1_pgentry_t *pl1e, ol1e;
    1.28      
    1.29      pl1e = &linear_pg_table[l1_linear_offset(addr)];
    1.30  
    1.31 -    if ( unlikely(__get_user(_ol1e, (unsigned long *)pl1e) != 0) )
    1.32 +    if ( unlikely(__get_user(ol1e.l1, &pl1e->l1) != 0) )
    1.33      {
    1.34          DPRINTK("Could not find PTE entry for address %lx\n", addr);
    1.35          return GNTST_general_error;
    1.36 @@ -2461,15 +2460,15 @@ int clear_grant_va_mapping(unsigned long
    1.37       * Check that the virtual address supplied is actually mapped to
    1.38       * frame.
    1.39       */
    1.40 -    if ( unlikely((_ol1e >> PAGE_SHIFT) != frame ))
    1.41 +    if ( unlikely(l1e_get_pfn(ol1e) != frame) )
    1.42      {
    1.43          DPRINTK("PTE entry %lx for address %lx doesn't match frame %lx\n",
    1.44 -                _ol1e, addr, frame);
    1.45 +                l1e_get_pfn(ol1e), addr, frame);
    1.46          return GNTST_general_error;
    1.47      }
    1.48  
    1.49      /* Delete pagetable entry. */
    1.50 -    if ( unlikely(__put_user(0, (unsigned long *)pl1e)))
    1.51 +    if ( unlikely(__put_user(0, &pl1e->l1)) )
    1.52      {
    1.53          DPRINTK("Cannot delete PTE entry at %p.\n", (unsigned long *)pl1e);
    1.54          return GNTST_general_error;