[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v5 4/4] i386: allow to load initrd below 4G for

From: Li Zhijian
Subject: Re: [Qemu-devel] [PATCH v5 4/4] i386: allow to load initrd below 4G for recent linux
Date: Wed, 16 Jan 2019 18:19:26 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

Hi Michael, Eduardo

On 1/15/19 09:46, Michael S. Tsirkin wrote:
On Tue, Jan 15, 2019 at 09:35:09AM +0800, Li Zhijian wrote:
Hi Eduardo

On 1/15/19 01:53, Eduardo Habkost wrote:

         +    if (protocol >= 0x20c &&
         +        lduw_p(header+0x236) & XLF_CAN_BE_LOADED_ABOVE_4G) {
         +        /*
         +         * Linux has supported initrd up to 4 GB for a very long time 
         +         * long before XLF_CAN_BE_LOADED_ABOVE_4G which was added in 
         +         * though it only sets initrd_max to 2 GB to "work around 
         +         * bugs". Luckily, QEMU firmware(which does something like 
         +         * has supported this.
         +         *
         +         * It's believed that if XLF_CAN_BE_LOADED_ABOVE_4G is set, 
initrd can
         +         * be loaded into any address.
         +         *
         +         * In addition, initrd_max is uint32_t simply because QEMU 
         +         * support the 64-bit boot protocol (specifically the 
         +         * field).
         +         *
         +         * Therefore here just limit initrd_max to UINT32_MAX simply 
as well.
         +         *
         +         * FIXME: it's possible that linux protocol within [0x208, 
         +         * supports up to 4G initrd as well.

     I don't understand what exactly this FIXME comment is
     documenting.  What exactly needs to be fixed?

XLF_CAN_BE_LOADED_ABOVE_4G is one of the indicators, actually as comments said,
linux has supported up to 4 GB initrd since linux-2.26(protocol version 0x208).

I just want to comment that linux with protocol within [0x208, 0x20c] supports 
up to 4 GB initrd as well.

Is documenting with FIXME appropriate?


Fixme should say what is missing in the qemu implementation.

thanks for your explanation @Michael
I'd like to update "FIXME" to "NOTE" and move it into git-commit-log if no 
and it's okay to delete it simply if it confuses others :)

BTW: any other comments for the others



  * Bar 2010 and up can actually be supported using foo.
  * FIXME: make use of foo to support bar.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]