[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



>>> On 27.08.15 at 11:57, <roger.pau@xxxxxxxxxx> wrote:
> 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?

I think we should try to avoid introducing any restrictions that aren't
technically warranted: The more restrictions we add now, the less
flexible we're going to be when we want/need to change some of the
implementation later on.

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

Considering that you claimed that after that free memory starts, when
- as said - there might not be any free memory there, it indeed sounds
like a bug to me.

> We already did something very similar with PV guests, see the comment 
> before the start_info structure:

I think we'd better avoid leaving basically no room for alterations. It
has been problematic on the PV side in at least one case (the ordering
of page table pages for compat guests).

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

The only thing we should make sure is that all pieces can be easily
found, i.e. the kernel doesn't need to do any guessing.

Jan


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