[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v6 4/4] i386: allow to load initrd below 4 GB fo
From: |
Stefano Garzarella |
Subject: |
Re: [Qemu-devel] [PATCH v6 4/4] i386: allow to load initrd below 4 GB for recent linux |
Date: |
Mon, 21 Jan 2019 09:42:41 +0100 |
User-agent: |
NeoMutt/20180716 |
On Thu, Jan 17, 2019 at 08:49:04PM +0800, Li Zhijian wrote:
> Since linux commit: cf8fa920cb42 ("i386: handle an initrd in highmem (version
> 2)")
> linux has supported initrd up to 4 GB, but the header field
> ramdisk_max is still set to 2 GB to avoid "possible bootloader bugs".
>
> When use '-kernel vmlinux -initrd initrd.cgz' to launch a VM,
> the firmware(it could be linuxboot_dma.bin) helps to read initrd
> contents into guest memory(below ramdisk_max) and jump to kernel.
> that's similar with what bootloader does, like grub.
>
> 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 to
> allow initrd to be loaded below 4 GB.
>
> NOTE: it's possible that linux protocol within [0x208, 0x20c]
> supports up to 4 GB initrd as well.
>
> CC: Paolo Bonzini <address@hidden>
> CC: Richard Henderson <address@hidden>
> CC: Eduardo Habkost <address@hidden>
> CC: "Michael S. Tsirkin" <address@hidden>
> CC: Marcel Apfelbaum <address@hidden>
> Signed-off-by: Li Zhijian <address@hidden>
>
> ---
> V6: update comments
> V5: udpate comments and changelog
> V3: correct grammar and check XLF_CAN_BE_LOADED_ABOVE_4G first (Michael S.
> Tsirkin)
>
> Signed-off-by: Li Zhijian <address@hidden>
> ---
> hw/i386/pc.c | 21 ++++++++++++++++++++-
> 1 file changed, 20 insertions(+), 1 deletion(-)
Reviewed-by: Stefano Garzarella <address@hidden>
- [Qemu-devel] [PATCH v6 0/4] allow to load initrd below 4G for recent kernel, Li Zhijian, 2019/01/17
- [Qemu-devel] [PATCH v6 1/4] unify len and addr type for memory/address APIs, Li Zhijian, 2019/01/17
- [Qemu-devel] [PATCH v6 4/4] i386: allow to load initrd below 4 GB for recent linux, Li Zhijian, 2019/01/17
- [Qemu-devel] [PATCH v6 3/4] i386: import & use bootparam.h, Li Zhijian, 2019/01/17
- [Qemu-devel] [PATCH v6 2/4] hw/core/loader.c: Read as long as possible in load_image_size(), Li Zhijian, 2019/01/17
- Re: [Qemu-devel] [PATCH v6 0/4] allow to load initrd below 4G for recent kernel, Paolo Bonzini, 2019/01/21
- Re: [Qemu-devel] [PATCH v6 0/4] allow to load initrd below 4G for recent kernel, no-reply, 2019/01/31