From patchwork Sat Sep 13 16:45:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 388939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 580211400AB for ; Sun, 14 Sep 2014 02:52:18 +1000 (EST) Received: from localhost ([::1]:50943 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSqYa-00063c-CL for incoming@patchwork.ozlabs.org; Sat, 13 Sep 2014 12:52:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSqSQ-0001Uy-30 for qemu-devel@nongnu.org; Sat, 13 Sep 2014 12:45:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSqSK-0000kk-Sy for qemu-devel@nongnu.org; Sat, 13 Sep 2014 12:45:54 -0400 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:51932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSqSK-0000kS-Lv; Sat, 13 Sep 2014 12:45:48 -0400 Received: by mail-pa0-f48.google.com with SMTP id hz1so3539468pad.35 for ; Sat, 13 Sep 2014 09:45:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=r/fiHnuaYznh1krzMA/8A6ZnoxlxLYRVgQ5kE4bF7Hw=; b=NToGYbDdZSu//5Irdr0hWO3+uN6warfjyLM6VHwMqCLyWD8Ll7l1vn2VdIq513aSQl kHYHssuVyy0t6S0If1ixxOuRSq7oe/vtjSczwtO40PZ6j+aJurGxkJhbKUzJZ/3npDBQ rs+rC5UV7Xw4xmQbV7ZnnWFvFbf4QDZiJHc7yYyv0uiKFdMpNwr+o9VMzrqyf9poJ6W0 4zPBZadq0c0Jru8f+//2Fnhcrt761lZofwD4YWTd7pPuqaW0bQZts/B0J3IpIicKqUB+ w2ZHSzRlXMd35cxLZX5snMgvjfRFDufPrSrgTHUL3K3TK7XHBEVwaWaaVIoC1HPMhI1+ b23w== X-Received: by 10.67.3.106 with SMTP id bv10mr23972729pad.13.1410626747499; Sat, 13 Sep 2014 09:45:47 -0700 (PDT) Received: from pike.twiddle.home ([198.134.93.254]) by mx.google.com with ESMTPSA id xt10sm7240462pab.44.2014.09.13.09.45.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 13 Sep 2014 09:45:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 13 Sep 2014 09:45:16 -0700 Message-Id: <1410626734-3804-6-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1410626734-3804-1-git-send-email-rth@twiddle.net> References: <1410626734-3804-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::230 Cc: peter.maydell@linaro.org, qemu-ppc@nongnu.org, afaerber@suse.de, aliguori@amazon.com Subject: [Qemu-devel] [PATCH 05/23] target-ppc: Use cpu_exec_enter qom hook X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+incoming=patchwork.ozlabs.org@nongnu.org Cc: qemu-ppc@nongnu.org Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --- cpu-exec.c | 3 --- target-ppc/translate_init.c | 9 +++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 9f84dda..d930e7a 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -352,9 +352,6 @@ int cpu_exec(CPUArchState *env) cpu->exit_request = 1; } -#if defined(TARGET_PPC) - env->reserve_addr = -1; -#endif cc->cpu_exec_enter(cpu); cpu->exception_index = -1; diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 48177ed..e577e03 100644 --- a/target-ppc/translate_init.c +++ b/target-ppc/translate_init.c @@ -9456,6 +9456,14 @@ static bool ppc_cpu_has_work(CPUState *cs) return msr_ee && (cs->interrupt_request & CPU_INTERRUPT_HARD); } +static void ppc_cpu_exec_enter(CPUState *cs) +{ + PowerPCCPU *cpu = POWERPC_CPU(cs); + CPUPPCState *env = &cpu->env; + + env->reserve_addr = -1; +} + /* CPUClass::reset() */ static void ppc_cpu_reset(CPUState *s) { @@ -9638,6 +9646,7 @@ static void ppc_cpu_class_init(ObjectClass *oc, void *data) cc->write_elf64_qemunote = ppc64_cpu_write_elf64_qemunote; #endif #endif + cc->cpu_exec_enter = ppc_cpu_exec_enter; cc->gdb_num_core_regs = 71;