Skip to contentSkip to conversation

Remove multipage_allocation_permitted

PATCH New Dave McCracken 1 participant 1 message Jun 15, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove multipage_allocation_permitted

Here's the patch to remove multipage_allocation_permitted() as we discussed.

Dave McCracken
Oracle Corp.

./xen/common/memory.c +0 -16
@@ -50,10 +50,6 @@ static void increase_reservation(struct 
                                      a->nr_extents-1) )
         return;
 
-    if ( (a->extent_order != 0) &&
-         !multipage_allocation_permitted(current->domain) )
-        return;
-
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
         if ( hypercall_preempt_check() )
@@ -96,10 +92,6 @@ static void populate_physmap(struct memo
                                      a->nr_extents-1) )
         return;
 
-    if ( (a->extent_order != 0) &&
-         !multipage_allocation_permitted(current->domain) )
-        return;
-
     for ( i = a->nr_done; i < a->nr_extents; i++ )
     {
         if ( hypercall_preempt_check() )
@@ -246,14 +238,6 @@ static long memory_exchange(XEN_GUEST_HA
         goto fail_early;
     }
 
-    /* Only privileged guests can allocate multi-page contiguous extents. */
-    if ( ((exch.in.extent_order != 0) || (exch.out.extent_order != 0)) &&
-         !multipage_allocation_permitted(current->domain) )
-    {
-        rc = -EPERM;
-        goto fail_early;
-    }
-
     if ( exch.in.extent_order <= exch.out.extent_order )
     {
         in_chunk_order  = exch.out.extent_order - exch.in.extent_order;
./xen/include/xen/iocap.h +0 -4
@@ -28,8 +28,4 @@
 #define irq_access_permitted(d, i)                      \
     rangeset_contains_singleton((d)->irq_caps, i)
 
-#define multipage_allocation_permitted(d)               \
-    (!rangeset_is_empty((d)->iomem_caps) ||             \
-     !rangeset_is_empty((d)->arch.ioport_caps))
-
 #endif /* __XEN_IOCAP_H__ */

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel