From patchwork Fri Jun 15 07:33:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Cave-Ayland X-Patchwork-Id: 929816 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=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ilande.co.uk 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 416XKp4sl7z9s19 for ; Fri, 15 Jun 2018 17:33:50 +1000 (AEST) Received: from localhost ([::1]:44800 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTjEy-0006CY-DS for incoming@patchwork.ozlabs.org; Fri, 15 Jun 2018 03:33:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fTjEU-0006BT-EV for qemu-devel@nongnu.org; Fri, 15 Jun 2018 03:33:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fTjEQ-0003Yj-Gt for qemu-devel@nongnu.org; Fri, 15 Jun 2018 03:33:18 -0400 Received: from chuckie.co.uk ([82.165.15.123]:36403 helo=s16892447.onlinehome-server.info) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fTjEQ-0003YD-9U for qemu-devel@nongnu.org; Fri, 15 Jun 2018 03:33:14 -0400 Received: from host86-191-128-6.range86-191.btcentralplus.com ([86.191.128.6] helo=kentang.home) by s16892447.onlinehome-server.info with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1fTjEc-0006UD-Ji; Fri, 15 Jun 2018 08:33:27 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, atar4qemu@gmail.com, richard.henderson@linaro.org, cota@braap.org Date: Fri, 15 Jun 2018 08:33:02 +0100 Message-Id: <20180615073303.502-1-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 X-SA-Exim-Connect-IP: 86.191.128.6 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Sun, 08 Jan 2012 02:45:44 +0000) X-SA-Exim-Scanned: Yes (on s16892447.onlinehome-server.info) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 82.165.15.123 Subject: [Qemu-devel] [RFC PATCH v4 0/1] SPARC64: add icount support 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: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This is a patch I've had in an earlier form for a while but never really developed due to experiencing random hangs when writing to the SPARC64 CPU timers. Fortunately it seems the recent icount timer fixes have resolved the underlying issues and with this patch I am able to boot all my qemu-system-sparc64 OpenBIOS test images. I've marked this as an RFC for two reasons: firstly I'm not sure I've fully covered all the cases where we need to exit the TB in order to allow the timer interrupt to fire, and secondly I do occasionally see messages booting Milax in the form of "WARNING: Time of Day clock error: reason [Jumped by 0x134]". Hopefully more sets of eyes will be able to point me in the right direction related to the Time of Day (m48t59) error and the TB exits in order to get this ready for commit. Signed-off-by: Mark Cave-Ayland v4: - Convert sparc_tr_tb_stop() to use switch for DisasJumpType as suggested by Richard v3: - Implement feedback from Richard: use tb_cflags() for icount flag access, unconditionally exit the TB when setting the timer registers, introduce DISAS_EXIT to avoid repeating TB exit code pattern v2: - Rebase onto master Mark Cave-Ayland (1): SPARC64: add icount support target/sparc/translate.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-)