[BACK]Return to x86_xpmap.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / xen / x86

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/arch/xen/x86/x86_xpmap.c between version 1.8.4.3 and 1.8.4.4

version 1.8.4.3, 2009/08/19 18:46:54 version 1.8.4.4, 2010/03/11 15:03:10
Line 27 
Line 27 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software  
  *    must display the following acknowledgement:  
  *      This product includes software developed by Manuel Bouyer.  
  * 4. The name of the author may not be used to endorse or promote products  
  *    derived from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Line 59 
Line 54 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software  
  *    must display the following acknowledgement:  
  *      This product includes software developed by Christian Limpach.  
  * 4. The name of the author may not be used to endorse or promote products  
  *    derived from this software without specific prior written permission.  
  *   *
  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR   * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES   * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
Line 157  xen_set_ldt(vaddr_t base, uint32_t entri
Line 147  xen_set_ldt(vaddr_t base, uint32_t entri
         for (va = base; va < end; va += PAGE_SIZE) {          for (va = base; va < end; va += PAGE_SIZE) {
                 KASSERT(va >= VM_MIN_KERNEL_ADDRESS);                  KASSERT(va >= VM_MIN_KERNEL_ADDRESS);
                 ptp = kvtopte(va);                  ptp = kvtopte(va);
                 XENPRINTF(("xen_set_ldt %p %d %p\n", (void *)base,                  XENPRINTF(("xen_set_ldt %#" PRIxVADDR " %d %p\n",
                               entries, ptp));                      base, entries, ptp));
                 pmap_pte_clearbits(ptp, PG_RW);                  pmap_pte_clearbits(ptp, PG_RW);
         }          }
         s = splvm();          s = splvm();
         xpq_queue_set_ldt(base, entries);          xpq_queue_set_ldt(base, entries);
         xpq_flush_queue();  
         splx(s);          splx(s);
 }  }
   
Line 182  xpq_flush_queue(void)
Line 171  xpq_flush_queue(void)
   
         XENPRINTK2(("flush queue %p entries %d\n", xpq_queue, xpq_idx));          XENPRINTK2(("flush queue %p entries %d\n", xpq_queue, xpq_idx));
         for (i = 0; i < xpq_idx; i++)          for (i = 0; i < xpq_idx; i++)
                 XENPRINTK2(("%d: %p %08" PRIx64 "\n", i,                  XENPRINTK2(("%d: 0x%08" PRIx64 " 0x%08" PRIx64 "\n", i,
                     (uint64_t)xpq_queue[i].ptr, (uint64_t)xpq_queue[i].val));                      xpq_queue[i].ptr, xpq_queue[i].val));
         if (xpq_idx != 0 &&          if (xpq_idx != 0 &&
             HYPERVISOR_mmu_update_self(xpq_queue, xpq_idx, &ok) < 0) {              HYPERVISOR_mmu_update_self(xpq_queue, xpq_idx, &ok) < 0) {
                 printf("xpq_flush_queue: %d entries \n", xpq_idx);                  printf("xpq_flush_queue: %d entries \n", xpq_idx);
                 for (i = 0; i < xpq_idx; i++)                  for (i = 0; i < xpq_idx; i++)
                         printf("0x%016" PRIx64 ": 0x%016" PRIx64 "\n",                          printf("0x%016" PRIx64 ": 0x%016" PRIx64 "\n",
                            (uint64_t)xpq_queue[i].ptr,                             xpq_queue[i].ptr, xpq_queue[i].val);
                            (uint64_t)xpq_queue[i].val);  
                 panic("HYPERVISOR_mmu_update failed\n");                  panic("HYPERVISOR_mmu_update failed\n");
         }          }
         xpq_idx = 0;          xpq_idx = 0;
Line 342  xpq_queue_invlpg(vaddr_t va)
Line 330  xpq_queue_invlpg(vaddr_t va)
         struct mmuext_op op;          struct mmuext_op op;
         xpq_flush_queue();          xpq_flush_queue();
   
         XENPRINTK2(("xpq_queue_invlpg %p\n", (void *)va));          XENPRINTK2(("xpq_queue_invlpg %#" PRIxVADDR "\n", va));
         op.cmd = MMUEXT_INVLPG_LOCAL;          op.cmd = MMUEXT_INVLPG_LOCAL;
         op.arg1.linear_addr = (va & ~PAGE_MASK);          op.arg1.linear_addr = (va & ~PAGE_MASK);
         if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0)          if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0)
