From patchwork Thu May 9 06:02:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163684 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp556404ilr; Wed, 8 May 2019 23:22:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/XbJ8s5BWBxI88HIqnE9k2qdOK4MeQ386/6RsiXQfswmvlqSGNciOAql+3kYlMQ6FobJL X-Received: by 2002:adf:dd43:: with SMTP id u3mr1493125wrm.302.1557382922828; Wed, 08 May 2019 23:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557382922; cv=none; d=google.com; s=arc-20160816; b=jC4XMVBet5Edv7Kn9Fau0FJKdXmVFFwNWAzZhS16EmE97AoLbntKZSNSS2dU+MPseH aZXrNj4gH/SfMYDIwe2YOHJhW1k+vsk7cJJHcFkTFaQ1aAsS73gTrKODSfuPXt0zPwXQ /uXajysYzPd7EzhQEVTMurS0Dr572bgbb5BkkgjGvbTvQB7NA3ykeGiEkUHgP0IbQ/W+ jgG8akyYMAQdWAZRUqCKwpcEvJDBg4WPc10rtjTt2lNIQ+HuVmb9ZCQSrmE7JA/o0uwG XjZZX8KRqUyxXlu7YUz7jHq33nhNStgE3TO+IeI01QQUKifByCLAXcPvM3NtWej2Fzd7 u3mw== 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=EtNpyKw/EOPIe4mzNasQEPiduGESvWdvOxw6MJleD9O+RrVNwc1GwNSnTR58zkk0En wH1xVIb3zO70hk2uDCBKQmzSKsV3ulNed5Jn61+bxb/Rb6wunwkht2LZwEyykh/Ng0Ib CMr7vDnj/WsH/7ishIiPuLBNhtL9YLZqYbcD57cAnAemt4/7UvtXHTu/Rff8gOeCBaiH B31XS89/c+lk61amnTBp4jxavcvSFkgmC0OG7ftwgM30iai3ZiH+iXqNmUVjrAB97SDK qxTW2U+003o8XjjRy/OH/InZME/mzAR3mnMtBnBj27Vn+tXaqf/I//mZfRP642k5TCWD yX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PMDZDgJS; 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 p8si954926wrs.89.2019.05.08.23.22.02 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 May 2019 23:22:02 -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=PMDZDgJS; 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]:48852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOcRN-00071z-Qp for patch@linaro.org; Thu, 09 May 2019 02:22:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOc9O-0006NP-UC for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOc9N-0007KO-R0 for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:26 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:38106) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOc9L-0007Is-Sl for qemu-devel@nongnu.org; Thu, 09 May 2019 02:03:24 -0400 Received: by mail-pf1-x444.google.com with SMTP id 10so723744pfo.5 for ; Wed, 08 May 2019 23:03:23 -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=PMDZDgJS+ftwQFG5gEFlapiKiC2l0aUNd+S2Lo12qd8qOfryT/Ina8h9RpXT9ndLfE uZs8fRo2Cp1lOpBx30MHHPEg2ZyFl8Nsh8WQ+WKkem3u6ZHyVrsGq/N12LhyHTAekki2 Ad0Rww6H+YssAgxiUAHlMAZ1PA+wInv27e+cC7e1SiuStGhokKcnM0AT6Zt2xCev4gKh hn5/mbJf3tVmfGqdGTe00aspAdpxFzjN4ePPE8gSgavVDM50MO3zTAmp23RhzIKZQ1Do QKxX2wn1bwrln1bI/qQcQtp7Mf/S2X0esRBiyVAfssjU6Z8s2wH7wn/NVhiYwfrpyHLu vDfQ== 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=pu7XsDrQoFTltiRx+6BBxvTQHnN1inR8euuBcBHfOoAq+vSNhjF4B+COvCUDBKHmXU tfUxa8YiB3MaFH9CmGEXBWA9YF9W9+QYTz5Mp19MK82s0RN22c22m4CzA9jc1I9XryZn exnjfAXfOjA9VlLKYxAB8qhTiwwRt+jLQBEcoVPeas7F+q9oNQnPlQjYZKniMJrCIOkY Lh/QfJ4j+hV2/5NTivXeHnEKVdqnq5Ox+Whutr2M931vZTWE79aXXorKSDp2TQuTaczz hc6pcJoIHeqTRQTZ5gozV0pn/iBco6Yrc6XPpLUNrkRBvksUWR0gkm99u4OqqbYegIVE fYOQ== X-Gm-Message-State: APjAAAXiXGebZr/XuIFY63v/zFrTN7InHUsAGNm9iWvf3MM/YJyd/TMc wltOAb7Oo8coNaVFD4BuLVNyvgu/dDI= X-Received: by 2002:aa7:810e:: with SMTP id b14mr2654937pfi.112.1557381802283; Wed, 08 May 2019 23:03:22 -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.21 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 23:03:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 8 May 2019 23:02:45 -0700 Message-Id: <20190509060246.4031-27-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> 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::444 Subject: [Qemu-devel] [PATCH v2 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__)