WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [IA64] IA64_GRANT_TABLE_PADDR

# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID f517be67eeac35c3418de79588e67762eafa409e
# Parent  11325d1c412cdf93be0e1dc0f4c8de6de0420229
[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@xxxxxxxx>

diff -r 11325d1c412c -r f517be67eeac xen/arch/ia64/xen/dom_fw.c
--- a/xen/arch/ia64/xen/dom_fw.c        Wed Mar 22 10:04:43 2006 -0700
+++ b/xen/arch/ia64/xen/dom_fw.c        Thu Mar 23 13:19:14 2006 -0700
@@ -20,7 +20,7 @@
 #include <asm/dom_fw.h>
 #include <public/sched.h>
 
-static struct ia64_boot_param *dom_fw_init(struct domain *, char *,int,char 
*,int);
+static struct ia64_boot_param *dom_fw_init(struct domain *, const char 
*,int,char *,int);
 extern unsigned long domain_mpa_to_imva(struct domain *,unsigned long mpaddr);
 extern struct domain *dom0;
 extern unsigned long dom0_start;
@@ -553,7 +553,7 @@ dom_fw_fake_acpi(struct domain *d, struc
 }
 
 static struct ia64_boot_param *
-dom_fw_init (struct domain *d, char *args, int arglen, char *fw_mem, int 
fw_mem_size)
+dom_fw_init (struct domain *d, const char *args, int arglen, char *fw_mem, int 
fw_mem_size)
 {
        efi_system_table_t *efi_systab;
        efi_runtime_services_t *efi_runtime;
diff -r 11325d1c412c -r f517be67eeac xen/arch/ia64/xen/process.c
--- a/xen/arch/ia64/xen/process.c       Wed Mar 22 10:04:43 2006 -0700
+++ b/xen/arch/ia64/xen/process.c       Thu Mar 23 13:19:14 2006 -0700
@@ -98,9 +98,16 @@ unsigned long translate_domain_pte(unsig
                }
        }
        else if ((mpaddr >> PAGE_SHIFT) > d->max_pages) {
-               if ((mpaddr & ~0x1fffL ) != (1L << 40))
-               printf("translate_domain_pte: bad mpa=0x%lx (> 
0x%lx),vadr=0x%lx,pteval=0x%lx,itir=0x%lx\n",
-                       mpaddr, (unsigned long) d->max_pages<<PAGE_SHIFT, 
address, pteval, itir);
+               /* Address beyond the limit.  However the grant table is
+                  also beyond the limit.  Display a message if not in the
+                  grant table.  */
+               if (mpaddr >= IA64_GRANT_TABLE_PADDR
+                   && mpaddr < (IA64_GRANT_TABLE_PADDR 
+                                + (ORDER_GRANT_FRAMES << PAGE_SHIFT)))
+                       printf("translate_domain_pte: bad mpa=0x%lx (> 0x%lx),"
+                              "vadr=0x%lx,pteval=0x%lx,itir=0x%lx\n",
+                              mpaddr, (unsigned long)d->max_pages<<PAGE_SHIFT,
+                              address, pteval, itir);
                tdpfoo();
        }
        pteval2 = lookup_domain_mpa(d,mpaddr);
diff -r 11325d1c412c -r f517be67eeac xen/include/asm-ia64/grant_table.h
--- a/xen/include/asm-ia64/grant_table.h        Wed Mar 22 10:04:43 2006 -0700
+++ b/xen/include/asm-ia64/grant_table.h        Thu Mar 23 13:19:14 2006 -0700
@@ -14,11 +14,14 @@
 
 #define gnttab_create_shared_page(d, t, i) ((void)0)
 
+/* Guest physical address of the grant table.  */
+#define IA64_GRANT_TABLE_PADDR (1UL << 40)
+
 #define gnttab_shared_gmfn(d, t, i)                                     \
     ( ((d) == dom0) ?                                                   \
       ((virt_to_maddr((t)->shared) >> PAGE_SHIFT) + (i)) :              \
-      (assign_domain_page((d), 1UL<<40, virt_to_maddr((t)->shared)),       \
-       1UL << (40 - PAGE_SHIFT))                                        \
+      (assign_domain_page((d), IA64_GRANT_TABLE_PADDR,                         
\
+       virt_to_maddr((t)->shared)), IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) \
     )
 
 #define gnttab_log_dirty(d, f) ((void)0)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [IA64] IA64_GRANT_TABLE_PADDR, Xen patchbot -unstable <=