mmu_pv.c (ecb41832bd2a7a3f8ac93527cec5e51e3827daed) | mmu_pv.c (55aedddb6149ab71bec9f050846855113977b033) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2 3/* 4 * Xen mmu operations 5 * 6 * This file contains the various mmu fetch and update operations. 7 * The most important job they must perform is the mapping between the 8 * domain's pfn and the overall machine mfns. --- 1293 unchanged lines hidden (view full) --- 1302 xen_remap_memory(); 1303 xen_setup_mfn_list_list(); 1304} 1305static void xen_write_cr2(unsigned long cr2) 1306{ 1307 this_cpu_read(xen_vcpu)->arch.cr2 = cr2; 1308} 1309 | 1// SPDX-License-Identifier: GPL-2.0 2 3/* 4 * Xen mmu operations 5 * 6 * This file contains the various mmu fetch and update operations. 7 * The most important job they must perform is the mapping between the 8 * domain's pfn and the overall machine mfns. --- 1293 unchanged lines hidden (view full) --- 1302 xen_remap_memory(); 1303 xen_setup_mfn_list_list(); 1304} 1305static void xen_write_cr2(unsigned long cr2) 1306{ 1307 this_cpu_read(xen_vcpu)->arch.cr2 = cr2; 1308} 1309 |
1310static unsigned long xen_read_cr2(void) 1311{ 1312 return this_cpu_read(xen_vcpu)->arch.cr2; 1313} 1314 1315unsigned long xen_read_cr2_direct(void) 1316{ 1317 return this_cpu_read(xen_vcpu_info.arch.cr2); 1318} 1319 | |
1320static noinline void xen_flush_tlb(void) 1321{ 1322 struct mmuext_op *op; 1323 struct multicall_space mcs; 1324 1325 preempt_disable(); 1326 1327 mcs = xen_mc_entry(sizeof(*op)); --- 1064 unchanged lines hidden (view full) --- 2392{ 2393 preempt_disable(); 2394 xen_mc_flush(); 2395 paravirt_leave_lazy_mmu(); 2396 preempt_enable(); 2397} 2398 2399static const struct pv_mmu_ops xen_mmu_ops __initconst = { | 1310static noinline void xen_flush_tlb(void) 1311{ 1312 struct mmuext_op *op; 1313 struct multicall_space mcs; 1314 1315 preempt_disable(); 1316 1317 mcs = xen_mc_entry(sizeof(*op)); --- 1064 unchanged lines hidden (view full) --- 2382{ 2383 preempt_disable(); 2384 xen_mc_flush(); 2385 paravirt_leave_lazy_mmu(); 2386 preempt_enable(); 2387} 2388 2389static const struct pv_mmu_ops xen_mmu_ops __initconst = { |
2400 .read_cr2 = xen_read_cr2, | 2390 .read_cr2 = __PV_IS_CALLEE_SAVE(xen_read_cr2), |
2401 .write_cr2 = xen_write_cr2, 2402 2403 .read_cr3 = xen_read_cr3, 2404 .write_cr3 = xen_write_cr3_init, 2405 2406 .flush_tlb_user = xen_flush_tlb, 2407 .flush_tlb_kernel = xen_flush_tlb, 2408 .flush_tlb_one_user = xen_flush_tlb_one_user, --- 286 unchanged lines hidden (view full) --- 2695struct remap_data { 2696 xen_pfn_t *pfn; 2697 bool contiguous; 2698 bool no_translate; 2699 pgprot_t prot; 2700 struct mmu_update *mmu_update; 2701}; 2702 | 2391 .write_cr2 = xen_write_cr2, 2392 2393 .read_cr3 = xen_read_cr3, 2394 .write_cr3 = xen_write_cr3_init, 2395 2396 .flush_tlb_user = xen_flush_tlb, 2397 .flush_tlb_kernel = xen_flush_tlb, 2398 .flush_tlb_one_user = xen_flush_tlb_one_user, --- 286 unchanged lines hidden (view full) --- 2685struct remap_data { 2686 xen_pfn_t *pfn; 2687 bool contiguous; 2688 bool no_translate; 2689 pgprot_t prot; 2690 struct mmu_update *mmu_update; 2691}; 2692 |
2703static int remap_area_pfn_pte_fn(pte_t *ptep, pgtable_t token, 2704 unsigned long addr, void *data) | 2693static int remap_area_pfn_pte_fn(pte_t *ptep, unsigned long addr, void *data) |
2705{ 2706 struct remap_data *rmd = data; 2707 pte_t pte = pte_mkspecial(mfn_pte(*rmd->pfn, rmd->prot)); 2708 2709 /* 2710 * If we have a contiguous range, just update the pfn itself, 2711 * else update pointer to be "next pfn". 2712 */ --- 103 unchanged lines hidden --- | 2694{ 2695 struct remap_data *rmd = data; 2696 pte_t pte = pte_mkspecial(mfn_pte(*rmd->pfn, rmd->prot)); 2697 2698 /* 2699 * If we have a contiguous range, just update the pfn itself, 2700 * else update pointer to be "next pfn". 2701 */ --- 103 unchanged lines hidden --- |