From patchwork Wed Aug 28 23:16:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 172505 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1416914ily; Wed, 28 Aug 2019 16:17:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqw6B/Fgl2N7htSiW0HGel6qqTR2gxawb+BkhKxpS4akFaUz8fGA4x4HqD7DdijbKV0lp/Ac X-Received: by 2002:a37:a083:: with SMTP id j125mr4804418qke.329.1567034250773; Wed, 28 Aug 2019 16:17:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567034250; cv=none; d=google.com; s=arc-20160816; b=iZT4/jxc6+xFBIvXhaAfsPePeCFaOYNF5XFXmfvIMpax/Vb72mU9izDuyH/XxoUXNt v9SXWfKBhW0oY6AZ8mlYIiWpPwvlKBF08rZjKRoo+DZl78ZMDvwmjvjDCCUAz3aoJ7N+ 23HMSXONG5z+vMsYK2qb1//avpreRFrShP0kuzkt3PlOAJ4aRirgZi17/0XGMWIY8k6E 6+Z7DtC26f24qvDZ64/b7+XKdhjo+ebg5fhoS9ls6d3xAJkrZlresmkos6YwcZw4fGlc F3+T3tt1YigxhyPnlwGE92+OWm43Mtqa5WVg9TORN3dElVLpkASvIRLTJ0omVXH53Xp/ C93A== 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=+7ek5yyanNbWwpydzYMNQsQs/w7ABBrAnwWJJRR1ihI=; b=PlLuAPhZ/fNK2hXGcXlIFsd7PP1PdGS61BJ68TxFy0IzLKlMybCur64yuDdC2HsIxJ jawLQOMQZO8Uue6UAGtPnQ28VzpWMyLX+s50WOtjd0Q0bAkxLK01wc55vtEUwmEUAVTK vRSZRKYL3P4HKxj8LaSS9SQi3Z3jtlCQA4/ZiN3b7LxTmI3R+JSPqgNAq5RKa5LM9mfn kMKOixlWJUyEiwqS7UsR9ww+ofjzMb7LnKo/aAfdzRxKVGl06XmbfB8Bqnfo+LCZZ+Rc 60b635mdpthzT+p5kTOV3AY6kAKV6ErRnkRQok9GxLD8rU/YcLBwXg76QosU9RogAWuC r03A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="gk+Hrn0/"; 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 d10si581424qki.333.2019.08.28.16.17.30 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Aug 2019 16:17:30 -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="gk+Hrn0/"; 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]:43542 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i37Bx-0004Ag-Fs for patch@linaro.org; Wed, 28 Aug 2019 19:17:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52272) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i37BQ-0004AK-De for qemu-devel@nongnu.org; Wed, 28 Aug 2019 19:16:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i37BP-0008F5-6M for qemu-devel@nongnu.org; Wed, 28 Aug 2019 19:16:56 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:37505) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i37BO-0008Ez-W8 for qemu-devel@nongnu.org; Wed, 28 Aug 2019 19:16:55 -0400 Received: by mail-pl1-x644.google.com with SMTP id bj8so660125plb.4 for ; Wed, 28 Aug 2019 16:16:54 -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; bh=+7ek5yyanNbWwpydzYMNQsQs/w7ABBrAnwWJJRR1ihI=; b=gk+Hrn0/DSkSUjCAwWyKbsq3I3Hqnk22PZOhzaYIMsulgu1TO7ueIRRAyyCziwdiwO DbPFqAkI6UtL+m95xqNNfouQV48lP6R09OIgprVAj2PhbidYrutVDLwnJnsqHUaPkmXc a0guKQYSoyU0T5yLtvGYYfLJuZp14hK/xAfSm0kCkGsA8qAZIOTp8fHE9kFKIrMTLhOJ 3u1wlhdbuMp/TQQ4J3vLlLeLZV97pXHYgeUgMICPkaTBXQFUmoCxi/XbT3qSC6R/d5yd cDEMGJPmeH4Fvj/tWt4Sx0yu/zjochh4gc+GcgSZXZb65nKXTfic5s/E45wwj2ZWbyqZ CWag== 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=+7ek5yyanNbWwpydzYMNQsQs/w7ABBrAnwWJJRR1ihI=; b=KNLwM3xu+yO5po6792rxSnl9ItdAfxmREt0hjmITCR4dTslhqlNoqd2OlSfkbwy0f+ sjJHCOlEzu1HMOapSaNyAdy+uu+MIPrI6lCl5rDGFWx2pSS9/bg1NJAxsyoTr0m4Ti1e VPyUXsI9F84ApwzgFsbXFcyDPPIWbgMhoMqRqpEazjVGBJDsE0JUeXAXm7qDw82wk0jY vN8YqDzV9uQ3Z1IqjPRuhSAypkNnYbrpt4gzoxTIBJovlI8zlEIrWJoI+ykSQjplOKgj GJUwKXh0TFUldjb4HsdzXISPZ1m8CB+TVn42XGp9Y5cIgCZXmLFn6/30GRWY3o2ZhYq3 6CEA== X-Gm-Message-State: APjAAAVKCJNmkoYLruIlM1xyovTQiRyJgQQv3mrtBqi6INkDZG0Xufl5 mKXWhGWAeju1sZ4/AC+8l9iVhMw41Kg= X-Received: by 2002:a17:902:4303:: with SMTP id i3mr7170334pld.30.1567034213584; Wed, 28 Aug 2019 16:16:53 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id s5sm485197pfm.97.2019.08.28.16.16.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 16:16:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 28 Aug 2019 16:16:43 -0700 Message-Id: <20190828231651.17176-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::644 Subject: [Qemu-devel] [PATCH v2 0/8] exec: Cleanup watchpoints 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: david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Changes from v1: * Split out some minor fixes to separate patches. * Reload tlb_addr2 after tlb_fill for page2 in patch 7. Blurb from v1: As discussed with David earlier this week, the current implementation of watchpoints cannot work, at least reliably. We are raising an exception out of the middle of the i/o access path which does not even attempt to unwind the guest cpu state, nor does it have the information required to do so. This moves the implementation to the cputlb helpers. This is a point at which we can and do raise exceptions properly. In addition, this fixes a bug in that unaligned stores were detecting watchpoints in the middle of the byte-by-byte operation, which means that we didn't signal the watchpoint early enough to avoid state change. r~ David Hildenbrand (2): exec: Factor out core logic of check_watchpoint() tcg: Check for watchpoints in probe_write() Richard Henderson (6): exec: Move user-only watchpoint stubs inline cputlb: Fold TLB_RECHECK into TLB_INVALID_MASK exec: Factor out cpu_watchpoint_address_matches cputlb: Fix size operand for tlb_fill on unaligned store cputlb: Remove double-alignment in store_helper cputlb: Handle watchpoints via TLB_WATCHPOINT include/exec/cpu-all.h | 8 +- include/hw/core/cpu.h | 37 +++++++++ accel/tcg/cputlb.c | 166 +++++++++++++++++++++++++--------------- exec.c | 167 +++++++++-------------------------------- 4 files changed, 179 insertions(+), 199 deletions(-) -- 2.17.1