From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v5 17/17] tools/tests: Enable xen-access on ARM Date: Thu, 11 Sep 2014 14:29:35 -0700 Message-ID: <5412143F.1060003@linaro.org> References: <1410355726-5599-1-git-send-email-tklengyel@sec.in.tum.de> <1410355726-5599-18-git-send-email-tklengyel@sec.in.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1410355726-5599-18-git-send-email-tklengyel@sec.in.tum.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tamas K Lengyel , xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, tim@xen.org, ian.jackson@eu.citrix.com, stefano.stabellini@citrix.com, andres@lagarcavilla.org, jbeulich@suse.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org Hello Tamas, On 10/09/14 06:28, Tamas K Lengyel wrote: > diff --git a/config/arm32.mk b/config/arm32.mk > index aa79d22..4a7c259 100644 > --- a/config/arm32.mk > +++ b/config/arm32.mk > @@ -13,6 +13,7 @@ HAS_PL011 := y > HAS_EXYNOS4210 := y > HAS_OMAP := y > HAS_NS16550 := y > +HAS_MEM_ACCESS := y > > # Use only if calling $(LD) directly. > LDFLAGS_DIRECT += -EL > diff --git a/config/arm64.mk b/config/arm64.mk > index 15b57a4..ea6558d 100644 > --- a/config/arm64.mk > +++ b/config/arm64.mk > @@ -8,6 +8,7 @@ CFLAGS += #-marm -march= -mcpu= etc > > HAS_PL011 := y > HAS_NS16550 := y > +HAS_MEM_ACCESS := y Why can't you move HAS_MEM_ACCESS directly here in patch #1? It would make this patch simpler. [..] > @@ -492,8 +523,9 @@ int main(int argc, char *argv[]) > goto exit; > } > > - rc = xc_set_mem_access(xch, domain_id, default_access, 0, > - xenaccess->domain_info->max_pages); > + rc = xc_set_mem_access(xch, domain_id, default_access, START_PFN, > + (xenaccess->domain_info->max_gpfn - START_PFN) ); > + max_gpfn contains the maximum GPFN mapped (it could be foreign page, MMIO range...). Before memaccess was used only on RAM. Now it can contains any other page type. I think this code has to be smarter and take into account the banks on ARM. Regards, -- Julien Grall