From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tamas K Lengyel Subject: Re: [PATCH v3 15/15] tools/tests: Enable xen-access on ARM Date: Tue, 2 Sep 2014 10:49:13 +0200 Message-ID: References: <1409581329-2607-1-git-send-email-tklengyel@sec.in.tum.de> <1409581329-2607-16-git-send-email-tklengyel@sec.in.tum.de> <5404E48D.8080109@linaro.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7080268877629784864==" Return-path: In-Reply-To: <5404E48D.8080109@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: Ian Campbell , Tim Deegan , Ian Jackson , "xen-devel@lists.xen.org" , Stefano Stabellini , Andres Lagar-Cavilla , Jan Beulich , Daniel De Graaf , Tamas K Lengyel List-Id: xen-devel@lists.xenproject.org --===============7080268877629784864== Content-Type: multipart/alternative; boundary=001a11c361229bc6f90502113180 --001a11c361229bc6f90502113180 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Sep 1, 2014 at 11:26 PM, Julien Grall wrote: > Hello Tamas, > > > On 01/09/14 10:22, Tamas K Lengyel wrote: > >> diff --git a/tools/tests/xen-access/Makefile b/tools/tests/xen-access/ >> Makefile >> index 65eef99..698355c 100644 >> --- a/tools/tests/xen-access/Makefile >> +++ b/tools/tests/xen-access/Makefile >> @@ -7,9 +7,7 @@ CFLAGS += $(CFLAGS_libxenctrl) >> CFLAGS += $(CFLAGS_libxenguest) >> CFLAGS += $(CFLAGS_xeninclude) >> >> -TARGETS-y := >> -TARGETS-$(CONFIG_X86) += xen-access >> -TARGETS := $(TARGETS-y) >> +TARGETS := xen-access >> > > I would move the definition of HAS_MEM_ACCESS from arch/*/Rules.mk to > config/*.mk and use the defition here to build or not xen-access. > > > @@ -520,7 +551,7 @@ int main(int argc, char *argv[]) >> >> /* Unregister for every event */ >> rc = xc_set_mem_access(xch, domain_id, XENMEM_access_rwx, >> ~0ull, 0); >> - rc = xc_set_mem_access(xch, domain_id, XENMEM_access_rwx, 0, >> + rc = xc_set_mem_access(xch, domain_id, XENMEM_access_rwx, >> GUEST_RAM_BASE_PFN, >> xenaccess->domain_info->max_pages); >> > > ARM may contains multiple banks non-contiguous banks. On Xen 4.5, there is > 2 banks with a hole (see GUEST_RAM{0,1}_* in xen/include/public/arch-arm.h) > . > > This change won't work with guest using more than 3G of RAM. > I guess it would only partially work. I'll add an #ifdef CONFIG_ARM here to set the second bank's permissions also. Tamas > > Regards, > > -- > Julien Grall > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel > --001a11c361229bc6f90502113180 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable



On Mon, Sep 1, 2014 at 11:26 PM, Julien Grall <= ;julien.grall@= linaro.org> wrote:
Hello Tamas,


On 01/09/14 10:22, Tamas K Lengyel wrote:
diff --git a/tools/tests/xen-access/Makefile b/tools/tests/xen-acces= s/Makefile
index 65eef99..698355c 100644
--- a/tools/tests/xen-access/Makefile
+++ b/tools/tests/xen-access/Makefile
@@ -7,9 +7,7 @@ CFLAGS +=3D $(CFLAGS_libxenctrl)
=A0 CFLAGS +=3D $(CFLAGS_libxenguest)
=A0 CFLAGS +=3D $(CFLAGS_xeninclude)

-TARGETS-y :=3D
-TARGETS-$(CONFIG_X86) +=3D xen-access
-TARGETS :=3D $(TARGETS-y)
+TARGETS :=3D xen-access

I would move the definition of HAS_MEM_ACCESS from arch/*/Rules.mk to confi= g/*.mk and use the defition here to build or not xen-access.


@@ -520,7 +551,7 @@ int main(int argc, char *argv[])

=A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Unregister for every event */
=A0 =A0 =A0 =A0 =A0 =A0 =A0 rc =3D xc_set_mem_access(xch, domain_id, XENMEM= _access_rwx, ~0ull, 0);
-=A0 =A0 =A0 =A0 =A0 =A0 rc =3D xc_set_mem_access(xch, domain_id, XENMEM_ac= cess_rwx, 0,
+=A0 =A0 =A0 =A0 =A0 =A0 rc =3D xc_set_mem_access(xch, domain_id, XENMEM_ac= cess_rwx, GUEST_RAM_BASE_PFN,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= xenaccess->domain_info->max_pages);

ARM may contains multiple banks non-contiguous banks. On Xen 4.5, there is = 2 banks with a hole (see GUEST_RAM{0,1}_* in xen/include/public/arch-arm.h)= .

This change won't work with guest using more than 3G of RAM.

I guess it would only partially work. I'll ad= d an #ifdef CONFIG_ARM here to set the second bank's permissions also.<= br>
Tamas
=A0

Regards,

--
Julien Grall


_______________________________________________
Xen-devel mailing list
Xen-devel@list= s.xen.org
http://lists.x= en.org/xen-devel

--001a11c361229bc6f90502113180-- --===============7080268877629784864== 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.xen.org http://lists.xen.org/xen-devel --===============7080268877629784864==--