From patchwork Tue Aug 20 21:07:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 171844 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp74806ily; Tue, 20 Aug 2019 14:12:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLMRY7ZUhx9ok4jsyf/8mmds+GmgJSCZFap1mSlQW8J67wHS6P6tpJmt8E9DUPgQgcuRN5 X-Received: by 2002:a17:907:20d6:: with SMTP id qq22mr27553763ejb.293.1566335537448; Tue, 20 Aug 2019 14:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566335537; cv=none; d=google.com; s=arc-20160816; b=AOc2Q0CE3l0WDGhVqrlhACqV6VSEBBIVjmozGij/FB3t7ubwJpY0caOYTsQRQKaG46 T/Hb4Nw5JXUgjG3L2oD9Uf45nmdA4WdXxc19E2ku8OJtqojLieX7HdVTYx5P+1ka2wPy 4TLYM+6w0EGtGO0lKk0o7c01+qVZpt0uc9X3CaXTOfaENyVCKg9f+n6Q/mHEC6UffVO9 3et/K/qoS30GDWh/EUzQk0v6gjutcZ6+zhdfeOrAukHoEBMpO4n3ix/hLIZfPzi5dYCQ mapOzoDlj1brnkqn3NTXVOD7OPO64HCF+7FZSHjedvHaD2Gs0IEyv3if9Y3SmUoxtg44 6sOw== 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:subject :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature; bh=oxUnGqeWvwLIZfcZQxjlh7NTLJypY4u3oeTZofI/YEE=; b=TOMet56yGIq6AKwU0svD116N8w6cjOuWPbSPaLaoF7ljrqmmvwSaOysDYgj0f3N1Aq E6JA+xzGKyvJDFLPcnTm/0VDjw1QhWTIKfdtdoZojFbNcpqRMPn6JXD0UfpcAdxDtvLf kCQ92FotNPjann1ftD+n9psVR9oesvUpntLB5F5wIpmmV4bwf9J3an7T+KnZm8bRh9kk +S6irfxy/UihfdC8ZnEMPGKJqrmv4yM0D2wpmVDhMhTs7SiJXJbL3a3a7an/YBda/G5Q ipQBWSTK02y8O1R9wxsKmFI0+piKom0M1+vEkQDcJ8ZS2geK+WfkdwXCN+kphDqs02Fm DYEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=N+y+0uKc; 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 b49si10726941edb.64.2019.08.20.14.12.17 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Aug 2019 14:12:17 -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=N+y+0uKc; 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 ([::1]:41714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0BQN-0003US-Tx for patch@linaro.org; Tue, 20 Aug 2019 17:12:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53613) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i0BLi-0000AM-2f for qemu-devel@nongnu.org; Tue, 20 Aug 2019 17:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i0BLg-0008JV-PC for qemu-devel@nongnu.org; Tue, 20 Aug 2019 17:07:25 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:41677) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i0BLg-0008Iv-HN for qemu-devel@nongnu.org; Tue, 20 Aug 2019 17:07:24 -0400 Received: by mail-pf1-x443.google.com with SMTP id 196so4108744pfz.8 for ; Tue, 20 Aug 2019 14:07:24 -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=oxUnGqeWvwLIZfcZQxjlh7NTLJypY4u3oeTZofI/YEE=; b=N+y+0uKch7/dYVasjX9hlWHOdpeGMPhFZCx4WnR6OXsSfc9P+HWXELC1AcdUuyr5C3 a9hWxWIMEf9NuN6U9MLOYfyF1zQ2Rvh2hHm1JsRhWd0ivrPM0qESuxz2Knf8oLmr7mE2 xXedyRe1dpG6Mb9n+dXCFMvWXqjWkQYj4k2ZuOZbCn1i3mVBuj2LNGQjbk16U56zMS1Y OlNFNLxHTxql3vM3Otlq2CosnbEPOWluls4Mq47iuZ/ueLrQPNshxhHPHvlXBHrrayxk 0eRkHDJaPE3LNxsjWrdoa4R3CZn+fgZOn7lbmizuJHea6TzpD305S3fvS4l02SAt00PC Daqg== 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=oxUnGqeWvwLIZfcZQxjlh7NTLJypY4u3oeTZofI/YEE=; b=RYpaf51PjUsAOe8aZPVcmE/2V6l8RPjy8Zk6waHR2IHLomizgvigTQSf3Zd5pKnNjY D6MF14gK7Gv7Js/FLpGdHS6ymKY0BGn+EzSQFOQ+8pdaha8aa5/qkZAaWjQHXiRPYJga s3N1XjXCjq/IpXPIJdURhsUiOOW6rMHa0RCH+f0yWo2R2Uvu/kshiG2P1Re/XmLAQEiW oVIW08Myc1IA4uUBHwlTK5n3MtHm4wzKQiL/AD7Ojv0vsXjRLJuObQqyDyg8o5VoqEEq uvmISHaPcaTEkNFKf5dTOBjRN0cuPpaLuT4qY2AplLzFgC89num5CePofMnC9QhJSiNI bpWw== X-Gm-Message-State: APjAAAWuN+maQscLLjdjh2VHUBODosHG46H8omGLxUyNARJaqPV+3Ao9 jnpIElYJjcJp4251Wlq/VYQRZ57SvME= X-Received: by 2002:a63:c70d:: with SMTP id n13mr26228089pgg.171.1566335242880; Tue, 20 Aug 2019 14:07:22 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id k22sm21690743pfk.157.2019.08.20.14.07.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 14:07:22 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 20 Aug 2019 14:07:03 -0700 Message-Id: <20190820210720.18976-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::443 Subject: [Qemu-devel] [PATCH v5 00/17] target/arm: Reduce overhead of cpu_get_tb_cpu_state 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" Changes since v4: * Split patch 1 into 15 smaller patches. * Cache the new DEBUG_TARGET_EL field. * Split out m-profile hflags separately from a-profile 32-bit. * Move around non-cached tb flags as well, avoiding repetitive checks for m-profile or other mutually exclusive conditions. I haven't officially re-run the performance test quoted in the last patch, but I have eyeballed "perf top", and have dug into the compiled code a bit, which resulted in a few of the new cleanup patches (e.g. cs_base, arm_mmu_idx_el, and arm_cpu_data_is_big_endian). Changes since v3: * Rebase. * Do not cache XSCALE_CPAR now that it overlaps VECSTRIDE. * Leave the new v7m bits as uncached. I haven't figured out all of the ways fpccr is modified. Changes since v2: * Do not cache VECLEN, VECSTRIDE, VFPEN. These variables come from VFP_FPSCR and VFP_FPEXC, not from system control registers. * Move HANDLER and STACKCHECK to rebuild_hflags_a32, instead of building them in rebuild_hflags_common. Changes since v1: * Apparently I had started a last-minute API change, and failed to covert all of the users, and also failed to re-test afterward. * Retain assertions for --enable-debug-tcg. Richard Henderson (17): target/arm: Split out rebuild_hflags_common target/arm: Split out rebuild_hflags_a64 target/arm: Split out rebuild_hflags_common_32 target/arm: Split arm_cpu_data_is_big_endian target/arm: Split out rebuild_hflags_m32 target/arm: Reduce tests vs M-profile in cpu_get_tb_cpu_state target/arm: Split out rebuild_hflags_a32 target/arm: Split out rebuild_hflags_aprofile target/arm: Hoist XSCALE_CPAR, VECLEN, VECSTRIDE in cpu_get_tb_cpu_state target/arm: Simplify set of PSTATE_SS in cpu_get_tb_cpu_state target/arm: Hoist computation of TBFLAG_A32.VFPEN target/arm: Add arm_rebuild_hflags target/arm: Split out arm_mmu_idx_el target/arm: Hoist store to cs_base in cpu_get_tb_cpu_state target/arm: Add HELPER(rebuild_hflags_{a32,a64,m32}) target/arm: Rebuild hflags at EL changes and MSR writes target/arm: Rely on hflags correct in cpu_get_tb_cpu_state target/arm/cpu.h | 84 +++++--- target/arm/helper.h | 4 + target/arm/internals.h | 9 + linux-user/syscall.c | 1 + target/arm/cpu.c | 1 + target/arm/helper-a64.c | 3 + target/arm/helper.c | 383 ++++++++++++++++++++++++------------- target/arm/machine.c | 1 + target/arm/op_helper.c | 1 + target/arm/translate-a64.c | 6 +- target/arm/translate.c | 18 +- 11 files changed, 341 insertions(+), 170 deletions(-) -- 2.17.1