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: 795679 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xLbGk6Dnyz9s2s for ; Mon, 31 Jul 2017 20:26:54 +1000 (AEST) Received: from localhost ([::1]:58577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dc7uW-0007V7-R2 for incoming@patchwork.ozlabs.org; Mon, 31 Jul 2017 06:26:52 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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)