qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC/PoC PATCH 0/3] support initrd size up to 4G


From: Wainer dos Santos Moschetta
Subject: Re: [Qemu-devel] [RFC/PoC PATCH 0/3] support initrd size up to 4G
Date: Thu, 8 Nov 2018 18:12:54 -0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

Under review, the following patch adds acceptance tests for the initrd option:

https://www.mail-archive.com/address@hidden/msg567776.html

The test should be updated in case this series get merged. Maybe the best would be to include those tests along with this series actually.

- Wainer


On 11/08/2018 08:59 AM, Li Zhijian wrote:
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 <address@hidden>
CC: Peter Crosthwaite <address@hidden>
CC: Richard Henderson <address@hidden>

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(-)





reply via email to

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