From: Dave McCracken Subject: [PATCH] Remove multipage_allocation_permitted Date: Mon, 15 Jun 2009 17:36:56 -0500 Message-ID: <200906151736.58467.dcm@mccr.org> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_K0sNKql+0Pq/D72" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Xen Developers List List-Id: xen-devel@lists.xenproject.org --Boundary-00=_K0sNKql+0Pq/D72 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Here's the patch to remove multipage_allocation_permitted() as we discussed. Dave McCracken Oracle Corp. --Boundary-00=_K0sNKql+0Pq/D72 Content-Type: text/plain; charset="us-ascii"; name="xen-unstable-090615-1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen-unstable-090615-1.patch" --- xen-unstable/./xen/common/memory.c 2009-06-05 09:07:43.000000000 -0500 +++ xen-hpage/./xen/common/memory.c 2009-06-15 17:08:21.000000000 -0500 @@ -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-unstable/./xen/include/xen/iocap.h 2009-03-12 09:14:53.000000000 -0500 +++ xen-hpage/./xen/include/xen/iocap.h 2009-06-15 17:08:38.000000000 -0500 @@ -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__ */ --Boundary-00=_K0sNKql+0Pq/D72 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_K0sNKql+0Pq/D72--