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: 10882701 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DE6A13B5 for ; Wed, 3 Apr 2019 04:03:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4618028989 for ; Wed, 3 Apr 2019 04:03:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A5F8289B5; Wed, 3 Apr 2019 04:03:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CC2F828989 for ; Wed, 3 Apr 2019 04:03:05 +0000 (UTC) Received: from localhost ([127.0.0.1]:56023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hBX7A-0001wG-UL for patchwork-qemu-devel@patchwork.kernel.org; Wed, 03 Apr 2019 00:03:04 -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-Google-Smtp-Source: APXvYqx09kR0nno0fnF2fVzu19lHTImwPmVD46AqdayLpAWlSdlNgxCMee0unvq12eC+E9JzauGt+g== 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This hook is now completely replaced by tlb_fill. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- include/qom/cpu.h | 3 --- accel/tcg/user-exec.c | 13 +++---------- 2 files changed, 3 insertions(+), 13 deletions(-) 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__)