From patchwork Sun May 27 14:13:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 921122 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="CnCO9JdT"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40v2Gc2VS3z9s15 for ; Mon, 28 May 2018 00:21:12 +1000 (AEST) Received: from localhost ([::1]:52234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMwXl-0005HI-UI for incoming@patchwork.ozlabs.org; Sun, 27 May 2018 10:21:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fMwQk-0000Dj-BO for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fMwQi-0004SV-Sv for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:54 -0400 Received: from mail-pl0-x236.google.com ([2607:f8b0:400e:c01::236]:33574) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fMwQi-0004SI-N7 for qemu-devel@nongnu.org; Sun, 27 May 2018 10:13:52 -0400 Received: by mail-pl0-x236.google.com with SMTP id n10-v6so5737341plp.0 for ; Sun, 27 May 2018 07:13:52 -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; bh=Ulh+EzcysOtJLTEaTwR+l2wPSZX/KDvqmQX2jTTu/AY=; b=CnCO9JdTC2RkZL6ZUtBX45F5AZr/RsFLWKhkaxtoi1+PXv4HqBX6YYwKq8eQ7xeYtl lBod83DfcFvE9xecgf6v0/su2wE/6MiOv6X7Rlv6SEz04PHjg85hjzxl6q5wixsH5pDr YZoRA0xeg0uSfH0cEyvrdHoFMpLAExcC6Zgv8= 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; bh=Ulh+EzcysOtJLTEaTwR+l2wPSZX/KDvqmQX2jTTu/AY=; b=e5j3REArhDW8TG1wwOrab7Vgz5eWbNNP5RNTXBhHtD9RzG9ckJ8c9cQoXuNO5W4sVV /IyUe4SxW9pPksbEUFtJYERt4qqXmTiO3vIApFva8uhSixZqddSGqvMlroCbWMxu0lJg Md+DDV5XBwEd7+OYqigRaafZJxxgvNoc2RwuU+jnkQ48YIrM8X8UECy5dYzX+xKYtFTo Nef53w5ulUIJL0a0UA4TMoL7XxCy97oAzi6edpHj6VzickeocqEshrtHEOJOSfN0dduj H++TlZdMEyZRekJmF2SFzj5q2t2ROA5+1SH3tLBPNtZrgiS1wZFxqFRz2ryUE6wgVwFb OfpQ== X-Gm-Message-State: ALKqPwdNaC/PnGite4n40AXxvUR1+wxISP2F++GkX5BIx1V+jeF5lGHV /f8EAzDVotUfJf9WaYrP/M/PMS5IMR/i6w== X-Google-Smtp-Source: AB8JxZrBa1RpOKj9c/jwXtI7HnfHVlNGFVqTh2XxR7xMR9OxMlljKWodT8tEptYTdxO7PUzvj+hwCA== X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr8899941plk.217.1527430431518; Sun, 27 May 2018 07:13:51 -0700 (PDT) Received: from cloudburst.twiddle.net (50-233-235-3-static.hfc.comcastbusiness.net. [50.233.235.3]) by smtp.gmail.com with ESMTPSA id b89-v6sm66680075pfd.85.2018.05.27.07.13.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 27 May 2018 07:13:50 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 27 May 2018 09:13:19 -0500 Message-Id: <20180527141324.11937-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180527141324.11937-1-richard.henderson@linaro.org> References: <20180527141324.11937-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::236 Subject: [Qemu-devel] [PATCH 15/20] target/openrisc: Stub out handle_mmu_fault for softmmu 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: Stafford Horne Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This hook is only used by CONFIG_USER_ONLY. Signed-off-by: Richard Henderson --- target/openrisc/mmu.c | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c index ee3016a8b9..2f1f16fd6b 100644 --- a/target/openrisc/mmu.c +++ b/target/openrisc/mmu.c @@ -177,42 +177,17 @@ static void cpu_openrisc_raise_mmu_exception(OpenRISCCPU *cpu, cpu->env.lock_addr = -1; } -#ifndef CONFIG_USER_ONLY int openrisc_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, int rw, int mmu_idx) { +#ifdef CONFIG_USER_ONLY OpenRISCCPU *cpu = OPENRISC_CPU(cs); - int ret = 0; - hwaddr physical = 0; - int prot = 0; - - ret = get_phys_addr(cpu, &physical, &prot, address, rw); - - if (ret == TLBRET_MATCH) { - tlb_set_page(cs, address & TARGET_PAGE_MASK, - physical & TARGET_PAGE_MASK, prot, - mmu_idx, TARGET_PAGE_SIZE); - ret = 0; - } else if (ret < 0) { - cpu_openrisc_raise_mmu_exception(cpu, address, rw, ret); - ret = 1; - } - - return ret; -} + cpu_openrisc_raise_mmu_exception(cpu, address, rw, 0); + return 1; #else -int openrisc_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int size, - int rw, int mmu_idx) -{ - OpenRISCCPU *cpu = OPENRISC_CPU(cs); - int ret = 0; - - cpu_openrisc_raise_mmu_exception(cpu, address, rw, ret); - ret = 1; - - return ret; -} + g_assert_not_reached (); #endif +} #ifndef CONFIG_USER_ONLY hwaddr openrisc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr)