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

RE: [PATCH v2] x86: Use low memory size directly from Multiboot



> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: Wednesday, 9 February 2022 15:26
> To: Tu Dinh Ngoc <dinhngoc.tu@xxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2] x86: Use low memory size directly from Multiboot
> 
> On 09.02.2022 14:12, Tu Dinh Ngoc wrote:
> > Previously, Xen used information from the BDA to detect the amount of
> > available low memory. This does not work on some scenarios such as
> > Coreboot, or when booting from Kexec on a UEFI system without CSM.
> >
> > Use the information directly supplied by Multiboot boot information
> > instead.
> > ---
> 
> Btw - please summarize here briefly what has changed from the earlier
> version. As it stands your adjustment looks to take care of one third of what 
> I
> did say in reply to your v1. That's not enough for a v2, or else you should 
> have
> taken care of the remaining aspects verbally.
> 
> Jan

Hi,

> The comment here is a pretty clear indication that bad values may have been 
> observed, even if this was only in the distant past. But we have to not 
> regress even on very old boot loaders.

> Is the kexec case recognizable by any means (including to distinguish kexec 
> properly communicating the value vs it not doing so, as iirc it was said on 
> irc that this didn't always work correctly there), such that we could skip 
> using the BDA value in that case?

As written in the comments, old versions of kexec (before 2.0.23) presented the 
amount of lower and upper memory in the BASIC_MEMINFO Multiboot2 tag in bytes 
instead of kilobytes. The v2 patch tries to detect this condition by checking 
if there's more than 640 KB of low memory and corrects the low memory size in 
that case.

This change should only affect the particular case of booting with Multiboot2 
without EFI (e.g. legacy BIOS or Kexec). Other cases like Multiboot 0.x, EFI 
booting (with or without MB2), or bootloaders that generate the BASIC_MEMINFO 
tag correctly shouldn't be affected.




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.