From patchwork Thu May 9 06:02:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 163659 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp538282ilr; Wed, 8 May 2019 23:03:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzp/6saM3cSSowDY8veONWW3KfRxm+YrblQjWhkXjQCCj7tm7h/GM8JLdEpC5xTOiTrwQrH X-Received: by 2002:adf:e845:: with SMTP id d5mr1511842wrn.154.1557381803814; Wed, 08 May 2019 23:03:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557381803; cv=none; d=google.com; s=arc-20160816; b=ETGlhUTA4iMf4GQOtJ3Yk8Q1KD3PGpuKzLHkd9zeHpk92+T4m0yK9BJA1jdF8R5PF/ 5y+koqZ1k9URavaezYPPVmxLVeD+ylKt8Fzwacn1dwLwtKo1iMrdGXuVIdVW1LwXcePG Jq0dgXrAu2SC0IEw9eAuAyiJq1xRri2xgad4BUksHxIhHeIeiqLuMdy8fxT+zqXtKTrv g0ojvKaT17uz8NTCyIk99Cu334DuZJg2M1BsZSgRTqyZq7ltH8xHUsKelWGzVaKJv3To AjWTyrtJL6xconk5YkJQWF2Cec9rC8A0kjorh0l/sMzX+MP6fU6vU0IVNSFwk2bVORC/ R9zQ== 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:message-id:date:to:from :dkim-signature; bh=v+OZD7XeZ0xihN95A1VXMos8Py5FqJIr9OLxNhWl3Hc=; b=bRXQATue5ztNYZ9AcUiz4xtDt+VP3yDQD4jjAEhwh7zoHsgJ3ySyNp8SScnMesh6oS YbsIyd1rCnHt/fY6ljGHmOorSsfuiCR5mKNsgKu1nmL7rgOy2UE5EQP2shpRvz3Vnc8F X9vDt2JhWabQx8VUCshPQIEwzLx6HT0YFo6/sQjxlpslMs4uMKUg2ri+5fOPg8voyWTt sRxUJ5ogyskzvEiAH6SalmklP6op0+ZxHW92U9gT4GngQMHtgd+BUi4lc4pmt367Wt1p d2kedZw+o5xgD3Fs8Xrzb7K9wRJT4VR4cjqB4ExO/hFGtIWbLPoqyp6VlX9AOUvXjjcw v4IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GD43A1RQ; 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 k5si925218wrm.232.2019.05.08.23.03.23 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 08 May 2019 23:03:23 -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=GD43A1RQ; 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]:48557 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOc9K-0005w4-L7 for patch@linaro.org; Thu, 09 May 2019 02:03:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOc8q-0005v9-NB for qemu-devel@nongnu.org; Thu, 09 May 2019 02:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOc8p-00070O-FO for qemu-devel@nongnu.org; Thu, 09 May 2019 02:02:52 -0400 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:38435) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOc8p-0006zl-5B for qemu-devel@nongnu.org; Thu, 09 May 2019 02:02:51 -0400 Received: by mail-pf1-x436.google.com with SMTP id 10so722985pfo.5 for ; Wed, 08 May 2019 23:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=v+OZD7XeZ0xihN95A1VXMos8Py5FqJIr9OLxNhWl3Hc=; b=GD43A1RQqptsAD4M7h+0PJ7i3dQMzstimm6vFBWPzzWsjQ+CtWy/S8MjO0BaEWr4zX VmzRseTpQey0cOwJg1FJek2yohKzeiZl3Og1vd0H3hielCNH2+aWbyNMiaUnNPxv7Ign G8rkRmbGrSl1jBiLPMYKLWBw5RyoA/nYWMS7m8nIA9oTmMomoGrvKHORWvuq5ZcWUVwW Cuv0TwwRu8kAHOHHsRp030LteMQhJa5UmTSaRPEYKONj1Y5dPHsgdi/c+uZjWVeQ/zaC yb3/JT3iTMoGrJs6Mup9P4zLfAZWMahe8zkYsLTuTKJQ1isFHwBZf+9mTkrooVqATfjX 8bIw== 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:mime-version :content-transfer-encoding; bh=v+OZD7XeZ0xihN95A1VXMos8Py5FqJIr9OLxNhWl3Hc=; b=Z+MKPZAifXEt6EFRXeY4S8MB7s7jlLBGAskmhprK+HDbC/7nf+f2imtP7gUwdK9Ary BFLpKGUkm9YoMkIFhkpQu4KkHiwkDscQtU7JouRK1cJGM0MhnPNxfc5mC8nbdIC/paCJ R4WsPeBjx7btnHcvPVPniZf1dfnAeA9gnkDsWwhPBI6CKjY6H4FdfAumQjuZS3Z1LMpr Q5gJ7VsLmiLCpb8snX+1iUS8fl90x+mCcB+RMVTlfwDA2mK0dl5bIpJGZHnSUZNg56Va zdHphDnHMFVv88e9YeaRz51BjMGGo026KwZpFWdwBMk7cm/3HEN6Mp9OI+9UHZuwnHGX 50Zg== X-Gm-Message-State: APjAAAV250Rf1HkJ95KPTKZFV+l4mDKJY1KAAZEY1/VgoKyJ+QjddD4E rQLmJel1AmJ+hoiMS2mOMZltrxe1Fms= X-Received: by 2002:a63:9d8d:: with SMTP id i135mr3163483pgd.245.1557381768728; Wed, 08 May 2019 23:02:48 -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.02.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 May 2019 23:02:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 8 May 2019 23:02:19 -0700 Message-Id: <20190509060246.4031-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 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::436 Subject: [Qemu-devel] [PATCH v2 00/27] tcg: Add CPUClass::tlb_fill 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" Changes from v1: * Do not unify user-only and system tlb_fill functions (alpha, microblaze, nios2, s390x, sparc, xtensa). * Split the mips patch into multiple. * Other random changes per review. Patches without review: 0009-target-microblaze-Convert-to-CPUClass-tlb_fill.patch 0010-target-mips-Pass-a-valid-error-to-raise_mmu_excep.patch (new) 0011-target-mips-Tidy-control-flow-in-mips_cpu_handle_.patch (new) 0012-target-mips-Convert-to-CPUClass-tlb_fill.patch 0014-target-nios2-Convert-to-CPUClass-tlb_fill.patch 0018-target-s390x-Convert-to-CPUClass-tlb_fill.patch 0020-target-sparc-Convert-to-CPUClass-tlb_fill.patch 0024-target-xtensa-Convert-to-CPUClass-tlb_fill.patch Blurb from v1: There is currently a lot of confusion between foo_cpu_handle_mmu_fault and tlb_fill. In particular, foo_cpu_handle_mmu_fault was only defined for user-only, and its only valid action was to set up the cpu for cpu_loop_exit so that we can deliver a SIGSEGV to the guest. And yet, we had code that tried to return from the host SIGSEGV handler to retry the instruction. We had, for some targets, a definition of foo_cpu_handle_mmu_fault for softmmu. Sometimes this was called from tlb_fill, sometimes not. Finally, we have a use case for SVE that wants a non-faulting tlb_fill, so while we're changing the interface, let's go ahead and include that. r~ Richard Henderson (27): tcg: Add CPUClass::tlb_fill target/alpha: Convert to CPUClass::tlb_fill target/arm: Convert to CPUClass::tlb_fill target/cris: Convert to CPUClass::tlb_fill target/hppa: Convert to CPUClass::tlb_fill target/i386: Convert to CPUClass::tlb_fill target/lm32: Convert to CPUClass::tlb_fill target/m68k: Convert to CPUClass::tlb_fill target/microblaze: Convert to CPUClass::tlb_fill target/mips: Pass a valid error to raise_mmu_exception for user-only target/mips: Tidy control flow in mips_cpu_handle_mmu_fault target/mips: Convert to CPUClass::tlb_fill target/moxie: Convert to CPUClass::tlb_fill target/nios2: Convert to CPUClass::tlb_fill target/openrisc: Convert to CPUClass::tlb_fill target/ppc: Convert to CPUClass::tlb_fill target/riscv: Convert to CPUClass::tlb_fill target/s390x: Convert to CPUClass::tlb_fill target/sh4: Convert to CPUClass::tlb_fill target/sparc: Convert to CPUClass::tlb_fill target/tilegx: Convert to CPUClass::tlb_fill target/tricore: Convert to CPUClass::tlb_fill target/unicore32: Convert to CPUClass::tlb_fill target/xtensa: Convert to CPUClass::tlb_fill tcg: Use CPUClass::tlb_fill in cputlb.c tcg: Remove CPUClass::handle_mmu_fault tcg: Use tlb_fill probe from tlb_vaddr_to_host include/exec/cpu_ldst.h | 50 ++------- include/exec/exec-all.h | 9 -- include/qom/cpu.h | 12 +- target/alpha/cpu.h | 5 +- target/arm/internals.h | 10 +- target/cris/cpu.h | 5 +- target/hppa/cpu.h | 8 +- target/i386/cpu.h | 5 +- target/lm32/cpu.h | 5 +- target/m68k/cpu.h | 5 +- target/microblaze/cpu.h | 5 +- target/mips/internal.h | 5 +- target/moxie/cpu.h | 5 +- target/nios2/cpu.h | 5 +- target/openrisc/cpu.h | 5 +- target/ppc/cpu.h | 7 +- target/riscv/cpu.h | 5 +- target/s390x/internal.h | 5 +- target/sh4/cpu.h | 5 +- target/sparc/cpu.h | 5 +- target/tricore/cpu.h | 6 +- target/unicore32/cpu.h | 5 +- target/xtensa/cpu.h | 5 +- accel/tcg/cputlb.c | 88 +++++++++++++-- accel/tcg/user-exec.c | 36 ++---- target/alpha/cpu.c | 5 +- target/alpha/helper.c | 24 ++-- target/alpha/mem_helper.c | 16 --- target/arm/cpu.c | 22 +--- target/arm/helper.c | 90 ++++++++------- target/arm/op_helper.c | 29 +---- target/arm/sve_helper.c | 6 +- target/cris/cpu.c | 5 +- target/cris/helper.c | 61 ++++++----- target/cris/op_helper.c | 28 ----- target/hppa/cpu.c | 5 +- target/hppa/mem_helper.c | 16 ++- target/i386/cpu.c | 5 +- target/i386/excp_helper.c | 53 +++++---- target/i386/mem_helper.c | 21 ---- target/lm32/cpu.c | 5 +- target/lm32/helper.c | 8 +- target/lm32/op_helper.c | 16 --- target/m68k/cpu.c | 2 +- target/m68k/helper.c | 89 ++++++++------- target/m68k/op_helper.c | 15 --- target/microblaze/cpu.c | 5 +- target/microblaze/helper.c | 101 ++++++++--------- target/microblaze/op_helper.c | 19 ---- target/mips/cpu.c | 5 +- target/mips/helper.c | 81 ++++++-------- target/mips/op_helper.c | 15 --- target/moxie/cpu.c | 5 +- target/moxie/helper.c | 65 +++-------- target/nios2/cpu.c | 5 +- target/nios2/helper.c | 166 ++++++++++++++-------------- target/nios2/mmu.c | 12 -- target/openrisc/cpu.c | 5 +- target/openrisc/mmu.c | 69 ++++++------ target/ppc/mmu_helper.c | 16 ++- target/ppc/translate_init.inc.c | 5 +- target/ppc/user_only_helper.c | 14 ++- target/riscv/cpu.c | 5 +- target/riscv/cpu_helper.c | 50 ++++----- target/s390x/cpu.c | 5 +- target/s390x/excp_helper.c | 67 +++++++---- target/s390x/mem_helper.c | 16 --- target/sh4/cpu.c | 5 +- target/sh4/helper.c | 189 +++++++++++++++----------------- target/sh4/op_helper.c | 12 -- target/sparc/cpu.c | 5 +- target/sparc/ldst_helper.c | 15 --- target/sparc/mmu_helper.c | 78 +++++++------ target/tilegx/cpu.c | 10 +- target/tricore/cpu.c | 1 + target/tricore/helper.c | 23 ++-- target/tricore/op_helper.c | 26 ----- target/unicore32/cpu.c | 5 +- target/unicore32/helper.c | 23 ---- target/unicore32/op_helper.c | 14 --- target/unicore32/softmmu.c | 13 ++- target/xtensa/cpu.c | 5 +- target/xtensa/helper.c | 33 +++--- 83 files changed, 876 insertions(+), 1139 deletions(-) -- 2.17.1