From patchwork Wed Mar 11 06:44:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 184387 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp278648ile; Tue, 10 Mar 2020 23:46:49 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt6Gy5aUMkFZLVhP8BdD8zVaFx9MWxV4DL4YY5Yq4QMwU4+aG5A/YARMd1zjvZz0tZCWWlg X-Received: by 2002:a0c:fb03:: with SMTP id c3mr1569788qvp.13.1583909209381; Tue, 10 Mar 2020 23:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583909209; cv=none; d=google.com; s=arc-20160816; b=pmVoVZ9SDWhDSOiq9baq75KAFPoGsHRYR4dnmb8FF3uUjTbrtqLPem8xVYImw4NKUm pFpmXK7huS9hJ7O7Fpn8HLhqjdhskxFn45vagFEKb5ptJGnYq3pFe03QkL8Yrvittk85 r7LxhGXAqdYPTgflQpd7HBfH6zttJLusEGEWOCM+mVUNJVnqnQasjge8e4cTb6i5AMBB 7bA0nXZKuWUw+kgNiv67mSn43e5x09vDsNOFBw7W4cEXVS4jjc8m3M2Sh27w9ooGpisN p5F+9BXvXTuJhyLMrMSErog+oBpfAiODMu+3RHD7tlfYR2WHUgMJ0CcdAQG9pSiZ7mUE vX1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=87Rk2Cus7V553zmUHZsKztsptlyw22li5a6Jn7L7yqM=; b=NuOUPIOl5DeE0TQ1LiHpR9MKBbUwXekML8MXnB8EluLjToUN9444oACGVHxawt9VUF TddrYrTh88Ady7teKC5qhSHzjVylIE8M1KBjF9I0dTJSPdG4D6fQuN4CIa/xAKOB9Kac TXapmeOdMjLIwuNzoRjzf0XeUIC5TIjZIxBm0G/MiBj/6HY7TcoqAU7/iNk35dRpRKHW XjgR7BQ3d5Fkhrq1+RmWjK4sR58y6XFJq4alH+rrjDiyAOIJDdhXKplZhBS+BKryr0qC igsAY2dDW3B+9u8yAdIReVQFQPb4PXD46/5Pc6ImMInznvwLBX+vmcCKVWK98BIKKPLI /otw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jIgyyhhI; 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=pass (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 64si474137qkd.374.2020.03.10.23.46.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Mar 2020 23:46:49 -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=pass header.i=@linaro.org header.s=google header.b=jIgyyhhI; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:46418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBv8i-0001NV-PC for patch@linaro.org; Wed, 11 Mar 2020 02:46:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59282) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBv6O-00065t-Ld for qemu-devel@nongnu.org; Wed, 11 Mar 2020 02:44:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBv6N-0001bs-Fi for qemu-devel@nongnu.org; Wed, 11 Mar 2020 02:44:24 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]:44728) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBv6N-0001an-AP for qemu-devel@nongnu.org; Wed, 11 Mar 2020 02:44:23 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9so608427plo.11 for ; Tue, 10 Mar 2020 23:44:23 -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:mime-version :content-transfer-encoding; bh=87Rk2Cus7V553zmUHZsKztsptlyw22li5a6Jn7L7yqM=; b=jIgyyhhICLIjSLjLOWshNGCsIO3EQvMaTa7iEm8NKuV8QZ9UJwuQRkCjtsLUCR/QXg XKMmD8xH12NDTBtCYLD+TkhKFfDGqEgPzV88rbZ6iFwkVM2af8liN5kEmH8Tw+JnuDzV 5zke21LSBMF6RyJt++Eemyl69h26vEMSG+opDF6jCVJajDO6Jc6XpM1khqY5QopSvYzw 8sHfRpjfBGXtBCgxcwKxj081Tu83gSMsZZS4SzVpYMDXmgYdn/6I8zC02ho71Zq8VmBg 3xt3IJWm9Ydwfvkp08rcPY1MympoADfyvXSQQw80QxRLooMnIsdQ9o4Kf86gErCoEz7y mopw== 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:mime-version :content-transfer-encoding; bh=87Rk2Cus7V553zmUHZsKztsptlyw22li5a6Jn7L7yqM=; b=k0pzMY4JlQsNOoKFDKyMUeDU8X/+BwrOuzFnmxtIvYeyLji+VHr4pCp4qQfz6/5vgN laQs72xBFMOnChPtyYzti6wMlDy+9G8WwqTEVdE9ywU+XweSZqc/xRrx4JPg2A9cdOZO m9MUN/WkUaiO8qDphKLYbAalkHK2uogzSz3EHWE8fCwPl+f63gM1FCMg/t2yHvvKI5o1 Ap2G4hLLCMNXmN1HIFEIvytmdfPr52p7+yPE4oITINW3MgGF5Z1QisaWSjhpCJ0RQ7Rz lhT9dS2/It4nM1fX+AtOvBaQ6DGP0uj2aQPamAe/Q5Gtaq3vC22aWqZLNsyWQjosMeH3 IiOw== X-Gm-Message-State: ANhLgQ1tXy/inOPCX9UTm4bDZ3UNu79xo7ABJFdYd+onBixhptyxmxQU Tao3yJKdvc2tdUDByuUssRrukmYpz/s= X-Received: by 2002:a17:90a:8d86:: with SMTP id d6mr1870847pjo.119.1583909061773; Tue, 10 Mar 2020 23:44:21 -0700 (PDT) Received: from localhost.localdomain (97-126-123-70.tukw.qwest.net. [97.126.123.70]) by smtp.gmail.com with ESMTPSA id z3sm50137807pfz.155.2020.03.10.23.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 23:44:21 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 00/16] target/arm: sve load/store improvements Date: Tue, 10 Mar 2020 23:44:04 -0700 Message-Id: <20200311064420.30606-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.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::62f X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The goal here is to support MTE, but there's some cleanup to do. Technically, we have sufficient interfaces in cputlb.c now, but it requires multiple tlb lookups on different interfaces to do so. Adding probe_access_flags() allows probing the tlb and getting out some of the flags buried in the tlb comparator, such as TLB_MMIO and TLB_WATCHPOINT. In addition, we get no-fault semantics, which we don't have via probe_acccess(). Adding cpu_probe_watchpoint() allows to *not* stop a first-fault or no-fault load when the page contains a watchpoint, but the actual access does not hit. Having these available means that we can handle all of the watchpoints for a given set of loads/stores all at once, before we begin doing any actual memory operations. Further, the actual memory operation on a page of ram that has a watchpoint can still use the fast path. Looking forward to MTE, we can examine the Tagged bit on a per-page basis and avoid dozens of mte_check calls that must be Unchecked. That comes later, in a new version of the MTE patch set, but I do add comments for where the checks should be added. r~ Richard Henderson (16): accel/tcg: Add block comment for probe_access accel/tcg: Add probe_access_flags exec: Add cpu_probe_watchpoint target/arm: Use cpu_*_data_ra for sve_ldst_tlb_fn target/arm: Drop manual handling of set/clear_helper_retaddr target/arm: Add sve infrastructure for page lookup target/arm: Adjust interface of sve_ld1_host_fn target/arm: Use SVEContLdSt in sve_ld1_r target/arm: Handle watchpoints in sve_ld1_r target/arm: Use SVEContLdSt for multi-register contiguous loads target/arm: Update contiguous first-fault and no-fault loads target/arm: Use SVEContLdSt for contiguous stores target/arm: Reuse sve_probe_page for gather first-fault loads target/arm: Reuse sve_probe_page for scatter stores target/arm: Reuse sve_probe_page for gather loads target/arm: Remove sve_memopidx include/exec/cpu-all.h | 13 +- include/exec/exec-all.h | 39 + include/hw/core/cpu.h | 7 + target/arm/internals.h | 5 - accel/tcg/cputlb.c | 178 +-- accel/tcg/user-exec.c | 36 +- exec.c | 19 + target/arm/sve_helper.c | 2238 +++++++++++++++++++----------------- target/arm/translate-sve.c | 17 +- 9 files changed, 1404 insertions(+), 1148 deletions(-) -- 2.20.1