From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TYdy4-00054W-P7 for qemu-devel@nongnu.org; Wed, 14 Nov 2012 09:29:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TYdy1-00060J-Lm for qemu-devel@nongnu.org; Wed, 14 Nov 2012 09:29:28 -0500 From: Olivia Yin Date: Wed, 14 Nov 2012 21:28:49 +0800 Message-ID: <1352899732-1197-1-git-send-email-hong-hua.yin@freescale.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [RFC PATCH v4 0/3] reload kernel/initrd/elf images when reset 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 from hard disk on reset, which could make loader framework more dynamic and reduce the memory consumption of QEMU process. Olivia Yin (3): use image_file_reset to reload initrd image use uimage_reset to reload uimage use elf_reset to reload elf image elf.h | 10 ++++++ hw/elf_ops.h | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/loader.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++---------- hw/loader.h | 7 ++++ 4 files changed, 203 insertions(+), 18 deletions(-) --- v4: uImage/vmlinux/ramdisk had been verified on PowerPC platforms. Issue: It seemed that the patch 3/3 could not free the memory for phdr, and the memory map of QEMU will increase 1392K every time. If free phdr, system_reset will cause segmentation fault.