mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/i386/pc: Map into memory the initrd
In order to reduce the memory footprint we map into memory the initrd using g_mapped_file_new() instead of reading it. In this way we can share the initrd pages between multiple instances of QEMU. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20190724143105.307042-4-sgarzare@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
816b9fe450
commit
e502fe96ac
2 changed files with 14 additions and 4 deletions
|
@ -41,6 +41,7 @@ struct PCMachineState {
|
|||
FWCfgState *fw_cfg;
|
||||
qemu_irq *gsi;
|
||||
PFlashCFI01 *flash[2];
|
||||
GMappedFile *initrd_mapped_file;
|
||||
|
||||
/* Configuration options: */
|
||||
uint64_t max_ram_below_4g;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue