From nobody Mon Nov 23 05:00:26 2026 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp ARC-Seal: i=1; a=rsa-sha256; t=1791364799; cv=none; d=zohomail.com; s=zohoarc; b=mLPWhQX7rCTL+gc0dRIYrpviNjemn+vquqQKJDZ7FnJfB83tsPTzDhN5Tm7kqadWpqpeWgNDCUAIXK8US10BAZ+J40W9AqvbdNaHlmWhfpm7/gABuylL5cDa962MDp/6uo5ybzQKHcGW1T0QFz9Q4T5oM4ms341DbpZSvjR/G/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1791364799; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2HUno62HsZaaCcmIrBgQRoldQXNh1TnWD02j631o4yM=; b=XPHOSLfsZA6LNkzPqWWsCNNPVKJp48e7uBR2ECbecNsJsBQSCRgW11226ZpMFiVLZ1fkyabBXiBkNsgHsjsLUKb6ROyYwUJIojEKUt5ZaMVPH26qsLWFByyBUvbYAJRM4ez1ODgnaJWYv3HWxXw40Rd2I1ZUIfyEscAvKXVpRD8= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1791364798566856.3438421175737; Wed, 7 Oct 2026 02:19:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xENYY-0002gP-KA; Wed, 07 Oct 2026 05:03:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xEKjZ-0001oH-Vz for qemu-devel@nongnu.org; Wed, 07 Oct 2026 02:02:51 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xEKjR-0001Rv-KQ for qemu-devel@nongnu.org; Wed, 07 Oct 2026 02:02:33 -0400 Received: from h183.csg.ci.i.u-tokyo.ac.jp (h183.csg.ci.i.u-tokyo.ac.jp [133.11.54.183]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 69761tqM048409 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Oct 2026 15:02:01 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=2HUno62HsZaaCcmIrBgQRoldQXNh1TnWD02j631o4yM=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1791352921; v=1; b=EN1l7ZWCoRLGF3c9qF4fBOYZbil7ixKdlv5Z+fgxLx06QF9ET/Wi9hUXyXyg5+Co o8UQaWZZRYtpeO60Gd3+sNllC9aOBLB4fSOtqBK8dsY9jZ4jHhQa4A8Zg4A3c3pa /XGcO+PCXbtVVUYkruDg4SJO1Y3zHo/9f/Q+yr57kGC8ak6jTd/lm2GLgw9BUP/K IWpJnHgrm8F0bIM/GOdT+dI/sjQMlrwXDUJ9sJLya/onO4hOnpCSKI+Wzd94orch Ek0xG6WFJ32Qj4dug63M5IJ2h1r34DVYBnA65HL77ZbvTDYVP8f3SievQMArsS47 juSfEktmkPT+0mgkGo9Dqw== From: Akihiko Odaki Date: Wed, 07 Oct 2026 15:01:49 +0900 Subject: [PATCH 1/2] contrib/plugins/bbv.c: Reject invalid intervals MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261007-bbv-v1-1-a2f521a68fdf@rsg.ci.i.u-tokyo.ac.jp> References: <20261007-bbv-v1-0-a2f521a68fdf@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20261007-bbv-v1-0-a2f521a68fdf@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Alexandre Iooss , Akihiko Odaki X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=1695; i=odaki@rsg.ci.i.u-tokyo.ac.jp; h=from:subject:message-id; bh=jHFs87XFImrn8wvBb3y27oUMigJjUsGayPlhwXLyz0E=; b=owGbwMvMwCWmMbc20y1CyJDxtFoSQ9bRB4FcD84aaHWpPbCu+7ghjK14vuyMhyxJCn/vrXrCq e17sy+ho5SFQYyLQVZMkSWlaDe3RnTtp8KE+BaYOaxMIEMYuDgFYCJVygx/hZ7qb1zppmFl8/Bz ZsnyGNmAWVY3ZqjMOOWnlyBaVrVoJyPDmTdsugZNsxgk/t+cqRd1rLLu0pwVy9Nv3+3WzjuvOP8 0BwA= X-Developer-Key: i=odaki@rsg.ci.i.u-tokyo.ac.jp; a=openpgp; fpr=AEDC03C9AF734F2EC26A7BFFA4BAEAA73536753C 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=lists1p.gnu.org; Received-SPF: pass client-ip=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @rsg.ci.i.u-tokyo.ac.jp) X-ZM-MESSAGEID: 1791364801619158500 g_ascii_strtoull() accepts a leading minus sign, and returns the negation of the parsed number. It also accepts zero. Reject those non-positive values since their semantics is unclear. Also reject interval values with trailing non-digit characters, such as interval=3D8a. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- contrib/plugins/bbv.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index 0e6ec673d972..e5caf5d9543b 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -26,7 +26,7 @@ static GHashTable *bbs; static GRWLock bbs_lock; static char *filename; static struct qemu_plugin_scoreboard *vcpus; -static uint64_t interval =3D 100000000; +static int64_t interval =3D 100000000; =20 static void plugin_exit(void *p) { @@ -138,7 +138,16 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin= _id_t id, char *opt =3D argv[i]; g_auto(GStrv) tokens =3D g_strsplit(opt, "=3D", 2); if (g_strcmp0(tokens[0], "interval") =3D=3D 0) { - interval =3D g_ascii_strtoull(tokens[1], NULL, 10); + char *endptr; + interval =3D g_ascii_strtoll(tokens[1], &endptr, 10); + if (*endptr) { + fprintf(stderr, "malformed integer: %s\n", opt); + return -1; + } + if (interval <=3D 0) { + fprintf(stderr, "unexpected non-positive value: %s\n", opt= ); + return -1; + } } else if (g_strcmp0(tokens[0], "outfile") =3D=3D 0) { filename =3D tokens[1]; tokens[1] =3D NULL; --=20 2.55.0 From nobody Mon Nov 23 05:00:26 2026 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=reject dis=none) header.from=rsg.ci.i.u-tokyo.ac.jp ARC-Seal: i=1; a=rsa-sha256; t=1791364478; cv=none; d=zohomail.com; s=zohoarc; b=J35q83AWo/HMf2ru4lvC4coF0vIsmlUkCjQ6iTp+zLhZXXWmG74khOHdgKhELj6SftbdlxJz6YO4rfVazGLt8yy3I4SUVt4OD41HfOnQODqEg4pQsdZYi+mWgNO70e4jxKGAKzOJLTxIk4e0U7xhd4nhEvjH6As03hEn0jdzInc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1791364478; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5MEWzOOuMtn+OMFz8oEyKXejR5oSiAq2XWujcAxsJPs=; b=brP3dtAiMLbl5lZcgKTBskBcexrd7lY/OXq2Era2DCE5RORqlf4pdv/NrgqbghVid+wx0qLmY7PTecwG/rZKUApl2W6zBpzwf3BXncIYn69v8hA8bE/mJvax46Ke5sxqgfdzakcc4GjQcT2lHWUMwhmdW2PKGJblHGD8Fd8PTOs= 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=reject dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1791364477977242.50591402198654; Wed, 7 Oct 2026 02:14:37 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xENXB-0000s7-E2; Wed, 07 Oct 2026 05:02:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xEKja-0001oK-CZ for qemu-devel@nongnu.org; Wed, 07 Oct 2026 02:02:53 -0400 Received: from www3579.sakura.ne.jp ([49.212.243.89]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xEKjR-0001Rx-KP for qemu-devel@nongnu.org; Wed, 07 Oct 2026 02:02:34 -0400 Received: from h183.csg.ci.i.u-tokyo.ac.jp (h183.csg.ci.i.u-tokyo.ac.jp [133.11.54.183]) (authenticated bits=0) by www3579.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 69761tqN048409 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 7 Oct 2026 15:02:01 +0900 (JST) (envelope-from odaki@rsg.ci.i.u-tokyo.ac.jp) DKIM-Signature: a=rsa-sha256; bh=5MEWzOOuMtn+OMFz8oEyKXejR5oSiAq2XWujcAxsJPs=; c=relaxed/relaxed; d=rsg.ci.i.u-tokyo.ac.jp; h=From:Message-Id:To:Subject:Date; s=rs20250326; t=1791352921; v=1; b=U42mutAftcCqxgAsAEmQRZjZPyDDyTTLSx1AtdmEmA1U7B1lVxbOd0WPwEzWIm1x vJWpJXtUegKvls5nYIowmCjJd3dDhwXy5DRhHG3oxUtF9Y8PpUFC446Dz5U2gESl 4jnyqq8yBpcpBDtis5+KuJ9I0K2fZ7czlcev4um4Uf7PfPonYXebVpOfncBeZsYv THGA3aJ1WD9tmJRvRzMCZsVA0c3MbofkHUaL5uJ8GtGDy8vjPrqR5shHV+jWw4Ul 85zotzzi8vw7K2l52ooKs4xlPMCsUF7dpbudQ/J55rVV0Ts1mYfXofDfGuzEiBh+ qUtkOZW7/93Cf24XfaYVig== From: Akihiko Odaki Date: Wed, 07 Oct 2026 15:01:50 +0900 Subject: [PATCH 2/2] contrib/plugins/bbv.c: Allow selecting ROI MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261007-bbv-v1-2-a2f521a68fdf@rsg.ci.i.u-tokyo.ac.jp> References: <20261007-bbv-v1-0-a2f521a68fdf@rsg.ci.i.u-tokyo.ac.jp> In-Reply-To: <20261007-bbv-v1-0-a2f521a68fdf@rsg.ci.i.u-tokyo.ac.jp> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Pierrick Bouvier , Alexandre Iooss , Akihiko Odaki X-Mailer: b4 0.17-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=6184; i=odaki@rsg.ci.i.u-tokyo.ac.jp; h=from:subject:message-id; bh=Uvk/okHOzcmHgoHxIDVfwHfx+rj2ZYS4xjwGNTIJ8b4=; b=owGbwMvMwCWmMbc20y1CyJDxtFoSQ9bRB0GptS+rjac86ZU/cqSE8dduyy13NglrWT7kOHdJf QrHs45/HaUsDGJcDLJiiiwpRbu5NaJrPxUmxLfAzGFlAhnCwMUpABNhvszIcFP9xRLJdXfvn2CI 8u5z/ODi94vHtzJIkZvr3uGs4q0XPBn+2e1wfPzoTeWnl/wHZglY/A5osyzg/dUr+NSocj3He5Z wVgA= X-Developer-Key: i=odaki@rsg.ci.i.u-tokyo.ac.jp; a=openpgp; fpr=AEDC03C9AF734F2EC26A7BFFA4BAEAA73536753C 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=lists1p.gnu.org; Received-SPF: pass client-ip=49.212.243.89; envelope-from=odaki@rsg.ci.i.u-tokyo.ac.jp; helo=www3579.sakura.ne.jp X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @rsg.ci.i.u-tokyo.ac.jp) X-ZM-MESSAGEID: 1791364479408158500 A region of interest (ROI) often excludes the program startup and exit. For example, a benchmark may parse a large input and then run a computation kernel and the former may take longer than the latter; basic block vectors generated for the whole execution will not properly represent the latter. Add options to specify the beginning and the end of the ROI to bound basic block vector generation to the ROI. Signed-off-by: Akihiko Odaki --- docs/about/emulation.rst | 8 +++++ contrib/plugins/bbv.c | 80 ++++++++++++++++++++++++++++++++++++++++++++= ++-- 2 files changed, 86 insertions(+), 2 deletions(-) diff --git a/docs/about/emulation.rst b/docs/about/emulation.rst index c58149086cdd..0566171b517b 100644 --- a/docs/about/emulation.rst +++ b/docs/about/emulation.rst @@ -284,6 +284,14 @@ The bbv plugin allows you to generate basic block vect= ors for use with the =20 * - Option - Description + * - begin=3DA + - The virtual address of the instruction that starts basic block vector + generation. Generation starts from the beginning of the execution if + not specified. + * - end=3DA + - The virtual address of the instruction that ends basic block vector + generation. Generation continues until the endo of the execution if + not specified. * - interval=3DN - The interval to generate a basic block vector specified by the numbe= r of instructions (Default: N =3D 100000000) diff --git a/contrib/plugins/bbv.c b/contrib/plugins/bbv.c index e5caf5d9543b..a2a779f7639e 100644 --- a/contrib/plugins/bbv.c +++ b/contrib/plugins/bbv.c @@ -5,6 +5,8 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ =20 +#include +#include #include #include =20 @@ -26,6 +28,10 @@ static GHashTable *bbs; static GRWLock bbs_lock; static char *filename; static struct qemu_plugin_scoreboard *vcpus; +static bool begin_present; +static uint64_t begin; +static bool end_present; +static uint64_t end; static int64_t interval =3D 100000000; =20 static void plugin_exit(void *p) @@ -66,6 +72,7 @@ static void vcpu_init(unsigned int vcpu_index, void *user= data) Vcpu *vcpu =3D qemu_plugin_scoreboard_find(vcpus, vcpu_index); =20 vcpu_filename =3D g_strdup_printf("%s.%u.bb", filename, vcpu_index); + vcpu->count =3D begin_present ? INT64_MIN : -interval; vcpu->file =3D fopen(vcpu_filename, "w"); } =20 @@ -102,6 +109,22 @@ static void vcpu_interval_exec(unsigned int vcpu_index= , void *udata) fputc('\n', vcpu->file); } =20 +static void vcpu_begin_insn_exec(unsigned int vcpu_index, void *userdata) +{ + GHashTableIter iter; + void *value; + + g_rw_lock_reader_lock(&bbs_lock); + g_hash_table_iter_init(&iter, bbs); + + while (g_hash_table_iter_next(&iter, NULL, &value)) { + qemu_plugin_u64_set(bb_count_u64(value), vcpu_index, 0); + } + + g_rw_lock_reader_unlock(&bbs_lock); + qemu_plugin_u64_set(count_u64(), vcpu_index, -interval); +} + static void vcpu_tb_trans(struct qemu_plugin_tb *tb, void *userdata) { uint64_t n_insns =3D qemu_plugin_tb_n_insns(tb); @@ -119,6 +142,19 @@ static void vcpu_tb_trans(struct qemu_plugin_tb *tb, v= oid *userdata) } g_rw_lock_writer_unlock(&bbs_lock); =20 + for (size_t idx =3D 0; idx < n_insns; idx++) { + struct qemu_plugin_insn *insn =3D qemu_plugin_tb_get_insn(tb, idx); + uint64_t insn_vaddr =3D qemu_plugin_insn_vaddr(insn); + + if (begin_present && insn_vaddr =3D=3D begin) { + qemu_plugin_register_vcpu_insn_exec_cb( + insn, vcpu_begin_insn_exec, QEMU_PLUGIN_CB_NO_REGS, NULL); + } else if (end_present && insn_vaddr =3D=3D end) { + qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu( + insn, QEMU_PLUGIN_INLINE_STORE_U64, count_u64(), INT64_MIN= ); + } + } + qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu( tb, QEMU_PLUGIN_INLINE_ADD_U64, count_u64(), n_insns); =20 @@ -127,7 +163,32 @@ static void vcpu_tb_trans(struct qemu_plugin_tb *tb, v= oid *userdata) =20 qemu_plugin_register_vcpu_tb_exec_cond_cb( tb, vcpu_interval_exec, QEMU_PLUGIN_CB_NO_REGS, - QEMU_PLUGIN_COND_GE, count_u64(), interval, NULL); + QEMU_PLUGIN_COND_LT, count_u64(), INT64_MIN, NULL); +} + +static bool parse_vaddr(uint64_t *vaddr, const char *opt, const char *toke= n) +{ + char *endptr; + + if (!*token) { + fprintf(stderr, "value is missing: %s\n", opt); + return false; + } + + errno =3D 0; + *vaddr =3D g_ascii_strtoull(token, &endptr, 0); + + if (*endptr) { + fprintf(stderr, "malformed integer: %s\n", opt); + return false; + } + + if (errno) { + perror(opt); + return false; + } + + return true; } =20 QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, @@ -137,7 +198,17 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin= _id_t id, for (int i =3D 0; i < argc; i++) { char *opt =3D argv[i]; g_auto(GStrv) tokens =3D g_strsplit(opt, "=3D", 2); - if (g_strcmp0(tokens[0], "interval") =3D=3D 0) { + if (g_strcmp0(tokens[0], "begin") =3D=3D 0) { + if (!parse_vaddr(&begin, opt, tokens[1])) { + return -1; + } + begin_present =3D true; + } else if (g_strcmp0(tokens[0], "end") =3D=3D 0) { + if (!parse_vaddr(&end, opt, tokens[1])) { + return -1; + } + end_present =3D true; + } else if (g_strcmp0(tokens[0], "interval") =3D=3D 0) { char *endptr; interval =3D g_ascii_strtoll(tokens[1], &endptr, 10); if (*endptr) { @@ -157,6 +228,11 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin= _id_t id, } } =20 + if (begin_present && end_present && begin =3D=3D end) { + fprintf(stderr, "begin and end have the same value"); + return -1; + } + if (!filename) { fputs("outfile unspecified\n", stderr); return -1; --=20 2.55.0