On 06/05/2014 04:20 PM, Ian Campbell wrote:
(switching to my citrix address which I forgot to do for this subthread)
On Thu, 2014-06-05 at 16:16 +0800, Fu Wei wrote:
On 06/05/2014 12:53 AM, Ian Campbell wrote:
On Wed, 2014-05-07 at 19:58 +0800, Fu Wei wrote:
+static grub_err_t +set_xen_module_type(multiboot_module_t module, int *argc, char **argv[]) +{ [...]
- } else {
node_info->type = module_type++;
if (module_type > XEN_MODULE_OTHER)
module_type = XEN_MODULE_OTHER;
This will, I think, cause the third and subsequent non-explicitly typed modules to automatically get assigned XEN_MODULE_XSM etc, which I think is not intended/expected by http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot. The only things which should be automatically assigned are the kernel and initrd, anything else should just get the fallback compatibility string unless one is explicitly requested.
Actually, the code is for "giving a default compatibility property based on the order". it is described in http://wiki.xen.org/wiki/Xen_ARM_with_Virtualization_Extensions/Multiboot#Co.... I hope my understanding is correct. :-)
Perhaps I misunderstood something, please correct me :-)
Your code will assign additional defaults over and above what is described there. The spec says:
The first module specified in this way will be: compatible = "multiboot,linux-zimage", "boot,module" The second module specified in this way will be: compatible = "multiboot,linux-ramdisk", "boot,module" All subsequent modules will be: compatible = "boot,module"
You implementation effectively adds: The third module specified in this way will be: compatible = "xen,xsm-policy", "xen,multiboot-module"
Which I think is undesirable.
Yes, I added a "xen,xsm-policy" after comparing wiki page with xen/docs/misc/arm/device-tree/booting.txt, I thought the wiki page is dated.
what I got from wiki page is we have two ways to decide the type of module: (1) by order (2) by "--type"
if "xen,xsm-policy" will be only loaded by "--type" way, I will improve the code ASAP.
Actually, what I should do is just following the xen multiboot protocol that decided by Xen Project. :-)
Please let me know : should I delete "xen,xsm-policy" from the "(1) by order"?
Thanks a lot! :-)
Ian.