From: Stefano Stabellini Subject: Re: [PATCH 07/10] xen: arm: fix is_xen_fixed_mfn Date: Thu, 20 Jun 2013 17:33:13 +0100 Message-ID: References: <1371562002.22783.25.camel@zakaz.uk.xensource.com> <1371562017-5379-7-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1371562017-5379-7-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: julien.grall@citrix.com, stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 18 Jun 2013, Ian Campbell wrote: > The current implementation is nonsense since the xenheap and the xen > text/data/etc mappings are nowhere near each other. > > This is only actually used by the page offlining code, which isn't active on > ARM. > > Signed-off-by: Ian Campbell Acked-by: Stefano Stabellini > xen/include/asm-arm/mm.h | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h > index 5e7c5a3..baaf9c3 100644 > --- a/xen/include/asm-arm/mm.h > +++ b/xen/include/asm-arm/mm.h > @@ -123,7 +123,9 @@ extern unsigned long xenheap_virt_end; > unsigned long _mfn = (mfn); \ > (_mfn >= xenheap_mfn_start && _mfn < xenheap_mfn_end); \ > }) > -#define is_xen_fixed_mfn(mfn) is_xen_heap_mfn(mfn) > +#define is_xen_fixed_mfn(mfn) \ > + ((((mfn) << PAGE_SHIFT) >= virt_to_maddr(&_start)) && \ > + (((mfn) << PAGE_SHIFT) <= virt_to_maddr(&_end))) > > #define page_get_owner(_p) (_p)->v.inuse.domain > #define page_set_owner(_p,_d) ((_p)->v.inuse.domain = (_d)) > -- > 1.7.2.5 >