Line 372  xpq_debug_dump(void)
Line 360  xpq_debug_dump(void)
         XENPRINTK2(("idx: %d\n", xpq_idx));          XENPRINTK2(("idx: %d\n", xpq_idx));
         for (i = 0; i < xpq_idx; i++) {          for (i = 0; i < xpq_idx; i++) {
                 snprintf(XBUF, sizeof(XBUF), "%" PRIx64 " %08" PRIx64,                  snprintf(XBUF, sizeof(XBUF), "%" PRIx64 " %08" PRIx64,
                     (uint64_t)xpq_queue[i].ptr, (uint64_t)xpq_queue[i].val);                      xpq_queue[i].ptr, xpq_queue[i].val);
                 if (++i < xpq_idx)                  if (++i < xpq_idx)
                         snprintf(XBUF + strlen(XBUF),                          snprintf(XBUF + strlen(XBUF),
                             sizeof(XBUF) - strlen(XBUF),                              sizeof(XBUF) - strlen(XBUF),
                             "%" PRIx64 " %08" PRIx64,                              "%" PRIx64 " %08" PRIx64,
                             (uint64_t)xpq_queue[i].ptr,                              xpq_queue[i].ptr, xpq_queue[i].val);
                             (uint64_t)xpq_queue[i].val);  
                 if (++i < xpq_idx)                  if (++i < xpq_idx)
                         snprintf(XBUF + strlen(XBUF),                          snprintf(XBUF + strlen(XBUF),
                             sizeof(XBUF) - strlen(XBUF),                              sizeof(XBUF) - strlen(XBUF),
                             "%" PRIx64 " %08" PRIx64,                              "%" PRIx64 " %08" PRIx64,
                             (uint64_t)xpq_queue[i].ptr,                              xpq_queue[i].ptr, xpq_queue[i].val);
                             (uint64_t)xpq_queue[i].val);  
                 if (++i < xpq_idx)                  if (++i < xpq_idx)
                         snprintf(XBUF + strlen(XBUF),                          snprintf(XBUF + strlen(XBUF),
                             sizeof(XBUF) - strlen(XBUF),                              sizeof(XBUF) - strlen(XBUF),
                             "%" PRIx64 " %08" PRIx64,                              "%" PRIx64 " %08" PRIx64,
                             (uint64_t)xpq_queue[i].ptr,                              xpq_queue[i].ptr, xpq_queue[i].val);
                             (uint64_t)xpq_queue[i].val);  
                 XENPRINTK2(("%d: %s\n", xpq_idx, XBUF));                  XENPRINTK2(("%d: %s\n", xpq_idx, XBUF));
         }          }
 }  }
