hw/i386/pc: Map into memory the initrd
commite502fe96ac4343a3f4a3c13f28eea03ae7b11c3f
authorStefano Garzarella <sgarzare@redhat.com>
Wed, 24 Jul 2019 14:31:05 +0000 (24 16:31 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Aug 2019 15:26:18 +0000 (20 17:26 +0200)
treeedcc405a47e5cbda2ce48580cfe819de5b1dab5d
parent816b9fe450220e19acb91a0ce4a8ade7000648d1
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>
hw/i386/pc.c
include/hw/i386/pc.h