aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJulien Grall <julien.grall@citrix.com>2015-08-07 12:34:41 -0400
committerJulien Grall <julien.grall@citrix.com>2015-09-08 13:03:54 -0400
commita13d7201d7deedcbb6ac6efa94a1a7d34d3d79ec (patch)
treeccbf55b3856cac4525d13acc671a55398288cfec /include
parent859e3267c515d0cc7cc11528e80a2b7f3edc3bd9 (diff)
xen/privcmd: Further s/MFN/GFN/ clean-up
The privcmd code is mixing the usage of GFN and MFN within the same functions which make the code difficult to understand when you only work with auto-translated guests. The privcmd driver is only dealing with GFN so replace all the mention of MFN into GFN. The ioctl structure used to map foreign change has been left unchanged given that the userspace is using it. Nonetheless, add a comment to explain the expected value within the "mfn" field. Signed-off-by: Julien Grall <julien.grall@citrix.com> Reviewed-by: David Vrabel <david.vrabel@citrix.com> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/xen/privcmd.h4
-rw-r--r--include/xen/xen-ops.h10
2 files changed, 9 insertions, 5 deletions
diff --git a/include/uapi/xen/privcmd.h b/include/uapi/xen/privcmd.h
index a85316811d79..7ddeeda93809 100644
--- a/include/uapi/xen/privcmd.h
+++ b/include/uapi/xen/privcmd.h
@@ -44,6 +44,10 @@ struct privcmd_hypercall {
44 44
45struct privcmd_mmap_entry { 45struct privcmd_mmap_entry {
46 __u64 va; 46 __u64 va;
47 /*
48 * This should be a GFN. It's not possible to change the name because
49 * it's exposed to the user-space.
50 */
47 __u64 mfn; 51 __u64 mfn;
48 __u64 npages; 52 __u64 npages;
49}; 53};
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index 0ce4f32017ea..e4e214a5abd5 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -30,7 +30,7 @@ void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order);
30struct vm_area_struct; 30struct vm_area_struct;
31 31
32/* 32/*
33 * xen_remap_domain_mfn_array() - map an array of foreign frames 33 * xen_remap_domain_gfn_array() - map an array of foreign frames
34 * @vma: VMA to map the pages into 34 * @vma: VMA to map the pages into
35 * @addr: Address at which to map the pages 35 * @addr: Address at which to map the pages
36 * @gfn: Array of GFNs to map 36 * @gfn: Array of GFNs to map
@@ -46,14 +46,14 @@ struct vm_area_struct;
46 * Returns the number of successfully mapped frames, or a -ve error 46 * Returns the number of successfully mapped frames, or a -ve error
47 * code. 47 * code.
48 */ 48 */
49int xen_remap_domain_mfn_array(struct vm_area_struct *vma, 49int xen_remap_domain_gfn_array(struct vm_area_struct *vma,
50 unsigned long addr, 50 unsigned long addr,
51 xen_pfn_t *gfn, int nr, 51 xen_pfn_t *gfn, int nr,
52 int *err_ptr, pgprot_t prot, 52 int *err_ptr, pgprot_t prot,
53 unsigned domid, 53 unsigned domid,
54 struct page **pages); 54 struct page **pages);
55 55
56/* xen_remap_domain_mfn_range() - map a range of foreign frames 56/* xen_remap_domain_gfn_range() - map a range of foreign frames
57 * @vma: VMA to map the pages into 57 * @vma: VMA to map the pages into
58 * @addr: Address at which to map the pages 58 * @addr: Address at which to map the pages
59 * @gfn: First GFN to map. 59 * @gfn: First GFN to map.
@@ -65,12 +65,12 @@ int xen_remap_domain_mfn_array(struct vm_area_struct *vma,
65 * Returns the number of successfully mapped frames, or a -ve error 65 * Returns the number of successfully mapped frames, or a -ve error
66 * code. 66 * code.
67 */ 67 */
68int xen_remap_domain_mfn_range(struct vm_area_struct *vma, 68int xen_remap_domain_gfn_range(struct vm_area_struct *vma,
69 unsigned long addr, 69 unsigned long addr,
70 xen_pfn_t gfn, int nr, 70 xen_pfn_t gfn, int nr,
71 pgprot_t prot, unsigned domid, 71 pgprot_t prot, unsigned domid,
72 struct page **pages); 72 struct page **pages);
73int xen_unmap_domain_mfn_range(struct vm_area_struct *vma, 73int xen_unmap_domain_gfn_range(struct vm_area_struct *vma,
74 int numpgs, struct page **pages); 74 int numpgs, struct page **pages);
75int xen_xlate_remap_gfn_array(struct vm_area_struct *vma, 75int xen_xlate_remap_gfn_array(struct vm_area_struct *vma,
76 unsigned long addr, 76 unsigned long addr,