From patchwork Thu Feb 14 04:06:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 158310 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp879404jaa; Wed, 13 Feb 2019 20:07:16 -0800 (PST) X-Google-Smtp-Source: AHgI3IYADITX6c7NQzZzh2oXA8oQi7RYEn0Wob5dUkMOjwFvJ3T3dA7cNtgJgJYlfK+Bo2MX9CZ/ X-Received: by 2002:a25:9201:: with SMTP id b1mr1397710ybo.60.1550117236106; Wed, 13 Feb 2019 20:07:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550117236; cv=none; d=google.com; s=arc-20160816; b=qrGL/p/IOFmZ/qNU1mzZ/O6qSRknRzOs4V7HvNZxp9mcarZWvSgHBkOFskTox7qQQu 9ryL5mqU78Jiwq3MM9Ne+/uiZW8k70WDt4pISMwaCJnIwSF5J/anKUygvbYglRclehxw +lCarkDDKoV7Y8zsvdgWvtxdrJDTbOlM70R2VE4GxLzhGTj0BlQ+w306Auvl/YoSpI5k YX1Uvi4iGTiUS1UiuBKjyqWdNPRDpzfqz4EeYFBHvKmG0rXfSmf4MDoWgBgF5i1UQ+05 Z9+y6Gg4tN41VWPBtYhHF9BE/vudXAivWje0/QrUgTbDHJTaow2J1Ae0r+YrgBtLupRG zgAQ== 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:message-id:date:to:from :dkim-signature; bh=lRH+FK7DgGGBnj1P21KnKS1XBJDj3U5uvNnebFNQlME=; b=h9rhQKH3aENsJjM6Qhw7OSvOi622ZB9GKTKksVExGWNGBqcj6ywzVg9ExGdH9PXOtH 8eTqtPoS++MWFOQWm9nB7wPtre4OBOaR8oBCDYcJ4KoFaa3UD99aWt2lsTiLSbOLO1eP L2bOhmSFLRGwwAfyqhU2p7jAVX7WBqvxEMrNRNlfirf5Gj3G6FZRkMd4+39DNbpisIid 7MXjiem6xe1yXgMcDMqYiV7auShytZInFsIuLzKz9S0HiC1ybav/fh0YivGFGQR6Pw8u zsHAoYCDZLkC1FNDOs0Jbimo8QpbvrQoeCuwGsmRrgQOKx0gkSIrfyEZN3yEhdsJ5aYq g2Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=p9eQK3I3; 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 p191si749293ywe.69.2019.02.13.20.07.16 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 13 Feb 2019 20:07:16 -0800 (PST) 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=p9eQK3I3; 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]:39544 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu8It-0003DW-Hr for patch@linaro.org; Wed, 13 Feb 2019 23:07:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu8Ic-0003D9-7f for qemu-devel@nongnu.org; Wed, 13 Feb 2019 23:07:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gu8Ib-0005ZI-4D for qemu-devel@nongnu.org; Wed, 13 Feb 2019 23:06:58 -0500 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]:32979) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gu8Ia-0005YA-ML for qemu-devel@nongnu.org; Wed, 13 Feb 2019 23:06:57 -0500 Received: by mail-pl1-x643.google.com with SMTP id y10so2416733plp.0 for ; Wed, 13 Feb 2019 20:06:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=lRH+FK7DgGGBnj1P21KnKS1XBJDj3U5uvNnebFNQlME=; b=p9eQK3I3zHWb7FXQgxnLz6JWgY1mEBbjR5hKzt62PvVyJqLUOZTizktiJTuIsynl/q M2GnPyjFxx4Qgzql19mr67UnpSTG8VKWHDPBbd6NbpdnQ+lP3kHRF+pX1Pct3+tVtmjH oNc0gc0hnDypVuHJuuETgzeByxuEYYyxYJrwwN1K4N1EFTD26AnOu4mDIljLhOSBQpB+ QDpewjDQDCCFsFr3iUm5gTM1E/ylBF6oex9a5Bz7luZXVZCD/QJr9trIVT+Xa74EwVHj U3DMPTZLzqE3LslfChD8Ty1LA692/KirLzl1MkK/6fYf1cai6RGNnwTw9oM0ZKTi2kkT O9eA== 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; bh=lRH+FK7DgGGBnj1P21KnKS1XBJDj3U5uvNnebFNQlME=; b=V2NBJ+ZU5oRF1TmxJhmoC9KUSlfAE7wjfELneGqe6k4GvtCip0VMX2+Mws0CUqDqEH +crvL0jWQ1dQwvzuitmYsQwwrv/vgYeJriG5pluSMvxFeBKcSd5VNh7gmSTQMgWpFyg5 gt6QvlVkkGK792B5ZAlwCAN8B5MeoDviz8z3XMntJpOdoXJE49EzmGqnuuTkqD652LR9 l9Tu9dVgPlTjD6hfM5cb5sPjdxNi+kCeZoFwnaCQdAubfum/SPZrozFUhSGQGtzUS0Av 00X8hOcxtzxOUb6UkbZAyfk9bpnkpELqOXkJWCd5NE+MFf5yVvODoqdTdh6E5Lr8Z9hr LEcg== X-Gm-Message-State: AHQUAuZ+I+4mGHVdfWDa8Fw2SGgs7XSazxfBWUmndvQXIvDd0yM5tY+j VnZPEzkwfxYbDIJFobCjHmauI2JUCtw= X-Received: by 2002:a17:902:6b87:: with SMTP id p7mr1992027plk.282.1550117214342; Wed, 13 Feb 2019 20:06:54 -0800 (PST) Received: from localhost.localdomain (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id b25sm1119581pfi.72.2019.02.13.20.06.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Feb 2019 20:06:53 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 13 Feb 2019 20:06:48 -0800 Message-Id: <20190214040652.4811-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::643 Subject: [Qemu-devel] [PATCH 0/4] target/arm: Reduce overhead of cpu_get_tb_cpu_state 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: peter.maydell@linaro.org, cota@braap.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We've talked about this before, caching state to reduce the amount of computation that happens looking up each TB. I know that Peter has been concerned that we would not be able to reliably maintain all of the places that need to be updates to keep this up-to-date. Well, modulo dirty tricks within linux-user, it appears as if exception delivery and return, plus after every TB-ending write to a system register is sufficient. There seems to be a noticable improvement, although wall-time is harder to come by -- all of my system-level measurements include user input, and my user-level measurements seem to be too small to matter. r~ Richard Henderson (4): target/arm: Split out recompute_hflags et al target/arm: Rebuild hflags at el changes and MSR writes target/arm: Assert hflags is correct in cpu_get_tb_cpu_state target/arm: Rely on hflags correct in cpu_get_tb_cpu_state target/arm/cpu.h | 22 ++- target/arm/helper.h | 3 + target/arm/internals.h | 4 + linux-user/syscall.c | 1 + target/arm/cpu.c | 1 + target/arm/helper-a64.c | 3 + target/arm/helper.c | 267 ++++++++++++++++++++++--------------- target/arm/machine.c | 1 + target/arm/op_helper.c | 1 + target/arm/translate-a64.c | 6 +- target/arm/translate.c | 14 +- 11 files changed, 204 insertions(+), 119 deletions(-) -- 2.17.1