From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWOrs-0001mJ-Al for qemu-devel@nongnu.org; Sun, 28 Apr 2013 06:30:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWOrr-0007Kc-Ep for qemu-devel@nongnu.org; Sun, 28 Apr 2013 06:30:04 -0400 From: Tiejun Chen Date: Sun, 28 Apr 2013 18:30:09 +0800 Message-ID: <1367145009-14512-1-git-send-email-tiejun.chen@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [v1][Qemu-ppc][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: agraf@suse.de Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org We should sync params->ram_size after we fixup memory size on a alignment boundary. Otherwise Guest would exceed the actual memory region. Signed-off-by: Tiejun Chen --- hw/ppc/e500.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index c1bdb6b..145da0e 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -523,6 +523,8 @@ void ppce500_init(PPCE500Params *params) /* Fixup Memory size on a alignment boundary */ ram_size &= ~(RAM_SIZES_ALIGN - 1); + /* Sync this for the system. */ + params->ram_size = ram_size; /* Register Memory */ memory_region_init_ram(ram, "mpc8544ds.ram", ram_size); -- 1.7.9.5