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

[Xen-devel] [PATCH 16/16] arm: use /chosen/module1-args for domain 0 command line



Ideally this would use module1-args iff the kernel came from
module1-{start,end} and the existing xen,dom0-bootargs if the kernel
came from flash, but this approach is simpler and has the sme effect
in practice.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c |   23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index e96ed10..2b65637 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -88,6 +88,8 @@ static int write_properties(struct domain *d, struct 
kernel_info *kinfo,
 {
     int prop;
 
+    int had_mod1_args = 0;
+
     for ( prop = fdt_first_property_offset(fdt, node);
           prop >= 0;
           prop = fdt_next_property_offset(fdt, prop) )
@@ -104,15 +106,30 @@ static int write_properties(struct domain *d, struct 
kernel_info *kinfo,
         prop_len  = fdt32_to_cpu(p->len);
 
         /*
-         * In chosen node: replace bootargs with value from
-         * xen,dom0-bootargs.
+         * In chosen node:
+         *
+         * * replace bootargs with value from module1-args, falling
+         *   back to xen,dom0-bootargs if not present.
+         * * remove all other module*.
          */
         if ( device_tree_node_matches(fdt, node, "chosen") )
         {
             if ( strcmp(prop_name, "bootargs") == 0 )
                 continue;
-            if ( strcmp(prop_name, "xen,dom0-bootargs") == 0 )
+            if ( strcmp(prop_name, "module1-args") == 0 )
+            {
                 prop_name = "bootargs";
+                had_mod1_args = 1;
+            }
+            if ( strncmp(prop_name, "module", strlen("module")) == 0 )
+                 continue;
+            if ( strcmp(prop_name, "xen,dom0-bootargs") == 0 )
+            {
+                if ( had_mod1_args )
+                    continue;
+                else
+                    prop_name = "bootargs";
+            }
         }
         /*
          * In a memory node: adjust reg property.
-- 
1.7.9.1


_______________________________________________
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®.