ia64/xen-unstable

changeset 9391:f517be67eeac

[IA64] IA64_GRANT_TABLE_PADDR

IA64_GRANT_TABLE_PADDR constant added to avoid use of hard-coded value.
translate_domain_pte uses it as well as ORDER_GRANT_FRAMES to filter error
message.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Thu Mar 23 13:19:14 2006 -0700 (2006-03-23)
parents 11325d1c412c
children 00111084c70a
files xen/arch/ia64/xen/dom_fw.c xen/arch/ia64/xen/process.c xen/include/asm-ia64/grant_table.h
line diff
     1.1 --- a/xen/arch/ia64/xen/dom_fw.c	Wed Mar 22 10:04:43 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/dom_fw.c	Thu Mar 23 13:19:14 2006 -0700
     1.3 @@ -20,7 +20,7 @@
     1.4  #include <asm/dom_fw.h>
     1.5  #include <public/sched.h>
     1.6  
     1.7 -static struct ia64_boot_param *dom_fw_init(struct domain *, char *,int,char *,int);
     1.8 +static struct ia64_boot_param *dom_fw_init(struct domain *, const char *,int,char *,int);
     1.9  extern unsigned long domain_mpa_to_imva(struct domain *,unsigned long mpaddr);
    1.10  extern struct domain *dom0;
    1.11  extern unsigned long dom0_start;
    1.12 @@ -553,7 +553,7 @@ dom_fw_fake_acpi(struct domain *d, struc
    1.13  }
    1.14  
    1.15  static struct ia64_boot_param *
    1.16 -dom_fw_init (struct domain *d, char *args, int arglen, char *fw_mem, int fw_mem_size)
    1.17 +dom_fw_init (struct domain *d, const char *args, int arglen, char *fw_mem, int fw_mem_size)
    1.18  {
    1.19  	efi_system_table_t *efi_systab;
    1.20  	efi_runtime_services_t *efi_runtime;
     2.1 --- a/xen/arch/ia64/xen/process.c	Wed Mar 22 10:04:43 2006 -0700
     2.2 +++ b/xen/arch/ia64/xen/process.c	Thu Mar 23 13:19:14 2006 -0700
     2.3 @@ -98,9 +98,16 @@ unsigned long translate_domain_pte(unsig
     2.4  		}
     2.5  	}
     2.6  	else if ((mpaddr >> PAGE_SHIFT) > d->max_pages) {
     2.7 -		if ((mpaddr & ~0x1fffL ) != (1L << 40))
     2.8 -		printf("translate_domain_pte: bad mpa=0x%lx (> 0x%lx),vadr=0x%lx,pteval=0x%lx,itir=0x%lx\n",
     2.9 -			mpaddr, (unsigned long) d->max_pages<<PAGE_SHIFT, address, pteval, itir);
    2.10 +		/* Address beyond the limit.  However the grant table is
    2.11 +		   also beyond the limit.  Display a message if not in the
    2.12 +		   grant table.  */
    2.13 +		if (mpaddr >= IA64_GRANT_TABLE_PADDR
    2.14 +		    && mpaddr < (IA64_GRANT_TABLE_PADDR 
    2.15 +				 + (ORDER_GRANT_FRAMES << PAGE_SHIFT)))
    2.16 +			printf("translate_domain_pte: bad mpa=0x%lx (> 0x%lx),"
    2.17 +			       "vadr=0x%lx,pteval=0x%lx,itir=0x%lx\n",
    2.18 +			       mpaddr, (unsigned long)d->max_pages<<PAGE_SHIFT,
    2.19 +			       address, pteval, itir);
    2.20  		tdpfoo();
    2.21  	}
    2.22  	pteval2 = lookup_domain_mpa(d,mpaddr);
     3.1 --- a/xen/include/asm-ia64/grant_table.h	Wed Mar 22 10:04:43 2006 -0700
     3.2 +++ b/xen/include/asm-ia64/grant_table.h	Thu Mar 23 13:19:14 2006 -0700
     3.3 @@ -14,11 +14,14 @@
     3.4  
     3.5  #define gnttab_create_shared_page(d, t, i) ((void)0)
     3.6  
     3.7 +/* Guest physical address of the grant table.  */
     3.8 +#define IA64_GRANT_TABLE_PADDR (1UL << 40)
     3.9 +
    3.10  #define gnttab_shared_gmfn(d, t, i)                                     \
    3.11      ( ((d) == dom0) ?                                                   \
    3.12        ((virt_to_maddr((t)->shared) >> PAGE_SHIFT) + (i)) :              \
    3.13 -      (assign_domain_page((d), 1UL<<40, virt_to_maddr((t)->shared)),       \
    3.14 -       1UL << (40 - PAGE_SHIFT))                                        \
    3.15 +      (assign_domain_page((d), IA64_GRANT_TABLE_PADDR, 			\
    3.16 +       virt_to_maddr((t)->shared)), IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) \
    3.17      )
    3.18  
    3.19  #define gnttab_log_dirty(d, f) ((void)0)