From patchwork Fri May 10 15:19:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163878 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp2524030ilr; Fri, 10 May 2019 08:30:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXhNNQUTLTp1oo9tzdbAm/vbU3bYVzqyqOgDpSUOc5Jx3pt8YN4bhp3Eq6rtojfAxpPms7 X-Received: by 2002:adf:cc8d:: with SMTP id p13mr821164wrj.114.1557502254588; Fri, 10 May 2019 08:30:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557502254; cv=none; d=google.com; s=arc-20160816; b=rDvXzM9K1iXtLYIpFhNR8heS9yJOtw1rCZDs9qkwI2cpNE3OPc2/yJn+ZkXv8htd/n Iv95hds1Sk6qpxsMSkxGN6XTP1Pn4FYVh3QGHP8K/SZQ6va9qukig5OjAtuomPREpp2X FcI8KqZb4Hc2mjFYBHn3nWbSHzopvzgFR+fxBxFmH4YdfjO52swpK3IfjtNvFb0Y91NZ eUGTRffwivYFirMnxSjT5PKZC1UdlldxJS70K7wGedzP1RAVYS/fDsiNp6Rb7gki4RyB dR8UGC6G6cJQQ4AU38YVd7t3TrifMQTIJAkB7VsIzX5BnyxV/kDNliJf8S0kmOJMzgzn vmCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=Lwb03eUhmS990EyUSfNfyAqT98t0fSpU1xpPRAyGlZMc8ps63ZYcjEdkcizqlmJKvm f4vmZDukj8EOSZIKF4DANalBjJSpSARyUYyJgs7JgVw2K6IUbpRwE3ahh3PFZ6YcxDPG 0LrAaGEsYt8n7nb+1ieBGKTJ/rjzlKufKgPgRSqEQ7BqT3ai/pncra1zUnhas3Lu9U6b A34vh6ZKNik4j/2nqqgLZBWHhQkLLett8FKrvIlqTDUJAEcX4Hh6XdQVcH2+ZVlynQ8i cqN9bBSNCu1dLxAj3lEi7VUTFZoxWgp/KENIwZSx1TCyOCJWUnBEJSIE1LprPEYt+pJz gsuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=goUfrrA5; 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 p23si3925308wma.55.2019.05.10.08.30.54 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 10 May 2019 08:30:54 -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=goUfrrA5; 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]:45143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP7U5-0000z8-6N for patch@linaro.org; Fri, 10 May 2019 11:30:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hP7Ju-0007wK-QP for qemu-devel@nongnu.org; Fri, 10 May 2019 11:20:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hP7Jt-0000Op-Iq for qemu-devel@nongnu.org; Fri, 10 May 2019 11:20:22 -0400 Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]:38936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hP7Jt-0000Nf-5l for qemu-devel@nongnu.org; Fri, 10 May 2019 11:20:21 -0400 Received: by mail-pf1-x42f.google.com with SMTP id z26so3404852pfg.6 for ; Fri, 10 May 2019 08:20:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7X2wC9JBm7qMTyCvU+ISYeQpejo5eFPlqgIZBbqHM2A=; b=goUfrrA5ptbRhNJDtaBMtPoxIclyf6WBGBDfsj/cJY20s9UONh7GTzGz29b5Lk5Yxu DcIr5Cy8gI1ihqMk1DtCdoCbX4BTClo5WUAcq5SuWHReLLMGwwSTVO8oifERrc3FHUy4 wScpPbviW1oIq/YJxwlcb57o+9i463knNndCabbGQn3a926SfwtNFLhJLZroiYNEBP87 bobuQm3dELibYIIsu37NJd5hlvOs+vO+XVhxDPtSLvsPwbe8UEOCZNGNDq5dHvU4ShCG 5D7M4EJudBq173YlLWd1yrGif7tUNh1MNJbEYnj+ZQ54BRhgXLZqZN7+HarxUK79iVMG 3nCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7X2wC9JBm7qMTyCvU+ISYeQpejo5eFPlqgIZBbqHM2A=; b=uBgiWnv4ygpwRZ2246f+6qjxjCkQjfYJlmfHHRZu9GSs1AOe71KwFHu/yq7LpjPlea O8AYgI9nm7UZdluZo5kkf8E9lY6Xp3OdLAadrpbLjkjBt02MLDH/vv4J4Qn+EOvY+7V3 YuHbXYuurQ+0a9Y7yAASdjcMkZSDb+SYiqiL9HZlQ9s5qT6qD4rttjNfjP5qw/N2TAHN JA8XrWcgPQoCA58bZQmdMeQ1yvHcqYBdLCu0o5foXTK8fkjAMAfvmsFmGo03q/yf1Cq1 hI+p2DF24ud3yK6OadLGnM1zULva6iSk12qhJXU7zG5AD8BL0astwPNt3K0thdbR/EGx VfNg== X-Gm-Message-State: APjAAAWhVYrOKpfvWkDdcnllCsORucZjdBj/tPh61IHgES3wjn78YPtP qc6CChPGspW8LWOJI1PBBRK0ylYuk7k= X-Received: by 2002:a63:7909:: with SMTP id u9mr9501616pgc.223.1557501619730; Fri, 10 May 2019 08:20:19 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id 19sm5920517pgz.24.2019.05.10.08.20.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 08:20:18 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 10 May 2019 08:19:43 -0700 Message-Id: <20190510151944.22981-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510151944.22981-1-richard.henderson@linaro.org> References: <20190510151944.22981-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::42f Subject: [Qemu-devel] [PULL 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: , Cc: peter.maydell@linaro.org 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__)