From patchwork Wed Apr 3 03:43:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 10882703 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 490C713B5 for ; Wed, 3 Apr 2019 04:03:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3119D28989 for ; Wed, 3 Apr 2019 04:03:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 242E8289B5; Wed, 3 Apr 2019 04:03:21 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BED3A28989 for ; Wed, 3 Apr 2019 04:03:20 +0000 (UTC) Received: from localhost ([127.0.0.1]:56083 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBX7Q-0002A2-5h for patchwork-qemu-devel@patchwork.kernel.org; Wed, 03 Apr 2019 00:03:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBWpS-00039U-6n for qemu-devel@nongnu.org; Tue, 02 Apr 2019 23:44:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBWpR-0000Ga-7o for qemu-devel@nongnu.org; Tue, 02 Apr 2019 23:44:46 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:39890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hBWpQ-0000FA-U7 for qemu-devel@nongnu.org; Tue, 02 Apr 2019 23:44:45 -0400 Received: by mail-pg1-x542.google.com with SMTP id k3so7586312pga.6 for ; Tue, 02 Apr 2019 20:44:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=a+hYtasS4SonQYD5VVnTIEorzk8rja9JxW5rAUXKw9Q=; b=Cqc1OMQJ34AN/ajshLVQx9m6fac1FsWQkOlZxvsJ2WrnYx0JRM+/aTbKGXGFY2271F i54iQjLdpy1PuD9JNKxLAiQPZhoexZ0eyAncMLI6S2eXa1fqz0UUVSq8/2+KNUC1Eixj hTrH+8SML1C2iP5xUD5+ZY4gfYHCHhGHnOT2Hf/zWGJs5fyU20IcN7q4KIXHOmrkQu0a 4QFBlWFdxwuXnJXgii3IPygdCogY9TEuk47zZbRsqNf9yjbP6Osq7HR9F7FQ6z6LJ8LH SSuRR0viD5DnRUwTKI9eYVXQ7Ax/huHqJgWpMypQbqsQ39fZJe6y+cSYwS4UXJAyYQHa AlRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=a+hYtasS4SonQYD5VVnTIEorzk8rja9JxW5rAUXKw9Q=; b=C4I88WupPO00V7S3BG4I6ackdnLaZSrwDQYSulQ71fI3gboapIOmWvXd/or+OFoek+ bSt0wrXAf8Bo6C0oJkr0TwUpTOFtzRzjsoIqhl5e8ZHzjPsYszF/ZWLfhQLt+NPvOTF/ HZKn2wAhgidurHjXb2b5f7CU5ScRbvG7lD4hnnFAnJF2sRO+rZCmu3ESReb+aeGd12EB CzkyFxHgzasm1yNKGtxPQBpYiGjEaZoufO2YH3ExiyUbwoJe5tP1D/h6rKUoQD/8IxYR XtEhUaUJVWKlgYpaO9PUrEubphBXSH6FO49rFAv8ayvJ3HzuJJpqvinazv2YZmzPvvVA jACw== X-Gm-Message-State: APjAAAW6ciDLeTbIH9JGdGn4IOSvl/l/S/rjYqYKHh1mcI/AFcEVJz/1 yYr7ewXyvTtowjxmAxHIYPbvB8GMFICWGg== X-Google-Smtp-Source: APXvYqylEFdkHE9/hv0hR4zQlNPK0W32abH0zmSKX7Q2DYARfRwDgbARuIHXmeVu/ILr6h0f/BZ5tg== X-Received: by 2002:aa7:864a:: with SMTP id a10mr74881937pfo.181.1554263083379; Tue, 02 Apr 2019 20:44:43 -0700 (PDT) Received: from cloudburst.imgcgcw.net ([147.50.13.10]) by smtp.gmail.com with ESMTPSA id z6sm26753214pgo.31.2019.04.02.20.44.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 20:44:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 3 Apr 2019 10:43:52 +0700 Message-Id: <20190403034358.21999-21-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190403034358.21999-1-richard.henderson@linaro.org> References: <20190403034358.21999-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [PATCH 20/26] target/tilegx: Convert to CPUClass::tlb_fill 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell --- target/tilegx/cpu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/target/tilegx/cpu.c b/target/tilegx/cpu.c index bfe9be59b5..be50976c6f 100644 --- a/target/tilegx/cpu.c +++ b/target/tilegx/cpu.c @@ -24,6 +24,8 @@ #include "qemu-common.h" #include "hw/qdev-properties.h" #include "linux-user/syscall_defs.h" +#include "exec/exec-all.h" + static void tilegx_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf, int flags) @@ -111,8 +113,9 @@ static void tilegx_cpu_do_interrupt(CPUState *cs) cs->exception_index = -1; } -static int tilegx_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, - int rw, int mmu_idx) +static bool tilegx_cpu_tlb_fill(CPUState *cs, vaddr address, int size, + MMUAccessType access_type, int mmu_idx, + bool probe, uintptr_t retaddr) { TileGXCPU *cpu = TILEGX_CPU(cs); @@ -122,7 +125,7 @@ static int tilegx_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, cpu->env.signo = TARGET_SIGSEGV; cpu->env.sigcode = 0; - return 1; + cpu_loop_exit_restore(cs, retaddr); } static bool tilegx_cpu_exec_interrupt(CPUState *cs, int interrupt_request) @@ -152,7 +155,7 @@ static void tilegx_cpu_class_init(ObjectClass *oc, void *data) cc->cpu_exec_interrupt = tilegx_cpu_exec_interrupt; cc->dump_state = tilegx_cpu_dump_state; cc->set_pc = tilegx_cpu_set_pc; - cc->handle_mmu_fault = tilegx_cpu_handle_mmu_fault; + cc->tlb_fill = tilegx_cpu_tlb_fill; cc->gdb_num_core_regs = 0; cc->tcg_initialize = tilegx_tcg_init; }