On Fri, Jun 21, 2024 at 03:20:19PM GMT, Igor Mammedov wrote:
> 
> > diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
> > index bb44dc296047..a43876a931c9 100644
> > --- a/src/fw/pciinit.c
> > +++ b/src/fw/pciinit.c
> > @@ -1189,11 +1189,16 @@ pci_setup(void)
> >  
> >      if (CPUPhysBits) {
> >          pci_mem64_top = 1LL << CPUPhysBits;
> > -        if (CPUPhysBits > 46) {
> > -            // Old linux kernels have trouble dealing with more than 46
> > -            // phys-bits, so avoid that for now.  Seems to be a bug in the
> > -            // virtio-pci driver.  Reported: centos-7, ubuntu-18.04
> > -            pci_mem64_top = 1LL << 46;
> > +        if (CPUPhysBits > 44) {
> > +            // Old linux kernels have trouble dealing with more than 44/46
> > +            // phys-bits. Seems to be a bug in the virtio-pci driver.
> > +            //   46:  centos-7, ubuntu-18.04
> > +            //   44:  ubuntu-16.04
> > +            // Limit the used address space to mitigate the bug, except we 
> > are
> > +            // running in a guest with more than 1TB of memory installed.
> 
> Is it possible to fix those broken drivers (centos-7 for example)
> and ditch this heuristic altogether?
> The rest of downstream can pick it up from there if they care about
> their customers.

Some further testing showed that this is not version-specific but arch
specific.  Old 32-bit kernels fail >44, old 64-bit kernels fail >46.

Note that 44 = 32 + 12, i.e. this could be pfn (page frame number)
hitting MAX_UINT32.  Should that be the case the fix is probably not
easy (didn't check the kernel source though).

Also note that releasing a kernel fix is not enough, you also have to
respin install media.  Distros which are *that* old typically don't get
regular install media updates any more ...

In short:  The idea to fix distros and drop the heuristic is IMHO not
realistic.

take care,
  Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to