/xen/tools/libs/call/ |
A D | linux.c | 92 p = mmap(NULL, npages * PAGE_SIZE, PROT_READ|PROT_WRITE, MAP_SHARED, in alloc_pages_bufdev() 97 npages, (unsigned long)PAGE_SIZE); in alloc_pages_bufdev() 106 size_t size = npages * PAGE_SIZE; in alloc_pages_nobufdev() 120 rc = madvise(p, npages * PAGE_SIZE, MADV_DONTFORK); in alloc_pages_nobufdev() 124 npages, (unsigned long)PAGE_SIZE); in alloc_pages_nobufdev() 136 char *c = (char *)p + (i*PAGE_SIZE); in alloc_pages_nobufdev() 168 madvise(ptr, npages * PAGE_SIZE, MADV_DOFORK); in osdep_free_pages() 171 munmap(ptr, npages * PAGE_SIZE); in osdep_free_pages()
|
A D | freebsd.c | 77 size_t size = npages * PAGE_SIZE; in osdep_alloc_pages() 103 munlock(ptr, npages * PAGE_SIZE); in osdep_free_pages() 105 munmap(ptr, npages * PAGE_SIZE); in osdep_free_pages()
|
/xen/tools/libs/gnttab/ |
A D | freebsd.c | 36 #define PAGE_SIZE (1UL << PAGE_SHIFT) macro 37 #define PAGE_MASK (~(PAGE_SIZE-1)) 81 if ( refs_size <= PAGE_SIZE ) in osdep_gnttab_grant_map() 108 addr = mmap(NULL, PAGE_SIZE * count, prot, MAP_SHARED, fd, in osdep_gnttab_grant_map() 117 if ( notify_offset < PAGE_SIZE * count ) in osdep_gnttab_grant_map() 132 munmap(addr, count * PAGE_SIZE); in osdep_gnttab_grant_map() 151 if ( refs_size > PAGE_SIZE ) in osdep_gnttab_grant_map() 190 if ( (rc = munmap(start_address, count * PAGE_SIZE)) ) in osdep_gnttab_unmap() 269 if ( notify_offset < PAGE_SIZE * count ) in osdep_gntshr_share_pages() 284 munmap(area, count * PAGE_SIZE); in osdep_gntshr_share_pages() [all …]
|
A D | linux.c | 40 #define PAGE_SIZE (1UL << PAGE_SHIFT) macro 41 #define PAGE_MASK (~(PAGE_SIZE-1)) 102 if ( map_size <= PAGE_SIZE ) in osdep_gnttab_grant_map() 130 addr = mmap(NULL, PAGE_SIZE * count, prot, MAP_SHARED, fd, in osdep_gnttab_grant_map() 155 if (notify_offset < PAGE_SIZE * count) { in osdep_gnttab_grant_map() 167 munmap(addr, count * PAGE_SIZE); in osdep_gnttab_grant_map() 187 if ( map_size > PAGE_SIZE ) in osdep_gnttab_grant_map() 223 if ( (rc = munmap(start_address, count * PAGE_SIZE)) ) in osdep_gnttab_unmap() 480 if (notify_offset < PAGE_SIZE * count) { in osdep_gntshr_share_pages() 492 munmap(area, count * PAGE_SIZE); in osdep_gntshr_share_pages() [all …]
|
/xen/xen/arch/x86/ |
A D | desc.c | 30 __section(".data.page_aligned") __aligned(PAGE_SIZE) 31 seg_desc_t boot_gdt[PAGE_SIZE / sizeof(seg_desc_t)] = 59 __section(".data.page_aligned") __aligned(PAGE_SIZE) 60 seg_desc_t boot_compat_gdt[PAGE_SIZE / sizeof(seg_desc_t)] =
|
A D | xen.lds.S | 30 # define SECTION_ALIGN PAGE_SIZE 74 . = ALIGN(PAGE_SIZE); 77 . = ALIGN(PAGE_SIZE); 185 . = ALIGN(PAGE_SIZE); /* Init code and data */ 298 . = ALIGN(PAGE_SIZE); 362 NR_CPUS * PAGE_SIZE, 366 ASSERT(kexec_reloc_size - kexec_reloc <= PAGE_SIZE, "kexec_reloc is too large") 382 ASSERT(IS_ALIGNED(__init_begin, PAGE_SIZE), "__init_begin misaligned") 383 ASSERT(IS_ALIGNED(__init_end, PAGE_SIZE), "__init_end misaligned")
|
A D | tboot.c | 164 vmac_update((void *)pt_vaddr, PAGE_SIZE, ctx); in update_iommu_mac() 198 vmac_update(pg, PAGE_SIZE, ctx); in update_pagetable_mac() 224 vmac_update(pg, PAGE_SIZE, &ctx); in tboot_gen_domain_integrity() 262 PRIMARY_STACK_SIZE - PAGE_SIZE); in mfn_in_guarded_stack() 286 if ( (mfn >= PFN_DOWN(g_tboot_shared->tboot_base - 3 * PAGE_SIZE)) in tboot_gen_xenheap_integrity() 289 + 3 * PAGE_SIZE)) ) in tboot_gen_xenheap_integrity() 300 vmac_update((uint8_t *)pg, PAGE_SIZE, &ctx); in tboot_gen_xenheap_integrity() 436 TXT_PRIV_CONFIG_REGS_BASE + NR_TXT_CONFIG_PAGES * PAGE_SIZE, in tboot_protect_mem_regions()
|
/xen/tools/libxc/ |
A D | xc_core_x86.c | 100 xc_map_foreign_range(xch, dom, PAGE_SIZE, PROT_READ, in xc_core_arch_map_p2m_rw() 110 if ( !(p2m_frame_list_list = malloc(PAGE_SIZE)) ) in xc_core_arch_map_p2m_rw() 115 memcpy(p2m_frame_list_list, live_p2m_frame_list_list, PAGE_SIZE); in xc_core_arch_map_p2m_rw() 119 for ( i = 0; i < PAGE_SIZE/sizeof(unsigned long); i++ ) in xc_core_arch_map_p2m_rw() 120 if ( i < PAGE_SIZE/dinfo->guest_width ) in xc_core_arch_map_p2m_rw() 125 for ( i = PAGE_SIZE/sizeof(unsigned long) - 1; i >= 0; i-- ) in xc_core_arch_map_p2m_rw() 175 munmap(live_p2m_frame_list_list, PAGE_SIZE); in xc_core_arch_map_p2m_rw() 178 munmap(live_p2m_frame_list, P2M_FLL_ENTRIES * PAGE_SIZE); in xc_core_arch_map_p2m_rw()
|
A D | xc_resume.c | 176 shinfo = xc_map_foreign_range(xch, domid, PAGE_SIZE, in xc_domain_resume_any() 187 xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ, in xc_domain_resume_any() 225 start_info = xc_map_foreign_range(xch, domid, PAGE_SIZE, in xc_domain_resume_any() 236 munmap(start_info, PAGE_SIZE); in xc_domain_resume_any() 255 munmap(p2m, P2M_FL_ENTRIES*PAGE_SIZE); in xc_domain_resume_any() 257 munmap(p2m_frame_list, P2M_FLL_ENTRIES*PAGE_SIZE); in xc_domain_resume_any() 259 munmap(p2m_frame_list_list, PAGE_SIZE); in xc_domain_resume_any() 261 munmap(shinfo, PAGE_SIZE); in xc_domain_resume_any()
|
A D | xc_core.c | 88 strings = malloc(PAGE_SIZE); in xc_core_strtab_init() 96 strtab->max = PAGE_SIZE; in xc_core_strtab_init() 366 header.xch_page_size = PAGE_SIZE; in elfnote_dump_core_header() 434 char dummy[PAGE_SIZE]; in xc_domain_dumpcore_via_callback() 680 filesz = PAGE_SIZE; in xc_domain_dumpcore_via_callback() 709 filesz = (uint64_t)nr_pages * PAGE_SIZE; in xc_domain_dumpcore_via_callback() 711 offset, filesz, PAGE_SIZE, PAGE_SIZE); in xc_domain_dumpcore_via_callback() 801 memset(dummy, 0, PAGE_SIZE); in xc_domain_dumpcore_via_callback() 866 munmap(vaddr, PAGE_SIZE); in xc_domain_dumpcore_via_callback() 867 dump_mem += PAGE_SIZE; in xc_domain_dumpcore_via_callback() [all …]
|
A D | xc_offline_page.c | 276 pte_num = PAGE_SIZE / ((minfo->pt_levels == 2) ? 4 : 8); in change_pte() 292 content = xc_map_foreign_range(xch, domid, PAGE_SIZE, in change_pte() 326 munmap(content, PAGE_SIZE); in change_pte() 338 munmap(content, PAGE_SIZE); in change_pte() 542 backup = malloc(PAGE_SIZE); in xc_exchange_page() 576 old_p = xc_map_foreign_range(xch, domid, PAGE_SIZE, in xc_exchange_page() 584 memcpy(backup, old_p, PAGE_SIZE); in xc_exchange_page() 585 munmap(old_p, PAGE_SIZE); in xc_exchange_page() 646 new_p = xc_map_foreign_range(xch, domid, PAGE_SIZE, in xc_exchange_page() 653 memcpy(new_p, backup, PAGE_SIZE); in xc_exchange_page() [all …]
|
A D | xc_pagetab.c | 85 map = xc_map_foreign_range(xch, dom, PAGE_SIZE, PROT_READ, in xc_translate_foreign_address() 89 memcpy(&pte, map + (paddr & (PAGE_SIZE - 1)), size); in xc_translate_foreign_address() 90 munmap(map, PAGE_SIZE); in xc_translate_foreign_address()
|
/xen/xen/arch/arm/acpi/ |
A D | lib.c | 33 offset = phys & (PAGE_SIZE - 1); in __acpi_map_table() 34 mapped_size = PAGE_SIZE - offset; in __acpi_map_table() 44 phys += PAGE_SIZE; in __acpi_map_table() 46 mapped_size += PAGE_SIZE; in __acpi_map_table()
|
/xen/tools/misc/ |
A D | xen-mfndump.c | 207 page = xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ, in dump_ptes_func() 216 pte_num = PAGE_SIZE / 8; in dump_ptes_func() 252 munmap(page, PAGE_SIZE); in dump_ptes_func() 290 pte_num = PAGE_SIZE / 8; in lookup_pte_func() 302 page = xc_map_foreign_range(xch, domid, PAGE_SIZE, PROT_READ, in lookup_pte_func() 320 munmap(page, PAGE_SIZE); in lookup_pte_func() 355 page1 = xc_map_foreign_range(xch, domid1, PAGE_SIZE, PROT_READ, mfn1); in memcmp_mfns_func() 356 page2 = xc_map_foreign_range(xch, domid2, PAGE_SIZE, PROT_READ, mfn2); in memcmp_mfns_func() 368 printf(" memcpy(1, 2) = %d\n", memcmp(page1, page2, PAGE_SIZE)); in memcmp_mfns_func() 372 munmap(page1, PAGE_SIZE); in memcmp_mfns_func() [all …]
|
/xen/xen/arch/arm/ |
A D | xen.lds.S | 41 . = ALIGN(PAGE_SIZE); 80 . = ALIGN(PAGE_SIZE); 143 . = ALIGN(PAGE_SIZE); /* Init code and data */ 150 . = ALIGN(PAGE_SIZE); 205 . = ALIGN(PAGE_SIZE); 207 . = ALIGN(PAGE_SIZE); 249 ASSERT( _end_boot - start <= PAGE_SIZE, "Boot code is larger than 4K")
|
/xen/xen/arch/x86/guest/hyperv/ |
A D | tlb.c | 36 #define HV_TLB_FLUSH_UNIT (4096 * PAGE_SIZE) 43 unsigned long end = cur + (PAGE_SIZE << order); in fill_gva_list() 99 (PAGE_SIZE - sizeof(*flush) - nr_banks * in flush_tlb_ex() 107 if ( !va || (PAGE_SIZE << order) / HV_TLB_FLUSH_UNIT > max_gvas ) in flush_tlb_ex() 124 #define MAX_GVAS ((PAGE_SIZE - sizeof(struct hv_tlb_flush)) / sizeof(uint64_t)) 186 if ( !va || (PAGE_SIZE << order) / HV_TLB_FLUSH_UNIT > MAX_GVAS ) in hyperv_flush_tlb()
|
/xen/stubdom/grub/ |
A D | mini-os.c | 218 if (strlen(arg) >= PAGE_SIZE) { in load_module() 223 rounded_new_module_size = (new_module_size + PAGE_SIZE - 1) & PAGE_MASK; in load_module() 234 multiboot_next_module = (void*) PAGE_SIZE; in load_module() 238 (multiboot_next_module - module_image) + rounded_new_module_size + PAGE_SIZE); in load_module() 245 if ((void*) (multiboot_next_module_header+1) - module_image > PAGE_SIZE) { in load_module() 260 multiboot_next_module += PAGE_SIZE; in load_module() 669 int numpages = (memsize + PAGE_SIZE - 1) / PAGE_SIZE; in fb_open() 676 memset(fb + i * PAGE_SIZE, 0, PAGE_SIZE); in fb_open() 677 mfns[i] = virtual_to_mfn(fb + i * PAGE_SIZE); in fb_open() 736 char grub_scratch_mem[SCRATCH_MEMSIZE] __attribute__((aligned(PAGE_SIZE))); [all …]
|
/xen/xen/common/ |
A D | vmap.c | 33 vm_top[type] = nr * PAGE_SIZE * 8; in vm_init_type() 35 for ( i = 0, va = (unsigned long)vm_bitmap(type); i < nr; ++i, va += PAGE_SIZE ) in vm_init_type() 113 vm_top[t] += PAGE_SIZE * 8; in vm_alloc() 139 return vm_base[t] + start * PAGE_SIZE; in vm_alloc() 144 unsigned long addr = (unsigned long)va & ~(PAGE_SIZE - 1); in vm_index() 152 addr >= start + vm_top[type] * PAGE_SIZE ) in vm_index() 209 for ( ; va && nr--; ++mfn, cur += PAGE_SIZE * granularity ) in __vmap() 235 destroy_xen_mappings(addr, addr + PAGE_SIZE * pages); in vunmap() 296 for ( i = 0; i < size; i += PAGE_SIZE ) in vzalloc() 322 struct page_info *page = vmap_to_page(va + i * PAGE_SIZE); in vfree()
|
A D | kimage.c | 63 #define KIMAGE_LAST_ENTRY (PAGE_SIZE/sizeof(kimage_entry_t) - 1) 319 eaddr = addr + PAGE_SIZE; in kimage_alloc_normal_control_page() 378 hole_end = hole_start + PAGE_SIZE; in kimage_alloc_crash_control_page() 394 hole_end = hole_start + PAGE_SIZE; in kimage_alloc_crash_control_page() 562 destination += PAGE_SIZE; in kimage_dst_used() 624 addr + PAGE_SIZE) ) in kimage_alloc_page() 692 size = min_t(unsigned long, PAGE_SIZE, to_copy); in kimage_load_normal_segment() 709 dest += PAGE_SIZE; in kimage_load_normal_segment() 714 for ( ; dest < end; dest += PAGE_SIZE ) in kimage_load_normal_segment() 744 dchunk = PAGE_SIZE; in kimage_load_crash_segment() [all …]
|
/xen/misc/coverity/ |
A D | model.c | 37 #define PAGE_SIZE 4096UL macro 38 #define PAGE_MASK (~(PAGE_SIZE-1)) 88 unsigned long ptr = (unsigned long)__coverity_alloc__(PAGE_SIZE); in map_domain_page()
|
/xen/xen/arch/x86/acpi/ |
A D | lib.c | 49 offset = phys & (PAGE_SIZE - 1); in __acpi_map_table() 50 mapped_size = PAGE_SIZE - offset; in __acpi_map_table() 61 phys += PAGE_SIZE; in __acpi_map_table() 63 mapped_size += PAGE_SIZE; in __acpi_map_table()
|
/xen/xen/include/asm-arm/ |
A D | config.h | 111 #define FIXMAP_ADDR(n) (_AT(vaddr_t,0x00400000) + (n) * PAGE_SIZE) 180 #define PAGE_SIZE (_AC(1,L) << PAGE_SHIFT) macro 181 #define PAGE_MASK (~(PAGE_SIZE-1)) 187 #define STACK_SIZE (PAGE_SIZE << STACK_ORDER)
|
/xen/xen/include/asm-x86/ |
A D | config.h | 67 #define STACK_SIZE (PAGE_SIZE << STACK_ORDER) 71 #define TRAMPOLINE_STACK_SPACE PAGE_SIZE 75 #define MBI_SPACE_MIN (2 * PAGE_SIZE) 86 #define STUBS_PER_PAGE (PAGE_SIZE / STUB_BUF_SIZE) 303 MAPCACHE_ENTRIES * PAGE_SIZE)
|
/xen/xen/include/xen/ |
A D | pfn.h | 7 #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) 9 #define round_pgup(p) (((p) + (PAGE_SIZE - 1)) & PAGE_MASK)
|
/xen/xen/arch/x86/pv/ |
A D | dom0_build.c | 76 if ( !((unsigned long)++pl1e & (PAGE_SIZE - 1)) ) in mark_pv_pt_pages_rdonly() 78 if ( !((unsigned long)++pl2e & (PAGE_SIZE - 1)) ) in mark_pv_pt_pages_rdonly() 80 if ( !((unsigned long)++pl3e & (PAGE_SIZE - 1)) ) in mark_pv_pt_pages_rdonly() 218 vphysmap_start += PAGE_SIZE; in setup_pv_physmap() 458 vxenstore_end = vxenstore_start + PAGE_SIZE; in dom0_construct_pv() 460 vconsole_end = vconsole_start + PAGE_SIZE; in dom0_construct_pv() 473 vstack_end = vstack_start + PAGE_SIZE; in dom0_construct_pv() 616 l3start = __va(mpt_alloc); mpt_alloc += PAGE_SIZE; in dom0_construct_pv() 623 if ( !((unsigned long)l1tab & (PAGE_SIZE-1)) ) in dom0_construct_pv() 630 if ( !((unsigned long)l2tab & (PAGE_SIZE-1)) ) in dom0_construct_pv() [all …]
|