[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [Draft B] Boot ABI for HVM guests without a device-model
El 27/08/15 a les 11.43, Andrew Cooper ha escrit: > On 27/08/15 09:04, Jan Beulich wrote: >>>>> On 26.08.15 at 16:44, <roger.pau@xxxxxxxxxx> wrote: >>> El 26/08/15 a les 14.12, Andrew Cooper ha escrit: >>>> On 26/08/15 13:00, Jan Beulich wrote: >>>>>> This structure is guaranteed to always be placed in memory after the >>>>> DYM "These structures are ..."? >>>>> >>>>>> loaded kernel and modules. >>>> There is no requirement for the command line/module information to be >>>> after the loaded kernel. All it needs to do is not overlap. >>> IMHO, this is helpful in order to get last used physical address, after >>> which free memory starts. Current FreeBSD implementation relies on this, >>> if we didn't do it that way I would have to calculate where the symtab + >>> strtab ends, which is more complex. >> But the statement leaves open whether there is any free memory at >> all after those structures, or whether instead all free memory lives >> at lower addresses. Nor do I consider it appropriate to take a present >> (one might say overly simplistic) implementation as a basis for setting >> arbitrary restrictions. Can we just state that the hvm_start_info structure and associated metadata is placed after the loaded kernel and modules? Whether there's free memory or not after this is something that the kernel has to figure out by itself, and I wasn't planning to add such a statement to the specification. > I agree. This sounds like a FreeBSD bug, and absolutely shouldn't be a > written restriction in the boot ABI. Bug? The FreeBSD native loader passes to the FreeBSD kernel the last used address, after which free memory starts. IMHO, it is not a bug, it's just how FreeBSD boots. I understand that Linux might not pass such a parameter, and there are other ways I can use to find this, but they are more complex. We already did something very similar with PV guests, see the comment before the start_info structure: * 3. This the order of bootstrap elements in the initial virtual region: * a. relocated kernel image * b. initial ram disk [mod_start, mod_len] * (may be omitted) * c. list of allocated page frames [mfn_list, nr_pages] * (unless relocated due to XEN_ELFNOTE_INIT_P2M) * d. start_info_t structure [register ESI (x86)] * in case of dom0 this page contains the console info, too * e. unless dom0: xenstore ring page * f. unless dom0: console ring page * g. bootstrap page tables [pt_base and CR3 (x86)] * h. bootstrap stack [register ESP (x86)] IMHO it is important to mention how things are loaded into memory, and placing the hvm_start_info struct after the loaded kernel and modules is also the most natural way to do it, I don't foresee this changing in the future. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |