From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56134) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TdG15-0004LD-Ps for qemu-devel@nongnu.org; Tue, 27 Nov 2012 02:55:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TdG11-00045C-Py for qemu-devel@nongnu.org; Tue, 27 Nov 2012 02:55:39 -0500 From: Olivia Yin Date: Tue, 27 Nov 2012 15:07:35 +0800 Message-ID: <1354000059-805-1-git-send-email-hong-hua.yin@freescale.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [RFC PATCH v6 0/4] reload images from host rootfs on reset to save footprint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Olivia Yin The current model of loader copy "rom blobs" and kept in memory until a reset occurs and waste host memory. This serial of patches uses private reset handlers to load uimage/initrd/vmlinux from hard disk on reset, which could make loader framework more dynamic and reduce the memory consumption of QEMU process. Olivia Yin (4): use image_file_reset to reload initrd use uimage_reset to reload uimage use elf_reset to reload elf image free rom->data when rom_reset elf.h | 10 +++++ hw/elf_ops.h | 44 ++++++++++++++++++++--- hw/loader.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++--------- hw/loader.h | 12 ++++++ 4 files changed, 158 insertions(+), 22 deletions(-) v6: patch 3/4: load symbol only when startup v5: patch 2/4: remove global variables is_linux and kernel_loaded. patch 3/4: register reset handlers in loader.c for elf images. extract the duplicated source code into function elf_phy_loader(). patch 4/4: fix the issue of memory increasing (about 1.4MB) once reload elf image. v4: fix elf reload and register reset handler in hw/elf_ops.h v3: reload elf v2: Rename target_phys_addr_t to hwaddr v1: support uimage/initrd reload