From patchwork Thu May 9 06:02:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163676 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp552207ilr; Wed, 8 May 2019 23:17:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqyitP7OE/vNukPDn3Nctk8i4AWOVj/1ByjyWMFixOEm1XOCp3iVfMzUurs+/on0ULCRtssg X-Received: by 2002:a5d:458e:: with SMTP id p14mr1421491wrq.318.1557382631948; Wed, 08 May 2019 23:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557382631; cv=none; d=google.com; s=arc-20160816; b=rfYzNpbQgtClcUf1OhSntDj5/b5f69g7uCCxF6n2awdcmlJS0nrYRRCLBzv1V6PZ6m MWt3dT/9kluvysPSMq8xqdpgnEejqroDEhveUbC0bBrrq1uBT3Trx6+d/8cb2LvwVogw Msvhfm/RozbWySYcozLt0hpS7KyyEoucjn6TN7cKIr+e/DeQapgYo5byoPlsK0L1dSqd ASAXU/hEQ8E3LCdmpGj5doeGpYXo99GmfHn5dgzOj7lDYuQxVepYaCfviflF2sEbqyUB jeSYmCWPn7vfTwDO9vlwLVazlnzt85EuFYZ/vC4XmeJBF8crEbM1MnjrlBHIvP49ZSBt iqhw== 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=s4MN+agLoZqxLhzSptzqanZ4wwu5I/aQQC+BedaVD0U=; b=iK+X+zd981Oi1+x+QHru0321sVJs8IGnswNWD0krr1TZ1GJRdca/qfyNxOXTGiXXPT 4Y4cGUlgpHooI4vNEHSsaEamnExE1IO+DuvCuHBunLF1LdsX7gmCXLzvyVBUkDMOH4Ik +OpdGrDObxx86xy9PMJO8tl7JlPd1XCqOgIfE8OdMn3KIzOjTptF/uUySNJpo9aIe/km 6fHzGvC4axgDXpie4i1RFhDmg3wcKAoUP8vOiaVPwHIHLIU1/20OdAK9X2IcOoasq3Si t9VCIaKLAoA2wLvmoldoDS/KEjHKARw95f9vrqWdcgEHhvWoPEiMmmQX9qpl0sVUFpZN dYBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=B+E9kacG; 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 v24si850220wmc.92.2019.05.08.23.17.11 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 May 2019 23:17:11 -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=B+E9kacG; 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]:48781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOcMg-0003GK-PD for patch@linaro.org; Thu, 09 May 2019 02:17:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOc9G-0006FS-Ku for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOc9F-0007Fh-Lr for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:18 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:35406) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOc9F-0007FD-Ff for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:17 -0400 Received: by mail-pg1-x543.google.com with SMTP id h1so637947pgs.2 for ; Wed, 08 May 2019 23:03:17 -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=s4MN+agLoZqxLhzSptzqanZ4wwu5I/aQQC+BedaVD0U=; b=B+E9kacGpyzB7L3CvPy2mjiuDYpq0w2ZzDcSFGdNHg0kMMwNiS2E87BSspTUpCKrQs NXbLhKW/RiOrU9C34kNMqxxrcFJqn24BXvNPC06bgshYiur6G5qs/VjMBDGPSIQzUN9V KAw1LZb25eVEqzFxApIbG0v5XnG1iSR3OnA4qQYiM33AXYzsuR+8bRUMPL3o2FavYT56 nWt9XiRYCItvu4aH5RnygW/e+A9g1HoZ28VBYK8QNR7AMWkhCEVtNKyjNrm+zx9nW2PE PUOZaMzUTfVS7r3d/+0aRIRvNt2nJXAcD5Bg4NXxmDTinmKYWTOdfP+5agKuyR69l/+g mfCQ== 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=s4MN+agLoZqxLhzSptzqanZ4wwu5I/aQQC+BedaVD0U=; b=THY+FdZRMU1GGJfllP5zD/qqozBbmd+gnwBYL1IpnMcECf9RCI3ggflSKpiP8Mlsq2 YXEU0dZuEZozvDUz1OE2cW9jh5EzZbpSzV9CMcvr7Nu1VOo34rjr1mT2DO1AY4aDXWuG WzdXvnUNKvA/pqFibVkV1wWcjl30drZEx9n36OQwXF5e8Lw5LZ8tuLDpAlbAt0SwrcDa n4pGNhh29Eh5xGvwJ2ObhKRz1ClaTVpeKK1mVoQ6DetB31NNYBXUByzFDdqut2yirJ6+ lJBxmI5bHE9J/u3mIzpNX30tw81PLZX4HamSUYyWxgsh1sGBLx2Xp4BhR57robA4u3mm bDkQ== X-Gm-Message-State: APjAAAWoLPGHmXGiM2hAxJ007Msc85AFn/6/slnTEQkeinyfwNY8K8Jg NnpxsRzD1TB1DkCcE5BtGbG4gSOBqQw= X-Received: by 2002:a62:7995:: with SMTP id u143mr2566428pfc.61.1557381796318; Wed, 08 May 2019 23:03:16 -0700 (PDT) Received: from localhost.localdomain (97-113-27-95.tukw.qwest.net. [97.113.27.95]) by smtp.gmail.com with ESMTPSA id n7sm1496109pff.45.2019.05.08.23.03.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 23:03:15 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 8 May 2019 23:02:40 -0700 Message-Id: <20190509060246.4031-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190509060246.4031-1-richard.henderson@linaro.org> References: <20190509060246.4031-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::543 Subject: [Qemu-devel] [PATCH v2 21/27] 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" Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/tilegx/cpu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/target/tilegx/cpu.c b/target/tilegx/cpu.c index b9d37105fa..b209c55387 100644 --- a/target/tilegx/cpu.c +++ b/target/tilegx/cpu.c @@ -25,6 +25,7 @@ #include "hw/qdev-properties.h" #include "linux-user/syscall_defs.h" #include "qemu/qemu-print.h" +#include "exec/exec-all.h" static void tilegx_cpu_dump_state(CPUState *cs, FILE *f, int flags) { @@ -111,8 +112,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 +124,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 +154,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; }