From nobody Thu May 2 10:16:34 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501242804086526.7414634213695; Fri, 28 Jul 2017 04:53:24 -0700 (PDT) Received: from localhost ([::1]:47577 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db3pZ-0006xv-Fw for importer@patchew.org; Fri, 28 Jul 2017 07:53:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1db3ny-00063m-FG for qemu-devel@nongnu.org; Fri, 28 Jul 2017 07:51:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1db3nt-000510-5F for qemu-devel@nongnu.org; Fri, 28 Jul 2017 07:51:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37428) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1db3ns-0004zo-V1; Fri, 28 Jul 2017 07:51:37 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1DDC9C0DE1F3; Fri, 28 Jul 2017 11:51:34 +0000 (UTC) Received: from vader.redhat.com (ovpn-116-161.ams2.redhat.com [10.36.116.161]) by smtp.corp.redhat.com (Postfix) with ESMTP id 672BF600C2; Fri, 28 Jul 2017 11:51:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1DDC9C0DE1F3 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=otubo@redhat.com From: Eduardo Otubo To: qemu-trivial@nongnu.org Date: Fri, 28 Jul 2017 13:51:31 +0200 Message-Id: <20170728115131.31725-1-otubo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 28 Jul 2017 11:51:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] unicore32: abort 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: thuth@redhat.com, gxt@mprc.pku.edu.cn, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Starting Qemu with "qemu-system-unicore32 -M puv3,accel=3Dqtest -S -nograph= ic" and entering "x 0 " at the monitor prompt leads to abort(): $ ./unicore32-softmmu/qemu-system-unicore32 -M puv3,accel=3Dqtest -S -nog= raphic QEMU 2.9.90 monitor - type 'help' for more information (qemu) x 0 qemu: fatal: uc32_cpu_get_phys_page_debug not supported yet R00=3D00000000 R01=3D00000000 R02=3D00000000 R03=3D00000000 R04=3D00000000 R05=3D00000000 R06=3D00000000 R07=3D00000000 R08=3D00000000 R09=3D00000000 R10=3D00000000 R11=3D00000000 R12=3D00000000 R13=3D00000000 R14=3D00000000 R15=3D00000000 R16=3D00000000 R17=3D00000000 R18=3D00000000 R19=3D00000000 R20=3D00000000 R21=3D00000000 R22=3D00000000 R23=3D00000000 R24=3D00000000 R25=3D00000000 R26=3D00000000 R27=3D00000000 R28=3D00000000 R29=3D00000000 R30=3D00000000 R31=3D03000000 PSR=3D40000013 -Z-- PRIV Aborted (core dumped) This happens because uc32_cpu_get_phys_page_debug() is not implemented yet, this is a temporary workaround to avoid the crash. Signed-off-by: Eduardo Otubo --- target/unicore32/softmmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/unicore32/softmmu.c b/target/unicore32/softmmu.c index e7152e72e0..d8d76968f3 100644 --- a/target/unicore32/softmmu.c +++ b/target/unicore32/softmmu.c @@ -15,6 +15,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" +#include "qemu/error-report.h" =20 #undef DEBUG_UC32 =20 @@ -271,8 +272,7 @@ int uc32_cpu_handle_mmu_fault(CPUState *cs, vaddr addre= ss, =20 hwaddr uc32_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) { - UniCore32CPU *cpu =3D UNICORE32_CPU(cs); - - cpu_abort(CPU(cpu), "%s not supported yet\n", __func__); - return addr; + error_report("function uc32_cpu_get_phys_page_debug not " + "implemented, aborting"); + return -1; } --=20 2.13.3