summaryrefslogtreecommitdiff
path: root/include/hw/i386
diff options
context:
space:
mode:
authorStefano Garzarella <sgarzare@redhat.com>2019-07-24 16:31:05 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2019-08-20 17:26:18 +0200
commite502fe96ac4343a3f4a3c13f28eea03ae7b11c3f (patch)
treeedcc405a47e5cbda2ce48580cfe819de5b1dab5d /include/hw/i386
parent816b9fe450220e19acb91a0ce4a8ade7000648d1 (diff)
downloadqemu-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.h1
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;