Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'upstream/tidy-xen-mmu-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen

* 'upstream/tidy-xen-mmu-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
xen: fix compile without CONFIG_XEN_DEBUG_FS
Use arbitrary_virt_to_machine() to deal with ioremapped pud updates.
Use arbitrary_virt_to_machine() to deal with ioremapped pmd updates.
xen/mmu: remove all ad-hoc stats stuff
xen: use normal virt_to_machine for ptes
xen: make a pile of mmu pvop functions static
vmalloc: remove vmalloc_sync_all() from alloc_vm_area()
xen: condense everything onto xen_set_pte
xen: use mmu_update for xen_set_pte_at()
xen: drop all the special iomap pte paths.

+52 -277
+52 -236
arch/x86/xen/mmu.c
··· 75 75 #include "mmu.h" 76 76 #include "debugfs.h" 77 77 78 - #define MMU_UPDATE_HISTO 30 79 - 80 78 /* 81 79 * Protects atomic reservation decrease/increase against concurrent increases. 82 80 * Also protects non-atomic updates of current_pages and balloon lists. 83 81 */ 84 82 DEFINE_SPINLOCK(xen_reservation_lock); 85 - 86 - #ifdef CONFIG_XEN_DEBUG_FS 87 - 88 - static struct { 89 - u32 pgd_update; 90 - u32 pgd_update_pinned; 91 - u32 pgd_update_batched; 92 - 93 - u32 pud_update; 94 - u32 pud_update_pinned; 95 - u32 pud_update_batched; 96 - 97 - u32 pmd_update; 98 - u32 pmd_update_pinned; 99 - u32 pmd_update_batched; 100 - 101 - u32 pte_update; 102 - u32 pte_update_pinned; 103 - u32 pte_update_batched; 104 - 105 - u32 mmu_update; 106 - u32 mmu_update_extended; 107 - u32 mmu_update_histo[MMU_UPDATE_HISTO]; 108 - 109 - u32 prot_commit; 110 - u32 prot_commit_batched; 111 - 112 - u32 set_pte_at; 113 - u32 set_pte_at_batched; 114 - u32 set_pte_at_pinned; 115 - u32 set_pte_at_current; 116 - u32 set_pte_at_kernel; 117 - } mmu_stats; 118 - 119 - static u8 zero_stats; 120 - 121 - static inline void check_zero(void) 122 - { 123 - if (unlikely(zero_stats)) { 124 - memset(&mmu_stats, 0, sizeof(mmu_stats)); 125 - zero_stats = 0; 126 - } 127 - } 128 - 129 - #define ADD_STATS(elem, val) \ 130 - do { check_zero(); mmu_stats.elem += (val); } while(0) 131 - 132 - #else /* !CONFIG_XEN_DEBUG_FS */ 133 - 134 - #define ADD_STATS(elem, val) do { (void)(val); } while(0) 135 - 136 - #endif /* CONFIG_XEN_DEBUG_FS */ 137 - 138 83 139 84 /* 140 85 * Identity map, in addition to plain kernel map. This needs to be ··· 188 243 return PagePinned(page); 189 244 } 190 245 191 - static bool xen_iomap_pte(pte_t pte) 192 - { 193 - return pte_flags(pte) & _PAGE_IOMAP; 194 - } 195 - 196 246 void xen_set_domain_pte(pte_t *ptep, pte_t pteval, unsigned domid) 197 247 { 198 248 struct multicall_space mcs; ··· 197 257 u = mcs.args; 198 258 199 259 /* ptep might be kmapped when using 32-bit HIGHPTE */ 200 - u->ptr = arbitrary_virt_to_machine(ptep).maddr; 260 + u->ptr = virt_to_machine(ptep).maddr; 201 261 u->val = pte_val_ma(pteval); 202 262 203 263 MULTI_mmu_update(mcs.mc, mcs.args, 1, NULL, domid); ··· 205 265 xen_mc_issue(PARAVIRT_LAZY_MMU); 206 266 } 207 267 EXPORT_SYMBOL_GPL(xen_set_domain_pte); 208 - 209 - static void xen_set_iomap_pte(pte_t *ptep, pte_t pteval) 210 - { 211 - xen_set_domain_pte(ptep, pteval, DOMID_IO); 212 - } 213 268 214 269 static void xen_extend_mmu_update(const struct mmu_update *update) 215 270 { ··· 214 279 mcs = xen_mc_extend_args(__HYPERVISOR_mmu_update, sizeof(*u)); 215 280 216 281 if (mcs.mc != NULL) { 217 - ADD_STATS(mmu_update_extended, 1); 218 - ADD_STATS(mmu_update_histo[mcs.mc->args[1]], -1); 219 - 220 282 mcs.mc->args[1]++; 221 - 222 - if (mcs.mc->args[1] < MMU_UPDATE_HISTO) 223 - ADD_STATS(mmu_update_histo[mcs.mc->args[1]], 1); 224 - else 225 - ADD_STATS(mmu_update_histo[0], 1); 226 283 } else { 227 - ADD_STATS(mmu_update, 1); 228 284 mcs = __xen_mc_entry(sizeof(*u)); 229 285 MULTI_mmu_update(mcs.mc, mcs.args, 1, NULL, DOMID_SELF); 230 - ADD_STATS(mmu_update_histo[1], 1); 231 286 } 232 287 233 288 u = mcs.args; 234 289 *u = *update; 235 290 } 236 291 237 - void xen_set_pmd_hyper(pmd_t *ptr, pmd_t val) 292 + static void xen_set_pmd_hyper(pmd_t *ptr, pmd_t val) 238 293 { 239 294 struct mmu_update u; 240 295 ··· 237 312 u.val = pmd_val_ma(val); 238 313 xen_extend_mmu_update(&u); 239 314 240 - ADD_STATS(pmd_update_batched, paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU); 241 - 242 315 xen_mc_issue(PARAVIRT_LAZY_MMU); 243 316 244 317 preempt_enable(); 245 318 } 246 319 247 - void xen_set_pmd(pmd_t *ptr, pmd_t val) 320 + static void xen_set_pmd(pmd_t *ptr, pmd_t val) 248 321 { 249 - ADD_STATS(pmd_update, 1); 250 - 251 322 /* If page is not pinned, we can just update the entry 252 323 directly */ 253 324 if (!xen_page_pinned(ptr)) { 254 325 *ptr = val; 255 326 return; 256 327 } 257 - 258 - ADD_STATS(pmd_update_pinned, 1); 259 328 260 329 xen_set_pmd_hyper(ptr, val); 261 330 } ··· 263 344 set_pte_vaddr(vaddr, mfn_pte(mfn, flags)); 264 345 } 265 346 266 - void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, 347 + static bool xen_batched_set_pte(pte_t *ptep, pte_t pteval) 348 + { 349 + struct mmu_update u; 350 + 351 + if (paravirt_get_lazy_mode() != PARAVIRT_LAZY_MMU) 352 + return false; 353 + 354 + xen_mc_batch(); 355 + 356 + u.ptr = virt_to_machine(ptep).maddr | MMU_NORMAL_PT_UPDATE; 357 + u.val = pte_val_ma(pteval); 358 + xen_extend_mmu_update(&u); 359 + 360 + xen_mc_issue(PARAVIRT_LAZY_MMU); 361 + 362 + return true; 363 + } 364 + 365 + static void xen_set_pte(pte_t *ptep, pte_t pteval) 366 + { 367 + if (!xen_batched_set_pte(ptep, pteval)) 368 + native_set_pte(ptep, pteval); 369 + } 370 + 371 + static void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, 267 372 pte_t *ptep, pte_t pteval) 268 373 { 269 - if (xen_iomap_pte(pteval)) { 270 - xen_set_iomap_pte(ptep, pteval); 271 - goto out; 272 - } 273 - 274 - ADD_STATS(set_pte_at, 1); 275 - // ADD_STATS(set_pte_at_pinned, xen_page_pinned(ptep)); 276 - ADD_STATS(set_pte_at_current, mm == current->mm); 277 - ADD_STATS(set_pte_at_kernel, mm == &init_mm); 278 - 279 - if (mm == current->mm || mm == &init_mm) { 280 - if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) { 281 - struct multicall_space mcs; 282 - mcs = xen_mc_entry(0); 283 - 284 - MULTI_update_va_mapping(mcs.mc, addr, pteval, 0); 285 - ADD_STATS(set_pte_at_batched, 1); 286 - xen_mc_issue(PARAVIRT_LAZY_MMU); 287 - goto out; 288 - } else 289 - if (HYPERVISOR_update_va_mapping(addr, pteval, 0) == 0) 290 - goto out; 291 - } 292 374 xen_set_pte(ptep, pteval); 293 - 294 - out: return; 295 375 } 296 376 297 377 pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, ··· 307 389 308 390 xen_mc_batch(); 309 391 310 - u.ptr = arbitrary_virt_to_machine(ptep).maddr | MMU_PT_UPDATE_PRESERVE_AD; 392 + u.ptr = virt_to_machine(ptep).maddr | MMU_PT_UPDATE_PRESERVE_AD; 311 393 u.val = pte_val_ma(pte); 312 394 xen_extend_mmu_update(&u); 313 - 314 - ADD_STATS(prot_commit, 1); 315 - ADD_STATS(prot_commit_batched, paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU); 316 395 317 396 xen_mc_issue(PARAVIRT_LAZY_MMU); 318 397 } ··· 378 463 return val; 379 464 } 380 465 381 - pteval_t xen_pte_val(pte_t pte) 466 + static pteval_t xen_pte_val(pte_t pte) 382 467 { 383 468 pteval_t pteval = pte.pte; 384 469 ··· 395 480 } 396 481 PV_CALLEE_SAVE_REGS_THUNK(xen_pte_val); 397 482 398 - pgdval_t xen_pgd_val(pgd_t pgd) 483 + static pgdval_t xen_pgd_val(pgd_t pgd) 399 484 { 400 485 return pte_mfn_to_pfn(pgd.pgd); 401 486 } ··· 426 511 WARN_ON(pat != 0x0007010600070106ull); 427 512 } 428 513 429 - pte_t xen_make_pte(pteval_t pte) 514 + static pte_t xen_make_pte(pteval_t pte) 430 515 { 431 516 phys_addr_t addr = (pte & PTE_PFN_MASK); 432 517 ··· 496 581 PV_CALLEE_SAVE_REGS_THUNK(xen_make_pte_debug); 497 582 #endif 498 583 499 - pgd_t xen_make_pgd(pgdval_t pgd) 584 + static pgd_t xen_make_pgd(pgdval_t pgd) 500 585 { 501 586 pgd = pte_pfn_to_mfn(pgd); 502 587 return native_make_pgd(pgd); 503 588 } 504 589 PV_CALLEE_SAVE_REGS_THUNK(xen_make_pgd); 505 590 506 - pmdval_t xen_pmd_val(pmd_t pmd) 591 + static pmdval_t xen_pmd_val(pmd_t pmd) 507 592 { 508 593 return pte_mfn_to_pfn(pmd.pmd); 509 594 } 510 595 PV_CALLEE_SAVE_REGS_THUNK(xen_pmd_val); 511 596 512 - void xen_set_pud_hyper(pud_t *ptr, pud_t val) 597 + static void xen_set_pud_hyper(pud_t *ptr, pud_t val) 513 598 { 514 599 struct mmu_update u; 515 600 ··· 522 607 u.val = pud_val_ma(val); 523 608 xen_extend_mmu_update(&u); 524 609 525 - ADD_STATS(pud_update_batched, paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU); 526 - 527 610 xen_mc_issue(PARAVIRT_LAZY_MMU); 528 611 529 612 preempt_enable(); 530 613 } 531 614 532 - void xen_set_pud(pud_t *ptr, pud_t val) 615 + static void xen_set_pud(pud_t *ptr, pud_t val) 533 616 { 534 - ADD_STATS(pud_update, 1); 535 - 536 617 /* If page is not pinned, we can just update the entry 537 618 directly */ 538 619 if (!xen_page_pinned(ptr)) { ··· 536 625 return; 537 626 } 538 627 539 - ADD_STATS(pud_update_pinned, 1); 540 - 541 628 xen_set_pud_hyper(ptr, val); 542 629 } 543 630 544 - void xen_set_pte(pte_t *ptep, pte_t pte) 545 - { 546 - if (xen_iomap_pte(pte)) { 547 - xen_set_iomap_pte(ptep, pte); 548 - return; 549 - } 550 - 551 - ADD_STATS(pte_update, 1); 552 - // ADD_STATS(pte_update_pinned, xen_page_pinned(ptep)); 553 - ADD_STATS(pte_update_batched, paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU); 554 - 555 631 #ifdef CONFIG_X86_PAE 556 - ptep->pte_high = pte.pte_high; 557 - smp_wmb(); 558 - ptep->pte_low = pte.pte_low; 559 - #else 560 - *ptep = pte; 561 - #endif 562 - } 563 - 564 - #ifdef CONFIG_X86_PAE 565 - void xen_set_pte_atomic(pte_t *ptep, pte_t pte) 632 + static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) 566 633 { 567 - if (xen_iomap_pte(pte)) { 568 - xen_set_iomap_pte(ptep, pte); 569 - return; 570 - } 571 - 572 634 set_64bit((u64 *)ptep, native_pte_val(pte)); 573 635 } 574 636 575 - void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 637 + static void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 576 638 { 577 - ptep->pte_low = 0; 578 - smp_wmb(); /* make sure low gets written first */ 579 - ptep->pte_high = 0; 639 + if (!xen_batched_set_pte(ptep, native_make_pte(0))) 640 + native_pte_clear(mm, addr, ptep); 580 641 } 581 642 582 - void xen_pmd_clear(pmd_t *pmdp) 643 + static void xen_pmd_clear(pmd_t *pmdp) 583 644 { 584 645 set_pmd(pmdp, __pmd(0)); 585 646 } 586 647 #endif /* CONFIG_X86_PAE */ 587 648 588 - pmd_t xen_make_pmd(pmdval_t pmd) 649 + static pmd_t xen_make_pmd(pmdval_t pmd) 589 650 { 590 651 pmd = pte_pfn_to_mfn(pmd); 591 652 return native_make_pmd(pmd); ··· 565 682 PV_CALLEE_SAVE_REGS_THUNK(xen_make_pmd); 566 683 567 684 #if PAGETABLE_LEVELS == 4 568 - pudval_t xen_pud_val(pud_t pud) 685 + static pudval_t xen_pud_val(pud_t pud) 569 686 { 570 687 return pte_mfn_to_pfn(pud.pud); 571 688 } 572 689 PV_CALLEE_SAVE_REGS_THUNK(xen_pud_val); 573 690 574 - pud_t xen_make_pud(pudval_t pud) 691 + static pud_t xen_make_pud(pudval_t pud) 575 692 { 576 693 pud = pte_pfn_to_mfn(pud); 577 694 ··· 579 696 } 580 697 PV_CALLEE_SAVE_REGS_THUNK(xen_make_pud); 581 698 582 - pgd_t *xen_get_user_pgd(pgd_t *pgd) 699 + static pgd_t *xen_get_user_pgd(pgd_t *pgd) 583 700 { 584 701 pgd_t *pgd_page = (pgd_t *)(((unsigned long)pgd) & PAGE_MASK); 585 702 unsigned offset = pgd - pgd_page; ··· 611 728 * 2. It is always pinned 612 729 * 3. It has no user pagetable attached to it 613 730 */ 614 - void __init xen_set_pgd_hyper(pgd_t *ptr, pgd_t val) 731 + static void __init xen_set_pgd_hyper(pgd_t *ptr, pgd_t val) 615 732 { 616 733 preempt_disable(); 617 734 ··· 624 741 preempt_enable(); 625 742 } 626 743 627 - void xen_set_pgd(pgd_t *ptr, pgd_t val) 744 + static void xen_set_pgd(pgd_t *ptr, pgd_t val) 628 745 { 629 746 pgd_t *user_ptr = xen_get_user_pgd(ptr); 630 - 631 - ADD_STATS(pgd_update, 1); 632 747 633 748 /* If page is not pinned, we can just update the entry 634 749 directly */ ··· 638 757 } 639 758 return; 640 759 } 641 - 642 - ADD_STATS(pgd_update_pinned, 1); 643 - ADD_STATS(pgd_update_batched, paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU); 644 760 645 761 /* If it's pinned, then we can at least batch the kernel and 646 762 user updates together. */ ··· 1040 1162 spin_unlock(&pgd_lock); 1041 1163 } 1042 1164 1043 - void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next) 1165 + static void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next) 1044 1166 { 1045 1167 spin_lock(&next->page_table_lock); 1046 1168 xen_pgd_pin(next); 1047 1169 spin_unlock(&next->page_table_lock); 1048 1170 } 1049 1171 1050 - void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm) 1172 + static void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm) 1051 1173 { 1052 1174 spin_lock(&mm->page_table_lock); 1053 1175 xen_pgd_pin(mm); ··· 1134 1256 * pagetable because of lazy tlb flushing. This means we need need to 1135 1257 * switch all CPUs off this pagetable before we can unpin it. 1136 1258 */ 1137 - void xen_exit_mmap(struct mm_struct *mm) 1259 + static void xen_exit_mmap(struct mm_struct *mm) 1138 1260 { 1139 1261 get_cpu(); /* make sure we don't move around */ 1140 1262 xen_drop_mm_ref(mm); ··· 2249 2371 struct remap_data *rmd = data; 2250 2372 pte_t pte = pte_mkspecial(pfn_pte(rmd->mfn++, rmd->prot)); 2251 2373 2252 - rmd->mmu_update->ptr = arbitrary_virt_to_machine(ptep).maddr; 2374 + rmd->mmu_update->ptr = virt_to_machine(ptep).maddr; 2253 2375 rmd->mmu_update->val = pte_val_ma(pte); 2254 2376 rmd->mmu_update++; 2255 2377 ··· 2303 2425 EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range); 2304 2426 2305 2427 #ifdef CONFIG_XEN_DEBUG_FS 2306 - 2307 2428 static int p2m_dump_open(struct inode *inode, struct file *filp) 2308 2429 { 2309 2430 return single_open(filp, p2m_dump_show, NULL); ··· 2314 2437 .llseek = seq_lseek, 2315 2438 .release = single_release, 2316 2439 }; 2317 - 2318 - static struct dentry *d_mmu_debug; 2319 - 2320 - static int __init xen_mmu_debugfs(void) 2321 - { 2322 - struct dentry *d_xen = xen_init_debugfs(); 2323 - 2324 - if (d_xen == NULL) 2325 - return -ENOMEM; 2326 - 2327 - d_mmu_debug = debugfs_create_dir("mmu", d_xen); 2328 - 2329 - debugfs_create_u8("zero_stats", 0644, d_mmu_debug, &zero_stats); 2330 - 2331 - debugfs_create_u32("pgd_update", 0444, d_mmu_debug, &mmu_stats.pgd_update); 2332 - debugfs_create_u32("pgd_update_pinned", 0444, d_mmu_debug, 2333 - &mmu_stats.pgd_update_pinned); 2334 - debugfs_create_u32("pgd_update_batched", 0444, d_mmu_debug, 2335 - &mmu_stats.pgd_update_pinned); 2336 - 2337 - debugfs_create_u32("pud_update", 0444, d_mmu_debug, &mmu_stats.pud_update); 2338 - debugfs_create_u32("pud_update_pinned", 0444, d_mmu_debug, 2339 - &mmu_stats.pud_update_pinned); 2340 - debugfs_create_u32("pud_update_batched", 0444, d_mmu_debug, 2341 - &mmu_stats.pud_update_pinned); 2342 - 2343 - debugfs_create_u32("pmd_update", 0444, d_mmu_debug, &mmu_stats.pmd_update); 2344 - debugfs_create_u32("pmd_update_pinned", 0444, d_mmu_debug, 2345 - &mmu_stats.pmd_update_pinned); 2346 - debugfs_create_u32("pmd_update_batched", 0444, d_mmu_debug, 2347 - &mmu_stats.pmd_update_pinned); 2348 - 2349 - debugfs_create_u32("pte_update", 0444, d_mmu_debug, &mmu_stats.pte_update); 2350 - // debugfs_create_u32("pte_update_pinned", 0444, d_mmu_debug, 2351 - // &mmu_stats.pte_update_pinned); 2352 - debugfs_create_u32("pte_update_batched", 0444, d_mmu_debug, 2353 - &mmu_stats.pte_update_pinned); 2354 - 2355 - debugfs_create_u32("mmu_update", 0444, d_mmu_debug, &mmu_stats.mmu_update); 2356 - debugfs_create_u32("mmu_update_extended", 0444, d_mmu_debug, 2357 - &mmu_stats.mmu_update_extended); 2358 - xen_debugfs_create_u32_array("mmu_update_histo", 0444, d_mmu_debug, 2359 - mmu_stats.mmu_update_histo, 20); 2360 - 2361 - debugfs_create_u32("set_pte_at", 0444, d_mmu_debug, &mmu_stats.set_pte_at); 2362 - debugfs_create_u32("set_pte_at_batched", 0444, d_mmu_debug, 2363 - &mmu_stats.set_pte_at_batched); 2364 - debugfs_create_u32("set_pte_at_current", 0444, d_mmu_debug, 2365 - &mmu_stats.set_pte_at_current); 2366 - debugfs_create_u32("set_pte_at_kernel", 0444, d_mmu_debug, 2367 - &mmu_stats.set_pte_at_kernel); 2368 - 2369 - debugfs_create_u32("prot_commit", 0444, d_mmu_debug, &mmu_stats.prot_commit); 2370 - debugfs_create_u32("prot_commit_batched", 0444, d_mmu_debug, 2371 - &mmu_stats.prot_commit_batched); 2372 - 2373 - debugfs_create_file("p2m", 0600, d_mmu_debug, NULL, &p2m_dump_fops); 2374 - return 0; 2375 - } 2376 - fs_initcall(xen_mmu_debugfs); 2377 - 2378 - #endif /* CONFIG_XEN_DEBUG_FS */ 2440 + #endif /* CONFIG_XEN_DEBUG_FS */
-37
arch/x86/xen/mmu.h
··· 15 15 16 16 void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); 17 17 18 - 19 - void xen_activate_mm(struct mm_struct *prev, struct mm_struct *next); 20 - void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm); 21 - void xen_exit_mmap(struct mm_struct *mm); 22 - 23 - pteval_t xen_pte_val(pte_t); 24 - pmdval_t xen_pmd_val(pmd_t); 25 - pgdval_t xen_pgd_val(pgd_t); 26 - 27 - pte_t xen_make_pte(pteval_t); 28 - pmd_t xen_make_pmd(pmdval_t); 29 - pgd_t xen_make_pgd(pgdval_t); 30 - 31 - void xen_set_pte(pte_t *ptep, pte_t pteval); 32 - void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, 33 - pte_t *ptep, pte_t pteval); 34 - 35 - #ifdef CONFIG_X86_PAE 36 - void xen_set_pte_atomic(pte_t *ptep, pte_t pte); 37 - void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); 38 - void xen_pmd_clear(pmd_t *pmdp); 39 - #endif /* CONFIG_X86_PAE */ 40 - 41 - void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval); 42 - void xen_set_pud(pud_t *ptr, pud_t val); 43 - void xen_set_pmd_hyper(pmd_t *pmdp, pmd_t pmdval); 44 - void xen_set_pud_hyper(pud_t *ptr, pud_t val); 45 - 46 - #if PAGETABLE_LEVELS == 4 47 - pudval_t xen_pud_val(pud_t pud); 48 - pud_t xen_make_pud(pudval_t pudval); 49 - void xen_set_pgd(pgd_t *pgdp, pgd_t pgd); 50 - void xen_set_pgd_hyper(pgd_t *pgdp, pgd_t pgd); 51 - #endif 52 - 53 - pgd_t *xen_get_user_pgd(pgd_t *pgd); 54 - 55 18 pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep); 56 19 void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, 57 20 pte_t *ptep, pte_t pte);
-4
mm/vmalloc.c
··· 2153 2153 return NULL; 2154 2154 } 2155 2155 2156 - /* Make sure the pagetables are constructed in process kernel 2157 - mappings */ 2158 - vmalloc_sync_all(); 2159 - 2160 2156 return area; 2161 2157 } 2162 2158 EXPORT_SYMBOL_GPL(alloc_vm_area);