From patchwork Wed Sep 18 18:02:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 173994 Delivered-To: patch@linaro.org Received: by 2002:ac9:19ad:0:0:0:0:0 with SMTP id d45csp15225oce; Wed, 18 Sep 2019 11:07:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6SsLoDWtGD0HWYkkNQLLe7J/mGEUkMGyNsAmZHYKeUnPqWsPkKaH6kgUc0FJ3dwuMXU3t X-Received: by 2002:a50:c908:: with SMTP id o8mr11848595edh.187.1568829946686; Wed, 18 Sep 2019 11:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568829946; cv=none; d=google.com; s=arc-20160816; b=Wy/iZNN50bpKxv741wFsTwqxzOee/dXEEQnn8+AZTljY8VddIMaqh7aGJHy1f1UhyK iGfj5GuaUTMDj4dVXOIzjlu3+jQvKoT7DSi/cwhLqIUFfV8JUyh9b2DCSLLrrUtcF/ma j8j8DSUsdaYMctTu4hwQWMD2nyOWFvPMBLdM4/WKIYB81jtC/mYXrJ1g9u9QwW/QwToa vaTuDHeL4Run0XNS2bkNQp4cVWxk9zAfwG51Dy4+/ch+GtG+D9XdyZ8WisZok0qx18Xl ufQx2hX0ImElYj5SpQyR4Nl8Q19gVBhxByq8xfEBPkf18lGptcFNp9mI7jWJ1sKFM9B7 xmYA== 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=F0Wia2jROmE5C4iTuiunWjrpETRbCBBXCQqEWgtA9Tk=; b=KhRS3VB9hOSpnvbia6djDIDCena0aEDVG0h4KY8zYwz7CTmh8eWoPg6UWpszT7YyIv VK5Era6+MxX30hFS7PF2sIKHc93+ISpEUcCCgnqgs/+nMs8SC1QxCXbFtKLQhjKn3+DA kikU0qkFlXwwzQEwssamJdGMCGKaqZ7kJtjLFQh0gJE1BTeM2RLHcNrv+/JL3Mz1C2gw lQUWRX8wWCSPhJcNxpO4+7voaL1mJ2LlDcStIXfiS88XteA2acyUhN0OBYnYqyCWqj3e LN7ZvluVDGZ3Q9jr6GsNd7HimFazsd1LOqx3b9UeZjz23ZFvRhWYqkPlCk4SuIiV44bI lYXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fjTJJ7Ee; 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 y13si3229850ejw.2.2019.09.18.11.05.46 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Sep 2019 11:05:46 -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=fjTJJ7Ee; 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]:33948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAeKn-0002iU-9F for patch@linaro.org; Wed, 18 Sep 2019 14:05:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45821) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iAeI4-0001x4-QS for qemu-devel@nongnu.org; Wed, 18 Sep 2019 14:02:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iAeI3-0000Q7-Fv for qemu-devel@nongnu.org; Wed, 18 Sep 2019 14:02:56 -0400 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:43954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iAeI3-0000PD-9j for qemu-devel@nongnu.org; Wed, 18 Sep 2019 14:02:55 -0400 Received: by mail-pl1-x644.google.com with SMTP id 4so307981pld.10 for ; Wed, 18 Sep 2019 11:02:55 -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=F0Wia2jROmE5C4iTuiunWjrpETRbCBBXCQqEWgtA9Tk=; b=fjTJJ7EeFA6oP1ilpFPq1+qr075q8lqMKWWSwVRU5gXxfFj7Fpa8jVnZy5XwpgUqTa 7H0JkeVKQ7ewwUsmdqPaX4prMBYHsAarBs1ijdz3qtExql2OPI8asqfcuaKKmhuy58Ya kszpOgXyYCs8xg6Qttfm846djVuCo0ujskKB3bIXwUNIAJ9H70kGDj/kIciJEDwASUFe nxYnHtmTHLnNu/FkVKNfopfgEqN5yy1btxReBsm0P7QO0KBJYYNAuSmTcfuwaxzDbrrU bHOYYd0E2sfYROO8GPViHZg7oAScTwkVYq6ddXxN7fnETrEowgUTMpG45WoVm3Ej08Fh tc4w== 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=F0Wia2jROmE5C4iTuiunWjrpETRbCBBXCQqEWgtA9Tk=; b=jqXtMd2PRb57NiOY4qNsF2hFBHoygne6w+i4XHfI7UjahOvPWoSZvitasM4WOn7Zd+ 3I9Pye7CVr3HxedEKyzW93xIxOJ5GkVp8Mmg2XkulWQ7PZKFj1gbG/JE7iM1Ku2wY3Uc ekY1/E6BS2RGNIy9lwlwmq57J6DCYMKq+ijLKiphnTpGBZOp7gGzdugSM5OnVp8oME0I FbIyRRVoN4/VgRdy8EkFcpKWKOAPDWasx05nbXZk1HoVcIfCKWi0Q2qC2X3osfj67+Yy rWq4y9Ms7RrXcVI8L+8Yy0glYLLT5Y0P31zQ3kSlalim0Iiygqgvm22uNN//MB0p6dju V3HA== X-Gm-Message-State: APjAAAVqh46XQ/ogarZQiiixAs45yVNm3EBZsMT9VEhqvLeHmK9CfSOW NTtBm23W2auYOBhJoQnWmzH3GE57HJs= X-Received: by 2002:a17:902:b20a:: with SMTP id t10mr5521579plr.277.1568829772960; Wed, 18 Sep 2019 11:02:52 -0700 (PDT) Received: from localhost.localdomain (97-113-7-119.tukw.qwest.net. [97.113.7.119]) by smtp.gmail.com with ESMTPSA id b16sm13319518pfb.54.2019.09.18.11.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Sep 2019 11:02:52 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 18 Sep 2019 11:02:46 -0700 Message-Id: <20190918180251.32003-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] [RFC v2 0/5] Move notdirty handling to cputlb 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: pbonzini@redhat.com, alex.bennee@linaro.org, stefanha@redhat.com, david@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" RFC because it *still* doesn't work, just like v1. However this time the changes are extremely minimal, and now I really *really* don't understand why they don't work, because as far as I can tell the new locking is *identical* with the current i/o path. In particular, the actual access happens between _prepare and _complete, just like before. Indeed, since this doesn't work as-is, then I can't believe the atomic path works either. I have included the TLB_BSWAP stuff just so that the patch set is self-contained. I did experiment with qemu_ram_addr_from_host_nofail(), but an assertion for equality with addr + iotlbentry->addr does not trigger. As expected, really, since that's what the i/o path uses. One more cleanup for the atomics path... Ideas? r~ Richard Henderson (5): cputlb: Disable __always_inline__ without optimization cputlb: Replace switches in load/store_helper with callback cputlb: Introduce TLB_BSWAP exec: Adjust notdirty tracing cputlb: Move NOTDIRTY handling from I/O path to TLB path include/exec/cpu-all.h | 2 + include/exec/cpu-common.h | 1 - include/qemu/compiler.h | 11 ++ accel/tcg/cputlb.c | 243 +++++++++++++++++++++----------------- exec.c | 57 +-------- memory.c | 20 ---- trace-events | 4 +- 7 files changed, 157 insertions(+), 181 deletions(-) -- 2.17.1