From patchwork Wed May 13 17:31:52 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: 186669 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp658092ilb; Wed, 13 May 2020 10:34:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4rMy+wmNthz4ZrP6HwudjV+MFrpdMMvK9WtVvqc4boDz2N5ldZUruHA0C7Q3Ulw0CMDO8 X-Received: by 2002:a37:9141:: with SMTP id t62mr774894qkd.95.1589391293964; Wed, 13 May 2020 10:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589391293; cv=none; d=google.com; s=arc-20160816; b=WxkuX6edP2hQVMtKxt825wnMS9IozGHl96TaE3oIc95sNyIrcMRimmQYR132UBS4Pm IKFYh0AxpgXCFfsFIalw0YsQMROz2OaY0XHZl8cafx4nzHA9hNEsrcEHZ18C7XkfzjQ7 q21a4tVVClGSqxsKVVn0m57Y/2x1DRXo0gJ+nECoIK3qwRG1sV6Ox3BFot64YTMVXGAK cmBCaXDIWbq+kyNocGPkGH9Yk/rm+/+1cWTT9zKGIsWCa5ucne6EmM0Uw80f3bTRqAri tXZe3EKGE/LswmKAdL5WJpJBkTkUq/Mbz3dM6XWWe1wg1ak0/1HsMtOBMlbvZfLRbCmL bHkA== 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=HR4jMOF852+AiagIFivRxvoRxaO2U/uZiy0Wy938QuE=; b=OaGbCl9OBZIXwH9P0B1VhrZOiFLnDXuH5WwFmgkKACIPrOuJ9uoCW7cy7RlYVBlHuP 6stHaF2l9jsug8RC3Xtvni/Itz77gXQE7MqdB1P9C7L4lXkmziBIsqzbgS++TdRe1XpP zVOeJ6YsycrArzWdVKbUXKHPIfc+nH1YHWn4Kulfcpf6lTPD5Gjs8yauiQ6yUfJ+2Z+v QBj8v/YSF2jz23IIpiNF9x81g60HGHmpLkFDYgfgl2LE+rAOLCRQW3Bb0ULDShwpoVqI HdQoWOstqZdNkO+VUGW0XkeWJDr40APQ7twilX/iwZ1BRktsp282bZOTYUoIDmXE5qpO T5LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F9Zc0kLn; 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=pass (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 z15si85038qvm.213.2020.05.13.10.34.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 May 2020 10:34:53 -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=pass header.i=@linaro.org header.s=google header.b=F9Zc0kLn; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:40662 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvHR-0008RP-HR for patch@linaro.org; Wed, 13 May 2020 13:34:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEw-0004x4-08 for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:18 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:54012) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEv-0007ny-23 for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:17 -0400 Received: by mail-wm1-x343.google.com with SMTP id k12so27420938wmj.3 for ; Wed, 13 May 2020 10:32:16 -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=HR4jMOF852+AiagIFivRxvoRxaO2U/uZiy0Wy938QuE=; b=F9Zc0kLnz+STQJWNl5ZwJBq7YwwWOywcBrwjvBrrzZzzVoeA4LM+PDjwPlnWkgOCmf 3YAIsr4mb60IcSRfLP1IuNA89Me1yvY2Vxr5qON+EFu9lxtpN+6L62BDMfH1JZUYdVh1 zTvCMXbMejlgkcZZXtTgiVUgIvUq7dWdktCuaJ/xLsAbipHuB+dn2kgvgBFkd61OwjH0 XMR7DpObxqXb8d6K0BoEBoVS5gb6RsUWqmy7ZcZN7uPoILKrk/sf0N6sR1kRMBV32HlJ iZ1EFWrMIgXL0zj6ncvIIrsBf2sui5yImANSbzILbBaroaebX0uC0GzFmgQwzmLAzoPE G0XQ== 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=HR4jMOF852+AiagIFivRxvoRxaO2U/uZiy0Wy938QuE=; b=FuR4LcCKycVKqZ5Q2HuXBUtGI7AECq6ojhR/PJyjpbf/Aaw1GYaauI18IiT0deWZnC TjDhH+2cammMhHn24iH3tZxfBdSidgAwY9IbOeJQguPq51aNk8NMjn+NWvJfyA2ySNav SKjg0aIMzKe2dQTqwKgsSS35KXtjfek8hf4bXXAaT/HK/aS5TSIS/FzfjHqv3h7w6Mgc hGB/uJPBvqUdrJvDmWnEF3IFEi73hXYteXf/QaBIJi8Ee9LRLCzSISzEI7x+uiMFdjZ4 YVWD5E9FhjkcXL5zsz2xpd8Ev0wAG/b/rwj2fHydUhosO0EJ234ATOJD+GlJH1UFDd0+ 52fw== X-Gm-Message-State: AGi0PuaglHzELgkn1tazObi7aHr6OeztbEVLVaWQkaBN0E4lleQTjTx9 1078odnINdCeYASP8qLZHlFk9Q== X-Received: by 2002:a1c:acc8:: with SMTP id v191mr39029728wme.128.1589391135718; Wed, 13 May 2020 10:32:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 1sm37544685wmi.0.2020.05.13.10.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:32:09 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id DDB711FF7E; Wed, 13 May 2020 18:32:00 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 0/8] plugins/next (cleanup, cpu_index and lockstep) Date: Wed, 13 May 2020 18:31:52 +0100 Message-Id: <20200513173200.11830-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::343; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x343.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: =?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/next tree. It contains 3 bits of work. First some minor clean-ups from Phillipe to help with his other re-factoring work. Next are some fixes for a crash reported by Nikolay on the list. The root cause was a re-use of cpu_index although I've also tried to clean up the handling of pthread termination. Finally there is another iteration of my lockstep plugin which has had a little more tinkering to better detect divergence between two QEMU's. It's no Rehoboam but it will hopefully be helpful. The following patches need review: - plugins: new lockstep plugin for debugging TCG changes - tests/tcg: add new threadcount test - linux-user: properly "unrealize" vCPU object - cpus-common: ensure auto-assigned cpu_indexes don't clash - MAINTAINERS: update the orphaned cpus-common.c file Alex Bennée (5): MAINTAINERS: update the orphaned cpus-common.c file cpus-common: ensure auto-assigned cpu_indexes don't clash linux-user: properly "unrealize" vCPU object tests/tcg: add new threadcount test plugins: new lockstep plugin for debugging TCG changes Philippe Mathieu-Daudé (3): qemu/plugin: Trivial code movement qemu/plugin: Move !CONFIG_PLUGIN stubs altogether qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument const include/qemu/plugin.h | 65 +++--- include/qemu/qemu-plugin.h | 2 +- cpus-common.c | 9 +- linux-user/syscall.c | 19 +- plugins/api.c | 4 +- tests/plugin/lockstep.c | 345 ++++++++++++++++++++++++++++ tests/tcg/multiarch/threadcount.c | 62 +++++ MAINTAINERS | 1 + tests/plugin/Makefile | 1 + tests/tcg/Makefile.target | 2 +- tests/tcg/multiarch/Makefile.target | 2 + 11 files changed, 461 insertions(+), 51 deletions(-) create mode 100644 tests/plugin/lockstep.c create mode 100644 tests/tcg/multiarch/threadcount.c -- 2.20.1 Reviewed-by: Emilio G. Cota