ia64/xen-unstable

changeset 4654:ccc4ee412321

bitkeeper revision 1.1381 (426ccd3chFZ3jThNSK9--Zvf3r2fug)

No longer disable format checking for printf/printk statements. This
required a whole bunch of cleanups to get the build working again.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Apr 25 10:58:04 2005 +0000 (2005-04-25)
parents 4c9072ada4bf
children 7b4421af1180
files xen/arch/x86/Rules.mk xen/arch/x86/audit.c xen/arch/x86/domain.c xen/arch/x86/domain_build.c xen/arch/x86/e820.c xen/arch/x86/extable.c xen/arch/x86/mm.c xen/arch/x86/shadow.c xen/arch/x86/time.c xen/arch/x86/traps.c xen/arch/x86/vmx.c xen/arch/x86/vmx_intercept.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/mm.c xen/arch/x86/x86_64/traps.c xen/common/dom_mem_ops.c xen/common/grant_table.c xen/common/multicall.c xen/common/page_alloc.c xen/include/asm-x86/mm.h xen/include/asm-x86/shadow.h xen/include/asm-x86/x86_32/page.h xen/include/xen/lib.h
line diff
     1.1 --- a/xen/arch/x86/Rules.mk	Mon Apr 25 09:04:02 2005 +0000
     1.2 +++ b/xen/arch/x86/Rules.mk	Mon Apr 25 10:58:04 2005 +0000
     1.3 @@ -2,7 +2,7 @@
     1.4  # x86-specific definitions
     1.5  
     1.6  CFLAGS  += -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
     1.7 -CFLAGS  += -iwithprefix include -Wall -Werror -Wno-format -pipe
     1.8 +CFLAGS  += -iwithprefix include -Wall -Werror -pipe
     1.9  CFLAGS  += -I$(BASEDIR)/include -Wno-pointer-arith -Wredundant-decls
    1.10  
    1.11  ifeq ($(optimize),y)
     2.1 --- a/xen/arch/x86/audit.c	Mon Apr 25 09:04:02 2005 +0000
     2.2 +++ b/xen/arch/x86/audit.c	Mon Apr 25 10:58:04 2005 +0000
     2.3 @@ -64,23 +64,25 @@ int audit_adjust_pgtables(struct domain 
     2.4  
     2.5              if ( page_get_owner(page) == NULL )
     2.6              {
     2.7 -                APRINTK("adjust(mfn=%p, dir=%d, adjtype=%d) owner=NULL",
     2.8 +                APRINTK("adjust(mfn=%lx, dir=%d, adjtype=%d) owner=NULL",
     2.9                          page_to_pfn(page), dir, adjtype);
    2.10                  errors++;
    2.11              }
    2.12  
    2.13              if ( tcount < 0 )
    2.14              {
    2.15 -                APRINTK("Audit %d: type count went below zero mfn=%x t=%x ot=%x",
    2.16 -                        d->id, page-frame_table,
    2.17 +                APRINTK("Audit %d: type count went below zero "
    2.18 +                        "mfn=%lx t=%x ot=%x",
    2.19 +                        d->id, page_to_pfn(page),
    2.20                          page->u.inuse.type_info,
    2.21                          page->tlbflush_timestamp);
    2.22                  errors++;
    2.23              }
    2.24              else if ( (tcount & ~PGT_count_mask) != 0 )
    2.25              {
    2.26 -                APRINTK("Audit %d: type count overflowed mfn=%x t=%x ot=%x",
    2.27 -                        d->id, page-frame_table,
    2.28 +                APRINTK("Audit %d: type count overflowed "
    2.29 +                        "mfn=%lx t=%x ot=%x",
    2.30 +                        d->id, page_to_pfn(page),
    2.31                          page->u.inuse.type_info,
    2.32                          page->tlbflush_timestamp);
    2.33                  errors++;
    2.34 @@ -97,16 +99,18 @@ int audit_adjust_pgtables(struct domain 
    2.35  
    2.36          if ( count < 0 )
    2.37          {
    2.38 -            APRINTK("Audit %d: general count went below zero mfn=%x t=%x ot=%x",
    2.39 -                    d->id, page-frame_table,
    2.40 +            APRINTK("Audit %d: general count went below zero "
    2.41 +                    "mfn=%lx t=%x ot=%x",
    2.42 +                    d->id, page_to_pfn(page),
    2.43                      page->u.inuse.type_info,
    2.44                      page->tlbflush_timestamp);
    2.45              errors++;
    2.46          }
    2.47          else if ( (count & ~PGT_count_mask) != 0 )
    2.48          {
    2.49 -            APRINTK("Audit %d: general count overflowed mfn=%x t=%x ot=%x",
    2.50 -                    d->id, page-frame_table,
    2.51 +            APRINTK("Audit %d: general count overflowed "
    2.52 +                    "mfn=%lx t=%x ot=%x",
    2.53 +                    d->id, page_to_pfn(page),
    2.54                      page->u.inuse.type_info,
    2.55                      page->tlbflush_timestamp);
    2.56              errors++;
    2.57 @@ -133,7 +137,7 @@ int audit_adjust_pgtables(struct domain 
    2.58                      {
    2.59                          if ( page_get_owner(l1page) != NULL )
    2.60                          {
    2.61 -                            printk("L2: Bizarre shadow L1 page mfn=%p "
    2.62 +                            printk("L2: Bizarre shadow L1 page mfn=%lx "
    2.63                                     "belonging to a domain %p (id=%d)\n",
    2.64                                     l1mfn,
    2.65                                     page_get_owner(l1page),
    2.66 @@ -146,7 +150,7 @@ int audit_adjust_pgtables(struct domain 
    2.67                      {
    2.68                          if ( page_get_owner(l1page) != d )
    2.69                          {
    2.70 -                            printk("L2: Skip bizarre L1 page mfn=%p "
    2.71 +                            printk("L2: Skip bizarre L1 page mfn=%lx "
    2.72                                     "belonging to other dom %p (id=%d)\n",
    2.73                                     l1mfn,
    2.74                                     page_get_owner(l1page),
    2.75 @@ -160,14 +164,14 @@ int audit_adjust_pgtables(struct domain 
    2.76                          if ( page_type == PGT_l2_page_table )
    2.77                          {
    2.78                              printk("Audit %d: [%x] Found %s Linear PT "
    2.79 -                                   "t=%x mfn=%p\n",
    2.80 +                                   "t=%x mfn=%lx\n",
    2.81                                     d->id, i, (l1mfn==mfn) ? "Self" : "Other",
    2.82                                     l1page->u.inuse.type_info, l1mfn);
    2.83                          }
    2.84                          else if ( page_type != PGT_l1_page_table )
    2.85                          {
    2.86 -                            printk("Audit %d: [L2 mfn=%p i=%x] "
    2.87 -                                   "Expected L1 t=%x mfn=%p\n",
    2.88 +                            printk("Audit %d: [L2 mfn=%lx i=%x] "
    2.89 +                                   "Expected L1 t=%x mfn=%lx\n",
    2.90                                     d->id, mfn, i,
    2.91                                     l1page->u.inuse.type_info, l1mfn);
    2.92                              errors++;
    2.93 @@ -218,8 +222,8 @@ int audit_adjust_pgtables(struct domain 
    2.94                  {
    2.95                      if ( page_get_owner(gpage) != d )
    2.96                      {
    2.97 -                        printk("Audit %d: [hl2mfn=%p,i=%x] Skip foreign page "
    2.98 -                               "dom=%p (id=%d) mfn=%p c=%08x t=%08x\n",
    2.99 +                        printk("Audit %d: [hl2mfn=%lx,i=%x] Skip foreign page "
   2.100 +                               "dom=%p (id=%d) mfn=%lx c=%08x t=%08x\n",
   2.101                                 d->id, hl2mfn, i,
   2.102                                 page_get_owner(gpage),
   2.103                                 page_get_owner(gpage)->id,
   2.104 @@ -269,8 +273,8 @@ int audit_adjust_pgtables(struct domain 
   2.105                          if ( !((gpage->u.inuse.type_info & PGT_type_mask) ==
   2.106                                 PGT_writable_page) )
   2.107                          {
   2.108 -                            printk("Audit %d: [l1mfn=%p, i=%x] Illegal RW "
   2.109 -                                   "t=%x mfn=%p\n",
   2.110 +                            printk("Audit %d: [l1mfn=%lx, i=%x] Illegal RW "
   2.111 +                                   "t=%x mfn=%lx\n",
   2.112                                     d->id, l1mfn, i,
   2.113                                     gpage->u.inuse.type_info, gmfn);
   2.114                              errors++;
   2.115 @@ -280,8 +284,8 @@ int audit_adjust_pgtables(struct domain 
   2.116                               page_is_page_table(gpage) &&
   2.117                               ! page_out_of_sync(gpage) )
   2.118                          {
   2.119 -                            printk("Audit %d: [l1mfn=%p, i=%x] Illegal RW of "
   2.120 -                                   "page table gmfn=%p\n",
   2.121 +                            printk("Audit %d: [l1mfn=%lx, i=%x] Illegal RW of "
   2.122 +                                   "page table gmfn=%lx\n",
   2.123                                     d->id, l1mfn, i, gmfn);
   2.124                              errors++;
   2.125                          }
   2.126 @@ -289,8 +293,8 @@ int audit_adjust_pgtables(struct domain 
   2.127  
   2.128                      if ( page_get_owner(gpage) != d )
   2.129                      {
   2.130 -                        printk("Audit %d: [l1mfn=%p,i=%x] Skip foreign page "
   2.131 -                               "dom=%p (id=%d) mfn=%p c=%08x t=%08x\n",
   2.132 +                        printk("Audit %d: [l1mfn=%lx,i=%x] Skip foreign page "
   2.133 +                               "dom=%p (id=%d) mfn=%lx c=%08x t=%08x\n",
   2.134                                 d->id, l1mfn, i,
   2.135                                 page_get_owner(gpage),
   2.136                                 page_get_owner(gpage)->id,
   2.137 @@ -436,22 +440,23 @@ int audit_adjust_pgtables(struct domain 
   2.138                      if ( shadow_enabled )
   2.139                      {
   2.140                          printk("Audit %d: found an L2 guest page "
   2.141 -                               "mfn=%p t=%08x c=%08x while in shadow mode\n",
   2.142 -                               mfn, page->u.inuse.type_info, page->count_info);
   2.143 +                               "mfn=%lx t=%08x c=%08x while in shadow mode\n",
   2.144 +                               d->id, mfn, page->u.inuse.type_info,
   2.145 +                               page->count_info);
   2.146                          errors++;
   2.147                      }
   2.148  
   2.149                      if ( (page->u.inuse.type_info & PGT_validated) !=
   2.150                           PGT_validated )
   2.151                      {
   2.152 -                        printk("Audit %d: L2 mfn=%p not validated %p\n",
   2.153 +                        printk("Audit %d: L2 mfn=%lx not validated %08x\n",
   2.154                                 d->id, mfn, page->u.inuse.type_info);
   2.155                          errors++;
   2.156                      }
   2.157  
   2.158                      if ( (page->u.inuse.type_info & PGT_pinned) != PGT_pinned )
   2.159                      {
   2.160 -                        printk("Audit %d: L2 mfn=%p not pinned t=%p\n",
   2.161 +                        printk("Audit %d: L2 mfn=%lx not pinned t=%08x\n",
   2.162                                 d->id, mfn, page->u.inuse.type_info);
   2.163                          errors++;
   2.164                      }
   2.165 @@ -472,14 +477,15 @@ int audit_adjust_pgtables(struct domain 
   2.166                  {
   2.167                      if ( shadow_enabled )
   2.168                      {
   2.169 -                        printk("found an L1 guest page mfn=%p t=%08x c=%08x while in shadow mode\n",
   2.170 +                        printk("found an L1 guest page mfn=%lx t=%08x c=%08x "
   2.171 +                               "while in shadow mode\n",
   2.172                                 mfn, page->u.inuse.type_info, page->count_info);
   2.173                          errors++;
   2.174                      }
   2.175  
   2.176                      if ( (page->u.inuse.type_info & PGT_validated) != PGT_validated )
   2.177                      {
   2.178 -                        printk("Audit %d: L1 not validated mfn=%p t=%p\n",
   2.179 +                        printk("Audit %d: L1 not validated mfn=%lx t=%08x\n",
   2.180                                 d->id, mfn, page->u.inuse.type_info);
   2.181                          errors++;
   2.182                      }
   2.183 @@ -488,7 +494,7 @@ int audit_adjust_pgtables(struct domain 
   2.184                      {
   2.185                          if ( !VM_ASSIST(d, VMASST_TYPE_writable_pagetables) )
   2.186                          {
   2.187 -                            printk("Audit %d: L1 mfn=%p not pinned t=%p\n",
   2.188 +                            printk("Audit %d: L1 mfn=%lx not pinned t=%08x\n",
   2.189                                     d->id, mfn, page->u.inuse.type_info);
   2.190                              errors++;
   2.191                          }
   2.192 @@ -575,7 +581,7 @@ void audit_pagelist(struct domain *d)
   2.193      if ( xenpages != d->xenheap_pages ||
   2.194           totpages != d->tot_pages )
   2.195      {
   2.196 -        printk("ARGH! dom %d: xen=%d %d, pages=%d %d\n",
   2.197 +        printk("ARGH! dom %d: xen=%d %d, pages=%d %d\n", d->id,
   2.198                 xenpages, d->xenheap_pages, 
   2.199                 totpages, d->tot_pages );
   2.200      }
   2.201 @@ -593,7 +599,8 @@ void _audit_domain(struct domain *d, int
   2.202          for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
   2.203          {
   2.204              if ( (pt[i] & _PAGE_PRESENT) && ((pt[i] >> PAGE_SHIFT) == xmfn) )
   2.205 -                printk("     found dom=%d mfn=%p t=%x c=%x pt[i=%x]=%p\n",
   2.206 +                printk("     found dom=%d mfn=%lx t=%08x c=%08x "
   2.207 +                       "pt[i=%x]=%lx\n",
   2.208                         d->id, mfn, page->u.inuse.type_info,
   2.209                         page->count_info, i, pt[i]);
   2.210          }
   2.211 @@ -704,7 +711,7 @@ void _audit_domain(struct domain *d, int
   2.212          if ( (page->u.inuse.type_info & PGT_count_mask) >
   2.213               (page->count_info & PGC_count_mask) )
   2.214          {
   2.215 -            printk("taf(%08x) > caf(%08x) mfn=%p\n",
   2.216 +            printk("taf(%08x) > caf(%08x) mfn=%lx\n",
   2.217                     page->u.inuse.type_info, page->count_info, mfn);
   2.218              errors++;
   2.219          }
   2.220 @@ -713,7 +720,8 @@ void _audit_domain(struct domain *d, int
   2.221               (page_type == PGT_writable_page) &&
   2.222               !(page->u.inuse.type_info & PGT_validated) )
   2.223          {
   2.224 -            printk("shadow mode writable page not validated mfn=%p t=%08x c=%08x\n",
   2.225 +            printk("shadow mode writable page not validated mfn=%lx "
   2.226 +                   "t=%08x c=%08x\n",
   2.227                     mfn, page->u.inuse.type_info, page->count_info);
   2.228              errors++;
   2.229          }
   2.230 @@ -722,7 +730,8 @@ void _audit_domain(struct domain *d, int
   2.231          if ( page_type == PGT_writable_page && 
   2.232               (page->u.inuse.type_info & PGT_count_mask) > 1 )
   2.233          {
   2.234 -            printk("writeable page with type count >1: mfn=%lx t=%x c=%x\n",
   2.235 +            printk("writeable page with type count >1: "
   2.236 +                   "mfn=%lx t=%08x c=%08x\n",
   2.237                    mfn,
   2.238                    page->u.inuse.type_info,
   2.239                    page->count_info );
   2.240 @@ -734,7 +743,7 @@ void _audit_domain(struct domain *d, int
   2.241          if ( page_type == PGT_none && 
   2.242               (page->u.inuse.type_info & PGT_count_mask) > 0 )
   2.243          {
   2.244 -            printk("normal page with type count >0: mfn=%lx t=%x c=%x\n",
   2.245 +            printk("normal page with type count >0: mfn=%lx t=%08x c=%08x\n",
   2.246                    mfn,
   2.247                    page->u.inuse.type_info,
   2.248                    page->count_info );
   2.249 @@ -745,18 +754,20 @@ void _audit_domain(struct domain *d, int
   2.250          {
   2.251              if ( !page_is_page_table(page) )
   2.252              {
   2.253 -                printk("out of sync page mfn=%p is not a page table\n", mfn);
   2.254 +                printk("out of sync page mfn=%lx is not a page table\n", mfn);
   2.255                  errors++;
   2.256              }
   2.257              unsigned long pfn = __mfn_to_gpfn(d, mfn);
   2.258              if ( !__shadow_status(d, pfn, PGT_snapshot) )
   2.259              {
   2.260 -                printk("out of sync page mfn=%p doesn't have a snapshot\n");
   2.261 +                printk("out of sync page mfn=%lx doesn't have a snapshot\n",
   2.262 +                       mfn);
   2.263                  errors++;
   2.264              }
   2.265              if ( page_type != PGT_writable_page )
   2.266              {
   2.267 -                printk("out of sync page mfn=%p has strange type t=%08x c=%08x\n",
   2.268 +                printk("out of sync page mfn=%lx has strange type "
   2.269 +                       "t=%08x c=%08x\n",
   2.270                         mfn, page->u.inuse.type_info, page->count_info);
   2.271                  errors++;
   2.272              }
   2.273 @@ -854,7 +865,8 @@ void _audit_domain(struct domain *d, int
   2.274                      if ( ((page->u.inuse.type_info & PGT_type_mask) != page_type ) ||
   2.275                           (page->count_info != 0) )
   2.276                      {
   2.277 -                        printk("Audit %d: shadow page counts wrong mfn=%p t=%x c=%x\n",
   2.278 +                        printk("Audit %d: shadow page counts wrong "
   2.279 +                               "mfn=%lx t=%08x c=%08x\n",
   2.280                                 d->id, page_to_pfn(page),
   2.281                                 page->u.inuse.type_info,
   2.282                                 page->count_info);
     3.1 --- a/xen/arch/x86/domain.c	Mon Apr 25 09:04:02 2005 +0000
     3.2 +++ b/xen/arch/x86/domain.c	Mon Apr 25 10:58:04 2005 +0000
     3.3 @@ -180,23 +180,23 @@ void dump_pageframe_info(struct domain *
     3.4      {
     3.5          list_for_each_entry ( page, &d->page_list, list )
     3.6          {
     3.7 -            printk("Page %08x: caf=%08x, taf=%08x\n",
     3.8 -                   page_to_phys(page), page->count_info,
     3.9 +            printk("Page %p: caf=%08x, taf=%08x\n",
    3.10 +                   _p(page_to_phys(page)), page->count_info,
    3.11                     page->u.inuse.type_info);
    3.12          }
    3.13      }
    3.14  
    3.15      list_for_each_entry ( page, &d->xenpage_list, list )
    3.16      {
    3.17 -        printk("XenPage %08x: caf=%08x, taf=%08x\n",
    3.18 -               page_to_phys(page), page->count_info,
    3.19 +        printk("XenPage %p: caf=%08x, taf=%08x\n",
    3.20 +               _p(page_to_phys(page)), page->count_info,
    3.21                 page->u.inuse.type_info);
    3.22      }
    3.23  
    3.24      
    3.25      page = virt_to_page(d->shared_info);
    3.26 -    printk("Shared_info@%08x: caf=%08x, taf=%08x\n",
    3.27 -           page_to_phys(page), page->count_info,
    3.28 +    printk("Shared_info@%p: caf=%08x, taf=%08x\n",
    3.29 +           _p(page_to_phys(page)), page->count_info,
    3.30             page->u.inuse.type_info);
    3.31  }
    3.32  
     4.1 --- a/xen/arch/x86/domain_build.c	Mon Apr 25 09:04:02 2005 +0000
     4.2 +++ b/xen/arch/x86/domain_build.c	Mon Apr 25 10:58:04 2005 +0000
     4.3 @@ -184,9 +184,9 @@ int construct_dom0(struct domain *d,
     4.4  
     4.5      printk("PHYSICAL MEMORY ARRANGEMENT:\n"
     4.6             " Dom0 alloc.:   %p->%p",
     4.7 -           alloc_start, alloc_end);
     4.8 +           _p(alloc_start), _p(alloc_end));
     4.9      if ( d->tot_pages < nr_pages )
    4.10 -        printk(" (%d pages to be allocated)",
    4.11 +        printk(" (%lu pages to be allocated)",
    4.12                 nr_pages - d->tot_pages);
    4.13      printk("\nVIRTUAL MEMORY ARRANGEMENT:\n"
    4.14             " Loaded kernel: %p->%p\n"
    4.15 @@ -196,14 +196,14 @@ int construct_dom0(struct domain *d,
    4.16             " Start info:    %p->%p\n"
    4.17             " Boot stack:    %p->%p\n"
    4.18             " TOTAL:         %p->%p\n",
    4.19 -           dsi.v_kernstart, dsi.v_kernend, 
    4.20 -           vinitrd_start, vinitrd_end,
    4.21 -           vphysmap_start, vphysmap_end,
    4.22 -           vpt_start, vpt_end,
    4.23 -           vstartinfo_start, vstartinfo_end,
    4.24 -           vstack_start, vstack_end,
    4.25 -           dsi.v_start, v_end);
    4.26 -    printk(" ENTRY ADDRESS: %p\n", dsi.v_kernentry);
    4.27 +           _p(dsi.v_kernstart), _p(dsi.v_kernend), 
    4.28 +           _p(vinitrd_start), _p(vinitrd_end),
    4.29 +           _p(vphysmap_start), _p(vphysmap_end),
    4.30 +           _p(vpt_start), _p(vpt_end),
    4.31 +           _p(vstartinfo_start), _p(vstartinfo_end),
    4.32 +           _p(vstack_start), _p(vstack_end),
    4.33 +           _p(dsi.v_start), _p(v_end));
    4.34 +    printk(" ENTRY ADDRESS: %p\n", _p(dsi.v_kernentry));
    4.35  
    4.36      if ( (v_end - dsi.v_start) > (nr_pages * PAGE_SIZE) )
    4.37      {
    4.38 @@ -508,7 +508,7 @@ int construct_dom0(struct domain *d,
    4.39      {
    4.40          si->mod_start = vinitrd_start;
    4.41          si->mod_len   = initrd_len;
    4.42 -        printk("Initrd len 0x%lx, start at 0x%p\n",
    4.43 +        printk("Initrd len 0x%lx, start at 0x%lx\n",
    4.44                 si->mod_len, si->mod_start);
    4.45      }
    4.46  
     5.1 --- a/xen/arch/x86/e820.c	Mon Apr 25 09:04:02 2005 +0000
     5.2 +++ b/xen/arch/x86/e820.c	Mon Apr 25 10:58:04 2005 +0000
     5.3 @@ -40,8 +40,8 @@ print_e820_memory_map(struct e820entry *
     5.4  
     5.5      for (i = 0; i < entries; i++) {
     5.6          printk(" %016Lx - %016Lx ",
     5.7 -               map[i].addr,
     5.8 -               map[i].addr + map[i].size);
     5.9 +               (unsigned long long)(map[i].addr),
    5.10 +               (unsigned long long)(map[i].addr + map[i].size));
    5.11          switch (map[i].type) {
    5.12          case E820_RAM:	printk("(usable)\n");
    5.13              break;
     6.1 --- a/xen/arch/x86/extable.c	Mon Apr 25 09:04:02 2005 +0000
     6.2 +++ b/xen/arch/x86/extable.c	Mon Apr 25 10:58:04 2005 +0000
     6.3 @@ -73,7 +73,7 @@ search_pre_exception_table(struct xen_re
     6.4      unsigned long addr = (unsigned long)regs->eip;
     6.5      unsigned long fixup = search_one_table(
     6.6          __start___pre_ex_table, __stop___pre_ex_table-1, addr);
     6.7 -    DPRINTK("Pre-exception: %p -> %p\n", addr, fixup);
     6.8 +    DPRINTK("Pre-exception: %p -> %p\n", _p(addr), _p(fixup));
     6.9  #ifdef PERF_COUNTERS
    6.10      if ( fixup )
    6.11          perfc_incrc(exception_fixed);
     7.1 --- a/xen/arch/x86/mm.c	Mon Apr 25 09:04:02 2005 +0000
     7.2 +++ b/xen/arch/x86/mm.c	Mon Apr 25 10:58:04 2005 +0000
     7.3 @@ -342,7 +342,7 @@ static int get_page_from_pagenr(unsigned
     7.4  
     7.5      if ( unlikely(!pfn_valid(page_nr)) || unlikely(!get_page(page, d)) )
     7.6      {
     7.7 -        MEM_LOG("Could not get page ref for pfn %p", page_nr);
     7.8 +        MEM_LOG("Could not get page ref for pfn %lx", page_nr);
     7.9          return 0;
    7.10      }
    7.11  
    7.12 @@ -362,7 +362,7 @@ static int get_page_and_type_from_pagenr
    7.13      if ( unlikely(!get_page_type(page, type)) )
    7.14      {
    7.15          if ( (type & PGT_type_mask) != PGT_l1_page_table )
    7.16 -            MEM_LOG("Bad page type for pfn %p (%08x)", 
    7.17 +            MEM_LOG("Bad page type for pfn %lx (%08x)", 
    7.18                      page_nr, page->u.inuse.type_info);
    7.19          put_page(page);
    7.20          return 0;
    7.21 @@ -442,7 +442,7 @@ get_page_from_l1e(
    7.22  
    7.23      if ( unlikely(l1e_get_flags(l1e) & L1_DISALLOW_MASK) )
    7.24      {
    7.25 -        MEM_LOG("Bad L1 type settings %p %p", l1e_get_value(l1e),
    7.26 +        MEM_LOG("Bad L1 type settings %lx %lx", l1e_get_value(l1e),
    7.27                  l1e_get_value(l1e) & L1_DISALLOW_MASK);
    7.28          return 0;
    7.29      }
    7.30 @@ -489,7 +489,7 @@ get_page_from_l2e(
    7.31  
    7.32      if ( unlikely((l2e_get_flags(l2e) & L2_DISALLOW_MASK)) )
    7.33      {
    7.34 -        MEM_LOG("Bad L2 page type settings %p",
    7.35 +        MEM_LOG("Bad L2 page type settings %lx",
    7.36                  l2e_get_value(l2e) & L2_DISALLOW_MASK);
    7.37          return 0;
    7.38      }
    7.39 @@ -517,7 +517,7 @@ get_page_from_l3e(
    7.40  
    7.41      if ( unlikely((l3e_get_flags(l3e) & L3_DISALLOW_MASK)) )
    7.42      {
    7.43 -        MEM_LOG("Bad L3 page type settings %p",
    7.44 +        MEM_LOG("Bad L3 page type settings %lx",
    7.45                  l3e_get_value(l3e) & L3_DISALLOW_MASK);
    7.46          return 0;
    7.47      }
    7.48 @@ -538,7 +538,7 @@ get_page_from_l4e(
    7.49  
    7.50      if ( unlikely((l4e_get_flags(l4e) & L4_DISALLOW_MASK)) )
    7.51      {
    7.52 -        MEM_LOG("Bad L4 page type settings %p",
    7.53 +        MEM_LOG("Bad L4 page type settings %lx",
    7.54                  l4e_get_value(l4e) & L4_DISALLOW_MASK);
    7.55          return 0;
    7.56      }
    7.57 @@ -846,7 +846,7 @@ static inline int update_l1e(l1_pgentry_
    7.58      if ( unlikely(cmpxchg_user(pl1e, o, n) != 0) ||
    7.59           unlikely(o != l1e_get_value(ol1e)) )
    7.60      {
    7.61 -        MEM_LOG("Failed to update %p -> %p: saw %p",
    7.62 +        MEM_LOG("Failed to update %lx -> %lx: saw %lx",
    7.63                  l1e_get_value(ol1e), l1e_get_value(nl1e), o);
    7.64          return 0;
    7.65      }
    7.66 @@ -870,7 +870,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
    7.67      {
    7.68          if ( unlikely(l1e_get_flags(nl1e) & L1_DISALLOW_MASK) )
    7.69          {
    7.70 -            MEM_LOG("Bad L1 type settings %p", 
    7.71 +            MEM_LOG("Bad L1 type settings %lx", 
    7.72                      l1e_get_value(nl1e) & L1_DISALLOW_MASK);
    7.73              return 0;
    7.74          }
    7.75 @@ -904,7 +904,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
    7.76                                  _t ## e_get_value(_o),                  \
    7.77                                  _t ## e_get_value(_n));                 \
    7.78      if ( __o != _t ## e_get_value(_o) )                                 \
    7.79 -        MEM_LOG("Failed to update %p -> %p: saw %p",                    \
    7.80 +        MEM_LOG("Failed to update %lx -> %lx: saw %lx",                 \
    7.81                  _t ## e_get_value(_o), _t ## e_get_value(_n), __o);     \
    7.82      (__o == _t ## e_get_value(_o)); })
    7.83  
    7.84 @@ -929,7 +929,7 @@ static int mod_l2_entry(l2_pgentry_t *pl
    7.85      {
    7.86          if ( unlikely(l2e_get_flags(nl2e) & L2_DISALLOW_MASK) )
    7.87          {
    7.88 -            MEM_LOG("Bad L2 type settings %p", 
    7.89 +            MEM_LOG("Bad L2 type settings %lx", 
    7.90                      l2e_get_value(nl2e) & L2_DISALLOW_MASK);
    7.91              return 0;
    7.92          }
    7.93 @@ -982,7 +982,7 @@ static int mod_l3_entry(l3_pgentry_t *pl
    7.94      {
    7.95          if ( unlikely(l3e_get_flags(nl3e) & L3_DISALLOW_MASK) )
    7.96          {
    7.97 -            MEM_LOG("Bad L3 type settings %p", 
    7.98 +            MEM_LOG("Bad L3 type settings %lx", 
    7.99                      l3e_get_value(nl3e) & L3_DISALLOW_MASK);
   7.100              return 0;
   7.101          }
   7.102 @@ -1032,7 +1032,7 @@ static int mod_l4_entry(l4_pgentry_t *pl
   7.103      {
   7.104          if ( unlikely(l4e_get_flags(nl4e) & L4_DISALLOW_MASK) )
   7.105          {
   7.106 -            MEM_LOG("Bad L4 type settings %p", 
   7.107 +            MEM_LOG("Bad L4 type settings %lx", 
   7.108                      l4e_get_value(nl4e) & L4_DISALLOW_MASK);
   7.109              return 0;
   7.110          }
   7.111 @@ -1189,7 +1189,7 @@ int get_page_type(struct pfn_info *page,
   7.112          nx = x + 1;
   7.113          if ( unlikely((nx & PGT_count_mask) == 0) )
   7.114          {
   7.115 -            MEM_LOG("Type count overflow on pfn %p", page_to_pfn(page));
   7.116 +            MEM_LOG("Type count overflow on pfn %lx", page_to_pfn(page));
   7.117              return 0;
   7.118          }
   7.119          else if ( unlikely((x & PGT_count_mask) == 0) )
   7.120 @@ -1228,7 +1228,7 @@ int get_page_type(struct pfn_info *page,
   7.121                  {
   7.122                      if ( ((x & PGT_type_mask) != PGT_l2_page_table) ||
   7.123                           ((type & PGT_type_mask) != PGT_l1_page_table) )
   7.124 -                        MEM_LOG("Bad type (saw %08x != exp %08x) for pfn %p",
   7.125 +                        MEM_LOG("Bad type (saw %08x != exp %08x) for pfn %lx",
   7.126                                  x, type, page_to_pfn(page));
   7.127                      return 0;
   7.128                  }
   7.129 @@ -1241,7 +1241,7 @@ int get_page_type(struct pfn_info *page,
   7.130                  else if ( ((type & PGT_va_mask) != PGT_va_mutable) &&
   7.131                            ((type & PGT_va_mask) != (x & PGT_va_mask)) )
   7.132                  {
   7.133 -                    /* This table is potentially mapped at multiple locations. */
   7.134 +                    /* This table is may be mapped at multiple locations. */
   7.135                      nx &= ~PGT_va_mask;
   7.136                      nx |= PGT_va_unknown;
   7.137                  }
   7.138 @@ -1262,7 +1262,7 @@ int get_page_type(struct pfn_info *page,
   7.139          /* Try to validate page type; drop the new reference on failure. */
   7.140          if ( unlikely(!alloc_page_type(page, type & PGT_type_mask)) )
   7.141          {
   7.142 -            MEM_LOG("Error while validating pfn %p for type %08x."
   7.143 +            MEM_LOG("Error while validating pfn %lx for type %08x."
   7.144                      " caf=%08x taf=%08x",
   7.145                      page_to_pfn(page), type,
   7.146                      page->count_info,
   7.147 @@ -1307,21 +1307,20 @@ int new_guest_cr3(unsigned long mfn)
   7.148          else
   7.149              put_page_and_type(&frame_table[old_base_mfn]);
   7.150  
   7.151 -        // CR3 holds its own ref to its shadow...
   7.152 -        //
   7.153 +        /* CR3 holds its own ref to its shadow. */
   7.154          if ( shadow_mode_enabled(d) )
   7.155          {
   7.156              if ( ed->arch.monitor_shadow_ref )
   7.157                  put_shadow_ref(ed->arch.monitor_shadow_ref);
   7.158              ed->arch.monitor_shadow_ref =
   7.159                  pagetable_val(ed->arch.monitor_table) >> PAGE_SHIFT;
   7.160 -            ASSERT(page_get_owner(&frame_table[ed->arch.monitor_shadow_ref]) == NULL);
   7.161 +            ASSERT(!page_get_owner(&frame_table[ed->arch.monitor_shadow_ref]));
   7.162              get_shadow_ref(ed->arch.monitor_shadow_ref);
   7.163          }
   7.164      }
   7.165      else
   7.166      {
   7.167 -        MEM_LOG("Error while installing new baseptr %p", mfn);
   7.168 +        MEM_LOG("Error while installing new baseptr %lx", mfn);
   7.169      }
   7.170  
   7.171      return okay;
   7.172 @@ -1493,14 +1492,14 @@ int do_mmuext_op(
   7.173              okay = get_page_and_type_from_pagenr(op.mfn, type, FOREIGNDOM);
   7.174              if ( unlikely(!okay) )
   7.175              {
   7.176 -                MEM_LOG("Error while pinning MFN %p", op.mfn);
   7.177 +                MEM_LOG("Error while pinning mfn %lx", op.mfn);
   7.178                  break;
   7.179              }
   7.180              
   7.181              if ( unlikely(test_and_set_bit(_PGT_pinned,
   7.182                                             &page->u.inuse.type_info)) )
   7.183              {
   7.184 -                MEM_LOG("MFN %p already pinned", op.mfn);
   7.185 +                MEM_LOG("Mfn %lx already pinned", op.mfn);
   7.186                  put_page_and_type(page);
   7.187                  okay = 0;
   7.188                  break;
   7.189 @@ -1525,7 +1524,7 @@ int do_mmuext_op(
   7.190          case MMUEXT_UNPIN_TABLE:
   7.191              if ( unlikely(!(okay = get_page_from_pagenr(op.mfn, FOREIGNDOM))) )
   7.192              {
   7.193 -                MEM_LOG("MFN %p bad domain (dom=%p)",
   7.194 +                MEM_LOG("Mfn %lx bad domain (dom=%p)",
   7.195                          op.mfn, page_get_owner(page));
   7.196              }
   7.197              else if ( likely(test_and_clear_bit(_PGT_pinned, 
   7.198 @@ -1538,7 +1537,7 @@ int do_mmuext_op(
   7.199              {
   7.200                  okay = 0;
   7.201                  put_page(page);
   7.202 -                MEM_LOG("MFN %p not pinned", op.mfn);
   7.203 +                MEM_LOG("Mfn %lx not pinned", op.mfn);
   7.204              }
   7.205              break;
   7.206  
   7.207 @@ -1553,7 +1552,7 @@ int do_mmuext_op(
   7.208                  op.mfn, PGT_root_page_table, d);
   7.209              if ( unlikely(!okay) )
   7.210              {
   7.211 -                MEM_LOG("Error while installing new MFN %p", op.mfn);
   7.212 +                MEM_LOG("Error while installing new mfn %lx", op.mfn);
   7.213              }
   7.214              else
   7.215              {
   7.216 @@ -1638,7 +1637,7 @@ int do_mmuext_op(
   7.217                   !array_access_ok(ptr, ents, LDT_ENTRY_SIZE) )
   7.218              {
   7.219                  okay = 0;
   7.220 -                MEM_LOG("Bad args to SET_LDT: ptr=%p, ents=%p", ptr, ents);
   7.221 +                MEM_LOG("Bad args to SET_LDT: ptr=%lx, ents=%lx", ptr, ents);
   7.222              }
   7.223              else if ( (ed->arch.ldt_ents != ents) || 
   7.224                        (ed->arch.ldt_base != ptr) )
   7.225 @@ -1665,7 +1664,7 @@ int do_mmuext_op(
   7.226              e = percpu_info[cpu].foreign;
   7.227              if ( unlikely(e == NULL) )
   7.228              {
   7.229 -                MEM_LOG("No FOREIGNDOM to reassign MFN %p to", op.mfn);
   7.230 +                MEM_LOG("No FOREIGNDOM to reassign mfn %lx to", op.mfn);
   7.231                  okay = 0;
   7.232                  break;
   7.233              }
   7.234 @@ -1697,7 +1696,7 @@ int do_mmuext_op(
   7.235                   unlikely(IS_XEN_HEAP_FRAME(page)) )
   7.236              {
   7.237                  MEM_LOG("Transferee has no reservation headroom (%d,%d), or "
   7.238 -                        "page is in Xen heap (%p), or dom is dying (%d).\n",
   7.239 +                        "page is in Xen heap (%lx), or dom is dying (%ld).\n",
   7.240                          e->tot_pages, e->max_pages, op.mfn, e->d_flags);
   7.241                  okay = 0;
   7.242                  goto reassign_fail;
   7.243 @@ -1717,7 +1716,7 @@ int do_mmuext_op(
   7.244                                (1|PGC_allocated)) ||
   7.245                       unlikely(_nd != _d) )
   7.246                  {
   7.247 -                    MEM_LOG("Bad page values %p: ed=%p(%u), sd=%p,"
   7.248 +                    MEM_LOG("Bad page values %lx: ed=%p(%u), sd=%p,"
   7.249                              " caf=%08x, taf=%08x\n", page_to_pfn(page),
   7.250                              d, d->id, unpickle_domptr(_nd), x,
   7.251                              page->u.inuse.type_info);
   7.252 @@ -1754,7 +1753,7 @@ int do_mmuext_op(
   7.253              break;
   7.254              
   7.255          default:
   7.256 -            MEM_LOG("Invalid extended pt command 0x%p", op.cmd);
   7.257 +            MEM_LOG("Invalid extended pt command 0x%x", op.cmd);
   7.258              okay = 0;
   7.259              break;
   7.260          }
   7.261 @@ -1959,12 +1958,12 @@ int do_mmu_update(
   7.262  
   7.263          case MMU_MACHPHYS_UPDATE:
   7.264  
   7.265 -            // HACK ALERT...  Need to think about this some more...
   7.266 -            //
   7.267 +            /* HACK ALERT...  Need to think about this some more... */
   7.268              if ( unlikely(shadow_mode_translate(FOREIGNDOM) && IS_PRIV(d)) )
   7.269              {
   7.270                  rc = FOREIGNDOM->next_io_page++;
   7.271 -                printk("privileged guest dom%d requests mfn=%p for dom%d, gets pfn=%p\n",
   7.272 +                printk("privileged guest dom%d requests mfn=%lx for dom%d, "
   7.273 +                       "gets pfn=%x\n",
   7.274                         d->id, mfn, FOREIGNDOM->id, rc);
   7.275                  set_machinetophys(mfn, rc);
   7.276                  set_p2m_entry(FOREIGNDOM, rc, mfn);
   7.277 @@ -1999,7 +1998,7 @@ int do_mmu_update(
   7.278              break;
   7.279  
   7.280          default:
   7.281 -            MEM_LOG("Invalid page update command %p", req.ptr);
   7.282 +            MEM_LOG("Invalid page update command %lx", req.ptr);
   7.283              break;
   7.284          }
   7.285  
   7.286 @@ -2497,7 +2496,7 @@ void ptwr_flush(struct domain *d, const 
   7.287           */
   7.288          BUG();
   7.289      }
   7.290 -    PTWR_PRINTK("[%c] disconnected_l1va at %p is %p\n",
   7.291 +    PTWR_PRINTK("[%c] disconnected_l1va at %p is %lx\n",
   7.292                  PTWR_PRINT_WHICH, ptep, pte);
   7.293      pte &= ~_PAGE_RW;
   7.294  
   7.295 @@ -2515,7 +2514,7 @@ void ptwr_flush(struct domain *d, const 
   7.296      /* Ensure that there are no stale writable mappings in any TLB. */
   7.297      /* NB. INVLPG is a serialising instruction: flushes pending updates. */
   7.298      local_flush_tlb_one(l1va); /* XXX Multi-CPU guests? */
   7.299 -    PTWR_PRINTK("[%c] disconnected_l1va at %p now %p\n",
   7.300 +    PTWR_PRINTK("[%c] disconnected_l1va at %p now %lx\n",
   7.301                  PTWR_PRINT_WHICH, ptep, pte);
   7.302  
   7.303      /*
   7.304 @@ -2597,7 +2596,7 @@ static int ptwr_emulated_update(
   7.305      /* Aligned access only, thank you. */
   7.306      if ( !access_ok(addr, bytes) || ((addr & (bytes-1)) != 0) )
   7.307      {
   7.308 -        MEM_LOG("ptwr_emulate: Unaligned or bad size ptwr access (%d, %p)\n",
   7.309 +        MEM_LOG("ptwr_emulate: Unaligned or bad size ptwr access (%d, %lx)\n",
   7.310                  bytes, addr);
   7.311          return X86EMUL_UNHANDLEABLE;
   7.312      }
   7.313 @@ -2633,12 +2632,12 @@ static int ptwr_emulated_update(
   7.314      page = &frame_table[pfn];
   7.315  
   7.316      /* We are looking only for read-only mappings of p.t. pages. */
   7.317 -    if ( ((l1e_get_flags(pte) & (_PAGE_RW | _PAGE_PRESENT)) != _PAGE_PRESENT) ||
   7.318 +    if ( ((l1e_get_flags(pte) & (_PAGE_RW|_PAGE_PRESENT)) != _PAGE_PRESENT) ||
   7.319           ((page->u.inuse.type_info & PGT_type_mask) != PGT_l1_page_table) ||
   7.320           (page_get_owner(page) != d) )
   7.321      {
   7.322 -        MEM_LOG("ptwr_emulate: Page is mistyped or bad pte (%p, %x)\n",
   7.323 -                pte, page->u.inuse.type_info);
   7.324 +        MEM_LOG("ptwr_emulate: Page is mistyped or bad pte (%lx, %08x)\n",
   7.325 +                l1e_get_pfn(pte), page->u.inuse.type_info);
   7.326          return X86EMUL_UNHANDLEABLE;
   7.327      }
   7.328  
   7.329 @@ -2787,8 +2786,8 @@ int ptwr_do_page_fault(struct domain *d,
   7.330              which = PTWR_PT_ACTIVE;
   7.331      }
   7.332      
   7.333 -    PTWR_PRINTK("[%c] page_fault on l1 pt at va %p, pt for %08x, "
   7.334 -                "pfn %p\n", PTWR_PRINT_WHICH,
   7.335 +    PTWR_PRINTK("[%c] page_fault on l1 pt at va %lx, pt for %08x, "
   7.336 +                "pfn %lx\n", PTWR_PRINT_WHICH,
   7.337                  addr, l2_idx << L2_PAGETABLE_SHIFT, pfn);
   7.338      
   7.339      /*
   7.340 @@ -2823,8 +2822,6 @@ int ptwr_do_page_fault(struct domain *d,
   7.341      
   7.342      /* Finally, make the p.t. page writable by the guest OS. */
   7.343      l1e_add_flags(&pte, _PAGE_RW);
   7.344 -    PTWR_PRINTK("[%c] update %p pte to %p\n", PTWR_PRINT_WHICH,
   7.345 -                &linear_pg_table[addr>>PAGE_SHIFT], pte);
   7.346      if ( unlikely(__copy_to_user(&linear_pg_table[addr>>PAGE_SHIFT],
   7.347                                   &pte, sizeof(pte))) )
   7.348      {
     8.1 --- a/xen/arch/x86/shadow.c	Mon Apr 25 09:04:02 2005 +0000
     8.2 +++ b/xen/arch/x86/shadow.c	Mon Apr 25 10:58:04 2005 +0000
     8.3 @@ -65,11 +65,11 @@ shadow_promote(struct domain *d, unsigne
     8.4      if ( unlikely(page_is_page_table(page)) )
     8.5          return 1;
     8.6  
     8.7 -    FSH_LOG("%s: gpfn=%p gmfn=%p nt=%p", __func__, gpfn, gmfn, new_type);
     8.8 +    FSH_LOG("%s: gpfn=%lx gmfn=%lx nt=%08lx", __func__, gpfn, gmfn, new_type);
     8.9  
    8.10      if ( !shadow_remove_all_write_access(d, gpfn, gmfn) )
    8.11      {
    8.12 -        FSH_LOG("%s: couldn't find/remove all write accesses, gpfn=%p gmfn=%p",
    8.13 +        FSH_LOG("%s: couldn't find/remove all write accesses, gpfn=%lx gmfn=%lx",
    8.14                  __func__, gpfn, gmfn);
    8.15  #if 1 || defined(LIVE_DANGEROUSLY)
    8.16          set_bit(_PGC_page_table, &page->count_info);
    8.17 @@ -107,7 +107,7 @@ shadow_promote(struct domain *d, unsigne
    8.18      else
    8.19      {
    8.20          printk("shadow_promote: get_page_type failed "
    8.21 -               "dom%d gpfn=%p gmfn=%p t=%x\n",
    8.22 +               "dom%d gpfn=%lx gmfn=%lx t=%08lx\n",
    8.23                 d->id, gpfn, gmfn, new_type);
    8.24          okay = 0;
    8.25      }
    8.26 @@ -294,7 +294,7 @@ alloc_shadow_page(struct domain *d,
    8.27      return smfn;
    8.28  
    8.29    fail:
    8.30 -    FSH_LOG("promotion of pfn=%p mfn=%p failed!  external gnttab refs?",
    8.31 +    FSH_LOG("promotion of pfn=%lx mfn=%lx failed!  external gnttab refs?",
    8.32              gpfn, gmfn);
    8.33      free_domheap_page(page);
    8.34      return 0;
    8.35 @@ -325,7 +325,7 @@ free_shadow_hl2_table(struct domain *d, 
    8.36      l1_pgentry_t *hl2 = map_domain_mem(smfn << PAGE_SHIFT);
    8.37      int i, limit;
    8.38  
    8.39 -    SH_VVLOG("%s: smfn=%p freed", __func__, smfn);
    8.40 +    SH_VVLOG("%s: smfn=%lx freed", __func__, smfn);
    8.41  
    8.42  #ifdef __i386__
    8.43      if ( shadow_mode_external(d) )
    8.44 @@ -376,7 +376,7 @@ void free_shadow_page(unsigned long smfn
    8.45      unsigned long gpfn = __mfn_to_gpfn(d, gmfn);
    8.46      unsigned long type = page->u.inuse.type_info & PGT_type_mask;
    8.47  
    8.48 -    SH_VVLOG("%s: free'ing smfn=%p", __func__, smfn);
    8.49 +    SH_VVLOG("%s: free'ing smfn=%lx", __func__, smfn);
    8.50  
    8.51      ASSERT( ! IS_INVALID_M2P_ENTRY(gpfn) );
    8.52  
    8.53 @@ -407,8 +407,8 @@ void free_shadow_page(unsigned long smfn
    8.54          break;
    8.55  
    8.56      default:
    8.57 -        printk("Free shadow weird page type mfn=%08x type=%08x\n",
    8.58 -               page-frame_table, page->u.inuse.type_info);
    8.59 +        printk("Free shadow weird page type mfn=%lx type=%08x\n",
    8.60 +               page_to_pfn(page), page->u.inuse.type_info);
    8.61          break;
    8.62      }
    8.63  
    8.64 @@ -1132,8 +1132,8 @@ void __shadow_mode_disable(struct domain
    8.65      {
    8.66          if ( d->arch.shadow_ht[i].gpfn_and_flags != 0 )
    8.67          {
    8.68 -            printk("%s: d->arch.shadow_ht[%x].gpfn_and_flags=%p\n",
    8.69 -                   i, d->arch.shadow_ht[i].gpfn_and_flags);
    8.70 +            printk("%s: d->arch.shadow_ht[%x].gpfn_and_flags=%lx\n",
    8.71 +                   __FILE__, i, d->arch.shadow_ht[i].gpfn_and_flags);
    8.72              BUG();
    8.73          }
    8.74      }
    8.75 @@ -1154,7 +1154,7 @@ static int shadow_mode_table_op(
    8.76  
    8.77      ASSERT(spin_is_locked(&d->arch.shadow_lock));
    8.78  
    8.79 -    SH_VLOG("shadow mode table op %p %p count %d",
    8.80 +    SH_VLOG("shadow mode table op %lx %lx count %d",
    8.81              pagetable_val(d->exec_domain[0]->arch.guest_table),  /* XXX SMP */
    8.82              pagetable_val(d->exec_domain[0]->arch.shadow_table), /* XXX SMP */
    8.83              d->arch.shadow_page_count);
    8.84 @@ -1342,7 +1342,7 @@ gpfn_to_mfn_foreign(struct domain *d, un
    8.85      unmap_domain_mem(l2);
    8.86      if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) )
    8.87      {
    8.88 -        printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%p) => 0 l2e=%p\n",
    8.89 +        printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => 0 l2e=%lx\n",
    8.90                 d->id, gpfn, l2e_get_value(l2e));
    8.91          return INVALID_MFN;
    8.92      }
    8.93 @@ -1352,13 +1352,13 @@ gpfn_to_mfn_foreign(struct domain *d, un
    8.94      unmap_domain_mem(l1);
    8.95  
    8.96  #if 0
    8.97 -    printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%p) => %p phystab=%p l2e=%p l1tab=%p, l1e=%p\n",
    8.98 +    printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => %lx phystab=%lx l2e=%lx l1tab=%lx, l1e=%lx\n",
    8.99             d->id, gpfn, l1_pgentry_val(l1e) >> PAGE_SHIFT, phystab, l2e, l1tab, l1e);
   8.100  #endif
   8.101  
   8.102      if ( !(l1e_get_flags(l1e) & _PAGE_PRESENT) )
   8.103      {
   8.104 -        printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%p) => 0 l1e=%p\n",
   8.105 +        printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => 0 l1e=%lx\n",
   8.106                 d->id, gpfn, l1e_get_value(l1e));
   8.107          return INVALID_MFN;
   8.108      }
   8.109 @@ -1378,11 +1378,12 @@ shadow_hl2_table(struct domain *d, unsig
   8.110  
   8.111      if ( unlikely(!(hl2mfn = alloc_shadow_page(d, gpfn, gmfn, PGT_hl2_shadow))) )
   8.112      {
   8.113 -        printk("Couldn't alloc an HL2 shadow for pfn=%p mfn=%p\n", gpfn, gmfn);
   8.114 +        printk("Couldn't alloc an HL2 shadow for pfn=%lx mfn=%lx\n",
   8.115 +               gpfn, gmfn);
   8.116          BUG(); /* XXX Deal gracefully with failure. */
   8.117      }
   8.118  
   8.119 -    SH_VVLOG("shadow_hl2_table(gpfn=%p, gmfn=%p, smfn=%p) => %p",
   8.120 +    SH_VVLOG("shadow_hl2_table(gpfn=%lx, gmfn=%lx, smfn=%lx) => %lx",
   8.121               gpfn, gmfn, smfn, hl2mfn);
   8.122      perfc_incrc(shadow_hl2_table_count);
   8.123  
   8.124 @@ -1430,13 +1431,14 @@ static unsigned long shadow_l2_table(
   8.125      unsigned long smfn;
   8.126      l2_pgentry_t *spl2e;
   8.127  
   8.128 -    SH_VVLOG("shadow_l2_table(gpfn=%p, gmfn=%p)", gpfn, gmfn);
   8.129 +    SH_VVLOG("shadow_l2_table(gpfn=%lx, gmfn=%lx)", gpfn, gmfn);
   8.130  
   8.131      perfc_incrc(shadow_l2_table_count);
   8.132  
   8.133      if ( unlikely(!(smfn = alloc_shadow_page(d, gpfn, gmfn, PGT_l2_shadow))) )
   8.134      {
   8.135 -        printk("Couldn't alloc an L2 shadow for pfn=%p mfn=%p\n", gpfn, gmfn);
   8.136 +        printk("Couldn't alloc an L2 shadow for pfn=%lx mfn=%lx\n",
   8.137 +               gpfn, gmfn);
   8.138          BUG(); /* XXX Deal gracefully with failure. */
   8.139      }
   8.140  
   8.141 @@ -1497,7 +1499,7 @@ static unsigned long shadow_l2_table(
   8.142  
   8.143      unmap_domain_mem(spl2e);
   8.144  
   8.145 -    SH_VLOG("shadow_l2_table(%p -> %p)", gmfn, smfn);
   8.146 +    SH_VLOG("shadow_l2_table(%lx -> %lx)", gmfn, smfn);
   8.147      return smfn;
   8.148  }
   8.149  
   8.150 @@ -1530,7 +1532,7 @@ void shadow_map_l1_into_current_l2(unsig
   8.151          if ( unlikely(!(sl1mfn =
   8.152                          alloc_shadow_page(d, gl1pfn, gl1mfn, PGT_l1_shadow))) )
   8.153          {
   8.154 -            printk("Couldn't alloc an L1 shadow for pfn=%p mfn=%p\n",
   8.155 +            printk("Couldn't alloc an L1 shadow for pfn=%lx mfn=%lx\n",
   8.156                     gl1pfn, gl1mfn);
   8.157              BUG(); /* XXX Need to deal gracefully with failure. */
   8.158          }
   8.159 @@ -1541,7 +1543,7 @@ void shadow_map_l1_into_current_l2(unsig
   8.160      else
   8.161      {
   8.162          /* This L1 is shadowed already, but the L2 entry is missing. */
   8.163 -        SH_VVLOG("4b: was shadowed, l2 missing (%p)", sl1mfn);
   8.164 +        SH_VVLOG("4b: was shadowed, l2 missing (%lx)", sl1mfn);
   8.165      }
   8.166  
   8.167  #ifndef NDEBUG
   8.168 @@ -1684,7 +1686,7 @@ shadow_make_snapshot(
   8.169  
   8.170      if ( unlikely(!(smfn = alloc_shadow_page(d, gpfn, gmfn, PGT_snapshot))) )
   8.171      {
   8.172 -        printk("Couldn't alloc fullshadow snapshot for pfn=%p mfn=%p!\n"
   8.173 +        printk("Couldn't alloc fullshadow snapshot for pfn=%lx mfn=%lx!\n"
   8.174                 "Dom%d snapshot_count_count=%d\n",
   8.175                 gpfn, gmfn, d->id, d->arch.snapshot_page_count);
   8.176          BUG(); /* XXX FIXME: try a shadow flush to free up some memory. */
   8.177 @@ -1748,7 +1750,7 @@ shadow_mark_mfn_out_of_sync(struct exec_
   8.178      ASSERT(pfn_valid(mfn));
   8.179      ASSERT((page->u.inuse.type_info & PGT_type_mask) == PGT_writable_page);
   8.180  
   8.181 -    FSH_LOG("%s(gpfn=%p, mfn=%p) c=%p t=%p", __func__,
   8.182 +    FSH_LOG("%s(gpfn=%lx, mfn=%lx) c=%08x t=%08x", __func__,
   8.183              gpfn, mfn, page->count_info, page->u.inuse.type_info);
   8.184  
   8.185      // XXX this will require some more thought...  Cross-domain sharing and
   8.186 @@ -1808,7 +1810,7 @@ void shadow_mark_va_out_of_sync(
   8.187      if ( !get_shadow_ref(l2e_get_pfn(sl2e)) )
   8.188          BUG();
   8.189  
   8.190 -    FSH_LOG("mark_out_of_sync(va=%p -> writable_pl1e=%p)",
   8.191 +    FSH_LOG("mark_out_of_sync(va=%lx -> writable_pl1e=%lx)",
   8.192              va, entry->writable_pl1e);
   8.193  }
   8.194  
   8.195 @@ -1905,7 +1907,7 @@ increase_writable_pte_prediction(struct 
   8.196  
   8.197      prediction = (prediction & PGT_mfn_mask) | score;
   8.198  
   8.199 -    //printk("increase gpfn=%p pred=%p create=%d\n", gpfn, prediction, create);
   8.200 +    //printk("increase gpfn=%lx pred=%lx create=%d\n", gpfn, prediction, create);
   8.201      set_shadow_status(d, GPFN_TO_GPTEPAGE(gpfn), 0, prediction, PGT_writable_pred);
   8.202  
   8.203      if ( create )
   8.204 @@ -1924,7 +1926,7 @@ decrease_writable_pte_prediction(struct 
   8.205  
   8.206      prediction = (prediction & PGT_mfn_mask) | score;
   8.207  
   8.208 -    //printk("decrease gpfn=%p pred=%p score=%p\n", gpfn, prediction, score);
   8.209 +    //printk("decrease gpfn=%lx pred=%lx score=%lx\n", gpfn, prediction, score);
   8.210  
   8.211      if ( score )
   8.212          set_shadow_status(d, GPFN_TO_GPTEPAGE(gpfn), 0, prediction, PGT_writable_pred);
   8.213 @@ -2003,7 +2005,7 @@ static u32 remove_all_write_access_in_pt
   8.214              put_page_from_l1e(old, d);
   8.215  
   8.216  #if 0
   8.217 -        printk("removed write access to pfn=%p mfn=%p in smfn=%p entry %x "
   8.218 +        printk("removed write access to pfn=%lx mfn=%lx in smfn=%lx entry %x "
   8.219                 "is_l1_shadow=%d\n",
   8.220                 readonly_gpfn, readonly_gmfn, pt_mfn, i, is_l1_shadow);
   8.221  #endif
   8.222 @@ -2211,7 +2213,7 @@ static int resync_all(struct domain *d, 
   8.223          if ( !(smfn = __shadow_status(d, entry->gpfn, stype)) )
   8.224              continue;
   8.225  
   8.226 -        FSH_LOG("resyncing t=%p gpfn=%p gmfn=%p smfn=%p snapshot_mfn=%p",
   8.227 +        FSH_LOG("resyncing t=%08x gpfn=%lx gmfn=%lx smfn=%lx snapshot_mfn=%lx",
   8.228                  stype, entry->gpfn, entry->gmfn, smfn, entry->snapshot_mfn);
   8.229  
   8.230          // Compare guest's new contents to its snapshot, validating
   8.231 @@ -2428,7 +2430,8 @@ int shadow_fault(unsigned long va, struc
   8.232  
   8.233      spte = l1e_empty();
   8.234  
   8.235 -    SH_VVLOG("shadow_fault( va=%p, code=%lu )", va, regs->error_code);
   8.236 +    SH_VVLOG("shadow_fault( va=%lx, code=%lu )",
   8.237 +             va, (unsigned long)regs->error_code);
   8.238      perfc_incrc(shadow_fault_calls);
   8.239      
   8.240      check_pagetable(ed, "pre-sf");
   8.241 @@ -2463,7 +2466,8 @@ int shadow_fault(unsigned long va, struc
   8.242      orig_gpte = gpte = linear_pg_table[l1_linear_offset(va)];
   8.243      if ( unlikely(!(l1e_get_flags(gpte) & _PAGE_PRESENT)) )
   8.244      {
   8.245 -        SH_VVLOG("shadow_fault - EXIT: gpte not present (%lx)", gpte);
   8.246 +        SH_VVLOG("shadow_fault - EXIT: gpte not present (%lx)",
   8.247 +                 l1e_get_value(gpte));
   8.248          perfc_incrc(shadow_fault_bail_pte_not_present);
   8.249          goto fail;
   8.250      }
   8.251 @@ -2474,7 +2478,8 @@ int shadow_fault(unsigned long va, struc
   8.252          if ( unlikely(!(l1e_get_flags(gpte) & _PAGE_RW)) )
   8.253          {
   8.254              /* Write fault on a read-only mapping. */
   8.255 -            SH_VVLOG("shadow_fault - EXIT: wr fault on RO page (%lx)", gpte);
   8.256 +            SH_VVLOG("shadow_fault - EXIT: wr fault on RO page (%lx)", 
   8.257 +                     l1e_get_value(gpte));
   8.258              perfc_incrc(shadow_fault_bail_ro_mapping);
   8.259              goto fail;
   8.260          }
   8.261 @@ -2507,8 +2512,8 @@ int shadow_fault(unsigned long va, struc
   8.262                                   &gpte, sizeof(gpte))) )
   8.263      {
   8.264          printk("shadow_fault() failed, crashing domain %d "
   8.265 -               "due to a read-only L2 page table (gpde=%p), va=%p\n",
   8.266 -               d->id, gpde, va);
   8.267 +               "due to a read-only L2 page table (gpde=%lx), va=%lx\n",
   8.268 +               d->id, l2e_get_value(gpde), va);
   8.269          domain_crash_synchronous();
   8.270      }
   8.271  
   8.272 @@ -2595,7 +2600,7 @@ void __update_pagetables(struct exec_dom
   8.273      if ( old_smfn )
   8.274          put_shadow_ref(old_smfn);
   8.275  
   8.276 -    SH_VVLOG("__update_pagetables(gmfn=%p, smfn=%p)", gmfn, smfn);
   8.277 +    SH_VVLOG("__update_pagetables(gmfn=%lx, smfn=%lx)", gmfn, smfn);
   8.278  
   8.279      /*
   8.280       * arch.shadow_vtable
   8.281 @@ -2685,9 +2690,9 @@ int shadow_status_noswap;
   8.282          printk("XXX %s-FAIL (%d,%d,%d)" _f " at %s(%d)\n",                   \
   8.283                 sh_check_name, level, l2_idx, l1_idx, ## _a,                  \
   8.284                 __FILE__, __LINE__);                                          \
   8.285 -        printk("g=%08lx s=%08lx &g=%08lx &s=%08lx"                           \
   8.286 -               " v2m(&g)=%08lx v2m(&s)=%08lx ea=%08lx\n",                    \
   8.287 -               gpte, spte, pgpte, pspte,                                     \
   8.288 +        printk("g=%lx s=%lx &g=%p &s=%p"                                     \
   8.289 +               " v2m(&g)=%08lx v2m(&s)=%08lx ea=%08x\n",                     \
   8.290 +               l1e_get_value(gpte), l1e_get_value(spte), pgpte, pspte,       \
   8.291                 v2m(ed, pgpte), v2m(ed, pspte),                               \
   8.292                 (l2_idx << L2_PAGETABLE_SHIFT) |                              \
   8.293                 (l1_idx << L1_PAGETABLE_SHIFT));                              \
   8.294 @@ -2741,7 +2746,7 @@ static int check_pte(
   8.295      gmfn = __gpfn_to_mfn(d, gpfn);
   8.296  
   8.297      if ( !VALID_MFN(gmfn) )
   8.298 -        FAIL("invalid gpfn=%p gpte=%p\n", __func__, gpfn,
   8.299 +        FAIL("%s: invalid gpfn=%lx gpte=%lx\n", __func__, gpfn,
   8.300               l1e_get_value(gpte));
   8.301  
   8.302      page_table_page = mfn_is_page_table(gmfn);
   8.303 @@ -2749,7 +2754,7 @@ static int check_pte(
   8.304      if ( (l1e_get_flags(spte) & _PAGE_RW ) &&
   8.305           !(l1e_get_flags(gpte) & _PAGE_RW) && !oos_ptes )
   8.306      {
   8.307 -        printk("gpfn=%p gmfn=%p smfn=%p t=0x%08x page_table_page=%d "
   8.308 +        printk("gpfn=%lx gmfn=%lx smfn=%lx t=0x%08x page_table_page=%d "
   8.309                 "oos_ptes=%d\n",
   8.310                 gpfn, gmfn, smfn,
   8.311                 frame_table[gmfn].u.inuse.type_info,
   8.312 @@ -2763,7 +2768,7 @@ static int check_pte(
   8.313             (l1e_get_flags(gpte) & _PAGE_DIRTY)) &&
   8.314           !oos_ptes )
   8.315      {
   8.316 -        printk("gpfn=%p gmfn=%p smfn=%p t=0x%08x page_table_page=%d "
   8.317 +        printk("gpfn=%lx gmfn=%lx smfn=%lx t=0x%08x page_table_page=%d "
   8.318                 "oos_ptes=%d\n",
   8.319                 gpfn, gmfn, smfn,
   8.320                 frame_table[gmfn].u.inuse.type_info,
   8.321 @@ -2784,7 +2789,7 @@ static int check_pte(
   8.322          if ( level == 2 )
   8.323          {
   8.324              if ( __shadow_status(d, gpfn, PGT_l1_shadow) != smfn )
   8.325 -                FAIL("smfn problem gpfn=%p smfn=%p", gpfn,
   8.326 +                FAIL("smfn problem gpfn=%lx smfn=%lx", gpfn,
   8.327                       __shadow_status(d, gpfn, PGT_l1_shadow));
   8.328          }
   8.329          else
   8.330 @@ -2846,7 +2851,7 @@ int check_l2_table(
   8.331      if ( oos_pdes && (page_get_owner(pfn_to_page(gmfn)) != NULL) )
   8.332          FAILPT("bogus owner for snapshot page");
   8.333      if ( page_get_owner(pfn_to_page(smfn)) != NULL )
   8.334 -        FAILPT("shadow page mfn=0x%08x is owned by someone, domid=%d",
   8.335 +        FAILPT("shadow page mfn=0x%lx is owned by someone, domid=%d",
   8.336                 smfn, page_get_owner(pfn_to_page(smfn))->id);
   8.337  
   8.338  #if 0
   8.339 @@ -2858,7 +2863,7 @@ int check_l2_table(
   8.340          for ( i = DOMAIN_ENTRIES_PER_L2_PAGETABLE; 
   8.341                i < (SH_LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT);
   8.342                i++ )
   8.343 -            printk("+++ (%d) %p %p\n",i,
   8.344 +            printk("+++ (%d) %lx %lx\n",i,
   8.345                     l2_pgentry_val(gpl2e[i]), l2_pgentry_val(spl2e[i]));
   8.346          FAILPT("hypervisor entries inconsistent");
   8.347      }
   8.348 @@ -2873,7 +2878,7 @@ int check_l2_table(
   8.349           l2e_has_changed(&spl2e[SH_LINEAR_PT_VIRT_START >> L2_PAGETABLE_SHIFT],
   8.350                           &match, PAGE_FLAG_MASK))
   8.351      {
   8.352 -        FAILPT("hypervisor shadow linear map inconsistent %p %p",
   8.353 +        FAILPT("hypervisor shadow linear map inconsistent %lx %lx",
   8.354                 l2e_get_value(spl2e[SH_LINEAR_PT_VIRT_START >>
   8.355                                     L2_PAGETABLE_SHIFT]),
   8.356                 l2e_get_value(match));
   8.357 @@ -2884,7 +2889,7 @@ int check_l2_table(
   8.358           l2e_has_changed(&spl2e[PERDOMAIN_VIRT_START >> L2_PAGETABLE_SHIFT],
   8.359                           &match, PAGE_FLAG_MASK))
   8.360      {
   8.361 -        FAILPT("hypervisor per-domain map inconsistent saw %p, expected (va=%p) %p",
   8.362 +        FAILPT("hypervisor per-domain map inconsistent saw %lx, expected (va=%p) %lx",
   8.363                 l2e_get_value(spl2e[PERDOMAIN_VIRT_START >> L2_PAGETABLE_SHIFT]),
   8.364                 d->arch.mm_perdomain_pt,
   8.365                 l2e_get_value(match));
   8.366 @@ -2942,7 +2947,7 @@ int _check_pagetable(struct exec_domain 
   8.367  
   8.368      if ( !(smfn = __shadow_status(d, ptbase_pfn, PGT_base_page_table)) )
   8.369      {
   8.370 -        printk("%s-PT %p not shadowed\n", s, gptbase);
   8.371 +        printk("%s-PT %lx not shadowed\n", s, gptbase);
   8.372          goto out;
   8.373      }
   8.374      if ( page_out_of_sync(pfn_to_page(ptbase_mfn)) )
   8.375 @@ -3038,8 +3043,8 @@ int _check_all_pagetables(struct exec_do
   8.376                  break;
   8.377              default:
   8.378                  errors++;
   8.379 -                printk("unexpected shadow type %p, gpfn=%p, "
   8.380 -                       "gmfn=%p smfn=%p\n",
   8.381 +                printk("unexpected shadow type %lx, gpfn=%lx, "
   8.382 +                       "gmfn=%lx smfn=%lx\n",
   8.383                         a->gpfn_and_flags & PGT_type_mask,
   8.384                         a->gpfn_and_flags & PGT_mfn_mask,
   8.385                         gmfn, a->smfn);
     9.1 --- a/xen/arch/x86/time.c	Mon Apr 25 09:04:02 2005 +0000
     9.2 +++ b/xen/arch/x86/time.c	Mon Apr 25 10:58:04 2005 +0000
     9.3 @@ -360,7 +360,6 @@ int __init init_xen_time()
     9.4      wc_sec  = get_cmos_time();
     9.5  
     9.6      printk("Time init:\n");
     9.7 -    printk(".... System Time: %lldns\n", NOW());
     9.8      printk(".... cpu_freq:    %08X:%08X\n", (u32)(cpu_freq>>32),(u32)cpu_freq);
     9.9      printk(".... scale:       %08X:%08X\n", (u32)(scale>>32),(u32)scale);
    9.10      printk(".... Wall Clock:  %lds %ldus\n", wc_sec, wc_usec);
    10.1 --- a/xen/arch/x86/traps.c	Mon Apr 25 09:04:02 2005 +0000
    10.2 +++ b/xen/arch/x86/traps.c	Mon Apr 25 10:58:04 2005 +0000
    10.3 @@ -115,7 +115,7 @@ asmlinkage void fatal_trap(int trapnr, s
    10.4      if ( trapnr == TRAP_page_fault )
    10.5      {
    10.6          __asm__ __volatile__ ("mov %%cr2,%0" : "=r" (cr2) : );
    10.7 -        printk("Faulting linear address might be %p\n", cr2);
    10.8 +        printk("Faulting linear address might be %p\n", _p(cr2));
    10.9      }
   10.10  
   10.11      printk("************************************\n");
   10.12 @@ -171,7 +171,7 @@ static inline int do_trap(int trapnr, ch
   10.13  
   10.14      if ( likely((fixup = search_exception_table(regs->eip)) != 0) )
   10.15      {
   10.16 -        DPRINTK("Trap %d: %p -> %p\n", trapnr, regs->eip, fixup);
   10.17 +        DPRINTK("Trap %d: %p -> %p\n", trapnr, _p(regs->eip), _p(fixup));
   10.18          regs->eip = fixup;
   10.19          return 0;
   10.20      }
   10.21 @@ -336,7 +336,7 @@ asmlinkage int do_page_fault(struct xen_
   10.22      {
   10.23          perfc_incrc(copy_user_faults);
   10.24          if ( !shadow_mode_enabled(d) )
   10.25 -            DPRINTK("Page fault: %p -> %p\n", regs->eip, fixup);
   10.26 +            DPRINTK("Page fault: %p -> %p\n", _p(regs->eip), _p(fixup));
   10.27          regs->eip = fixup;
   10.28          return 0;
   10.29      }
   10.30 @@ -709,7 +709,7 @@ static int emulate_privileged_op(struct 
   10.31          /* Ignore the instruction if unprivileged. */
   10.32          if ( !IS_PRIV(ed->domain) )
   10.33              DPRINTK("Non-priv domain attempted WRMSR(%p,%08lx,%08lx).\n",
   10.34 -                    regs->ecx, (long)regs->eax, (long)regs->edx);
   10.35 +                    _p(regs->ecx), (long)regs->eax, (long)regs->edx);
   10.36          else if ( wrmsr_user(regs->ecx, regs->eax, regs->edx) )
   10.37              goto fail;
   10.38          break;
   10.39 @@ -717,7 +717,7 @@ static int emulate_privileged_op(struct 
   10.40      case 0x32: /* RDMSR */
   10.41          if ( !IS_PRIV(ed->domain) )
   10.42              DPRINTK("Non-priv domain attempted RDMSR(%p,%08lx,%08lx).\n",
   10.43 -                    regs->ecx, (long)regs->eax, (long)regs->edx);
   10.44 +                    _p(regs->ecx), (long)regs->eax, (long)regs->edx);
   10.45          /* Everyone can read the MSR space. */
   10.46          if ( rdmsr_user(regs->ecx, regs->eax, regs->edx) )
   10.47              goto fail;
   10.48 @@ -824,7 +824,7 @@ asmlinkage int do_general_protection(str
   10.49      if ( likely((fixup = search_exception_table(regs->eip)) != 0) )
   10.50      {
   10.51          DPRINTK("GPF (%04x): %p -> %p\n",
   10.52 -                regs->error_code, regs->eip, fixup);
   10.53 +                regs->error_code, _p(regs->eip), _p(fixup));
   10.54          regs->eip = fixup;
   10.55          return 0;
   10.56      }
    11.1 --- a/xen/arch/x86/vmx.c	Mon Apr 25 09:04:02 2005 +0000
    11.2 +++ b/xen/arch/x86/vmx.c	Mon Apr 25 10:58:04 2005 +0000
    11.3 @@ -118,7 +118,7 @@ static int vmx_do_page_fault(unsigned lo
    11.4          __vmread(GUEST_EIP, &eip);
    11.5          VMX_DBG_LOG(DBG_LEVEL_VMMU, 
    11.6                  "vmx_do_page_fault = 0x%lx, eip = %lx, error_code = %lx",
    11.7 -                va, eip, regs->error_code);
    11.8 +                va, eip, (unsigned long)regs->error_code);
    11.9      }
   11.10  #endif
   11.11  
   11.12 @@ -163,12 +163,14 @@ static void vmx_do_general_protection_fa
   11.13      __vmread(VM_EXIT_INTR_ERROR_CODE, &error_code);
   11.14  
   11.15      VMX_DBG_LOG(DBG_LEVEL_1,
   11.16 -            "vmx_general_protection_fault: eip = %lx, erro_code = %lx",
   11.17 -            eip, error_code);
   11.18 +                "vmx_general_protection_fault: eip = %lx, erro_code = %lx",
   11.19 +                eip, error_code);
   11.20  
   11.21      VMX_DBG_LOG(DBG_LEVEL_1,
   11.22 -            "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
   11.23 -            regs->eax, regs->ebx, regs->ecx, regs->edx, regs->esi, regs->edi);
   11.24 +                "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
   11.25 +                (unsigned long)regs->eax, (unsigned long)regs->ebx,
   11.26 +                (unsigned long)regs->ecx, (unsigned long)regs->edx,
   11.27 +                (unsigned long)regs->esi, (unsigned long)regs->edi);
   11.28  
   11.29      /* Reflect it back into the guest */
   11.30      intr_fields = (INTR_INFO_VALID_MASK | 
   11.31 @@ -189,8 +191,9 @@ static void vmx_vmexit_do_cpuid(unsigned
   11.32      VMX_DBG_LOG(DBG_LEVEL_1, 
   11.33                  "do_cpuid: (eax) %lx, (ebx) %lx, (ecx) %lx, (edx) %lx,"
   11.34                  " (esi) %lx, (edi) %lx",
   11.35 -                regs->eax, regs->ebx, regs->ecx, regs->edx,
   11.36 -                regs->esi, regs->edi);
   11.37 +                (unsigned long)regs->eax, (unsigned long)regs->ebx,
   11.38 +                (unsigned long)regs->ecx, (unsigned long)regs->edx,
   11.39 +                (unsigned long)regs->esi, (unsigned long)regs->edi);
   11.40  
   11.41      cpuid(input, &eax, &ebx, &ecx, &edx);
   11.42  
   11.43 @@ -275,7 +278,7 @@ static void vmx_vmexit_do_invlpg(unsigne
   11.44  
   11.45      __vmread(GUEST_EIP, &eip);
   11.46  
   11.47 -    VMX_DBG_LOG(DBG_LEVEL_VMMU, "vmx_vmexit_do_invlpg: eip=%p, va=%p",
   11.48 +    VMX_DBG_LOG(DBG_LEVEL_VMMU, "vmx_vmexit_do_invlpg: eip=%lx, va=%lx",
   11.49                  eip, va);
   11.50  
   11.51      /*
   11.52 @@ -301,8 +304,9 @@ static void vmx_io_instruction(struct xe
   11.53      vm86 = eflags & X86_EFLAGS_VM ? 1 : 0;
   11.54  
   11.55      VMX_DBG_LOG(DBG_LEVEL_1, 
   11.56 -            "vmx_io_instruction: vm86 %d, eip=%p:%p, exit_qualification = %lx",
   11.57 -            vm86, cs, eip, exit_qualification);
   11.58 +                "vmx_io_instruction: vm86 %d, eip=%lx:%lx, "
   11.59 +                "exit_qualification = %lx",
   11.60 +                vm86, cs, eip, exit_qualification);
   11.61  
   11.62      if (test_bit(6, &exit_qualification))
   11.63          addr = (exit_qualification >> 16) & (0xffff);
   11.64 @@ -915,13 +919,15 @@ static int vmx_cr_access(unsigned long e
   11.65  static inline void vmx_do_msr_read(struct xen_regs *regs)
   11.66  {
   11.67      VMX_DBG_LOG(DBG_LEVEL_1, "vmx_do_msr_read: ecx=%lx, eax=%lx, edx=%lx",
   11.68 -            regs->ecx, regs->eax, regs->edx);
   11.69 +                (unsigned long)regs->ecx, (unsigned long)regs->eax, 
   11.70 +                (unsigned long)regs->edx);
   11.71  
   11.72      rdmsr(regs->ecx, regs->eax, regs->edx);
   11.73  
   11.74      VMX_DBG_LOG(DBG_LEVEL_1, "vmx_do_msr_read returns: "
   11.75                  "ecx=%lx, eax=%lx, edx=%lx",
   11.76 -                regs->ecx, regs->eax, regs->edx);
   11.77 +                (unsigned long)regs->ecx, (unsigned long)regs->eax,
   11.78 +                (unsigned long)regs->edx);
   11.79  }
   11.80  
   11.81  /*
   11.82 @@ -933,7 +939,7 @@ static inline void vmx_vmexit_do_hlt(voi
   11.83      unsigned long eip;
   11.84      __vmread(GUEST_EIP, &eip);
   11.85  #endif
   11.86 -    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_hlt:eip=%p", eip);
   11.87 +    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_hlt:eip=%lx", eip);
   11.88      raise_softirq(SCHEDULE_SOFTIRQ);
   11.89  }
   11.90  
   11.91 @@ -943,7 +949,7 @@ static inline void vmx_vmexit_do_mwait(v
   11.92      unsigned long eip;
   11.93      __vmread(GUEST_EIP, &eip);
   11.94  #endif
   11.95 -    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_mwait:eip=%p", eip);
   11.96 +    VMX_DBG_LOG(DBG_LEVEL_1, "vmx_vmexit_do_mwait:eip=%lx", eip);
   11.97      raise_softirq(SCHEDULE_SOFTIRQ);
   11.98  }
   11.99  
  11.100 @@ -1097,9 +1103,10 @@ asmlinkage void vmx_vmexit_handler(struc
  11.101              __vmread(EXIT_QUALIFICATION, &va);
  11.102              __vmread(VM_EXIT_INTR_ERROR_CODE, &regs.error_code);
  11.103              VMX_DBG_LOG(DBG_LEVEL_VMMU, 
  11.104 -                    "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
  11.105 -                        regs.eax, regs.ebx, regs.ecx, regs.edx, regs.esi,
  11.106 -                        regs.edi);
  11.107 +                        "eax=%lx, ebx=%lx, ecx=%lx, edx=%lx, esi=%lx, edi=%lx",
  11.108 +                        (unsigned long)regs.eax, (unsigned long)regs.ebx,
  11.109 +                        (unsigned long)regs.ecx, (unsigned long)regs.edx,
  11.110 +                        (unsigned long)regs.esi, (unsigned long)regs.edi);
  11.111              ed->arch.arch_vmx.vmx_platform.mpci.inst_decoder_regs = &regs;
  11.112  
  11.113              if (!(error = vmx_do_page_fault(va, &regs))) {
  11.114 @@ -1219,8 +1226,8 @@ asmlinkage void vmx_vmexit_handler(struc
  11.115          break;
  11.116      case EXIT_REASON_MSR_WRITE:
  11.117          __vmread(GUEST_EIP, &eip);
  11.118 -        VMX_DBG_LOG(DBG_LEVEL_1, "MSR_WRITE: eip=%p, eax=%p, edx=%p",
  11.119 -                eip, regs.eax, regs.edx);
  11.120 +        VMX_DBG_LOG(DBG_LEVEL_1, "MSR_WRITE: eip=%lx, eax=%lx, edx=%lx",
  11.121 +                eip, (unsigned long)regs.eax, (unsigned long)regs.edx);
  11.122          /* just ignore this point */
  11.123          __get_instruction_length(inst_len);
  11.124          __update_guest_eip(inst_len);
    12.1 --- a/xen/arch/x86/vmx_intercept.c	Mon Apr 25 09:04:02 2005 +0000
    12.2 +++ b/xen/arch/x86/vmx_intercept.c	Mon Apr 25 10:58:04 2005 +0000
    12.3 @@ -222,7 +222,7 @@ void vmx_hooks_assist(struct exec_domain
    12.4          /* frequency(ms) of pit */
    12.5          vpit->period = DIV_ROUND(((vpit->init_val) * 1000), PIT_FREQ); 
    12.6          if (vpit->period < 1) {
    12.7 -            printk("VMX_PIT: guest programmed too small an init_val: %lx\n",
    12.8 +            printk("VMX_PIT: guest programmed too small an init_val: %x\n",
    12.9                     vpit->init_val);
   12.10              vpit->period = 1;
   12.11          }
    13.1 --- a/xen/arch/x86/x86_32/traps.c	Mon Apr 25 09:04:02 2005 +0000
    13.2 +++ b/xen/arch/x86/x86_32/traps.c	Mon Apr 25 10:58:04 2005 +0000
    13.3 @@ -31,7 +31,7 @@ void show_guest_stack(void)
    13.4      int i;
    13.5      execution_context_t *ec = get_execution_context();
    13.6      unsigned long *stack = (unsigned long *)ec->esp;
    13.7 -    printk("Guest EIP is %lx\n   ",ec->eip);
    13.8 +    printk("Guest EIP is %08x\n   ", ec->eip);
    13.9  
   13.10      for ( i = 0; i < kstack_depth_to_print; i++ )
   13.11      {
   13.12 @@ -39,7 +39,7 @@ void show_guest_stack(void)
   13.13              break;
   13.14          if ( i && ((i % 8) == 0) )
   13.15              printk("\n   ");
   13.16 -            printk("%p ", *stack++);            
   13.17 +        printk("%08lx ", *stack++);
   13.18      }
   13.19      printk("\n");
   13.20      
   13.21 @@ -58,7 +58,7 @@ void show_trace(unsigned long *esp)
   13.22          if (kernel_text_address(addr)) {
   13.23              if (i && ((i % 6) == 0))
   13.24                  printk("\n   ");
   13.25 -            printk("[<%p>] ", addr);
   13.26 +            printk("[<%08lx>] ", addr);
   13.27              i++;
   13.28          }
   13.29      }
   13.30 @@ -80,9 +80,9 @@ void show_stack(unsigned long *esp)
   13.31          if ( i && ((i % 8) == 0) )
   13.32              printk("\n   ");
   13.33          if ( kernel_text_address(*stack) )
   13.34 -            printk("[%p] ", *stack++);
   13.35 +            printk("[%08lx] ", *stack++);
   13.36          else
   13.37 -            printk("%p ", *stack++);            
   13.38 +            printk("%08lx ", *stack++);
   13.39      }
   13.40      printk("\n");
   13.41  
   13.42 @@ -140,13 +140,16 @@ void show_registers(struct xen_regs *reg
   13.43          }
   13.44      }
   13.45  
   13.46 -    printk("CPU:    %d\nEIP:    %04lx:[<%p>]      \nEFLAGS: %p   CONTEXT: %s\n",
   13.47 -           smp_processor_id(), 0xffff & regs->cs, eip, eflags, context);
   13.48 -    printk("eax: %p   ebx: %p   ecx: %p   edx: %p\n",
   13.49 +    printk("CPU:    %d\nEIP:    %04lx:[<%08lx>]      \nEFLAGS: %08lx   "
   13.50 +           "CONTEXT: %s\n",
   13.51 +           smp_processor_id(), (unsigned long)0xffff & regs->cs,
   13.52 +           eip, eflags, context);
   13.53 +    printk("eax: %08x   ebx: %08x   ecx: %08x   edx: %08x\n",
   13.54             regs->eax, regs->ebx, regs->ecx, regs->edx);
   13.55 -    printk("esi: %p   edi: %p   ebp: %p   esp: %p\n",
   13.56 +    printk("esi: %08x   edi: %08x   ebp: %08x   esp: %08lx\n",
   13.57             regs->esi, regs->edi, regs->ebp, esp);
   13.58 -    printk("ds: %04x   es: %04x   fs: %04x   gs: %04x   ss: %04x   cs: %04x\n",
   13.59 +    printk("ds: %04lx   es: %04lx   fs: %04lx   gs: %04lx   "
   13.60 +           "ss: %04lx   cs: %04lx\n",
   13.61             ds, es, fs, gs, ss, cs);
   13.62  
   13.63      show_stack((unsigned long *)&regs->esp);
   13.64 @@ -161,16 +164,16 @@ void show_page_walk(unsigned long addr)
   13.65      if ( addr < PAGE_OFFSET )
   13.66          return;
   13.67  
   13.68 -    printk("Pagetable walk from %p:\n", addr);
   13.69 +    printk("Pagetable walk from %08lx:\n", addr);
   13.70      
   13.71      page = l2e_get_value(idle_pg_table[l2_table_offset(addr)]);
   13.72 -    printk(" L2 = %p %s\n", page, (page & _PAGE_PSE) ? "(4MB)" : "");
   13.73 +    printk(" L2 = %08lx %s\n", page, (page & _PAGE_PSE) ? "(4MB)" : "");
   13.74      if ( !(page & _PAGE_PRESENT) || (page & _PAGE_PSE) )
   13.75          return;
   13.76  
   13.77      page &= PAGE_MASK;
   13.78      page = ((unsigned long *) __va(page))[l1_table_offset(addr)];
   13.79 -    printk("  L1 = %p\n", page);
   13.80 +    printk("  L1 = %08lx\n", page);
   13.81  }
   13.82  
   13.83  #define DOUBLEFAULT_STACK_SIZE 1024
    14.1 --- a/xen/arch/x86/x86_64/mm.c	Mon Apr 25 09:04:02 2005 +0000
    14.2 +++ b/xen/arch/x86/x86_64/mm.c	Mon Apr 25 10:58:04 2005 +0000
    14.3 @@ -204,7 +204,7 @@ void subarch_init_memory(struct domain *
    14.4      if ( (offsetof(struct pfn_info, u.inuse._domain) != 
    14.5            (offsetof(struct pfn_info, count_info) + sizeof(u32))) )
    14.6      {
    14.7 -        printk("Weird pfn_info layout (%ld,%ld,%d)\n",
    14.8 +        printk("Weird pfn_info layout (%ld,%ld,%ld)\n",
    14.9                 offsetof(struct pfn_info, count_info),
   14.10                 offsetof(struct pfn_info, u.inuse._domain),
   14.11                 sizeof(struct pfn_info));
    15.1 --- a/xen/arch/x86/x86_64/traps.c	Mon Apr 25 09:04:02 2005 +0000
    15.2 +++ b/xen/arch/x86/x86_64/traps.c	Mon Apr 25 10:58:04 2005 +0000
    15.3 @@ -26,7 +26,7 @@ void show_guest_stack(void)
    15.4      int i;
    15.5      execution_context_t *ec = get_execution_context();
    15.6      unsigned long *stack = (unsigned long *)ec->rsp;
    15.7 -    printk("Guest RIP is %lx\n   ", ec->rip);
    15.8 +    printk("Guest RIP is %016lx\n   ", ec->rip);
    15.9  
   15.10      for ( i = 0; i < kstack_depth_to_print; i++ )
   15.11      {
   15.12 @@ -34,7 +34,7 @@ void show_guest_stack(void)
   15.13              break;
   15.14          if ( i && ((i % 8) == 0) )
   15.15              printk("\n    ");
   15.16 -            printk("%p ", *stack++);
   15.17 +            printk("%016lx ", *stack++);
   15.18      }
   15.19      printk("\n");
   15.20      
   15.21 @@ -53,7 +53,7 @@ void show_trace(unsigned long *rsp)
   15.22          if (kernel_text_address(addr)) {
   15.23              if (i && ((i % 6) == 0))
   15.24                  printk("\n   ");
   15.25 -            printk("[<%p>] ", addr);
   15.26 +            printk("[<%016lx>] ", addr);
   15.27              i++;
   15.28          }
   15.29      }
   15.30 @@ -75,9 +75,9 @@ void show_stack(unsigned long *rsp)
   15.31          if ( i && ((i % 8) == 0) )
   15.32              printk("\n    ");
   15.33          if ( kernel_text_address(*stack) )
   15.34 -            printk("[%p] ", *stack++);
   15.35 +            printk("[%016lx] ", *stack++);
   15.36          else
   15.37 -            printk("%p ", *stack++);            
   15.38 +            printk("%016lx ", *stack++);            
   15.39      }
   15.40      printk("\n");
   15.41  
   15.42 @@ -86,15 +86,15 @@ void show_stack(unsigned long *rsp)
   15.43  
   15.44  void show_registers(struct xen_regs *regs)
   15.45  {
   15.46 -    printk("CPU:    %d\nEIP:    %04lx:[<%p>]      \nEFLAGS: %p\n",
   15.47 +    printk("CPU:    %d\nEIP:    %04lx:[<%016lx>]      \nEFLAGS: %016lx\n",
   15.48             smp_processor_id(), 0xffff & regs->cs, regs->rip, regs->eflags);
   15.49 -    printk("rax: %p   rbx: %p   rcx: %p   rdx: %p\n",
   15.50 +    printk("rax: %016lx   rbx: %016lx   rcx: %016lx   rdx: %016lx\n",
   15.51             regs->rax, regs->rbx, regs->rcx, regs->rdx);
   15.52 -    printk("rsi: %p   rdi: %p   rbp: %p   rsp: %p\n",
   15.53 +    printk("rsi: %016lx   rdi: %016lx   rbp: %016lx   rsp: %016lx\n",
   15.54             regs->rsi, regs->rdi, regs->rbp, regs->rsp);
   15.55 -    printk("r8:  %p   r9:  %p   r10: %p   r11: %p\n",
   15.56 +    printk("r8:  %016lx   r9:  %016lx   r10: %016lx   r11: %016lx\n",
   15.57             regs->r8,  regs->r9,  regs->r10, regs->r11);
   15.58 -    printk("r12: %p   r13: %p   r14: %p   r15: %p\n",
   15.59 +    printk("r12: %016lx   r13: %016lx   r14: %016lx   r15: %016lx\n",
   15.60             regs->r12, regs->r13, regs->r14, regs->r15);
   15.61  
   15.62      show_stack((unsigned long *)regs->rsp);
   15.63 @@ -104,29 +104,29 @@ void show_page_walk(unsigned long addr)
   15.64  {
   15.65      unsigned long page = read_cr3();
   15.66      
   15.67 -    printk("Pagetable walk from %p:\n", addr);
   15.68 +    printk("Pagetable walk from %016lx:\n", addr);
   15.69  
   15.70      page &= PAGE_MASK;
   15.71      page = ((unsigned long *) __va(page))[l4_table_offset(addr)];
   15.72 -    printk(" L4 = %p\n", page);
   15.73 +    printk(" L4 = %016lx\n", page);
   15.74      if ( !(page & _PAGE_PRESENT) )
   15.75          return;
   15.76  
   15.77      page &= PAGE_MASK;
   15.78      page = ((unsigned long *) __va(page))[l3_table_offset(addr)];
   15.79 -    printk("  L3 = %p\n", page);
   15.80 +    printk("  L3 = %016lx\n", page);
   15.81      if ( !(page & _PAGE_PRESENT) )
   15.82          return;
   15.83  
   15.84      page &= PAGE_MASK;
   15.85      page = ((unsigned long *) __va(page))[l2_table_offset(addr)];
   15.86 -    printk("   L2 = %p %s\n", page, (page & _PAGE_PSE) ? "(2MB)" : "");
   15.87 +    printk("   L2 = %016lx %s\n", page, (page & _PAGE_PSE) ? "(2MB)" : "");
   15.88      if ( !(page & _PAGE_PRESENT) || (page & _PAGE_PSE) )
   15.89          return;
   15.90  
   15.91      page &= PAGE_MASK;
   15.92      page = ((unsigned long *) __va(page))[l1_table_offset(addr)];
   15.93 -    printk("    L1 = %p\n", page);
   15.94 +    printk("    L1 = %016lx\n", page);
   15.95  }
   15.96  
   15.97  asmlinkage void double_fault(void);
    16.1 --- a/xen/common/dom_mem_ops.c	Mon Apr 25 09:04:02 2005 +0000
    16.2 +++ b/xen/common/dom_mem_ops.c	Mon Apr 25 10:58:04 2005 +0000
    16.3 @@ -94,7 +94,7 @@ free_dom_mem(struct domain *d,
    16.4          {
    16.5              if ( unlikely((mpfn + j) >= max_page) )
    16.6              {
    16.7 -                DPRINTK("Domain %u page number out of range (%p>=%p)\n", 
    16.8 +                DPRINTK("Domain %u page number out of range (%lx >= %lx)\n", 
    16.9                          d->id, mpfn + j, max_page);
   16.10                  return i;
   16.11              }
    17.1 --- a/xen/common/grant_table.c	Mon Apr 25 09:04:02 2005 +0000
    17.2 +++ b/xen/common/grant_table.c	Mon Apr 25 10:58:04 2005 +0000
    17.3 @@ -341,7 +341,7 @@ static int
    17.4      if ( ((host_virt_addr != 0) || (dev_hst_ro_flags & GNTMAP_host_map)) &&
    17.5           unlikely(!__addr_ok(host_virt_addr)))
    17.6      {
    17.7 -        DPRINTK("Bad virtual address (%x) or flags (%x).\n",
    17.8 +        DPRINTK("Bad virtual address (%lx) or flags (%x).\n",
    17.9                  host_virt_addr, dev_hst_ro_flags);
   17.10          (void)__put_user(GNTST_bad_virt_addr, &uop->handle);
   17.11          return GNTST_bad_gntref;
   17.12 @@ -552,7 +552,7 @@ static int
   17.13  
   17.14          if ( unlikely(__get_user(_ol1e, (unsigned long *)pl1e) != 0) )
   17.15          {
   17.16 -            DPRINTK("Could not find PTE entry for address %x\n", virt);
   17.17 +            DPRINTK("Could not find PTE entry for address %lx\n", virt);
   17.18              rc = -EINVAL;
   17.19              goto unmap_out;
   17.20          }
   17.21 @@ -563,7 +563,7 @@ static int
   17.22           */
   17.23          if ( unlikely((_ol1e >> PAGE_SHIFT) != frame ))
   17.24          {
   17.25 -            DPRINTK("PTE entry %x for address %x doesn't match frame %x\n",
   17.26 +            DPRINTK("PTE entry %lx for address %lx doesn't match frame %lx\n",
   17.27                      _ol1e, virt, frame);
   17.28              rc = -EINVAL;
   17.29              goto unmap_out;
   17.30 @@ -572,7 +572,7 @@ static int
   17.31          /* Delete pagetable entry. */
   17.32          if ( unlikely(__put_user(0, (unsigned long *)pl1e)))
   17.33          {
   17.34 -            DPRINTK("Cannot delete PTE entry at %x for virtual address %x\n",
   17.35 +            DPRINTK("Cannot delete PTE entry at %p for virtual address %lx\n",
   17.36                      pl1e, virt);
   17.37              rc = -EINVAL;
   17.38              goto unmap_out;
   17.39 @@ -912,7 +912,7 @@ gnttab_check_unmap(
   17.40              }
   17.41  
   17.42              /* gotcha */
   17.43 -            DPRINTK("Grant unref rd(%d) ld(%d) frm(%x) flgs(%x).\n",
   17.44 +            DPRINTK("Grant unref rd(%d) ld(%d) frm(%lx) flgs(%x).\n",
   17.45                      rd->id, ld->id, frame, readonly);
   17.46  
   17.47              if ( readonly )
   17.48 @@ -985,7 +985,7 @@ gnttab_prepare_for_transfer(
   17.49  
   17.50          if ( unlikely(target_pfn >= max_page ) )
   17.51          {
   17.52 -            DPRINTK("Bad pfn (%x)\n", target_pfn);
   17.53 +            DPRINTK("Bad pfn (%lx)\n", target_pfn);
   17.54              goto fail;
   17.55          }
   17.56  
   17.57 @@ -1050,7 +1050,7 @@ gnttab_notify_transfer(
   17.58      pfn = sha->frame;
   17.59  
   17.60      if ( unlikely(pfn >= max_page ) )
   17.61 -        DPRINTK("Bad pfn (%x)\n", pfn);
   17.62 +        DPRINTK("Bad pfn (%lx)\n", pfn);
   17.63      else
   17.64      {
   17.65          machine_to_phys_mapping[frame] = pfn;
    18.1 --- a/xen/common/multicall.c	Mon Apr 25 09:04:02 2005 +0000
    18.2 +++ b/xen/common/multicall.c	Mon Apr 25 10:58:04 2005 +0000
    18.3 @@ -27,7 +27,7 @@ long do_multicall(multicall_entry_t *cal
    18.4      if ( unlikely(!array_access_ok(call_list, nr_calls, sizeof(*call_list))) )
    18.5      {
    18.6          DPRINTK("Bad memory range %p for %u*%u bytes.\n",
    18.7 -                call_list, nr_calls, sizeof(*call_list));
    18.8 +                call_list, nr_calls, (unsigned int)sizeof(*call_list));
    18.9          goto fault;
   18.10      }
   18.11  
   18.12 @@ -37,7 +37,7 @@ long do_multicall(multicall_entry_t *cal
   18.13                                         sizeof(*call_list))) )
   18.14          {
   18.15              DPRINTK("Error copying from user range %p for %u bytes.\n",
   18.16 -                    &call_list[i], sizeof(*call_list));
   18.17 +                    &call_list[i], (unsigned int)sizeof(*call_list));
   18.18              goto fault;
   18.19          }
   18.20  
    19.1 --- a/xen/common/page_alloc.c	Mon Apr 25 09:04:02 2005 +0000
    19.2 +++ b/xen/common/page_alloc.c	Mon Apr 25 10:58:04 2005 +0000
    19.3 @@ -171,7 +171,7 @@ void init_boot_pages(unsigned long ps, u
    19.4  
    19.5          if ( (bad_pfn < (bitmap_size*8)) && !allocated_in_map(bad_pfn) )
    19.6          {
    19.7 -            printk("Marking page %p as bad\n", bad_pfn);
    19.8 +            printk("Marking page %lx as bad\n", bad_pfn);
    19.9              map_alloc(bad_pfn, 1);
   19.10          }
   19.11      }
    20.1 --- a/xen/include/asm-x86/mm.h	Mon Apr 25 09:04:02 2005 +0000
    20.2 +++ b/xen/include/asm-x86/mm.h	Mon Apr 25 10:58:04 2005 +0000
    20.3 @@ -183,7 +183,7 @@ static inline int get_page(struct pfn_in
    20.4               unlikely(d != _domain) )                /* Wrong owner? */
    20.5          {
    20.6              if ( !_shadow_mode_enabled(domain) )
    20.7 -                DPRINTK("Error pfn %p: rd=%p, od=%p, caf=%08x, taf=%08x\n",
    20.8 +                DPRINTK("Error pfn %lx: rd=%p, od=%p, caf=%08x, taf=%08x\n",
    20.9                          page_to_pfn(page), domain, unpickle_domptr(d),
   20.10                          x, page->u.inuse.type_info);
   20.11              return 0;
   20.12 @@ -263,9 +263,9 @@ static inline unsigned long phys_to_mach
   20.13      unsigned long mfn;
   20.14      l1_pgentry_t pte;
   20.15  
   20.16 -    if (!__copy_from_user(&pte, (__phys_to_machine_mapping + pfn),
   20.17 -			  sizeof(pte))
   20.18 -	&& (l1e_get_flags(pte) & _PAGE_PRESENT) )
   20.19 +    if ( (__copy_from_user(&pte, &__phys_to_machine_mapping[pfn],
   20.20 +                           sizeof(pte)) == 0) &&
   20.21 +         (l1e_get_flags(pte) & _PAGE_PRESENT) )
   20.22  	mfn = l1e_get_pfn(pte);
   20.23      else
   20.24  	mfn = INVALID_MFN;
    21.1 --- a/xen/include/asm-x86/shadow.h	Mon Apr 25 09:04:02 2005 +0000
    21.2 +++ b/xen/include/asm-x86/shadow.h	Mon Apr 25 10:58:04 2005 +0000
    21.3 @@ -304,7 +304,7 @@ shadow_get_page_from_l1e(l1_pgentry_t l1
    21.4           (d != owner) )
    21.5      {
    21.6          res = get_page_from_l1e(nl1e, owner);
    21.7 -        printk("tried to map mfn %p from domain %d into shadow page tables "
    21.8 +        printk("tried to map mfn %lx from domain %d into shadow page tables "
    21.9                 "of domain %d; %s\n",
   21.10                 mfn, owner->id, d->id, res ? "success" : "failed");
   21.11      }
   21.12 @@ -312,7 +312,8 @@ shadow_get_page_from_l1e(l1_pgentry_t l1
   21.13      if ( unlikely(!res) )
   21.14      {
   21.15          perfc_incrc(shadow_get_page_fail);
   21.16 -        FSH_LOG("%s failed to get ref l1e=%p\n", __func__, l1e_get_value(l1e));
   21.17 +        FSH_LOG("%s failed to get ref l1e=%lx\n",
   21.18 +                __func__, l1e_get_value(l1e));
   21.19      }
   21.20  
   21.21      return res;
   21.22 @@ -369,7 +370,7 @@ update_hl2e(struct exec_domain *ed, unsi
   21.23      old_hl2e = ed->arch.hl2_vtable[index];
   21.24  
   21.25      if ( (l2e_get_flags(gl2e) & _PAGE_PRESENT) &&
   21.26 -         VALID_MFN(mfn = phys_to_machine_mapping(l2e_get_pfn(gl2e)) ))
   21.27 +         VALID_MFN(mfn = phys_to_machine_mapping(l2e_get_pfn(gl2e))) )
   21.28          new_hl2e = l1e_create_pfn(mfn, __PAGE_HYPERVISOR);
   21.29      else
   21.30          new_hl2e = l1e_empty();
   21.31 @@ -405,16 +406,16 @@ static inline void shadow_drop_reference
   21.32          return;
   21.33  
   21.34      /* XXX This needs more thought... */
   21.35 -    printk("%s: needing to call shadow_remove_all_access for mfn=%p\n",
   21.36 +    printk("%s: needing to call shadow_remove_all_access for mfn=%lx\n",
   21.37             __func__, page_to_pfn(page));
   21.38 -    printk("Before: mfn=%p c=%p t=%p\n", page_to_pfn(page),
   21.39 +    printk("Before: mfn=%lx c=%08x t=%08x\n", page_to_pfn(page),
   21.40             page->count_info, page->u.inuse.type_info);
   21.41  
   21.42      shadow_lock(d);
   21.43      shadow_remove_all_access(d, page_to_pfn(page));
   21.44      shadow_unlock(d);
   21.45  
   21.46 -    printk("After:  mfn=%p c=%p t=%p\n", page_to_pfn(page),
   21.47 +    printk("After:  mfn=%lx c=%08x t=%08x\n", page_to_pfn(page),
   21.48             page->count_info, page->u.inuse.type_info);
   21.49  }
   21.50  
   21.51 @@ -452,8 +453,9 @@ get_shadow_ref(unsigned long smfn)
   21.52  
   21.53      if ( unlikely(nx == 0) )
   21.54      {
   21.55 -        printk("get_shadow_ref overflow, gmfn=%p smfn=%p\n",
   21.56 -               frame_table[smfn].u.inuse.type_info & PGT_mfn_mask, smfn);
   21.57 +        printk("get_shadow_ref overflow, gmfn=%x smfn=%lx\n",
   21.58 +               frame_table[smfn].u.inuse.type_info & PGT_mfn_mask,
   21.59 +               smfn);
   21.60          BUG();
   21.61      }
   21.62      
   21.63 @@ -481,7 +483,7 @@ put_shadow_ref(unsigned long smfn)
   21.64  
   21.65      if ( unlikely(x == 0) )
   21.66      {
   21.67 -        printk("put_shadow_ref underflow, smfn=%p oc=%p t=%p\n",
   21.68 +        printk("put_shadow_ref underflow, smfn=%lx oc=%08x t=%08x\n",
   21.69                 smfn,
   21.70                 frame_table[smfn].count_info,
   21.71                 frame_table[smfn].u.inuse.type_info);
   21.72 @@ -592,11 +594,11 @@ static inline int l1pte_write_fault(
   21.73      unsigned long gpfn = l1e_get_pfn(gpte);
   21.74      unsigned long gmfn = __gpfn_to_mfn(d, gpfn);
   21.75  
   21.76 -    //printk("l1pte_write_fault gmfn=%p\n", gmfn);
   21.77 +    //printk("l1pte_write_fault gmfn=%lx\n", gmfn);
   21.78  
   21.79      if ( unlikely(!VALID_MFN(gmfn)) )
   21.80      {
   21.81 -        SH_LOG("l1pte_write_fault: invalid gpfn=%p", gpfn);
   21.82 +        SH_LOG("l1pte_write_fault: invalid gpfn=%lx", gpfn);
   21.83          *spte_p = l1e_empty();
   21.84          return 0;
   21.85      }
   21.86 @@ -605,7 +607,7 @@ static inline int l1pte_write_fault(
   21.87      l1e_add_flags(&gpte, _PAGE_DIRTY | _PAGE_ACCESSED);
   21.88      spte = l1e_create_pfn(gmfn, l1e_get_flags(gpte) & ~_PAGE_GLOBAL);
   21.89  
   21.90 -    SH_VVLOG("l1pte_write_fault: updating spte=0x%p gpte=0x%p",
   21.91 +    SH_VVLOG("l1pte_write_fault: updating spte=0x%lx gpte=0x%lx",
   21.92               l1e_get_value(spte), l1e_get_value(gpte));
   21.93  
   21.94      if ( shadow_mode_log_dirty(d) )
   21.95 @@ -630,7 +632,7 @@ static inline int l1pte_read_fault(
   21.96  
   21.97      if ( unlikely(!VALID_MFN(mfn)) )
   21.98      {
   21.99 -        SH_LOG("l1pte_read_fault: invalid gpfn=%p", pfn);
  21.100 +        SH_LOG("l1pte_read_fault: invalid gpfn=%lx", pfn);
  21.101          *spte_p = l1e_empty();
  21.102          return 0;
  21.103      }
  21.104 @@ -644,7 +646,7 @@ static inline int l1pte_read_fault(
  21.105          l1e_remove_flags(&spte, _PAGE_RW);
  21.106      }
  21.107  
  21.108 -    SH_VVLOG("l1pte_read_fault: updating spte=0x%p gpte=0x%p",
  21.109 +    SH_VVLOG("l1pte_read_fault: updating spte=0x%lx gpte=0x%lx",
  21.110               l1e_get_value(spte), l1e_get_value(gpte));
  21.111      *gpte_p = gpte;
  21.112      *spte_p = spte;
  21.113 @@ -675,7 +677,7 @@ static inline void l1pte_propagate_from_
  21.114      }
  21.115  
  21.116      if ( l1e_get_value(spte) || l1e_get_value(gpte) )
  21.117 -        SH_VVVLOG("%s: gpte=%p, new spte=%p",
  21.118 +        SH_VVVLOG("%s: gpte=%lx, new spte=%lx",
  21.119                    __func__, l1e_get_value(gpte), l1e_get_value(spte));
  21.120  
  21.121      *spte_p = spte;
  21.122 @@ -709,7 +711,7 @@ static inline void hl2e_propagate_from_g
  21.123      }
  21.124  
  21.125      if ( l1e_get_value(hl2e) || l2e_get_value(gpde) )
  21.126 -        SH_VVLOG("%s: gpde=%p hl2e=%p", __func__,
  21.127 +        SH_VVLOG("%s: gpde=%lx hl2e=%lx", __func__,
  21.128                   l2e_get_value(gpde), l1e_get_value(hl2e));
  21.129  
  21.130      *hl2e_p = hl2e;
  21.131 @@ -739,7 +741,7 @@ static inline void l2pde_general(
  21.132      }
  21.133  
  21.134      if ( l2e_get_value(spde) || l2e_get_value(gpde) )
  21.135 -        SH_VVLOG("%s: gpde=%p, new spde=%p", __func__,
  21.136 +        SH_VVLOG("%s: gpde=%lx, new spde=%lx", __func__,
  21.137                   l2e_get_value(gpde), l2e_get_value(spde));
  21.138  
  21.139      *spde_p = spde;
  21.140 @@ -771,7 +773,7 @@ validate_pte_change(
  21.141      perfc_incrc(validate_pte_calls);
  21.142  
  21.143  #if 0
  21.144 -    FSH_LOG("validate_pte(old=%p new=%p)", old_pte, new_pte);
  21.145 +    FSH_LOG("validate_pte(old=%lx new=%lx)", old_pte, new_pte);
  21.146  #endif
  21.147  
  21.148      old_spte = *shadow_pte_p;
  21.149 @@ -897,7 +899,7 @@ static void shadow_audit(struct domain *
  21.150              live++; 
  21.151              if ( (a->gpfn_and_flags == 0) || (a->smfn == 0) )
  21.152              {
  21.153 -                printk("XXX live=%d gpfn+flags=%p sp=%p next=%p\n",
  21.154 +                printk("XXX live=%d gpfn+flags=%lx sp=%lx next=%p\n",
  21.155                         live, a->gpfn_and_flags, a->smfn, a->next);
  21.156                  BUG();
  21.157              }
  21.158 @@ -1161,7 +1163,7 @@ static inline void delete_shadow_status(
  21.159  
  21.160      head = hash_bucket(d, gpfn);
  21.161  
  21.162 -    SH_VLOG("delete gpfn=%p t=%p bucket=%p", gpfn, stype, head);
  21.163 +    SH_VLOG("delete gpfn=%lx t=%08x bucket=%p", gpfn, stype, head);
  21.164      shadow_audit(d, 0);
  21.165  
  21.166      /* Match on head item? */
  21.167 @@ -1235,7 +1237,7 @@ static inline void set_shadow_status(
  21.168      int i;
  21.169      unsigned long key = gpfn | stype;
  21.170  
  21.171 -    SH_VVLOG("set gpfn=%p gmfn=%p smfn=%p t=%p", gpfn, gmfn, smfn, stype);
  21.172 +    SH_VVLOG("set gpfn=%lx gmfn=%lx smfn=%lx t=%lx", gpfn, gmfn, smfn, stype);
  21.173  
  21.174      ASSERT(spin_is_locked(&d->arch.shadow_lock));
  21.175  
  21.176 @@ -1249,7 +1251,7 @@ static inline void set_shadow_status(
  21.177  
  21.178      x = head = hash_bucket(d, gpfn);
  21.179     
  21.180 -    SH_VLOG("set gpfn=%p smfn=%p t=%p bucket=%p(%p)",
  21.181 +    SH_VLOG("set gpfn=%lx smfn=%lx t=%lx bucket=%p(%p)",
  21.182               gpfn, smfn, stype, x, x->next);
  21.183      shadow_audit(d, 0);
  21.184  
  21.185 @@ -1463,7 +1465,7 @@ static inline l1_pgentry_t gva_to_gpte(u
  21.186                                     &linear_pg_table[gva >> PAGE_SHIFT],
  21.187                                     sizeof(gpte))) )
  21.188      {
  21.189 -        FSH_LOG("gva_to_gpte got a fault on gva=%p", gva);
  21.190 +        FSH_LOG("gva_to_gpte got a fault on gva=%lx", gva);
  21.191          return l1e_empty();
  21.192      }
  21.193  
    22.1 --- a/xen/include/asm-x86/x86_32/page.h	Mon Apr 25 09:04:02 2005 +0000
    22.2 +++ b/xen/include/asm-x86/x86_32/page.h	Mon Apr 25 10:58:04 2005 +0000
    22.3 @@ -29,18 +29,18 @@ typedef struct { u32 l1_lo; } l1_pgentry
    22.4  typedef struct { u32 l2_lo; } l2_pgentry_t;
    22.5  typedef l2_pgentry_t root_pgentry_t;
    22.6  
    22.7 -/* read access (depricated) */
    22.8 -#define l1e_get_value(_x)         ((_x).l1_lo)
    22.9 -#define l2e_get_value(_x)         ((_x).l2_lo)
   22.10 +/* read access (deprecated) */
   22.11 +#define l1e_get_value(_x)      ((unsigned long)((_x).l1_lo))
   22.12 +#define l2e_get_value(_x)      ((unsigned long)((_x).l2_lo))
   22.13  
   22.14  /* read access */
   22.15 -#define l1e_get_pfn(_x)           ((_x).l1_lo >> PAGE_SHIFT)
   22.16 -#define l1e_get_phys(_x)          ((_x).l1_lo &  PAGE_MASK)
   22.17 -#define l1e_get_flags(_x)         ((_x).l1_lo &  PAGE_FLAG_MASK)
   22.18 +#define l1e_get_pfn(_x)        ((unsigned long)((_x).l1_lo >> PAGE_SHIFT))
   22.19 +#define l1e_get_phys(_x)       ((unsigned long)((_x).l1_lo &  PAGE_MASK))
   22.20 +#define l1e_get_flags(_x)      ((unsigned long)((_x).l1_lo &  PAGE_FLAG_MASK))
   22.21  
   22.22 -#define l2e_get_pfn(_x)           ((_x).l2_lo >> PAGE_SHIFT)
   22.23 -#define l2e_get_phys(_x)          ((_x).l2_lo &  PAGE_MASK)
   22.24 -#define l2e_get_flags(_x)         ((_x).l2_lo &  PAGE_FLAG_MASK)
   22.25 +#define l2e_get_pfn(_x)        ((unsigned long)((_x).l2_lo >> PAGE_SHIFT))
   22.26 +#define l2e_get_phys(_x)       ((unsigned long)((_x).l2_lo &  PAGE_MASK))
   22.27 +#define l2e_get_flags(_x)      ((unsigned long)((_x).l2_lo &  PAGE_FLAG_MASK))
   22.28  
   22.29  /* write access */
   22.30  static inline l1_pgentry_t l1e_empty(void)
    23.1 --- a/xen/include/xen/lib.h	Mon Apr 25 09:04:02 2005 +0000
    23.2 +++ b/xen/include/xen/lib.h	Mon Apr 25 10:58:04 2005 +0000
    23.3 @@ -40,17 +40,20 @@ extern void debugtrace_printk(const char
    23.4  #define debugtrace_printk(_f, ...) ((void)0)
    23.5  #endif
    23.6  
    23.7 -#define printk printf
    23.8 -void printf(const char *format, ...);
    23.9 -void panic(const char *format, ...);
   23.10 -long vm_assist(struct domain *, unsigned int, unsigned int);
   23.11 +/* Allows us to use '%p' as general-purpose machine-word format char. */
   23.12 +#define _p(_x) ((void *)(unsigned long)(_x))
   23.13 +#define printk(_f , _a...) printf( _f , ## _a )
   23.14 +extern void printf(const char *format, ...)
   23.15 +    __attribute__ ((format (printf, 1, 2)));
   23.16 +extern void panic(const char *format, ...);
   23.17 +extern long vm_assist(struct domain *, unsigned int, unsigned int);
   23.18  
   23.19  /* vsprintf.c */
   23.20  extern int sprintf(char * buf, const char * fmt, ...)
   23.21 -	__attribute__ ((format (printf, 2, 3)));
   23.22 +    __attribute__ ((format (printf, 2, 3)));
   23.23  extern int vsprintf(char *buf, const char *, va_list);
   23.24  extern int snprintf(char * buf, size_t size, const char * fmt, ...)
   23.25 -	__attribute__ ((format (printf, 3, 4)));
   23.26 +    __attribute__ ((format (printf, 3, 4)));
   23.27  extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
   23.28  
   23.29  long simple_strtol(const char *cp,char **endp,unsigned int base);