From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPUz2-0004Fb-UK for qemu-devel@nongnu.org; Thu, 04 Sep 2014 07:13:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPUyt-0005Rb-TO for qemu-devel@nongnu.org; Thu, 04 Sep 2014 07:13:44 -0400 Received: from e31.co.us.ibm.com ([32.97.110.149]:38035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPUyt-0005RN-MA for qemu-devel@nongnu.org; Thu, 04 Sep 2014 07:13:35 -0400 Received: from /spool/local by e31.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Sep 2014 05:13:35 -0600 From: Aravinda Prasad Date: Thu, 04 Sep 2014 16:43:28 +0530 Message-ID: <20140904111328.20476.51234.stgit@aravindap> In-Reply-To: <20140904111153.20476.58429.stgit@aravindap> References: <20140904111153.20476.58429.stgit@aravindap> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH v2 1/4] target-ppc: Extend rtas-blob List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aik@au1.ibm.com, qemu-ppc@nongnu.org, qemu-devel@nongnu.org Cc: benh@au1.ibm.com, paulus@samba.org Extend rtas-blob to accommodate error log. Error log structure is saved in rtas space upon a machine check exception. Signed-off-by: Aravinda Prasad --- hw/ppc/spapr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 4b20e36..4a7c0ae 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -1409,6 +1409,10 @@ static void ppc_spapr_init(MachineState *machine) filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, "spapr-rtas.bin"); spapr->rtas_size = get_image_size(filename); + + /* Resize blob to accommodate error log at a page aligned address */ + spapr->rtas_size = TARGET_PAGE_ALIGN(spapr->rtas_size) + TARGET_PAGE_SIZE; + spapr->rtas_blob = g_malloc(spapr->rtas_size); if (load_image_size(filename, spapr->rtas_blob, spapr->rtas_size) < 0) { hw_error("qemu: could not load LPAR rtas '%s'\n", filename);