From patchwork Mon Jul 31 10:21:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 9871509 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 31EB960375 for ; Mon, 31 Jul 2017 10:27:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2214528575 for ; Mon, 31 Jul 2017 10:27:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 157312857D; Mon, 31 Jul 2017 10:27:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9CD4228575 for ; Mon, 31 Jul 2017 10:27:07 +0000 (UTC) Received: from localhost ([::1]:58577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dc7uk-0007V7-Um for patchwork-qemu-devel@patchwork.kernel.org; Mon, 31 Jul 2017 06:27:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50909) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dc7pe-00046w-0J for qemu-devel@nongnu.org; Mon, 31 Jul 2017 06:21:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dc7pa-00068a-Q8 for qemu-devel@nongnu.org; Mon, 31 Jul 2017 06:21:49 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:46587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dc7pa-00068H-ID; Mon, 31 Jul 2017 06:21:46 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id A53BE42ABC; Mon, 31 Jul 2017 13:21:45 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 95022B78; Mon, 31 Jul 2017 13:21:43 +0300 (MSK) Received: (nullmailer pid 5550 invoked by uid 1000); Mon, 31 Jul 2017 10:21:45 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 31 Jul 2017 13:21:25 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 06/25] qemu-system-tricore: segfault when entering "x 0" on the monitor X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eduardo Otubo , qemu-trivial@nongnu.org, Michael Tokarev Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Eduardo Otubo Starting Qemu with "qemu-system-tricore -nographic -M tricore_testboard -S" and entering "x 0" at the monitor prompt leads to Segmentation fault. This happens because tricore_cpu_get_phys_page_debug() is not implemented yet, this is a temporary workaround to avoid the crash. Signed-off-by: Eduardo Otubo Tested-by: Thomas Huth Signed-off-by: Michael Tokarev --- target/tricore/cpu.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c index 08f50e2ba7..5ab5b56454 100644 --- a/target/tricore/cpu.c +++ b/target/tricore/cpu.c @@ -22,6 +22,15 @@ #include "cpu.h" #include "qemu-common.h" #include "exec/exec-all.h" +#include "qemu/error-report.h" + +static hwaddr tricore_cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr, + MemTxAttrs *attrs) +{ + error_report("function cpu_get_phys_page_attrs_debug not " + "implemented, aborting"); + return -1; +} static inline void set_feature(CPUTriCoreState *env, int feature) { @@ -176,6 +185,7 @@ static void tricore_cpu_class_init(ObjectClass *c, void *data) cc->dump_state = tricore_cpu_dump_state; cc->set_pc = tricore_cpu_set_pc; cc->synchronize_from_tb = tricore_cpu_synchronize_from_tb; + cc->get_phys_page_attrs_debug = tricore_cpu_get_phys_page_attrs_debug; } static void cpu_register(const TriCoreCPUInfo *info)