From patchwork Wed Apr 3 03:43:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 161672 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp2523205jan; Tue, 2 Apr 2019 21:03:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAndNFFb/yU3n92OzqgXfQ5CMYfVNewiryCcnwOZL/yA5g9hfRTdvBkq9HFo428hV8B+qO X-Received: by 2002:a25:3b58:: with SMTP id i85mr17758345yba.28.1554264236753; Tue, 02 Apr 2019 21:03:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554264236; cv=none; d=google.com; s=arc-20160816; b=k/mVdyugSOWm9YRMxuSfKYt1nyBk8UCxN7MpuADTM1qPkSVEICnPDpSVe4xxSybX6h VwrxwOekGbEVoGgcIlLESL1qt2Y35HQNBkahHYUbBPlFwyMSD1g3rYGGcI6p49lPVIpc tUkLZ+NImpRB/QuJJKLcPDHbPDX6brdbr4KGkz5r1rDIUBT94ev18CydCHZ1uCTV3JCF nfbLQGZqC4Kk53GlGfeGo8zusLIl0227YtJU1nEIvrnOBXUyewGEe84+fuxIu+jTwSBe sKwH2E42RzOsP+k52B8fw1+fhV2HF4cw5+qBlY4hU6Qo7+VTF6o4rSMMHvO6DYFdFasL DBNw== 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=AtXcR9qOhAm4SZbk8xtPeJBMD1d3f2FJbejNtiDmN/8=; b=0wC7grMSNcETqp4AHGc2YtZipQ4MMjLFZCHB9+2cbzoNpQTMS/btoV/qb30gZeca5C tzvZJAIiRG7nNZ0gh2He5Zb4KfIVqjfY+beDr0YHfel8dBy4AcTZX4BuhqQ12L0DxbF8 BOi+0PxWSs8DDioN34kA/4h/AFM/Bv2irmuwt2GyObVa/K9/tEDo2KBKil0Hgv7UZRZV HjcKs7PgYsjYWDDGCyZ9V3pyQtSxm9GaBT9xqsc7sJHMzDQ7FhbDblAvyAY4T+I5Ab34 JzqjXTRXdik5FR36FtC3cN8WLVk+K28RbaTKjyYB3MibNYAnVAc5Ebs5dm/jWWvsLiC2 4MLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=TpU6h2gn; 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 h11si9004704ybh.338.2019.04.02.21.03.56 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 02 Apr 2019 21:03:56 -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=TpU6h2gn; 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]:56257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBX80-0002hZ-Am for patch@linaro.org; Wed, 03 Apr 2019 00:03:56 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBWpb-0003J6-W6 for qemu-devel@nongnu.org; Tue, 02 Apr 2019 23:44:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hBWpa-0000U3-VM for qemu-devel@nongnu.org; Tue, 02 Apr 2019 23:44:55 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:38335) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hBWpa-0000TF-MM for qemu-devel@nongnu.org; Tue, 02 Apr 2019 23:44:54 -0400 Received: by mail-pl1-x641.google.com with SMTP id g37so7315057plb.5 for ; Tue, 02 Apr 2019 20:44:54 -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=AtXcR9qOhAm4SZbk8xtPeJBMD1d3f2FJbejNtiDmN/8=; b=TpU6h2gneimIlKfJZLH3v+kEFfLXhWzcZiSIMxA8dZ3pUpVLNf+RBxmvwKTqXVgGOn NLRUMOyiJnEskyTsaigDOtQDLP6SWPYM3mF+aMtrQeqfPA8CkFFayBNDSfm6OXw1V/pZ hmWgsouv8h6TnlLRtv3h4oQq7Lt6VaU5zLfqy1RsAMPVSqPzCBGbgC7tgde+GgmINMxw EFd2c3hYAz8aRZ57fK2VCQPMfkf4Jkgnt32h9/5A8oIBJ7Y226IZPeK/yCp+B5Rz+One XzD+ak8KnL79F/rh2/q0PhpuVFwrrbH/SGEW8e1rZo58urJ9j9hMRwNHq35Qb+9o7ja5 e+Rw== 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=AtXcR9qOhAm4SZbk8xtPeJBMD1d3f2FJbejNtiDmN/8=; b=Xqukf8O+GmsRM2JNIeIiLnO6q0AIoJb8hjHCbahJB1zJq3NcHhSKoHE36iNc0om/kP biVv/9IDSOb6U67TjKSsqE2NKiEC054v8J5ZJZqMYi4+0Lrud09bqXPjohmJWLii8WDq VvoGAaEMKdSWfX2sxDHaHMQHq+z5dx2EiMJ5c6pPu/j37yVnpsT+trcbVXIwMkaKgSY2 P+BJ07pGkviPObd1rUbUZCEcPL8CI8j9OIrLNpaF730svxqtrail34LUItVWEthoGoBF 7VCD3ltovft5UviOntuC0o3wqlt/tY27k9CX+6Yvdr0b72hyVRciFa5fbHFCkvIXcnOa NPRg== X-Gm-Message-State: APjAAAXsYFHdLPhC6Gbsu8V0o5T1RlXe4pZ0dhW1Fr8hZn4T7JWgvKiZ j80OX+lp/wfb7K99r6d+300sbCSP6k3Xyg== X-Received: by 2002:a17:902:2b81:: with SMTP id l1mr27812394plb.289.1554263093170; Tue, 02 Apr 2019 20:44:53 -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.51 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Apr 2019 20:44:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 3 Apr 2019 10:43:57 +0700 Message-Id: <20190403034358.21999-26-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::641 Subject: [Qemu-devel] [PATCH 25/26] 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. 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 Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé diff --git a/include/qom/cpu.h b/include/qom/cpu.h index 7e96a0aed3..8afcf0c427 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -118,7 +118,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 @@ -198,8 +197,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 f13c0b2b67..d79bed0266 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; @@ -162,15 +161,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__)