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: 161673 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2523395jan; Tue, 2 Apr 2019 21:04:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHe0VAE/PF+XzPTcO8blvgvDehbVRCDSBelOSDkhCDXgfgKfcr5NTjK+R+kyOtSq42g8br X-Received: by 2002:a25:4d45:: with SMTP id a66mr59747031ybb.456.1554264249887; Tue, 02 Apr 2019 21:04:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554264249; cv=none; d=google.com; s=arc-20160816; b=e3B5+LjKqrcqWgRasxQbAu8Y4sb0KJq9v7Y8eUhneO0fXE9qTStOddt1tPRy8Sc2zq esjaliLdDkmddnLR3gG9xmj0BYIwzvwk1GaI8z/gOFCN6ufB2p2+Ybi/QuJfUyflG0c/ V5xDCiOsX9DPa7mLp3MnYNTCGJPuWp/qcm5ZknaDVvbTgUlWKhGbOInImFZ8nKyS0uMb cSrcoombAkkQDeD1RHepDeTMwuVhEqvYus6xFxB3amNLKdfEgWCECxm/y/xr1s+XajCR 5+BxhklNs4kk+Ekq8pCvUxaWuHyvgtMsnAPFRZsCKj3S+ufdQj1vA73nYDDVd9qAQj8/ ZTlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=a+hYtasS4SonQYD5VVnTIEorzk8rja9JxW5rAUXKw9Q=; b=CNT7Cc/wUFg7qRsJ9JdJ/uD8RiG82H9kTD8FIez8dIBL6J/c3C3CVNIoKW5I//wtvs SJoy6BjkdvfGQjWiXhU8vAzVa/8taTh2oFAAIHYZ6PxglJ3tVpQFcLQcRTAJR0cFUJKv bOTEk+UDGR67pEl2V7MzSTpp+1QlFjOVSOxTyaf1w5p9ZOIJIpHGlYS49LgayEp7KNgQ I1Q4SqapigXgvxNb590G8KsFzs29+17VnJY9nONa4RznAq9pYZ9cHxKWO41zmWnp5km6 b1rIMN4nC41SM9IKAdfEELw2Shfl65aZWqxBO6kEUcZ+QJ7KWzpenI/y9HHLYcqBOrnU ViPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Cqc1OMQJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b72si9350183yba.341.2019.04.02.21.04.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 02 Apr 2019 21:04:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Cqc1OMQJ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:56321 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBX8D-0002tK-GC for patch@linaro.org; Wed, 03 Apr 2019 00:04:09 -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-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+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/tilegx/cpu.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.17.1 Reviewed-by: Peter Maydell 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; }