All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC/PoC PATCH 0/3] support initrd size up to 4G
@ 2018-11-08 10:59 Li Zhijian
  2018-11-08 10:59 ` [Qemu-devel] [RFC/PoC PATCH 1/3] i386: set initrd_max to 4G - 1 to allow up to 4G initrd Li Zhijian
  2018-11-08 20:12 ` [Qemu-devel] [RFC/PoC PATCH 0/3] support initrd size up to 4G Wainer dos Santos Moschetta
  0 siblings, 2 replies; 22+ messages in thread
From: Li Zhijian @ 2018-11-08 10:59 UTC (permalink / raw)
  To: qemu-devel
  Cc: zhijianx.li, Li Zhijian, Paolo Bonzini, Peter Crosthwaite,
	Richard Henderson

Long long ago, linux kernel have supported up to 4G initrd, but it's header still
hard code to allow 2G - 1 only.
 # (Header version 0x0203 or later) the highest safe address for the contents
 # of an initrd. The current kernel allows up to 4 GB, but leave it at 2 GB to
 # avoid possible bootloader bugs.

kexec is one of the known scenario which has supported up to 4G initrd.

This patches is to enable up to 4G initrd, Seabios + optionrom(linuxboot_dma)
works as expected so far.

3/3 has a huge change of address/memory APIs.
I replace 'int len' in a stupid way, but it looks not safety.
$ sed -i 's/int len/uint32_t len/' exec.c
$ make # and check compiling errors
$ sed -i 's/int len/uint32_t len/' cpu-all.h
$ make -i 's/int len/uint32_t len/' include/exec/cpu-common.h
$ make -i 's/int len/uint32_t len/' include/exec/memory.h
$ make # all errors gone

CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Peter Crosthwaite <crosthwaite.peter@gmail.com>
CC: Richard Henderson <rth@twiddle.net>

Li Zhijian (3):
  i386: set initrd_max to 4G - 1 to allow up to 4G initrd
  change size type from int to int64_t on load_image()
  change int len to uin32_t len

 exec.c                    | 42 +++++++++++++++++++++---------------------
 hw/core/loader.c          |  3 ++-
 hw/i386/pc.c              |  6 ++++++
 include/exec/cpu-all.h    |  2 +-
 include/exec/cpu-common.h | 10 +++++-----
 include/exec/memory.h     | 20 ++++++++++----------
 6 files changed, 45 insertions(+), 38 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2018-11-12 16:48 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 10:59 [Qemu-devel] [RFC/PoC PATCH 0/3] support initrd size up to 4G Li Zhijian
2018-11-08 10:59 ` [Qemu-devel] [RFC/PoC PATCH 1/3] i386: set initrd_max to 4G - 1 to allow up to 4G initrd Li Zhijian
2018-11-08 10:59   ` [Qemu-devel] [RFC/PoC PATCH 2/3] change size type from int to int64_t on load_image() Li Zhijian
2018-11-08 10:59     ` [Qemu-devel] [PATCH 3/3] change int len to uin32_t len Li Zhijian
2018-11-08 11:14       ` Peter Maydell
2018-11-08 11:04     ` [Qemu-devel] [RFC/PoC PATCH 2/3] change size type from int to int64_t on load_image() Peter Maydell
2018-11-09  2:48       ` Li Zhijian
2018-11-08 11:06   ` [Qemu-devel] [RFC/PoC PATCH 1/3] i386: set initrd_max to 4G - 1 to allow up to 4G initrd Peter Maydell
2018-11-09  1:47     ` Li Zhijian
2018-11-09  1:47       ` Li Zhijian
2018-11-09  7:20       ` Ingo Molnar
2018-11-09  9:57         ` Li Zhijian
2018-11-09 10:04           ` Juergen Gross
2018-11-09 13:11             ` Li Zhijian
2018-11-09 13:40             ` Li Zhijian
2018-11-09 21:10               ` H. Peter Anvin
2018-11-12  4:56                 ` Ingo Molnar
2018-11-12  6:00                   ` H. Peter Anvin
2018-11-12  6:19                     ` Ingo Molnar
2018-11-12  6:36                       ` H. Peter Anvin
2018-11-12 16:47                       ` H. Peter Anvin
2018-11-08 20:12 ` [Qemu-devel] [RFC/PoC PATCH 0/3] support initrd size up to 4G Wainer dos Santos Moschetta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.