]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
xen/arm: Extend create_xen_entries prototype to take mapping attribute
authorJulien Grall <julien.grall@linaro.org>
Wed, 8 May 2013 22:59:58 +0000 (23:59 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 13 May 2013 10:51:42 +0000 (11:51 +0100)
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/mm.c

index 2836cbbc580ba95db06e2a1b300b1022578c3df1..bd7eb1afa36e16e2eb6809780cfead64eed673b1 100644 (file)
@@ -631,7 +631,8 @@ enum xenmap_operation {
 static int create_xen_entries(enum xenmap_operation op,
                               unsigned long virt,
                               unsigned long mfn,
-                              unsigned long nr_mfns)
+                              unsigned long nr_mfns,
+                              unsigned int ai)
 {
     int rc;
     unsigned long addr = virt, addr_end = addr + nr_mfns * PAGE_SIZE;
@@ -664,6 +665,7 @@ static int create_xen_entries(enum xenmap_operation op,
                 }
                 pte = mfn_to_xen_entry(mfn);
                 pte.pt.table = 1;
+                pte.pt.ai = ai;
                 write_pte(&third[third_table_offset(addr)], pte);
                 break;
             case REMOVE:
@@ -693,12 +695,11 @@ int map_pages_to_xen(unsigned long virt,
                      unsigned long nr_mfns,
                      unsigned int flags)
 {
-    ASSERT(flags == PAGE_HYPERVISOR);
-    return create_xen_entries(INSERT, virt, mfn, nr_mfns);
+    return create_xen_entries(INSERT, virt, mfn, nr_mfns, flags);
 }
 void destroy_xen_mappings(unsigned long v, unsigned long e)
 {
-    create_xen_entries(REMOVE, v, 0, (e - v) >> PAGE_SHIFT);
+    create_xen_entries(REMOVE, v, 0, (e - v) >> PAGE_SHIFT, 0);
 }
 
 enum mg { mg_clear, mg_ro, mg_rw, mg_rx };