From patchwork Tue Jun 2 15:46:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187368 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4088289ilb; Tue, 2 Jun 2020 08:46:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKzATM86F1+jTc8jgFnF5HCEYiKOp5NKbVCBvreXi5Xd4XrB6C/1KUjMWFwaRlMFY0DwyC X-Received: by 2002:a5b:543:: with SMTP id r3mr38995018ybp.249.1591112804229; Tue, 02 Jun 2020 08:46:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591112804; cv=none; d=google.com; s=arc-20160816; b=PQotDdqbGefYMswmCIUGEeGGr6qtbWBXnJwNr0QDdHPKpehjyoj94qHBR3OeoYhPcA A3AVRlVn/CRfsMS1ia5CasqqlYQGT3AJovJOl543sGFnU79UjqEO3HUtwz9oYtluWbRE zVOIOVVugeEgROvtQqs9Hly97nQCxpVocvikLq4gCMDzJMp8t+xCTBmRs2OfCxnq1gDd d3p2VKgohohlEeSR/bPNmXmhFnFPvZCtH5TXrhuA94e7tkHHD9AHuzchLxavSoFi68Ud adcj4fvE9NwuwsQmGBHYo3y8vArzOuSj6R0pCB1wOyn+mVmiRMjjB1p0Hta7wY3mKy3X XoPg== 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=wUc7KzosaqpYazILM0pVzftN3xHyA5K9bdQHHd2wtss=; b=J3fmHDoXcSLViroEjLHMxSztmIA5eGdS8LUxl8YyzbT32kmPIl61VtZAND1s8mvx/t rk0aXIQO5Y4xYkQ/eepn3VMuteBLt5WVofYSX95UMS+LyhvLbvCYv+CGWGw0fH8I8dgq PO4Kvpl1lkz6cF5TmQwnGUvWGaGQQNFBs5vu2vnYExOQE8gIhzAx/+OnLQ+49P2cMKEr kh/Flmi3UnVs3JTCISwQz6l0X/C28HXNMAJCATDhZUxLtyyq1IKjMfi0iQN+uQnKMLeE OL/EMUq1Tdo478XJ9iGUT7mscJWb0LvPQKMvWlGYK27hBEZqAViYiQvvOrHm7xaRclTU WNoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QlSCMVEt; 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 r9si2530067ybj.374.2020.06.02.08.46.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:46:44 -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=QlSCMVEt; 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]:56648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg97j-0003Vr-Go for patch@linaro.org; Tue, 02 Jun 2020 11:46:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97V-0003VQ-LW for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:29 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:33792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97U-0007cG-Hz for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:29 -0400 Received: by mail-wr1-x42d.google.com with SMTP id r7so3929900wro.1 for ; Tue, 02 Jun 2020 08:46:27 -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=wUc7KzosaqpYazILM0pVzftN3xHyA5K9bdQHHd2wtss=; b=QlSCMVEtFsr+u1dBHYE6jSLXWXDNOSH+0v5QSldew6xZu45A8obXk1oyhCIxzNBTfu BySoZ9iOK1VhcWDkwf06p7pvsIAz5Rhk/8HZNaHimwdGme4ZfTxO9L+AQMlB/ZgCW3wd 1LrhhbB1JzNiuLjv2pHPwpeCxHiaGfTENwqIAfZqnwOJ7MK6o4DEQjKDVyQmZLq5HE1y jkMr77JcUx5yHjkBU4hu2XPHFc/R2Ncr8+H1D8QcUGaZWhkOuiIIILGlVCvHlvyIA1gx 5Vj7KJaFvn+8UP2f2tbgAFZDPZoYAftwm6qIwSvIymkYkTw4yYXOCT+jD4gD2gJFtrdk zcnA== 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=wUc7KzosaqpYazILM0pVzftN3xHyA5K9bdQHHd2wtss=; b=nTbyr602FI9K6iKxSKK1EyS10aHA9Rj02rdtzW9WhPm5iSrG3rBZNzDdVL0oj6tNuF qcdTn+33Dh8620vou3/7cyBknLZcs8NDHpQhLFzHJ5RhLgooDaQhbr14isdhvI7/vo7b uhr9oYOS8oi5qntRoVFUHSs/PBtdZ1vFXTvhbL10Xu9/8gmpeme6bslcqRE3ALQ2zYPm FwSPStGahjSOzyGSlwEK1j3HrK+wPqB6TexnSfv6vsHtPK4YZp6fQc6Vt1XFXQGZIlf4 5gn6w6V9ydHNtyWBc6y3ufei+e21ixBbejevtToHkKm/rskQu6x1uu8n1zXzgMOSBXm2 tiNQ== X-Gm-Message-State: AOAM531b5m5hhRcyvFKRjDrMlYysIfdtyLMg+StGZV9SoAadJcFoFapD jS4GXY0LhxQC/BlCwI9HrJGlHw== X-Received: by 2002:a5d:49c4:: with SMTP id t4mr26213521wrs.127.1591112786626; Tue, 02 Jun 2020 08:46:26 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z16sm4216207wrm.70.2020.06.02.08.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3A5401FF7E; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 0/9] plugins/next (bug fixes, hwprofile, lockstep) Date: Tue, 2 Jun 2020 16:46:15 +0100 Message-Id: <20200602154624.4460-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: robert.foley@linaro.org, robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, This is the current state of my plugins tree. It has a few minor fixes to the headers as well as a bug I found in the cputlb which was triggered when a pci_config write via io_writex causes the memory regions to be reset and as a result a flush and potential re-sizing of the TLB entries. This meant when a plugin looked up details of the address later there was no TLB entry with the information which got flagged as an error on the plugins part. I found the bug while I was looking around trying to figure out what was going wrong with my virtio code so I implemented a "hwprofile" plugin to track exactly what devices where seeing writes. There are some minor associated tweaks to the virtio PCI code to better name the MemoryRegions and a new helper API which exposes the region names to the plugin. The lockstep plugin is essentially unchanged from previous postings but hasn't seen any review. I'm minded to include it in the next PR anyway just so it isn't lost next time I need to do an A-B comparison on something that only diverges in behaviour several million instructions into an execution. The following need review: - .travis.yml: allow failure for unreliable hosts - plugins: new hwprofile plugin - plugins: add API to return a name for a IO device - hw/virtio/pci: include vdev name in registered PCI sections - cputlb: ensure we re-fill the TLB if it has reset - tests/plugin: correctly honour io_count - plugins: new lockstep plugin for debugging TCG changes Alex Bennée (7): plugins: new lockstep plugin for debugging TCG changes tests/plugin: correctly honour io_count cputlb: ensure we re-fill the TLB if it has reset hw/virtio/pci: include vdev name in registered PCI sections plugins: add API to return a name for a IO device plugins: new hwprofile plugin .travis.yml: allow failure for unreliable hosts Emilio G. Cota (1): qemu-plugin.h: add missing include to define size_t Philippe Mathieu-Daudé (1): scripts/clean-includes: Mark 'qemu/qemu-plugin.h' as special header include/qemu/qemu-plugin.h | 6 + accel/tcg/cputlb.c | 14 ++ hw/virtio/virtio-pci.c | 21 ++- plugins/api.c | 18 ++ tests/plugin/hwprofile.c | 248 +++++++++++++++++++++++++++ tests/plugin/lockstep.c | 340 +++++++++++++++++++++++++++++++++++++ tests/plugin/mem.c | 2 +- .travis.yml | 5 + scripts/clean-includes | 1 + tests/plugin/Makefile | 2 + tests/tcg/Makefile.target | 2 +- 11 files changed, 649 insertions(+), 10 deletions(-) create mode 100644 tests/plugin/hwprofile.c create mode 100644 tests/plugin/lockstep.c -- 2.20.1