From patchwork Thu May 9 22:26:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163773 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1575365ilr; Thu, 9 May 2019 15:37:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqyuQSJ86P/VEps9jvnoCTvjeyqQ6g5Sf6t31mKQXIHd9QD3NqIMStwUcVaGWhEfj2AXeV7A X-Received: by 2002:adf:ec06:: with SMTP id x6mr4789913wrn.159.1557441446199; Thu, 09 May 2019 15:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557441446; cv=none; d=google.com; s=arc-20160816; b=FiO/xanRWLS3CPkli+Bl+ndJtLgZFoZXVtWQsHNrn/bmSs2zKMKj5T5ym9RtZ2M3Sl 196lL1uUkuJAyQYMCt2g37cvg0agcbyK0tXPCTdhGePMusPt2/fBlPB7b2Tn81p+1zOm DiUrPx/2m6imNiEIyz6GEdLDZuSM07J1e83b7Q2Vb2rQdrGzHxKhkKTjfiX2biOdsWKN PeGT7Z/d00CgRktAGuQvwM9CB5gVPxJ0bPnGDCL3G0vGIpN78xAPouZCKbejZYflitY7 dygQ9QkGOmURql3W2RY2fSDHt09j9OE169cBYAMQYbVVCDOVIjMBxGKOgR19dZQIFwEk Jo0g== 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=7X2wC9JBm7qMTyCvU+ISYeQpejo5eFPlqgIZBbqHM2A=; b=v1YXBmLe4z1QdBS+mwjxjevtdenSvW0QeaVQDt6s0wDG8AuP4+2Yc+hX7fpGfVReDi Gdh6JGKuHycAmege97N0qVNq+bBhs+rLz6Y8X9rD1hkcJ68mOsU/DxtW5S1a34sfqdoa 9V5RRaYE0kpryO0WDq8TDEAkgjpzr0GTdl80ll2AGKC9i9PpDDY1P7ojQtj/BkBbbbTS jsw5p1eW6X4ghR8zx/ObdcT5lZPlSq/llg2ZmEBrt0tGM7JInp8vKXzsyd7PpRldcKV8 +JTTrkkXpbTtK74B8O60gpQG1AH0daKIpbkk7BjwOt7A5nXY0n9tyk9ZlhJCdYYJp74B oQVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=pHXQ54sB; 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 f66si727254wmf.137.2019.05.09.15.37.25 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 May 2019 15:37:26 -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=pHXQ54sB; 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]:33585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOrfJ-0000Xa-3A for patch@linaro.org; Thu, 09 May 2019 18:37:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33233) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOrVP-0007zq-1v for qemu-devel@nongnu.org; Thu, 09 May 2019 18:27:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOrVN-0005df-S4 for qemu-devel@nongnu.org; Thu, 09 May 2019 18:27:11 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:41760) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOrVN-0005d6-MC for qemu-devel@nongnu.org; Thu, 09 May 2019 18:27:09 -0400 Received: by mail-pl1-x641.google.com with SMTP id d9so1801142pls.8 for ; Thu, 09 May 2019 15:27:09 -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:mime-version :content-transfer-encoding; bh=7X2wC9JBm7qMTyCvU+ISYeQpejo5eFPlqgIZBbqHM2A=; b=pHXQ54sBAviErVPY8IYOEID7pbmPziscvQGTT8a0hh4Bt6VXLbuWAscUCay4jqQve5 36gWCV+xMoNrFkLltghBp0p8o+VXqO/RwibwXS5BCsOn000d2s7bk5T0EaRscTRpLydk Rt+UNuZHM5/uZk0u/Jwko6XMKUi7zAylAKXEIm6zig0CGHevmZIX8XHhJICLgt7J3E0/ +Z7a7/gIWCi0Moz5Bq5RomNLTvD2CjsYZry5RbBQpOvpZP3FgByZSDmXjs5uwBQJs5Rw iNkftczqGL9OE7WzNXziFNLM5C0sTzcebpOs0+TexflApcDjZogTOzNcqfTYCywEeQhX i7PQ== 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:mime-version:content-transfer-encoding; bh=7X2wC9JBm7qMTyCvU+ISYeQpejo5eFPlqgIZBbqHM2A=; b=M8wRftqF7mQaOBheMVf692DajZyspjwj27V8te7EBglqrs9So4mw2YghcgEbz/zn3e fkGivHLus3VeUrIuNxeIxnmVzPXApIIeZQ2S2yqcUgSjbfKFPNT9U8X5qlxwIlEDonBd LfXyrG3n5y1aEkhtqqiwHTC25zSxuEXcFKKENADalIX7J6N4mxsrOC9gLkQs8MvXcJdq o6GDH3Z8OMLO0vuzB6k+vK7nPJCwUeabSSGAVt7aHFwo/V44Jg9Bs92zTY0qgdKHi5jB cH3kBcOve9at8Ldko/yNXYkXQoOH6A4GV80dnbF5wLsubidgYr0Y4i7tVsSNibNnf1jn 1jxQ== X-Gm-Message-State: APjAAAXXy/+hU7JEzvMGIcdJcuB0dm2QoMfMG54Mh3GeWJ2zKmb7xTCx x6YGnI8Hnmwlphvmng9LvuvjLDv+r4I= X-Received: by 2002:a17:902:9007:: with SMTP id a7mr8362961plp.221.1557440827989; Thu, 09 May 2019 15:27:07 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id m2sm4490521pfi.24.2019.05.09.15.27.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 15:27:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 15:26:30 -0700 Message-Id: <20190509222631.14271-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190509222631.14271-1-richard.henderson@linaro.org> References: <20190509222631.14271-1-richard.henderson@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::641 Subject: [Qemu-devel] [PATCH v3 26/27] tcg: Remove CPUClass::handle_mmu_fault 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" This hook is now completely replaced by tlb_fill. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qom/cpu.h | 3 --- accel/tcg/user-exec.c | 13 +++---------- 2 files changed, 3 insertions(+), 13 deletions(-) -- 2.17.1 diff --git a/include/qom/cpu.h b/include/qom/cpu.h index c1f267b4e0..32983f27c3 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -117,7 +117,6 @@ struct TranslationBlock; * This always includes at least the program counter; some targets * will need to do more. If this hook is not implemented then the * default is to call @set_pc(tb->pc). - * @handle_mmu_fault: Callback for handling an MMU fault. * @tlb_fill: Callback for handling a softmmu tlb miss or user-only * address fault. For system mode, if the access is valid, call * tlb_set_page and return true; if the access is invalid, and @@ -195,8 +194,6 @@ typedef struct CPUClass { Error **errp); void (*set_pc)(CPUState *cpu, vaddr value); void (*synchronize_from_tb)(CPUState *cpu, struct TranslationBlock *tb); - int (*handle_mmu_fault)(CPUState *cpu, vaddr address, int size, int rw, - int mmu_index); bool (*tlb_fill)(CPUState *cpu, vaddr address, int size, MMUAccessType access_type, int mmu_idx, bool probe, uintptr_t retaddr); diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 199f88c826..8cfbeb1b56 100644 --- a/accel/tcg/user-exec.c +++ b/accel/tcg/user-exec.c @@ -63,7 +63,6 @@ static inline int handle_cpu_signal(uintptr_t pc, siginfo_t *info, { CPUState *cpu = current_cpu; CPUClass *cc; - int ret; unsigned long address = (unsigned long)info->si_addr; MMUAccessType access_type; @@ -156,15 +155,9 @@ static inline int handle_cpu_signal(uintptr_t pc, siginfo_t *info, helper_retaddr = 0; cc = CPU_GET_CLASS(cpu); - if (cc->tlb_fill) { - access_type = is_write ? MMU_DATA_STORE : MMU_DATA_LOAD; - cc->tlb_fill(cpu, address, 0, access_type, MMU_USER_IDX, false, pc); - g_assert_not_reached(); - } else { - ret = cc->handle_mmu_fault(cpu, address, 0, is_write, MMU_USER_IDX); - g_assert(ret > 0); - cpu_loop_exit_restore(cpu, pc); - } + access_type = is_write ? MMU_DATA_STORE : MMU_DATA_LOAD; + cc->tlb_fill(cpu, address, 0, access_type, MMU_USER_IDX, false, pc); + g_assert_not_reached(); } #if defined(__i386__)