aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/xen/mmu.c')
-rw-r--r--arch/x86/xen/mmu.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c
index 2c50b445884e..9c479fe40459 100644
--- a/arch/x86/xen/mmu.c
+++ b/arch/x86/xen/mmu.c
@@ -2812,9 +2812,9 @@ static int remap_area_mfn_pte_fn(pte_t *ptep, pgtable_t token,
2812 return 0; 2812 return 0;
2813} 2813}
2814 2814
2815static int do_remap_mfn(struct vm_area_struct *vma, 2815static int do_remap_gfn(struct vm_area_struct *vma,
2816 unsigned long addr, 2816 unsigned long addr,
2817 xen_pfn_t *mfn, int nr, 2817 xen_pfn_t *gfn, int nr,
2818 int *err_ptr, pgprot_t prot, 2818 int *err_ptr, pgprot_t prot,
2819 unsigned domid, 2819 unsigned domid,
2820 struct page **pages) 2820 struct page **pages)
@@ -2830,14 +2830,14 @@ static int do_remap_mfn(struct vm_area_struct *vma,
2830 if (xen_feature(XENFEAT_auto_translated_physmap)) { 2830 if (xen_feature(XENFEAT_auto_translated_physmap)) {
2831#ifdef CONFIG_XEN_PVH 2831#ifdef CONFIG_XEN_PVH
2832 /* We need to update the local page tables and the xen HAP */ 2832 /* We need to update the local page tables and the xen HAP */
2833 return xen_xlate_remap_gfn_array(vma, addr, mfn, nr, err_ptr, 2833 return xen_xlate_remap_gfn_array(vma, addr, gfn, nr, err_ptr,
2834 prot, domid, pages); 2834 prot, domid, pages);
2835#else 2835#else
2836 return -EINVAL; 2836 return -EINVAL;
2837#endif 2837#endif
2838 } 2838 }
2839 2839
2840 rmd.mfn = mfn; 2840 rmd.mfn = gfn;
2841 rmd.prot = prot; 2841 rmd.prot = prot;
2842 /* We use the err_ptr to indicate if there we are doing a contigious 2842 /* We use the err_ptr to indicate if there we are doing a contigious
2843 * mapping or a discontigious mapping. */ 2843 * mapping or a discontigious mapping. */
@@ -2865,8 +2865,8 @@ static int do_remap_mfn(struct vm_area_struct *vma,
2865 batch_left, &done, domid); 2865 batch_left, &done, domid);
2866 2866
2867 /* 2867 /*
2868 * @err_ptr may be the same buffer as @mfn, so 2868 * @err_ptr may be the same buffer as @gfn, so
2869 * only clear it after each chunk of @mfn is 2869 * only clear it after each chunk of @gfn is
2870 * used. 2870 * used.
2871 */ 2871 */
2872 if (err_ptr) { 2872 if (err_ptr) {
@@ -2896,19 +2896,19 @@ out:
2896 return err < 0 ? err : mapped; 2896 return err < 0 ? err : mapped;
2897} 2897}
2898 2898
2899int xen_remap_domain_mfn_range(struct vm_area_struct *vma, 2899int xen_remap_domain_gfn_range(struct vm_area_struct *vma,
2900 unsigned long addr, 2900 unsigned long addr,
2901 xen_pfn_t mfn, int nr, 2901 xen_pfn_t gfn, int nr,
2902 pgprot_t prot, unsigned domid, 2902 pgprot_t prot, unsigned domid,
2903 struct page **pages) 2903 struct page **pages)
2904{ 2904{
2905 return do_remap_mfn(vma, addr, &mfn, nr, NULL, prot, domid, pages); 2905 return do_remap_gfn(vma, addr, &gfn, nr, NULL, prot, domid, pages);
2906} 2906}
2907EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range); 2907EXPORT_SYMBOL_GPL(xen_remap_domain_gfn_range);
2908 2908
2909int xen_remap_domain_mfn_array(struct vm_area_struct *vma, 2909int xen_remap_domain_gfn_array(struct vm_area_struct *vma,
2910 unsigned long addr, 2910 unsigned long addr,
2911 xen_pfn_t *mfn, int nr, 2911 xen_pfn_t *gfn, int nr,
2912 int *err_ptr, pgprot_t prot, 2912 int *err_ptr, pgprot_t prot,
2913 unsigned domid, struct page **pages) 2913 unsigned domid, struct page **pages)
2914{ 2914{
@@ -2917,13 +2917,13 @@ int xen_remap_domain_mfn_array(struct vm_area_struct *vma,
2917 * cause of "wrong memory was mapped in". 2917 * cause of "wrong memory was mapped in".
2918 */ 2918 */
2919 BUG_ON(err_ptr == NULL); 2919 BUG_ON(err_ptr == NULL);
2920 return do_remap_mfn(vma, addr, mfn, nr, err_ptr, prot, domid, pages); 2920 return do_remap_gfn(vma, addr, gfn, nr, err_ptr, prot, domid, pages);
2921} 2921}
2922EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_array); 2922EXPORT_SYMBOL_GPL(xen_remap_domain_gfn_array);
2923 2923
2924 2924
2925/* Returns: 0 success */ 2925/* Returns: 0 success */
2926int xen_unmap_domain_mfn_range(struct vm_area_struct *vma, 2926int xen_unmap_domain_gfn_range(struct vm_area_struct *vma,
2927 int numpgs, struct page **pages) 2927 int numpgs, struct page **pages)
2928{ 2928{
2929 if (!pages || !xen_feature(XENFEAT_auto_translated_physmap)) 2929 if (!pages || !xen_feature(XENFEAT_auto_translated_physmap))
@@ -2935,4 +2935,4 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
2935 return -EINVAL; 2935 return -EINVAL;
2936#endif 2936#endif
2937} 2937}
2938EXPORT_SYMBOL_GPL(xen_unmap_domain_mfn_range); 2938EXPORT_SYMBOL_GPL(xen_unmap_domain_gfn_range);