[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 17/17] tools/tests: Enable xen-access on ARM





On Thu, Sep 11, 2014 at 11:29 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
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.


This is just a sample application, nothing prevents another user of the same API on using it this way. If this is a problem, it needs to be handled within Xen.
 
Regards,

--
Julien Grall


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.