diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2019-07-24 16:31:05 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-08-20 17:26:18 +0200 |
commit | e502fe96ac4343a3f4a3c13f28eea03ae7b11c3f (patch) | |
tree | edcc405a47e5cbda2ce48580cfe819de5b1dab5d /include/hw/i386 | |
parent | 816b9fe450220e19acb91a0ce4a8ade7000648d1 (diff) | |
download | qemu-e502fe96ac4343a3f4a3c13f28eea03ae7b11c3f.zip |
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>
Diffstat (limited to 'include/hw/i386')
-rw-r--r-- | include/hw/i386/pc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 4bb9e29114..2afe285009 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -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; |