[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 08/15] x86/hyperlaunch: locate dom0 kernel with hyperlaunch
On 11/25/24 17:54, Jason Andryuk wrote: On 2024-11-23 13:20, Daniel P. Smith wrote:Look for a subnode of type `multiboot,kernel` within a domain node. If found, process the reg property for the MB1 module index. If the bootargs property is present and there was not an MB1 string, then use the command line from thedevice tree definition. Signed-off-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>diff --git a/xen/arch/x86/domain_builder/core.c b/xen/arch/x86/ domain_builder/core.cindex a80f3711c306..9335f3a9ebef 100644 --- a/xen/arch/x86/domain_builder/core.c +++ b/xen/arch/x86/domain_builder/core.c @@ -56,6 +56,18 @@ void __init builder_init(struct boot_info *bi)printk(XENLOG_INFO " Number of domains: %d\n", bi- >nr_domains);} + else + { + int i; + + /* Find first unknown boot module to use as Dom0 kernel */ + printk("Falling back to using first boot module as dom0\n"); + i = first_boot_module_index(bi, BOOTMOD_UNKNOWN); + bi->mods[i].type = BOOTMOD_KERNEL; + bi->domains[0].kernel = &bi->mods[i]; + bi->nr_domains = 1; + } +extra newline. ack. } /*diff --git a/xen/arch/x86/domain_builder/fdt.c b/xen/arch/x86/ domain_builder/fdt.cindex ff1ba58b6907..6bf1c4a297fe 100644 --- a/xen/arch/x86/domain_builder/fdt.c +++ b/xen/arch/x86/domain_builder/fdt.c+static int __init process_domain_node( + struct boot_info *bi, void *fdt, int dom_node) +{ + int node; + struct boot_domain *bd = &bi->domains[bi->nr_domains]; + const char *name = fdt_get_name(fdt, dom_node, NULL);const char *name = fdt_get_name(fdt, dom_node, NULL) ?: "unknown"; to avoid... Sure. + int address_size = fdt_address_cells(fdt, dom_node); + int size_size = fdt_size_cells(fdt, dom_node); + + if ( address_size < 0 || size_size < 0 ) + { + printk(" failed processing #address or #size for domain %s)\n", + name == NULL ? "unknown" : name);...all this duplication in the following patches.+ return -EINVAL; + } + + fdt_for_each_subnode(node, fdt, dom_node) + {+ if ( fdt_node_check_compatible(fdt, node, "multiboot,kernel") == 0 )I thought you were going to use "module,kernel" and "module,index" as u32s for multiboot2? Per our discussion, I will update appropriately. v/r, dps
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |