From nobody Fri May 3 23:45:52 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391203; cv=none; d=zohomail.com; s=zohoarc; b=KqKeX9TxeZYJnzK6cX/OtjjnraJOtqBWa25XBDX7xzTTMWBfT8a0y9Lq0PApnNSjdM+zhjhAkj4teMyEK6lPNumcAbi1+NM4X4mpS/o69tQ55QtqdQlCWC4ccIEllnN0Zt8/i1akKjErXKkaaALcaAEu2zscYNM27TGCeDW3Pls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391203; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qcFVIBqUp0EMIHK5cdTZ6uX+aE01YOYGri1QnnvF5Gw=; b=JB4wrVRVeFSmEPJmbcVz+9R49Reiv0kf6Iu33XsOEMNdzBqG4AYEoSp9UzwF2Hp0mxrloObyTKCpSy/f7JlTBimX0UfxAK27xFQAzPkwPLRkVG4jAu+AC2fROjzeT/rFMq0aOf7vnJH2uD3hZMGYF5wo9y6i4NsmUp86EkWVCHU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158939120301436.04674891834111; Wed, 13 May 2020 10:33:23 -0700 (PDT) Received: from localhost ([::1]:35644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvFx-0006Ob-HC for importer@patchew.org; Wed, 13 May 2020 13:33:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56666) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEn-0004hc-LN for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:09 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:39149) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEk-0007l5-W9 for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:09 -0400 Received: by mail-wm1-x344.google.com with SMTP id y24so29511966wma.4 for ; Wed, 13 May 2020 10:32:06 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w9sm286251wrc.27.2020.05.13.10.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:32:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0154A1FF87; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qcFVIBqUp0EMIHK5cdTZ6uX+aE01YOYGri1QnnvF5Gw=; b=HfnvLKwkkm0n9VXzBjxEaM5yQwmxPDHgFHqw0O5k6Qdm1UvqIxv5UHOnekGJVts2W2 uV1uFKVT7AmyyJqsCmEaXHip2MRLc1V3eFJ+yFD8gJmbaE8gI7uFliSDsIbmCY88Xs1c p+WhKv/ekYOqkjiD29NIzefkbaTkLwP8ZgBM6d1k4+hNB4b9yFqOO1cydyAMCL3U9y0r C4EWqAufC/+OnZ38osa2Z6beUoBO4qmiISHoFY+wt9aPsrZg9SQYJMdJCdLUACzhaNb1 U57JhRYvEbL+LlKl9vwTsk7UQgI3060cN2fJ9MUdx29Khqlz6fF+7V+8YLRc7on0qYJ7 08ng== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=qcFVIBqUp0EMIHK5cdTZ6uX+aE01YOYGri1QnnvF5Gw=; b=jc782DDnacAdh4B9ZNf0sqp5u8eECg+dONs6Sqc4niSiTSQkGnH1SqkKILUoqpKeJT 4B2xFJcfDdQo3I5R5NlajYZCLbGkDebnqtRFDLQUyEocrElb3yb0X0T0aoP2E2BowJ0o 3CRWrzg1lChUULo0Hb2ZAYrAMOoCzrW+Iwj1SgxClz29pQe0vTIKKRbYk06Jru0KW8Q5 a+5p31cdLhrz5qg73oNM9ws8puEwn+36B5wobiIj6VWUtGAIsvBXzAM0fIevzBNF09il 6s6Jp/dGeIQP8ws6MqWNMkVoBIqjIXU890jD5mWcOrOORYsbFjAejxgiMblzf2pQ4iSw gkzg== X-Gm-Message-State: AGi0PuberkuzHpVuwTpaFbkozMszXypB4UtotniRdq+JghuQitbLDU8u ECzu+qy4+US1DEI6soJqtVFdFQ== X-Google-Smtp-Source: APiQypIesWLFs3N7PAZU3rtca0szHc81hl2eKtxMiby5p8BqiwMg5FaFcH3oPPV1aPjzdD/gicGKyA== X-Received: by 2002:a05:600c:2299:: with SMTP id 25mr23278372wmf.138.1589391125390; Wed, 13 May 2020 10:32:05 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 1/8] qemu/plugin: Trivial code movement Date: Wed, 13 May 2020 18:31:53 +0100 Message-Id: <20200513173200.11830-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.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: "open list:Trivial patches" , Michael Tokarev , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Move the qemu_plugin_event enum declaration earlier. This will make the next commit easier to review. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200510171119.20827-2-f4bug@amsat.org> Reviewed-by: Emilio G. Cota --- include/qemu/plugin.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index 11687e8cdc3..e45f950fe36 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -13,6 +13,22 @@ #include "qemu/queue.h" #include "qemu/option.h" =20 +/* + * Events that plugins can subscribe to. + */ +enum qemu_plugin_event { + QEMU_PLUGIN_EV_VCPU_INIT, + QEMU_PLUGIN_EV_VCPU_EXIT, + QEMU_PLUGIN_EV_VCPU_TB_TRANS, + QEMU_PLUGIN_EV_VCPU_IDLE, + QEMU_PLUGIN_EV_VCPU_RESUME, + QEMU_PLUGIN_EV_VCPU_SYSCALL, + QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, + QEMU_PLUGIN_EV_FLUSH, + QEMU_PLUGIN_EV_ATEXIT, + QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */ +}; + /* * Option parsing/processing. * Note that we can load an arbitrary number of plugins. @@ -47,22 +63,6 @@ static inline int qemu_plugin_load_list(QemuPluginList *= head) } #endif /* !CONFIG_PLUGIN */ =20 -/* - * Events that plugins can subscribe to. - */ -enum qemu_plugin_event { - QEMU_PLUGIN_EV_VCPU_INIT, - QEMU_PLUGIN_EV_VCPU_EXIT, - QEMU_PLUGIN_EV_VCPU_TB_TRANS, - QEMU_PLUGIN_EV_VCPU_IDLE, - QEMU_PLUGIN_EV_VCPU_RESUME, - QEMU_PLUGIN_EV_VCPU_SYSCALL, - QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, - QEMU_PLUGIN_EV_FLUSH, - QEMU_PLUGIN_EV_ATEXIT, - QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */ -}; - union qemu_plugin_cb_sig { qemu_plugin_simple_cb_t simple; qemu_plugin_udata_cb_t udata; --=20 2.20.1 From nobody Fri May 3 23:45:52 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391205; cv=none; d=zohomail.com; s=zohoarc; b=fzVAbcWjlaUqTwCbYC1edtiHaGhhfv+9E6MOtZGczRHQiyQ4LdfGfZaELdcx7g9qlc32SKxkptq/0uvbJ/cwqw5V9FH3P4QhvtO4/mD2741WA/20wTiqhjcIU5+oG8P/mZ4GMOeMkwcJjC3YNC1u3LsqLCwAGgGz57uZqe0XvZ4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391205; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=t9Sop/JZIFc8+KcCWQNsKU9OCXVZGmJjWJpVbXq1m9s=; b=nBE1rhuDHFzyN2tT0yiqMzAB3FMv67Ruzoc7yomcT/R2h4i+5yl5/WlPKRRadUlabv3nklN0bYapWyqX6MhGXlwgkzhNEx5VWj6uRAFv88qBkTFD6yLz0V+V6ie3Wg9EVWx4SjC8NCMbn6SkpzFOkkaWWhy4WxsShyRhtfJDCQ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589391205897117.30914014578468; Wed, 13 May 2020 10:33:25 -0700 (PDT) Received: from localhost ([::1]:35882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvG0-0006UN-Dd for importer@patchew.org; Wed, 13 May 2020 13:33:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEp-0004i3-87 for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:11 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:40745) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEn-0007lP-06 for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:10 -0400 Received: by mail-wr1-x441.google.com with SMTP id e16so445908wra.7 for ; Wed, 13 May 2020 10:32:07 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 81sm20821140wme.16.2020.05.13.10.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:32:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 162461FF8C; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t9Sop/JZIFc8+KcCWQNsKU9OCXVZGmJjWJpVbXq1m9s=; b=Q3IXCHJ9ags7AJsZ3eetC1UY49ttWRma2/I/aiUyBZkOjOcDOoOiDqNPipFY7iQRXc MDa3DOUnbJD09FVa28baN2AeEc2Ndwsifqb4C7Y/gyAxtgM+pHwT5U288Vg0WmDyXNpb QZG4BR3sQa3MW+bosBnNpfgbq/57fXjKZw0OZWCs5SYr0eguQEENih4jsude7X+4wsKD MvGJmVj/xy7b+bFaAAvhw68Pl8fRmtPkgrUWQ4jRS4lkJZbfLGquFOiERUcFqq8WHDcD 6c/CMO8p2xZSQ46/6Vmahp1e9rPHw/WieJl+sw5iuu7B88NyI0/9cq9wMeG8fGaDJV7U h9pg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=t9Sop/JZIFc8+KcCWQNsKU9OCXVZGmJjWJpVbXq1m9s=; b=trJCl3qpT0PQJHm8b/9X36mOHiMnWVvMZFSXpXWgKS5BWhj77msUEAdo7D79fWHlxw 0fNWJg/7h8RsXUJLOb+myX7YDqUABIy+LpBpan8IXToTilXeciEOvFKkUuUSmSW/Vj5E i4qxifKf65qneLcZY5n6l+C4rxUPkBLsj9iGVyGrOMLunF5KK5Ci4/gntNQNm73oo2KX JJCVpdybRJeOl0wQ5ekHiM7Lih1PE9K2JO5nyGtbt88mSl2+aZjAkUWT115pv1i2Cg/+ Yu6m4Xq5eVX2J0Ci2Zb5uW8yITJkWJl5ijQPjt9Fe8SRdbsQ3WST+PfU/vzmXJioobwR nopQ== X-Gm-Message-State: AOAM530BAyEx8gXV9QB+q+3XLNR2iTgSDU++Qw2wLgmY6n23ZCk8IEy3 XhkTRMGJhqVoHraTk41PsJX/4A== X-Google-Smtp-Source: ABdhPJzQf3/moO/pp0oN7YE21OFyk0gkAlXVPJ52Lp31bOZLOMBN+sjPaQG20uc0iWICPOHjbkzhmw== X-Received: by 2002:a5d:49c4:: with SMTP id t4mr408377wrs.127.1589391126623; Wed, 13 May 2020 10:32:06 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/8] qemu/plugin: Move !CONFIG_PLUGIN stubs altogether Date: Wed, 13 May 2020 18:31:54 +0100 Message-Id: <20200513173200.11830-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.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=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Simplify the ifdef'ry by moving all stubs together. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200510171119.20827-3-f4bug@amsat.org> Reviewed-by: Emilio G. Cota --- include/qemu/plugin.h | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index e45f950fe36..ab790ad105c 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -46,22 +46,6 @@ static inline void qemu_plugin_add_opts(void) =20 void qemu_plugin_opt_parse(const char *optarg, QemuPluginList *head); int qemu_plugin_load_list(QemuPluginList *head); -#else /* !CONFIG_PLUGIN */ -static inline void qemu_plugin_add_opts(void) -{ } - -static inline void qemu_plugin_opt_parse(const char *optarg, - QemuPluginList *head) -{ - error_report("plugin interface not enabled in this build"); - exit(1); -} - -static inline int qemu_plugin_load_list(QemuPluginList *head) -{ - return 0; -} -#endif /* !CONFIG_PLUGIN */ =20 union qemu_plugin_cb_sig { qemu_plugin_simple_cb_t simple; @@ -182,8 +166,6 @@ struct qemu_plugin_insn *qemu_plugin_tb_insn_get(struct= qemu_plugin_tb *tb) return insn; } =20 -#ifdef CONFIG_PLUGIN - void qemu_plugin_vcpu_init_hook(CPUState *cpu); void qemu_plugin_vcpu_exit_hook(CPUState *cpu); void qemu_plugin_tb_trans_cb(CPUState *cpu, struct qemu_plugin_tb *tb); @@ -207,6 +189,21 @@ void qemu_plugin_disable_mem_helpers(CPUState *cpu); =20 #else /* !CONFIG_PLUGIN */ =20 +static inline void qemu_plugin_add_opts(void) +{ } + +static inline void qemu_plugin_opt_parse(const char *optarg, + QemuPluginList *head) +{ + error_report("plugin interface not enabled in this build"); + exit(1); +} + +static inline int qemu_plugin_load_list(QemuPluginList *head) +{ + return 0; +} + static inline void qemu_plugin_vcpu_init_hook(CPUState *cpu) { } =20 --=20 2.20.1 From nobody Fri May 3 23:45:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391307; cv=none; d=zohomail.com; s=zohoarc; b=K6DAyDC8+4j6x5bvkyROKC37hIeTgGuPkD32CfanO9hmR/jQJRfxAO64t7STqgLicU/nxv/1d4DwFh5RuWH+cci6HRVTgnTmuUwEISf4o3CmBKMmJAOCQmjLv2LsvWAnRRiHeWuo2lgxLpi0+5fiTTi7X4ZDzMqFTYpEGjk1q6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391307; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=C5L2tP3m/XtQpZw+uVEZIBSr0SqohhleNs5AmfODQjU=; b=H0Q164L5eTqXqZckuZmCifZIwy1uvqD1HGiTpuIEjsacgtIFF5TWyE/KhMCwdn5Wzg1KwIUpgOnhkrpKYc4aVZ4wXLBoWIax4GeJuktYeZjYTBBvlNRf+pgLAzEXrNkwlWfs6yQ8PZvCfDMgnRznl7grQdjD9hVVosme9EmgJXQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589391307733383.31803893908364; Wed, 13 May 2020 10:35:07 -0700 (PDT) Received: from localhost ([::1]:42648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvHe-0000pm-Do for importer@patchew.org; Wed, 13 May 2020 13:35:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEo-0004hy-QB for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:11 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:39148) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEn-0007lh-8O for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:09 -0400 Received: by mail-wm1-x342.google.com with SMTP id y24so29512110wma.4 for ; Wed, 13 May 2020 10:32:08 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i6sm193679wrw.97.2020.05.13.10.32.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:32:04 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 2BCD51FF8F; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C5L2tP3m/XtQpZw+uVEZIBSr0SqohhleNs5AmfODQjU=; b=xVZ8C1P02bKndHIFx//8VuCIb57kKh01f8OFVUXfSvQOqxpRRTkhKTPOTAljRT2NSk Tm5y6FX+Ab/wOYBuJ5HhbFHISZ2wWE8rtBzkrRnWQnyz6/qAd+igPHo70CnKEM2O6mUB hpG+mkSsNcBQA0+I+zYHYhkMFLpfhFMy8KAHiERnYkRs1VhVzi26mig6m2f/KVGiTjSQ mQC+WWwnTgkEiNQfGePzk4pmNnQzyyhM+er+hKfdRopIFk+FB00wloY4LKwbz2JgmI4k 7MyIUBGs9M55R3AAAHRmDtVhuXTFtLYazvwtsRpeIZhxvxVLV/VyBCE5CT+/+Nw3tiI0 SuEg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=C5L2tP3m/XtQpZw+uVEZIBSr0SqohhleNs5AmfODQjU=; b=LOWY4TbW9H8kQewoTYiIYLF4+75EApadIZgrNHSyMC1fOnxd+ni+sO1ZJ6sDEb2jYI QPA5hAC9fr/XC4OkxNj1rzIe5jw8dlXqkuIZHl13d0kPj32Ke83ZvMo+1TgVyBgpUI0B TVY4dFoYc7ZzbZ1CbE84zvKamzgXrFv2Dz6kyPNtJ2dsn7xcPeKijrVp4CONM8P5HpuA 3TyJq9hCOZnBaHilEEG31+4IeIWmPRxPQyamlW+y6govVw1yEYsugp5BNdN9dOOhMeqN ZlF8XlwGq7t9XntNm9jrulMhMe7gS3yRMGV77UoLnGBStnOickczPyv4kYyErmelZC3R /Xlg== X-Gm-Message-State: AGi0PuY3FyJTtAw5GJ2Cf5Dd4De/9mxDoiSsoyZh1fhsRfaKl5YHXePj Pxn1xyijGlhWJLvTUzj98zzL8/9ZEJM= X-Google-Smtp-Source: APiQypKPwWZTI0td0ToQfqXGHWF7B6hO3oy63ykDfbabCXbKIGlfiVqwGaCm8NUi7/9RFF2VBo7AjQ== X-Received: by 2002:a7b:c5c7:: with SMTP id n7mr33930439wmk.18.1589391127899; Wed, 13 May 2020 10:32:07 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/8] qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument const Date: Wed, 13 May 2020 18:31:55 +0100 Message-Id: <20200513173200.11830-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::342; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x342.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=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Philippe Mathieu-Daud=C3=A9 Rename qemu_plugin_hwaddr_is_io() address argument 'haddr' similarly to qemu_plugin_hwaddr_device_offset(), and make it const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200510171119.20827-4-f4bug@amsat.org> Reviewed-by: Emilio G. Cota --- include/qemu/qemu-plugin.h | 2 +- plugins/api.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 5502e112c81..89ed579f559 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -331,7 +331,7 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_= plugin_meminfo_t info, * to return information about it. For non-IO accesses the device * offset will be into the appropriate block of RAM. */ -bool qemu_plugin_hwaddr_is_io(struct qemu_plugin_hwaddr *hwaddr); +bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr); uint64_t qemu_plugin_hwaddr_device_offset(const struct qemu_plugin_hwaddr = *haddr); =20 typedef void diff --git a/plugins/api.c b/plugins/api.c index 53c8a735823..bbdc5a4eb46 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -275,10 +275,10 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qem= u_plugin_meminfo_t info, } #endif =20 -bool qemu_plugin_hwaddr_is_io(struct qemu_plugin_hwaddr *hwaddr) +bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) { #ifdef CONFIG_SOFTMMU - return hwaddr->is_io; + return haddr->is_io; #else return false; #endif --=20 2.20.1 From nobody Fri May 3 23:45:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391516; cv=none; d=zohomail.com; s=zohoarc; b=eMo7PZya9IvHK5ukUN+u2K7yka/gjM6KgiFmibBYR+tXg3nKQbLENBdmIinUBGzK3NLOmPmVmKHc2G+1SdUYnzEYyP9AoxEJyoRpWqdcjZGAkiGDJxBkU42bQYTrXwTt9LOEbpuBs0wpHczMYLTSSzouhg83RP9og/oRbVEsFSc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391516; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1chDwz94RrS85XCVVBqcwsxgLaBVTqxdPFO1xuLV3bk=; b=JTjArm9iQ5hnHpo8MmGM2AX0a/G1hOAbl5G8LmBw3WfgTyIT10z+6APggzLiPLhcHyFsyn6QBFnqI8qe5KYSp97PWqG1JXpPOH15NbLN/KSrgc1kEev1ijIf0ST0XxAFcoNBzOiWTMwnaLpi3Er8/mI8apk2JrFxJ7gb2Noo1us= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589391515952163.55894597733675; Wed, 13 May 2020 10:38:35 -0700 (PDT) Received: from localhost ([::1]:53156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvL0-0007VO-JG for importer@patchew.org; Wed, 13 May 2020 13:38:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEv-0004uy-4a for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:17 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:51752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEt-0007nQ-EH for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:16 -0400 Received: by mail-wm1-x331.google.com with SMTP id f134so15293168wmf.1 for ; Wed, 13 May 2020 10:32:15 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q18sm2579484wmk.28.2020.05.13.10.32.07 (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 40B0B1FF90; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1chDwz94RrS85XCVVBqcwsxgLaBVTqxdPFO1xuLV3bk=; b=xpw2fHKXQtK4NYVNby1EzTcnvzHvTpoIFbBtfpjc537l4xdL0yt5wYHRhffX8UBjTu ifitgSRksy9OPMF29j3Q3kYYf8gZRFbOhpBuv7V7y0+63xcYHosqx8GwxRTXY5GctW8A JS3S/JoyOHEVtSqvvmBk2Iod2tszqTugJW//FVdeLBp5GJNu4meeZdBIbuDkc7A/5aTq 8W7QNM5VP2AAbbeTMuiLq1gzW69GGOAig2DoV2JhuD15aVq2fowQ1U7j571x03BvXu3S PRA5V68VAWHtOc9B0TiEmXVFf6GcqbX7dmlzgvHF5iJAJF/InEbFzotGX4aRRZOpBpef 058w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=1chDwz94RrS85XCVVBqcwsxgLaBVTqxdPFO1xuLV3bk=; b=hO5TtlHamsDhVXYda8AK2tqtesCKs3MqSnTHvpm7xfPG+GVdfCdMVnYielqw/jIpCT RChBHzbKyZebZ0I64azaIlEsYQw6ioVe/RRoNNFi2uej8d0JsuDBtvZdMC/2NLLjIVms bc612lR/iAaqJ1WQpYxu1W2iqaTryK3xb/+x9RECqdHU52mK+yyMtNxrJB0MbB59da6N ogKIRh6csQVcGSRooztr4x0q8t50JoG3mMLCTV+J1tQom+rlgNnGOQIPLMfcZgWPbKgJ Bn3yX/Jsv9c5+7UM5g8mrN+hFLFuyuVdh1OZlyEQSd8v4QvqndY7g1ygsxQ2yRGkN/Z+ CaSw== X-Gm-Message-State: AGi0PubCZerbjg1ANt55XNzczxlaKt3E1rZOrWseg0Sy18EdNvLQYvYf P4nmJ0K/IJx/9syrUHkVDqCUKiIUN8o= X-Google-Smtp-Source: APiQypKNHIpJm9pe1wQkvX+tNEHXlwNc27iKv6iOuZxwBUpjlVj/btXvrEvoMjFOsBLSijgiKDm5Iw== X-Received: by 2002:a1c:6884:: with SMTP id d126mr25031171wmc.179.1589391134028; Wed, 13 May 2020 10:32:14 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 4/8] MAINTAINERS: update the orphaned cpus-common.c file Date: Wed, 13 May 2020 18:31:56 +0100 Message-Id: <20200513173200.11830-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) We forgot to update MAINTAINERS when this code was re-factored. Fixes: 267f685b8b Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1f84e3ae2c6..cfe71898d2f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -115,6 +115,7 @@ M: Richard Henderson R: Paolo Bonzini S: Maintained F: cpus.c +F: cpus-common.c F: exec.c F: accel/tcg/ F: accel/stubs/tcg-stub.c --=20 2.20.1 From nobody Fri May 3 23:45:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391215; cv=none; d=zohomail.com; s=zohoarc; b=BoRfFKx1aESEqq4lA274V5afhVNX0p/vYVv4GGi1fCPR3ci7C36ebgg54TWRrP/fiDve3zBTdTdxCMnrJ2QH5GfJoWw8neks2ptpvWQV/95ZFDSddgfrD8FNTkAn149UANL4ABqMHB3SfAhPGLoBLY9lOyUITmmts/AQB+7txM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391215; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Gdil8t+xOr7TCjqgJyVIpfNS5QGic/4oGQPhUYY1lwY=; b=Haf1SkbXB0IaYD4tOBGc0ZG9tPWJgViP8hCZZirITU1tpbkJrQz23IxUv0pvJ9gJ2iLlAlxJ+KtnaSy5mkrqwHfhe70hvsNnZbXL21H9K70a6Azfe1YAphG9hk2HFde6kCERS9rSJppefkII06ObO+1p1apb+yQueS+awyK+2SY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589391215747617.0885527659051; Wed, 13 May 2020 10:33:35 -0700 (PDT) Received: from localhost ([::1]:36804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvGA-0006sJ-EA for importer@patchew.org; Wed, 13 May 2020 13:33:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEq-0004jR-2C for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:12 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:46718) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEp-0007m8-4A for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:11 -0400 Received: by mail-wr1-x444.google.com with SMTP id w7so401788wre.13 for ; Wed, 13 May 2020 10:32:10 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b14sm25207574wmb.18.2020.05.13.10.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:32:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5727D1FF91; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gdil8t+xOr7TCjqgJyVIpfNS5QGic/4oGQPhUYY1lwY=; b=Mk0PGW4BIra3cS2PmzSYNrVkdPGBRV8SVZaCqfq3vq6bVcstAaROI1pszAwikYGSsE TABTuaPO8dcIPnw+KIVPuayAZ74+Ee8C5we2skVc3UidC2FUrVbdGFYAyK6kPoAcs/sa 63FiyyTPadcyjIAMJnG30EuPaHzMowRQwdLDf8a2t0ywzKWQtcwCsBQsKQyIUUhAP7ce M2W44Feha5Jb5GYaCOntV4Ufc5SKrdFABO3/cjsc+twW2Cbnm2DR5b6aWEQrqGvu91/i 77VNQd8UrIF9y5DpHeBLPiUi4QDBlIy1xK9cJSvtfzgddm0yosxxqmm9APmdQ+wJdJqe X5dA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gdil8t+xOr7TCjqgJyVIpfNS5QGic/4oGQPhUYY1lwY=; b=LrsLrXydAr7uwuqsxmOjbw3oWDFmCFq8ZHfVyFwjMlgH58V6Rn98nHXy09Wn+3wvtp DpPK/l1gAIibMR5wg48eVclkphji72u9f0dyDfocXCfwMwgpuAkNpsGhZ6rwK1pdGVgF 3oMPQv0GSgAO/2yp6vqehAOk+T1erdiW1pYTcNAERzob+e6PVeWtrAdoAn+rP16mvWWn k7gijUOetfPebiL7t8BXoOdOnWLZW1dqTpn4sq0glBycdF4R2dXqdOVjPAGXQeHINY5U 8Fc7u9WGsEX+VGteYh37JoVeFzNdlzHE0hgKKcsgkf2WeQrZeQu9jC3gnncQFG75MkVN 5Vcw== X-Gm-Message-State: AOAM5314F65i2Ufv98+kLwQR9LDQxS3DN1mEqip5FobSn9hVOp6fBpGV boeUv+PdKht3pI/x65zqFLZr9Rq7h3I= X-Google-Smtp-Source: ABdhPJwL0ElNpBW71yX/nSVyEYQJla9seuk4DtygfC/oZNJJWWx+M2Yj9iDWUOyAf1Iwf4HsqDriOg== X-Received: by 2002:adf:97d9:: with SMTP id t25mr438902wrb.176.1589391129690; Wed, 13 May 2020 10:32:09 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 5/8] cpus-common: ensure auto-assigned cpu_indexes don't clash Date: Wed, 13 May 2020 18:31:57 +0100 Message-Id: <20200513173200.11830-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.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: Eduardo Habkost , Nikolay Igotti , Igor Mammedov , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Basing the cpu_index on the number of currently allocated vCPUs fails when vCPUs aren't removed in a LIFO manner. This is especially true when we are allocating a cpu_index for each guest thread in linux-user where there is no ordering constraint on their allocation and de-allocation. [I've dropped the assert which is there to guard against out-of-order removal as this should probably be caught higher up the stack. Maybe we could just ifdef CONFIG_SOFTTMU it?] Signed-off-by: Alex Benn=C3=A9e Cc: Nikolay Igotti Cc: Paolo Bonzini Cc: Igor Mammedov Cc: Eduardo Habkost Acked-by: Igor Mammedow Reviewed-by: Emilio G. Cota --- cpus-common.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cpus-common.c b/cpus-common.c index 55d5df89237..5a7d2f6132b 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -61,13 +61,14 @@ static bool cpu_index_auto_assigned; static int cpu_get_free_index(void) { CPUState *some_cpu; - int cpu_index =3D 0; + int max_cpu_index =3D 0; =20 cpu_index_auto_assigned =3D true; CPU_FOREACH(some_cpu) { - cpu_index++; + max_cpu_index =3D MAX(some_cpu->cpu_index, max_cpu_index); } - return cpu_index; + max_cpu_index++; + return max_cpu_index; } =20 void cpu_list_add(CPUState *cpu) @@ -90,8 +91,6 @@ void cpu_list_remove(CPUState *cpu) return; } =20 - assert(!(cpu_index_auto_assigned && cpu !=3D QTAILQ_LAST(&cpus))); - QTAILQ_REMOVE_RCU(&cpus, cpu, node); cpu->cpu_index =3D UNASSIGNED_CPU_INDEX; } --=20 2.20.1 From nobody Fri May 3 23:45:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391402; cv=none; d=zohomail.com; s=zohoarc; b=OyESRgubCjIeoJFx98+wtB7GOku+qnufCUJXUTN4IluHUMnGpXn2HI8MokQrPwZ4MScNAf4Xw2lfEkWHGKnAZ5ff3yLHzZPschUMeLlON7XysvA76b/AsUhuZvkrNOe29AITCyHV8SQ7E37k5YV1GxLi3KbQvD1wJ7Zpu6SLgi0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391402; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=AurL0SAZRHpkVWbSIjSJmyFw3W3Or7KduKRq6WmTvNA=; b=L8gFFuKVKZSaMd9D1RxZLXs/+be8P0PZC60v1MUWGv+4J82tEcZzLGMr3dJy7RzDBOLKLjNAs0o3+WTjBGvlZfREKdUiNWjVx5zoF/b0sEE0Ww2SuXE89vRw+ZqGDZy2yAu7lF9uL538OJR6QaICLM+a/pHrR51Ipiszmq0VK/0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589391402761879.8706913566593; Wed, 13 May 2020 10:36:42 -0700 (PDT) Received: from localhost ([::1]:47072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvJB-00038F-3e for importer@patchew.org; Wed, 13 May 2020 13:36:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEt-0004pu-6C for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:15 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:33180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEs-0007nB-7s for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:14 -0400 Received: by mail-wr1-x443.google.com with SMTP id l11so496533wru.0 for ; Wed, 13 May 2020 10:32:13 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id y3sm210170wrm.64.2020.05.13.10.32.07 (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 6DA8E1FF92; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AurL0SAZRHpkVWbSIjSJmyFw3W3Or7KduKRq6WmTvNA=; b=NOSgJ89BSMgdetJsU+IaXENbLCZyAC8NzNSwJDcpivO8AkDsH2Spgd5q6zhAIrTF0f VQloZO6Pq+h7VPfuzZjMRf/55WoM9Cmm6DV6NHEN84c6PC5qBx5K/1itP4bqYycqg1Le wvAjioxDwCbrhraHXdt1yx+Lq60wCRYi2xxP2e0dqb/UUx9A7LDhRt465dTktF4V+KYq 1P1iHSPCJZah1zVh48pbseJuEb5/FMD9HI56mwBMTs+AzmDcR9vI+c63YJ+Bc5Ho5lsc 4vXVvI4KLBbYkEqK7j/eJz3iZGKfmt0QvzTFh9+rPkwcVsCKHGjN8qbyj7xRi0fXyczr kzJw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=AurL0SAZRHpkVWbSIjSJmyFw3W3Or7KduKRq6WmTvNA=; b=o5Yh/OPPR8zeim4p/1T+10clCGU3C6wjDV8hZj9nOgd2M5SkkvRlEXSMPtrW7D2LEC GmvyAiClWVrUTyywVSzmVAm2ZF41HX/SzZ5tw2TpzpJeXD9v6fXRzVtjBjUzb/wtNV7o qlShszes7ztgR7kydUsqhr88LHYXM+vd9ySflwzrn5SbqCrFuhriwzDX4xUwTFGmCGpu HA9JgGtgQpIMP9Bssuq9GMPtTAa9fXQ6wf8DZt2Sxukxkm4cQHBVQE0HRuuJY5B1GgaN gjs179DCWyZjxb/kQekfpHyfgAcAk9FPFeEWNuMbeouJ7FcQIqbDpFuzCd0ggCv3rOt2 Z/jw== X-Gm-Message-State: AOAM533Lob9kNe/Nr8AhrscDe4iWZApYKvnX9uZk42WT21utPxJ6WTtU zP/5CW6HCbv8aQrAXpNoWQrqUQ== X-Google-Smtp-Source: ABdhPJyUHp4evpHBWv8Wc8iM9jFH7MZkmLJDCDtUbVy7y+mQKvoCrFRhgR5+0VKWKpAM9PLlGzD2pg== X-Received: by 2002:a5d:460d:: with SMTP id t13mr469692wrq.280.1589391132861; Wed, 13 May 2020 10:32:12 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 6/8] linux-user: properly "unrealize" vCPU object Date: Wed, 13 May 2020 18:31:58 +0100 Message-Id: <20200513173200.11830-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x443.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: Riku Voipio , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier , Nikolay Igotti Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We shouldn't be messing around with the CPU list in linux-user save for the very special case of do_fork(). When threads end we need to properly follow QOM object lifetime handling and allow the eventual cpu_common_unrealizefn to both remove the CPU and ensure any clean-up actions are taken place, for example calling plugin exit hooks. There is still a race condition to avoid so use the linux-user specific clone_lock instead of the cpu_list_lock to avoid it. Signed-off-by: Alex Benn=C3=A9e Cc: Nikolay Igotti Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- linux-user/syscall.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff0..7f6700c54e3 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -7635,30 +7635,33 @@ static abi_long do_syscall1(void *cpu_env, int num,= abi_long arg1, return -TARGET_ERESTARTSYS; } =20 - cpu_list_lock(); + pthread_mutex_lock(&clone_lock); =20 if (CPU_NEXT(first_cpu)) { - TaskState *ts; + TaskState *ts =3D cpu->opaque; =20 - /* Remove the CPU from the list. */ - QTAILQ_REMOVE_RCU(&cpus, cpu, node); + object_property_set_bool(OBJECT(cpu), false, "realized", NULL); + object_unref(OBJECT(cpu)); + /* + * At this point the CPU should be unrealized and removed + * from cpu lists. We can clean-up the rest of the thread + * data without the lock held. + */ =20 - cpu_list_unlock(); + pthread_mutex_unlock(&clone_lock); =20 - ts =3D cpu->opaque; if (ts->child_tidptr) { put_user_u32(0, ts->child_tidptr); do_sys_futex(g2h(ts->child_tidptr), FUTEX_WAKE, INT_MAX, NULL, NULL, 0); } thread_cpu =3D NULL; - object_unref(OBJECT(cpu)); g_free(ts); rcu_unregister_thread(); pthread_exit(NULL); } =20 - cpu_list_unlock(); + pthread_mutex_unlock(&clone_lock); preexit_cleanup(cpu_env, arg1); _exit(arg1); return 0; /* avoid warning */ --=20 2.20.1 From nobody Fri May 3 23:45:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391208; cv=none; d=zohomail.com; s=zohoarc; b=GN+GzXP6xzg8mKdAnZtKVIga/9LcB5oJrqcxv/XxPl6giIXqwHf4JVjxXkC3jArrpONRHvptk9bZbR0ONUeWkPjv+mkY9I8jGwXsyb+7Jliu363vxh7eKHEVOlItZyH407EKOzqccBYzfQJsDlgdu5ZLxoqdVBu6jMyPw69/3Is= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391208; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U+wDRXFAS4OV7UFOFmLqxoBwV2cM218whk06u8SrwM0=; b=O3saIqjy20KfWWZs5ZQhdxPlLWJRTqaZ/QsHokQfiSTw75l5+6z8BnWwUmG2oRQ95fGN3uEV27lRK0ZuQqMZG07EQG+Y5HUqzv+mjqbSI6WspqcrDaAr4lEQbbIt3le/fpRlFL5C7iZLGBIgBIpfjR7atIh62qPeCKtSRRErtkE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158939120867286.88201277334281; Wed, 13 May 2020 10:33:28 -0700 (PDT) Received: from localhost ([::1]:36086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvG2-0006ZM-7p for importer@patchew.org; Wed, 13 May 2020 13:33:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEr-0004lH-3j for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:13 -0400 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]:33691) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEq-0007mO-5w for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:12 -0400 Received: by mail-wm1-x329.google.com with SMTP id d207so9442810wmd.0 for ; Wed, 13 May 2020 10:32:11 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id u12sm38461466wmu.25.2020.05.13.10.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:32:08 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 84FF01FF93; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U+wDRXFAS4OV7UFOFmLqxoBwV2cM218whk06u8SrwM0=; b=RHdpc28E4Tt6y22isUBMIn8q5whMNRVJj6Py0aVZ5o5Ebhh7Md+Y/fn18RcdZNk9bz ur/kzq1cGMyz/7gBQ8qQxRK3Ib0FtwlO7ru9+eW+Oj6tqOE16BmFziwo2tEFt7N+iprZ Q+TV3Z4lxeYvnhlLT8Slrir3hGuNfnlDdCwATV9VQvMrOppoMOgxRP9LOKxghTsru2Ec eO4T9D2gw7aOpvKf3ekL4kjsGuHQPAy9KPV5U1QyClvhaUYSqVVFd21TtooOsHNVeYWG Rc26eiezzzpZvBf0rhPMDlUwRRm/JvrRzt9s1D0uvvnLu1wLGwPeqruqOAO0zsrO7pmZ Jv8A== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=U+wDRXFAS4OV7UFOFmLqxoBwV2cM218whk06u8SrwM0=; b=AF3+ebRCeX34NH4NmvoTYIpczQ5Vixkb8NylSUXfJG5W+N2rN1ZbEeHoNdTatmh9OW /zFDGH8Va9ClZlGrC2afVPSEddkvPE5yWejIlG57P9EeiewvRhjCuvPzJb75Jnweug1W LeP3FSBlDhJ4BFPUNLPDyiVWS5SME1/7P2I9Rook8JYloNjPPUZ6fgi8gwTabPGu+vyy BzvoiNekfAlKFkQzetTVEw4vD9xx0entCqviYSRBoTV9F2UHm4SDhS187k8j61UosY2y Bq/ypjfMaC/5ab+ZMfIYnrlElxb2pyC765YAKAh8qF/cR1vIbvw/Q6oH0ABh5yrC3+Ie EmFQ== X-Gm-Message-State: AOAM5320PJeSx+q9d0+4jdjQpAD5xozOIMuTXS29dsp2O+WjKE5BNtHh hHWe8IHzxaHEPECkYQdtpZ+GOg== X-Google-Smtp-Source: ABdhPJxX7DpYIxzJwPvhQ257/5aMtJTBX2i+msvs9knfpynhetWEVamRCfg6VcZcI9X34AN6AONGbA== X-Received: by 2002:a05:600c:206:: with SMTP id 6mr9916787wmi.170.1589391130775; Wed, 13 May 2020 10:32:10 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 7/8] tests/tcg: add new threadcount test Date: Wed, 13 May 2020 18:31:59 +0100 Message-Id: <20200513173200.11830-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.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=20Benn=C3=A9e?= , Nikolay Igotti Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Based on the original testcase by Nikolay Igotti. Message-ID: Cc: Nikolay Igotti [Nikolay can we have your signed of by to add the testcase?] Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- tests/tcg/multiarch/threadcount.c | 62 +++++++++++++++++++++++++++++ tests/tcg/multiarch/Makefile.target | 2 + 2 files changed, 64 insertions(+) create mode 100644 tests/tcg/multiarch/threadcount.c diff --git a/tests/tcg/multiarch/threadcount.c b/tests/tcg/multiarch/thread= count.c new file mode 100644 index 00000000000..546dd90eeb2 --- /dev/null +++ b/tests/tcg/multiarch/threadcount.c @@ -0,0 +1,62 @@ +/* + * Thread Exerciser + * + * Unlike testthread which is mainly concerned about testing thread + * semantics this test is used to exercise the thread creation and + * accounting. A version of this test found a problem with clashing + * cpu_indexes which caused a break in plugin handling. + * + * Based on the original test case by Nikolay Igotti. + * + * Copyright (c) 2020 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include +#include +#include + +int max_threads =3D 10; + +typedef struct { + int delay; +} ThreadArg; + +static void *thread_fn(void* varg) { + ThreadArg* arg =3D varg; + usleep(arg->delay); + free(arg); + return NULL; +} + +int main(int argc, char **argv) { + int i; + pthread_t *threads; + + if (argc > 1) { + max_threads =3D atoi(argv[1]); + } + threads =3D calloc(sizeof(pthread_t), max_threads); + + for (i =3D 0; i < max_threads; i++) { + ThreadArg* arg =3D calloc(sizeof(ThreadArg), 1); + arg->delay =3D i * 100; + pthread_create(threads + i, NULL, thread_fn, arg); + } + + printf("Created %d threads\n", max_threads); + + /* sleep until roughly half the threads have "finished" */ + usleep(max_threads * 50); + + for (i =3D 0; i < max_threads; i++) { + pthread_join(threads[i], NULL); + } + + printf("Done\n"); + + return 0; +} diff --git a/tests/tcg/multiarch/Makefile.target b/tests/tcg/multiarch/Make= file.target index 51fb75ecfdd..cb49cc9ccb2 100644 --- a/tests/tcg/multiarch/Makefile.target +++ b/tests/tcg/multiarch/Makefile.target @@ -28,6 +28,8 @@ run-float_%: float_% =20 testthread: LDFLAGS+=3D-lpthread =20 +threadcount: LDFLAGS+=3D-lpthread + # We define the runner for test-mmap after the individual # architectures have defined their supported pages sizes. If no # additional page sizes are defined we only run the default test. --=20 2.20.1 From nobody Fri May 3 23:45:53 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589391407; cv=none; d=zohomail.com; s=zohoarc; b=f6DO4C6STTGN2Dxznpw7zKO+EIuusOWNxJTDcBgs4+TqGxZdqPXgYkTzJoRPudVn5XO+/CgOMw5C6t3381G2MdzFmdY3uI4T0BogcD4hK4lQGVbHwoCpwwnHXmW65oL4B3Y67A2qlBhth3975G/XOLKl/pw4gqzBQOx5fJoe5Po= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589391407; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qrjRWWkfvfrzIarb2T2Snq5Ul6a8M/IZ5P4/vErDudE=; b=RL1dQSisizhsRBcEtiST/EuXwvMv13Op9SDEW0nE/H5VY0JQC2O64u/vTpCphHsJKNgJeu1tMy9Ljp6ambcePtWA+/oqgvy12WtTvFnKhV1lamPAhzHwi+rvdhbo7yl8hT58lXlSy6JQFMIInPh/4LmrjoV0+zDMzJjQ4LtshyQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15893914070998.437456405503895; Wed, 13 May 2020 10:36:47 -0700 (PDT) Received: from localhost ([::1]:47344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYvJF-0003JG-Jz for importer@patchew.org; Wed, 13 May 2020 13:36:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYvEz-00054H-84 for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:21 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:40594) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYvEx-0007oU-Kq for qemu-devel@nongnu.org; Wed, 13 May 2020 13:32:20 -0400 Received: by mail-wm1-x331.google.com with SMTP id u16so29456450wmc.5 for ; Wed, 13 May 2020 10:32:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 1sm37544937wmi.0.2020.05.13.10.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2020 10:32:16 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 9F04B1FF96; Wed, 13 May 2020 18:32:01 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qrjRWWkfvfrzIarb2T2Snq5Ul6a8M/IZ5P4/vErDudE=; b=iIg+pXvH64/b6g0op07SrkLfEluWAaLsSaclTIYgy+XKUDScoHaDCAAVcLMcBWVnST m51d63dN8zdv9qAx31OeB+cosfnxXD39U4W9kh5EED3UF3POprhDXBiL/K2wUNm/cwtt 1fhTjy+t2c4VahiTxqQFey0gPyo0RNzbP8zEnECI6w9Zerx8lkS7E+166iNWryPncy+C 5cOPnDDnrCSCrjUCKRdwidznxYNzL0EsGJZOUuZLT9xCDjlcvLR+2pllpk+iHehaFxWi pJBwi8DkaHYQzXAB7HjTQkYyzWjQUqNw8ZEgW/dAWHpsmzM4q0iKstwk3bZBz1ncaSz2 72cw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=qrjRWWkfvfrzIarb2T2Snq5Ul6a8M/IZ5P4/vErDudE=; b=BMtnD3GMFBIjDPz5egCP/omhrp0/BevABRRVdNyTVa8+yKRl/b9yLVwr700CdE2OLz na9LL8mqwgfi8gENmNMSWfwt686NqKQIcY/9FvNaTQd9jBuQsQf6QOL2D2O4p79xFnFu IxGRHg2A9lOZW+en9B61pQr8fBMK91xRxJ56b/RAJ77ZarXUqtwOA6E7z98V9VUA9vII XAc41rmL2hejQ0ttsLse4Usp3opR5rzTRIb+jDM0EufOTD58qn50giktEKyTSHDawr3d kl22ASDHecARfWf+4OWZ160hrvCjufCisL6nvmo5xbzE7y64kqXbI/jSAWB0jbEuNEyi DpXQ== X-Gm-Message-State: AOAM532f7zMCTaJqs3TFB/ldRjyCEERQigBJJhNxsBisHkoJ/gc3g1RA q11epBsp/QaaOl/of6+OT6bjVoSjwqY= X-Google-Smtp-Source: ABdhPJylWXRXYEg1N0mUEM9D0EkCb+IEL3ieTuKu6uEXvT40ieRdJ6ak/I+sMm1JacepSRrP0SLfSg== X-Received: by 2002:a7b:c385:: with SMTP id s5mr9698483wmj.189.1589391138051; Wed, 13 May 2020 10:32:18 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 8/8] plugins: new lockstep plugin for debugging TCG changes Date: Wed, 13 May 2020 18:32:00 +0100 Message-Id: <20200513173200.11830-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200513173200.11830-1-alex.bennee@linaro.org> References: <20200513173200.11830-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x331.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: Richard Henderson , Mark Cave-Ayland , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) When we make changes to the TCG we sometimes cause regressions that are deep into the execution cycle of the guest. Debugging this often requires comparing large volumes of trace information to figure out where behaviour has diverged. The lockstep plugin utilises a shared socket so two QEMU's running with the plugin will write their current execution position and wait to receive the position of their partner process. When execution diverges the plugins output where they were and the previous few blocks before unloading themselves and letting execution continue. Originally I planned for this to be most useful with -icount but it turns out you can get divergence pretty quickly due to asynchronous qemu_cpu_kick_rr_cpus() events causing one side to eventually run into a short block a few cycles before the other side. For this reason I've added a bit of tracking and I think the divergence reporting could be finessed to report only if we really start to diverge in execution. An example run would be: qemu-system-sparc -monitor none -parallel none -net none \ -M SS-20 -m 256 -kernel day11/zImage.elf \ -plugin ./tests/plugin/liblockstep.so,arg=3Dlockstep-sparc.sock \ -d plugin,nochain with an identical command in another window in the same working directory. Signed-off-by: Alex Benn=C3=A9e Cc: Richard Henderson Cc: Mark Cave-Ayland Message-Id: <20200429200754.18327-1-alex.bennee@linaro.org> Reviewed-by: Emilio G. Cota --- v3 - added verbose flag - basic heuristics to detect "real" divergence --- tests/plugin/lockstep.c | 345 ++++++++++++++++++++++++++++++++++++++ tests/plugin/Makefile | 1 + tests/tcg/Makefile.target | 2 +- 3 files changed, 347 insertions(+), 1 deletion(-) create mode 100644 tests/plugin/lockstep.c diff --git a/tests/plugin/lockstep.c b/tests/plugin/lockstep.c new file mode 100644 index 00000000000..4d1a5c3264e --- /dev/null +++ b/tests/plugin/lockstep.c @@ -0,0 +1,345 @@ +/* + * Lockstep Execution Plugin + * + * Allows you to execute two QEMU instances in lockstep and report + * when their execution diverges. This is mainly useful for developers + * who want to see where a change to TCG code generation has + * introduced a subtle and hard to find bug. + * + * Caveats: + * - single-threaded linux-user apps only with non-deterministic syscalls + * - no MTTCG enabled system emulation (icount may help) + * + * While icount makes things more deterministic it doesn't mean a + * particular run may execute the exact same sequence of blocks. An + * asynchronous event (for example X11 graphics update) may cause a + * block to end early and a new partial block to start. This means + * serial only test cases are a better bet. -d nochain may also help. + * + * This code is not thread safe! + * + * Copyright (c) 2020 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; + +/* saved so we can uninstall later */ +static qemu_plugin_id_t our_id; + +static unsigned long bb_count; +static unsigned long insn_count; + +/* Information about a translated block */ +typedef struct { + uint64_t pc; + uint64_t insns; +} BlockInfo; + +/* Information about an execution state in the log */ +typedef struct { + BlockInfo *block; + unsigned long insn_count; + unsigned long block_count; +} ExecInfo; + +/* The execution state we compare */ +typedef struct { + uint64_t pc; + unsigned long insn_count; +} ExecState; + +typedef struct { + GSList *log_pos; + int distance; +} DivergeState; + +/* list of translated block info */ +static GSList *blocks; + +/* execution log and points of divergence */ +static GSList *log, *divergence_log; + +static int socket_fd; +static char *path_to_unlink; + +static bool verbose; + +static void plugin_cleanup(qemu_plugin_id_t id) +{ + /* Free our block data */ + g_slist_free_full(blocks, &g_free); + g_slist_free_full(log, &g_free); + g_slist_free(divergence_log); + + close(socket_fd); + if (path_to_unlink) { + unlink(path_to_unlink); + } +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + g_autoptr(GString) out =3D g_string_new("No divergence :-)\n"); + g_string_append_printf(out, "Executed %ld/%d blocks\n", + bb_count, g_slist_length(log)); + g_string_append_printf(out, "Executed ~%ld instructions\n", insn_count= ); + qemu_plugin_outs(out->str); + + plugin_cleanup(id); +} + +static inline const char * ord_ind(int n) { + return n > 3 ? "th" : + n =3D=3D 3 ? "rd" : + n =3D=3D 2 ? "nd" : "st"; +} + +static void report_divergance(ExecState *us, ExecState *them) +{ + DivergeState divrec =3D { log, 0 }; + g_autoptr(GString) out =3D g_string_new(""); + bool diverged =3D false; + + /* + * If we have diverged before did we get back on track or are we + * totally loosing it? + */ + if (divergence_log) { + DivergeState *last =3D (DivergeState *) divergence_log->data; + GSList *entry; + + for (entry =3D log; g_slist_next(entry); entry =3D g_slist_next(en= try)) { + if (entry =3D=3D last->log_pos) { + break; + } + divrec.distance++; + } + + /* + * If the last two records are so close it is likely we will + * not recover synchronisation with the other end. + */ + if (divrec.distance =3D=3D 1 && last->distance =3D=3D 1) { + diverged =3D true; + } + } + divergence_log =3D g_slist_prepend(divergence_log, + g_memdup(&divrec, sizeof(divrec))); + + /* Output short log entry of going out of sync... */ + if (verbose || divrec.distance =3D=3D 1 || diverged) { + g_string_printf(out, "@ %#016lx vs %#016lx (%d/%d since last)\n", + us->pc, them->pc, g_slist_length(divergence_log), + divrec.distance); + qemu_plugin_outs(out->str); + } + + if (diverged) { + int i; + GSList *entry; + + g_string_printf(out, "=CE=94 insn_count @ %#016lx (%ld) vs %#016lx= (%ld)\n", + us->pc, us->insn_count, them->pc, them->insn_count= ); + + for (entry =3D log, i =3D 0; + g_slist_next(entry) && i < 5; + entry =3D g_slist_next(entry), i++) { + ExecInfo *prev =3D (ExecInfo *) entry->data; + g_string_append_printf(out, " previously @ %#016lx/%ld (%ld i= nsns)\n", + prev->block->pc, prev->block->insns, + prev->insn_count); + } + qemu_plugin_outs(out->str); + qemu_plugin_outs("too much divergence... giving up."); + qemu_plugin_uninstall(our_id, plugin_cleanup); + } +} + +static void vcpu_tb_exec(unsigned int cpu_index, void *udata) +{ + BlockInfo *bi =3D (BlockInfo *) udata; + ExecState us, them; + ssize_t bytes; + ExecInfo *exec; + + us.pc =3D bi->pc; + us.insn_count =3D insn_count; + + /* + * Write our current position to the other end. If we fail the + * other end has probably died and we should shut down gracefully. + */ + bytes =3D write(socket_fd, &us, sizeof(ExecState)); + if (bytes < sizeof(ExecState)) { + qemu_plugin_outs(bytes < 0 ? + "problem writing to socket" : + "wrote less than expected to socket"); + qemu_plugin_uninstall(our_id, plugin_cleanup); + return; + } + + /* + * Now read where our peer has reached. Again a failure probably + * indicates the other end died and we should close down cleanly. + */ + bytes =3D read(socket_fd, &them, sizeof(ExecState)); + if (bytes < sizeof(ExecState)) { + qemu_plugin_outs(bytes < 0 ? + "problem reading from socket" : + "read less than expected"); + qemu_plugin_uninstall(our_id, plugin_cleanup); + return; + } + + /* + * Compare and report if we have diverged. + */ + if (us.pc !=3D them.pc) { + report_divergance(&us, &them); + } + + /* + * Assume this block will execute fully and record it + * in the execution log. + */ + insn_count +=3D bi->insns; + bb_count++; + exec =3D g_new0(ExecInfo, 1); + exec->block =3D bi; + exec->insn_count =3D insn_count; + exec->block_count =3D bb_count; + log =3D g_slist_prepend(log, exec); +} + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ + BlockInfo *bi =3D g_new0(BlockInfo, 1); + bi->pc =3D qemu_plugin_tb_vaddr(tb); + bi->insns =3D qemu_plugin_tb_n_insns(tb); + + // save a reference so we can free later + blocks =3D g_slist_prepend(blocks, bi); + qemu_plugin_register_vcpu_tb_exec_cb(tb, vcpu_tb_exec, + QEMU_PLUGIN_CB_NO_REGS, (void *)b= i); +} + + +/* + * Instead of encoding master/slave status into what is essentially + * two peers we shall just take the simple approach of checking for + * the existence of the pipe and assuming if it's not there we are the + * first process. + */ +static bool setup_socket(const char *path) +{ + struct sockaddr_un sockaddr; + int fd; + + fd =3D socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + perror("create socket"); + return false; + } + + sockaddr.sun_family =3D AF_UNIX; + g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + if (bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { + perror("bind socket"); + close(fd); + return false; + } + + /* remember to clean-up */ + path_to_unlink =3D g_strdup(path); + + if (listen(fd, 1) < 0) { + perror("listen socket"); + close(fd); + return false; + } + + socket_fd =3D accept(fd, NULL, NULL); + if (socket_fd < 0 && errno !=3D EINTR) { + perror("accept socket"); + return false; + } + + qemu_plugin_outs("setup_socket::ready\n"); + + return true; +} + +static bool connect_socket(const char *path) +{ + int fd; + struct sockaddr_un sockaddr; + + fd =3D socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + perror("create socket"); + return false; + } + + sockaddr.sun_family =3D AF_UNIX; + g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + + if (connect(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { + perror("failed to connect"); + return false; + } + + qemu_plugin_outs("connect_socket::ready\n"); + + socket_fd =3D fd; + return true; +} + +static bool setup_unix_socket(const char *path) +{ + if (g_file_test(path, G_FILE_TEST_EXISTS)) { + return connect_socket(path); + } else { + return setup_socket(path); + } +} + + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv) +{ + int i; + + if (!argc || !argv[0]) { + qemu_plugin_outs("Need a socket path to talk to other instance."); + return -1; + } + + for (i =3D 0; i < argc; i++) { + char *p =3D argv[i]; + if (strcmp(p, "verbose") =3D=3D 0) { + verbose =3D true; + } else if (!setup_unix_socket(argv[0])) { + qemu_plugin_outs("Failed to setup socket for communications."); + return -1; + } + } + + our_id =3D id; + + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + return 0; +} diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index 75467b6db85..b3250e2504c 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -13,6 +13,7 @@ NAMES +=3D mem NAMES +=3D hotblocks NAMES +=3D howvec NAMES +=3D hotpages +NAMES +=3D lockstep =20 SONAMES :=3D $(addsuffix .so,$(addprefix lib,$(NAMES))) =20 diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index b3cff3cad1a..075daf3d22d 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -128,7 +128,7 @@ RUN_TESTS=3D$(patsubst %,run-%, $(TESTS)) ifeq ($(CONFIG_PLUGIN),y) PLUGIN_DIR=3D../../plugin VPATH+=3D$(PLUGIN_DIR) -PLUGINS=3D$(notdir $(wildcard $(PLUGIN_DIR)/*.so)) +PLUGINS=3D$(filter-out liblockstep.so,$(notdir $(wildcard $(PLUGIN_DIR)/*.= so))) =20 # We need to ensure expand the run-plugin-TEST-with-PLUGIN # pre-requistes manually here as we can't use stems to handle it. We --=20 2.20.1