Line 554  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 539  xen_bootstrap_tables (vaddr_t old_pgd, v
         int i;          int i;
         extern char __data_start;          extern char __data_start;
   
         __PRINTK(("xen_bootstrap_tables(0x%lx, 0x%lx, %d, %d)\n",          __PRINTK(("xen_bootstrap_tables(%#" PRIxVADDR ", %#" PRIxVADDR ","
               " %d, %d)\n",
             old_pgd, new_pgd, old_count, new_count));              old_pgd, new_pgd, old_count, new_count));
         text_end = ((vaddr_t)&__data_start) & ~PAGE_MASK;          text_end = ((vaddr_t)&__data_start) & ~PAGE_MASK;
         /*          /*
Line 591  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 577  xen_bootstrap_tables (vaddr_t old_pgd, v
   
         __PRINTK(("xen_bootstrap_tables text_end 0x%lx map_end 0x%lx\n",          __PRINTK(("xen_bootstrap_tables text_end 0x%lx map_end 0x%lx\n",
             text_end, map_end));              text_end, map_end));
         __PRINTK(("console 0x%lx ", xen_start_info.console.domU.mfn));          __PRINTK(("console %#lx ", xen_start_info.console_mfn));
         __PRINTK(("xenstore 0x%lx\n", xen_start_info.store_mfn));          __PRINTK(("xenstore %#" PRIx32 "\n", xen_start_info.store_mfn));
   
         /*          /*
          * Create bootstrap page tables           * Create bootstrap page tables
Line 617  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 603  xen_bootstrap_tables (vaddr_t old_pgd, v
         bt_pgd[pl4_pi(KERNTEXTOFF)] =          bt_pgd[pl4_pi(KERNTEXTOFF)] =
             xpmap_ptom_masked(addr) | PG_k | PG_RW | PG_V;              xpmap_ptom_masked(addr) | PG_k | PG_RW | PG_V;
   
         __PRINTK(("L3 va 0x%lx pa 0x%" PRIx64 " entry 0x%" PRIx64 " -> L4[0x%x]\n",          __PRINTK(("L3 va %#lx pa %#" PRIxPADDR " entry %#" PRIxPADDR
             pdtpe, (uint64_t)addr, (uint64_t)bt_pgd[pl4_pi(KERNTEXTOFF)],              " -> L4[%#x]\n",
             pl4_pi(KERNTEXTOFF)));              pdtpe, addr, bt_pgd[pl4_pi(KERNTEXTOFF)], pl4_pi(KERNTEXTOFF)));
 #else  #else
         pdtpe = bt_pgd;          pdtpe = bt_pgd;
 #endif /* PTP_LEVELS > 3 */  #endif /* PTP_LEVELS > 3 */
Line 633  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 619  xen_bootstrap_tables (vaddr_t old_pgd, v
         addr = ((u_long) pde) - KERNBASE;          addr = ((u_long) pde) - KERNBASE;
         pdtpe[pl3_pi(KERNTEXTOFF)] =          pdtpe[pl3_pi(KERNTEXTOFF)] =
             xpmap_ptom_masked(addr) | PG_k | PG_V | PG_RW;              xpmap_ptom_masked(addr) | PG_k | PG_V | PG_RW;
         __PRINTK(("L2 va 0x%lx pa 0x%" PRIx64 " entry 0x%" PRIx64 " -> L3[0x%x]\n",          __PRINTK(("L2 va %#lx pa %#" PRIxPADDR " entry %#" PRIxPADDR
             pde, (int64_t)addr, (int64_t)pdtpe[pl3_pi(KERNTEXTOFF)],              " -> L3[%#x]\n",
             pl3_pi(KERNTEXTOFF)));              pde, addr, pdtpe[pl3_pi(KERNTEXTOFF)], pl3_pi(KERNTEXTOFF)));
 #elif defined(PAE)  #elif defined(PAE)
         /* our PAE-style level 2: 5 contigous pages (4 L2 + 1 shadow) */          /* our PAE-style level 2: 5 contigous pages (4 L2 + 1 shadow) */
         pde = (pd_entry_t *) avail;          pde = (pd_entry_t *) avail;
Line 653  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 639  xen_bootstrap_tables (vaddr_t old_pgd, v
                  * itself.                   * itself.
                  */                   */
                 pdtpe[i] = xpmap_ptom_masked(addr) | PG_k | PG_V;                  pdtpe[i] = xpmap_ptom_masked(addr) | PG_k | PG_V;
                 __PRINTK(("L2 va 0x%lx pa 0x%" PRIx64 " entry 0x%" PRIx64                  __PRINTK(("L2 va %#lx pa %#" PRIxPADDR " entry %#" PRIxPADDR
                     " -> L3[0x%x]\n", (vaddr_t)pde + PAGE_SIZE * i,                      " -> L3[%#x]\n",
                     (int64_t)addr, (int64_t)pdtpe[i], i));                      (vaddr_t)pde + PAGE_SIZE * i, addr, pdtpe[i], i));
         }          }
         addr += PAGE_SIZE;          addr += PAGE_SIZE;
         pdtpe[3] = xpmap_ptom_masked(addr) | PG_k | PG_V;          pdtpe[3] = xpmap_ptom_masked(addr) | PG_k | PG_V;
         __PRINTK(("L2 va 0x%lx pa 0x%" PRIx64 " entry 0x%" PRIx64          __PRINTK(("L2 va %#lx pa %#" PRIxPADDR " entry %#" PRIxPADDR
             " -> L3[0x%x]\n", (vaddr_t)pde + PAGE_SIZE * 4,              " -> L3[%#x]\n",
             (int64_t)addr, (int64_t)pdtpe[3], 3));              (vaddr_t)pde + PAGE_SIZE * 4, addr, pdtpe[3], 3));
   
 #else /* PAE */  #else /* PAE */
         pde = bt_pgd;          pde = bt_pgd;
Line 687  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 673  xen_bootstrap_tables (vaddr_t old_pgd, v
                         if (page == (vaddr_t)HYPERVISOR_shared_info) {                          if (page == (vaddr_t)HYPERVISOR_shared_info) {
                                 pte[pl1_pi(page)] = xen_start_info.shared_info;                                  pte[pl1_pi(page)] = xen_start_info.shared_info;
                                 __PRINTK(("HYPERVISOR_shared_info "                                  __PRINTK(("HYPERVISOR_shared_info "
                                     "va 0x%lx pte 0x%" PRIx64 "\n",                                      "va %#lx pte %#" PRIxPADDR "\n",
                                     HYPERVISOR_shared_info, (int64_t)pte[pl1_pi(page)]));                                      HYPERVISOR_shared_info, pte[pl1_pi(page)]));
                         }                          }
                         if ((xpmap_ptom_masked(page - KERNBASE) >> PAGE_SHIFT)                          if ((xpmap_ptom_masked(page - KERNBASE) >> PAGE_SHIFT)
                             == xen_start_info.console.domU.mfn) {                              == xen_start_info.console.domU.mfn) {
                                 xencons_interface = (void *)page;                                  xencons_interface = (void *)page;
                                 pte[pl1_pi(page)] = xen_start_info.console.domU.mfn;                                  pte[pl1_pi(page)] = xen_start_info.console_mfn;
                                 pte[pl1_pi(page)] <<= PAGE_SHIFT;                                  pte[pl1_pi(page)] <<= PAGE_SHIFT;
                                 __PRINTK(("xencons_interface "                                  __PRINTK(("xencons_interface "
                                     "va 0x%lx pte 0x%" PRIx64 "\n",                                      "va %#lx pte %#" PRIxPADDR "\n",
                                     xencons_interface, (int64_t)pte[pl1_pi(page)]));                                      xencons_interface, pte[pl1_pi(page)]));
                         }                          }
                         if ((xpmap_ptom_masked(page - KERNBASE) >> PAGE_SHIFT)                          if ((xpmap_ptom_masked(page - KERNBASE) >> PAGE_SHIFT)
                             == xen_start_info.store_mfn) {                              == xen_start_info.store_mfn) {
Line 705  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 691  xen_bootstrap_tables (vaddr_t old_pgd, v
                                 pte[pl1_pi(page)] = xen_start_info.store_mfn;                                  pte[pl1_pi(page)] = xen_start_info.store_mfn;
                                 pte[pl1_pi(page)] <<= PAGE_SHIFT;                                  pte[pl1_pi(page)] <<= PAGE_SHIFT;
                                 __PRINTK(("xenstore_interface "                                  __PRINTK(("xenstore_interface "
                                     "va 0x%lx pte 0x%" PRIx64 "\n",                                      "va %#lx pte %#" PRIxPADDR "\n",
                                     xenstore_interface, (int64_t)pte[pl1_pi(page)]));                                      xenstore_interface, pte[pl1_pi(page)]));
                         }                          }
 #ifdef DOM0OPS  #ifdef DOM0OPS
                         if (page >= (vaddr_t)atdevbase &&                          if (page >= (vaddr_t)atdevbase &&
Line 734  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 720  xen_bootstrap_tables (vaddr_t old_pgd, v
   
                         if ((page  >= old_pgd && page < old_pgd + (old_count * PAGE_SIZE))                          if ((page  >= old_pgd && page < old_pgd + (old_count * PAGE_SIZE))
                             || page >= new_pgd) {                              || page >= new_pgd) {
                                 __PRINTK(("va 0x%lx pa 0x%lx "                                  __PRINTK(("va %#lx pa %#lx "
                                     "entry 0x%" PRIx64 " -> L1[0x%x]\n",                                      "entry 0x%" PRIxPADDR " -> L1[%#x]\n",
                                     page, page - KERNBASE,                                      page, page - KERNBASE,
                                     (int64_t)pte[pl1_pi(page)], pl1_pi(page)));                                      pte[pl1_pi(page)], pl1_pi(page)));
                         }                          }
                         page += PAGE_SIZE;                          page += PAGE_SIZE;
                 }                  }
Line 745  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 731  xen_bootstrap_tables (vaddr_t old_pgd, v
                 addr = ((u_long) pte) - KERNBASE;                  addr = ((u_long) pte) - KERNBASE;
                 pde[pl2_pi(cur_page)] =                  pde[pl2_pi(cur_page)] =
                     xpmap_ptom_masked(addr) | PG_k | PG_RW | PG_V;                      xpmap_ptom_masked(addr) | PG_k | PG_RW | PG_V;
                 __PRINTK(("L1 va 0x%lx pa 0x%" PRIx64 " entry 0x%" PRIx64                  __PRINTK(("L1 va %#lx pa %#" PRIxPADDR " entry %#" PRIxPADDR
                     " -> L2[0x%x]\n", pte, (int64_t)addr,                      " -> L2[%#x]\n",
                     (int64_t)pde[pl2_pi(cur_page)], pl2_pi(cur_page)));                      pte, addr, pde[pl2_pi(cur_page)], pl2_pi(cur_page)));
                 /* Mark readonly */                  /* Mark readonly */
                 xen_bt_set_readonly((vaddr_t) pte);                  xen_bt_set_readonly((vaddr_t) pte);
         }          }
Line 772  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 758  xen_bootstrap_tables (vaddr_t old_pgd, v
         addr = (u_long)pde - KERNBASE;          addr = (u_long)pde - KERNBASE;
         for (i = 0; i < 3; i++, addr += PAGE_SIZE) {          for (i = 0; i < 3; i++, addr += PAGE_SIZE) {
                 pde[PDIR_SLOT_PTE + i] = xpmap_ptom_masked(addr) | PG_k | PG_V;                  pde[PDIR_SLOT_PTE + i] = xpmap_ptom_masked(addr) | PG_k | PG_V;
                 __PRINTK(("pde[%d] va 0x%lx pa 0x%lx entry 0x%" PRIx64 "\n",                  __PRINTK(("pde[%d] va %#" PRIxVADDR " pa %#" PRIxPADDR
                     (int)(PDIR_SLOT_PTE + i), pde + PAGE_SIZE * i, (long)addr,                      " entry %#" PRIxPADDR "\n",
                     (int64_t)pde[PDIR_SLOT_PTE + i]));                      (int)(PDIR_SLOT_PTE + i), pde + PAGE_SIZE * i,
                       addr, pde[PDIR_SLOT_PTE + i]));
         }          }
 #if 0  #if 0
         addr += PAGE_SIZE; /* point to shadow L2 */          addr += PAGE_SIZE; /* point to shadow L2 */
Line 796  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 783  xen_bootstrap_tables (vaddr_t old_pgd, v
         }          }
         if (final) {          if (final) {
                 addr = (u_long)pde - KERNBASE + 3 * PAGE_SIZE;                  addr = (u_long)pde - KERNBASE + 3 * PAGE_SIZE;
                 __PRINTK(("pin L2 %d addr 0x%" PRIx64 "\n", 2, (int64_t)addr));                  __PRINTK(("pin L2 %d addr %#" PRIxPADDR "\n", 2, addr));
                 xpq_queue_pin_table(xpmap_ptom_masked(addr));                  xpq_queue_pin_table(xpmap_ptom_masked(addr));
         }          }
 #if 0  #if 0
Line 808  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 795  xen_bootstrap_tables (vaddr_t old_pgd, v
         /* recursive entry in higher-level PD */          /* recursive entry in higher-level PD */
         bt_pgd[PDIR_SLOT_PTE] =          bt_pgd[PDIR_SLOT_PTE] =
             xpmap_ptom_masked(new_pgd - KERNBASE) | PG_k | PG_V;              xpmap_ptom_masked(new_pgd - KERNBASE) | PG_k | PG_V;
         __PRINTK(("bt_pgd[PDIR_SLOT_PTE] va 0x%lx pa 0x%" PRIx64          __PRINTK(("bt_pgd[PDIR_SLOT_PTE] va %#" PRIxVADDR " pa %#" PRIxPADDR
             " entry 0x%" PRIx64 "\n", new_pgd, (int64_t)new_pgd - KERNBASE,              " entry %#" PRIxPADDR "\n", new_pgd, (paddr_t)new_pgd - KERNBASE,
             (int64_t)bt_pgd[PDIR_SLOT_PTE]));              bt_pgd[PDIR_SLOT_PTE]));
         /* Mark tables RO */          /* Mark tables RO */
         xen_bt_set_readonly((vaddr_t) pde);          xen_bt_set_readonly((vaddr_t) pde);
 #endif  #endif
Line 839  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 826  xen_bootstrap_tables (vaddr_t old_pgd, v
         /* Switch to new tables */          /* Switch to new tables */
         __PRINTK(("switch to PGD\n"));          __PRINTK(("switch to PGD\n"));
         xpq_queue_pt_switch(xpmap_ptom_masked(new_pgd - KERNBASE));          xpq_queue_pt_switch(xpmap_ptom_masked(new_pgd - KERNBASE));
         __PRINTK(("bt_pgd[PDIR_SLOT_PTE] now entry 0x%" PRIx64 "\n",          __PRINTK(("bt_pgd[PDIR_SLOT_PTE] now entry %#" PRIxPADDR "\n",
             (int64_t)bt_pgd[PDIR_SLOT_PTE]));              bt_pgd[PDIR_SLOT_PTE]));
 #ifdef PAE  #ifdef PAE
         if (final) {          if (final) {
                 /* now enter kernel's PTE mappings */                  /* now enter kernel's PTE mappings */
Line 865  xen_bootstrap_tables (vaddr_t old_pgd, v
Line 852  xen_bootstrap_tables (vaddr_t old_pgd, v
         addr = xpmap_mtop(addr);          addr = xpmap_mtop(addr);
         pte = (pd_entry_t *) ((u_long)addr + KERNBASE);          pte = (pd_entry_t *) ((u_long)addr + KERNBASE);
         pte += pl1_pi(page);          pte += pl1_pi(page);
         __PRINTK(("*pde 0x%" PRIx64 " addr 0x%" PRIx64 " pte 0x%lx\n",          __PRINTK(("*pde %#" PRIxPADDR " addr %#" PRIxPADDR " pte %#lx\n",
             (int64_t)pde[pl2_pi(page)], (int64_t)addr, (long)pte));              pde[pl2_pi(page)], addr, (long)pte));
         while (page < old_pgd + (old_count * PAGE_SIZE) && page < map_end) {          while (page < old_pgd + (old_count * PAGE_SIZE) && page < map_end) {
                 addr = xpmap_ptom(((u_long) pte) - KERNBASE);                  addr = xpmap_ptom(((u_long) pte) - KERNBASE);
                 XENPRINTK(("addr 0x%" PRIx64 " pte 0x%lx *pte 0x%" PRIx64 "\n",                  XENPRINTK(("addr %#" PRIxPADDR " pte %#lx "
                    (int64_t)addr, (long)pte, (int64_t)*pte));                     "*pte %#" PRIxPADDR "\n",
                      addr, (long)pte, *pte));
                 xpq_queue_pte_update(addr, *pte | PG_RW);                  xpq_queue_pte_update(addr, *pte | PG_RW);
                 page += PAGE_SIZE;                  page += PAGE_SIZE;
                 /*                  /*
Line 915  xen_set_user_pgd(paddr_t page)
Line 903  xen_set_user_pgd(paddr_t page)
         op.arg1.mfn = xpmap_phys_to_machine_mapping[page >> PAGE_SHIFT];          op.arg1.mfn = xpmap_phys_to_machine_mapping[page >> PAGE_SHIFT];
         if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0)          if (HYPERVISOR_mmuext_op(&op, 1, NULL, DOMID_SELF) < 0)
                 panic("xen_set_user_pgd: failed to install new user page"                  panic("xen_set_user_pgd: failed to install new user page"
                         " directory %lx", page);                          " directory %#" PRIxPADDR, page);
         splx(s);          splx(s);
 }  }
 #endif /* __x86_64__ */  #endif /* __x86_64__ */

Legend:
Removed from v.1.8.4.3  
changed lines
  Added in v.1.8.4.4

CVSweb <webmaster@jp.NetBSD.org>