qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Li Zhijian <lizhijian@cn.fujitsu.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org,
	philmd@redhat.com, zhijianx.li@intel.com,
	Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <rth@twiddle.net>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
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	[thread overview]
Message-ID: <6e2b275c-e566-16d9-c848-582eb55fd1f3@cn.fujitsu.com> (raw)
In-Reply-To: <20190114204414-mutt-send-email-mst@kernel.org>

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 (2007,
>>          +         * long before XLF_CAN_BE_LOADED_ABOVE_4G which was added in 2013),
>>          +         * though it only sets initrd_max to 2 GB to "work around bootloader
>>          +         * bugs". Luckily, QEMU firmware(which does something like bootloader)
>>          +         * 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 doesn't
>>          +         * support the 64-bit boot protocol (specifically the ext_ramdisk_image
>>          +         * field).
>>          +         *
>>          +         * Therefore here just limit initrd_max to UINT32_MAX simply as well.
>>          +         *
>>          +         * FIXME: it's possible that linux protocol within [0x208, 0x20c]
>>          +         * 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?
>>
>>
>> Thanks
>>
>>
>
> 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 objection
and it's okay to delete it simply if it confuses others :)

BTW: any other comments for the others

Thanks
Zhijian




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

  reply	other threads:[~2019-01-16 10:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-11  8:57 [Qemu-devel] [PATCH v5 0/4] allow to load initrd below 4G for recent kernel Li Zhijian
2019-01-11  8:57 ` [Qemu-devel] [PATCH v5 1/4] unify len and addr type for memory/address APIs Li Zhijian
2019-01-11  8:57 ` [Qemu-devel] [PATCH v5 2/4] hw/core/loader.c: Read as long as possible in load_image_size() Li Zhijian
2019-01-11  8:57 ` [Qemu-devel] [PATCH v5 3/4] i386: import & use bootparam.h Li Zhijian
2019-01-11  9:48   ` Stefano Garzarella
2019-01-11 10:03     ` Li Zhijian
2019-01-11  8:57 ` [Qemu-devel] [PATCH v5 4/4] i386: allow to load initrd below 4G for recent linux Li Zhijian
2019-01-14 17:53   ` Eduardo Habkost
2019-01-15  1:35     ` Li Zhijian
2019-01-15  1:46       ` Michael S. Tsirkin
2019-01-16 10:19         ` Li Zhijian [this message]
2019-01-13 14:32 ` [Qemu-devel] [PATCH v5 0/4] allow to load initrd below 4G for recent kernel no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e2b275c-e566-16d9-c848-582eb55fd1f3@cn.fujitsu.com \
    --to=lizhijian@cn.fujitsu.com \
    --cc=ehabkost@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=zhijianx.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).