From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749659; cv=none; d=zohomail.com; s=zohoarc; b=UpUuRFpotKa4+y24yvNwV72mMrCrvacu3ZLdO46Jh9dr5wiOnfg4nB3RXvyngNTRPdiLj1CHTYOOcYzdUkBib6PX7CVw+sX/bMr/K/qWeZv8I02SpoiwXW3Jh8iiLTmq6izMr6140AiE9xHxWQLKF7ouXEzsJ8vEKyacDxqxBD8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749659; 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=olvshQStKsCnUjtp8KyqUOdEyAZzY1YXfVY0j5oOc5Q=; b=cuILNvrl3yIgAyqjSCLXeeRZ1vnl20A3YS7dZ5Z9nCmknnN6TZKlyFKFhEMoctzmp00aG4QmXO2GUD0ZhaDuPft/JttWXJuI/P3qGw8UIPtbnSxb8itVJ/2AaHRoo20VCNFE0Yn1ruzkoKUVZTpYDs/gDd6CzctIfHG2DwrukhY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1681749659765101.62357578655701; Mon, 17 Apr 2023 09:40:59 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-459-mdTIDOTlNhaZ7RHniLO-7A-1; Mon, 17 Apr 2023 12:40:55 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4A37885D540; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37038492B0C; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 28637194658C; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B7111194658C for ; Mon, 17 Apr 2023 16:40:46 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9B0B4492B10; Mon, 17 Apr 2023 16:40:46 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 931EC492B03 for ; Mon, 17 Apr 2023 16:40:46 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 745E785D539 for ; Mon, 17 Apr 2023 16:40:46 +0000 (UTC) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-590-tI4gztk9NV-pjhkWClHrMA-1; Mon, 17 Apr 2023 12:40:44 -0400 Received: by mail-wm1-f48.google.com with SMTP id n9-20020a05600c4f8900b003f05f617f3cso20138581wmq.2 for ; Mon, 17 Apr 2023 09:40:44 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749658; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=olvshQStKsCnUjtp8KyqUOdEyAZzY1YXfVY0j5oOc5Q=; b=HQAoNqmZPYV67RMAoYqlBuWplnMTpnoDv7Gd3aSHLlfmT5vN3tFWfQIhVjbKMjXG9aahiH 7VwpdBO23zmI+JoNrfx3v3uWX4veI+aUPklRVG/e5QCVFIU5Bbq4DYz+7KQ02wxyS2OOS7 wDXvAHzAwFQI7XsNFvJeWOCjcmOn0Mk= X-MC-Unique: mdTIDOTlNhaZ7RHniLO-7A-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: tI4gztk9NV-pjhkWClHrMA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749643; x=1684341643; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=olvshQStKsCnUjtp8KyqUOdEyAZzY1YXfVY0j5oOc5Q=; b=G4qiEBUVFpQm5axWFZ0DxorcEalmaBIAcCqFjFSMk/yx4d/V7i5bAxljG/NRJNcXIn wYUFaZn26jsV4IKW9E8hUcq68yL1g09MtjSY4pdZv5CoJL4vwzOUR9a4zaOMRvbS0vZf QB0JDUuAeQLr1UMoyoiR/SyxzmAS+EO8NggiDf06FiUHNsFuult5FJDgsvGPPbBAPw4I AFOzmjWar9Dl9/SW8xcqTD1iRvKx0w67ZfcAMKXZIn6ieV8idibR/Tufjg4VcIZuuI+a khgYJV5xxEnwlYXyrS/36QYqy3eZkBLb5DuVLFPwzqk8a5i+7vK+GL+2KbUQLu3pCIC4 g7TQ== X-Gm-Message-State: AAQBX9diOwTNlhIFsA0He/qWNaBvb8xGqegYL8H7dET6qSRozuP1tFCM bhgoMEgLQvfCcaqEbHP1sbpn/w== X-Google-Smtp-Source: AKy350YDXGom3ChgOcAxt6iFB5mJH9jTOcrXq891A4+3filgrYDNBfv8Ea9uR1/bf5RUez4Nmb7yjQ== X-Received: by 2002:a05:600c:ac9:b0:3f1:6f44:ff3a with SMTP id c9-20020a05600c0ac900b003f16f44ff3amr4788135wmr.13.1681749643483; Mon, 17 Apr 2023 09:40:43 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 01/10] make one-insn-per-tb an accel option Date: Mon, 17 Apr 2023 17:40:32 +0100 Message-Id: <20230417164041.684562-2-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749660573100001 Content-Type: text/plain; charset="utf-8"; x-default="true" This commit adds 'one-insn-per-tb' as a property on the TCG accelerator object, so you can enable it with -accel tcg,one-insn-per-tb=3Don It has the same behaviour as the existing '-singlestep' command line option. We use a different name because 'singlestep' has always been a confusing choice, because it doesn't have anything to do with single-stepping the CPU. What it does do is force TCG emulation to put one guest instruction in each TB, which can be useful in some situations (such as analysing debug logs). The existing '-singlestep' commandline options are decoupled from the global 'singlestep' variable and instead now are syntactic sugar for setting the accel property. (These can then go away after a deprecation period.) The global variable remains for the moment as: * what the TCG code looks at to change its behaviour * what HMP and QMP use to query and set the behaviour In the following commits we'll clean those up to not directly look at the global variable. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- accel/tcg/tcg-all.c | 21 +++++++++++++++++++++ bsd-user/main.c | 8 ++++++-- linux-user/main.c | 8 ++++++-- softmmu/vl.c | 17 +++++++++++++++-- qemu-options.hx | 7 +++++++ 5 files changed, 55 insertions(+), 6 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 5dab1ae9dd3..fcf361c8db6 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -42,6 +42,7 @@ struct TCGState { AccelState parent_obj; =20 bool mttcg_enabled; + bool one_insn_per_tb; int splitwx_enabled; unsigned long tb_size; }; @@ -208,6 +209,20 @@ static void tcg_set_splitwx(Object *obj, bool value, E= rror **errp) s->splitwx_enabled =3D value; } =20 +static bool tcg_get_one_insn_per_tb(Object *obj, Error **errp) +{ + TCGState *s =3D TCG_STATE(obj); + return s->one_insn_per_tb; +} + +static void tcg_set_one_insn_per_tb(Object *obj, bool value, Error **errp) +{ + TCGState *s =3D TCG_STATE(obj); + s->one_insn_per_tb =3D value; + /* For the moment, set the global also: this changes the behaviour */ + singlestep =3D value; +} + static int tcg_gdbstub_supported_sstep_flags(void) { /* @@ -245,6 +260,12 @@ static void tcg_accel_class_init(ObjectClass *oc, void= *data) tcg_get_splitwx, tcg_set_splitwx); object_class_property_set_description(oc, "split-wx", "Map jit pages into separate RW and RX regions"); + + object_class_property_add_bool(oc, "one-insn-per-tb", + tcg_get_one_insn_per_tb, + tcg_set_one_insn_per_tb); + object_class_property_set_description(oc, "one-insn-per-tb", + "Only put one guest insn in each translation block"); } =20 static const TypeInfo tcg_accel_type =3D { diff --git a/bsd-user/main.c b/bsd-user/main.c index babc3b009b6..09b84da190c 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -50,6 +50,7 @@ #include "target_arch_cpu.h" =20 int singlestep; +static bool opt_one_insn_per_tb; uintptr_t guest_base; bool have_guest_base; /* @@ -386,7 +387,7 @@ int main(int argc, char **argv) } else if (!strcmp(r, "seed")) { seed_optarg =3D optarg; } else if (!strcmp(r, "singlestep")) { - singlestep =3D 1; + opt_one_insn_per_tb =3D true; } else if (!strcmp(r, "strace")) { do_strace =3D 1; } else if (!strcmp(r, "trace")) { @@ -444,9 +445,12 @@ int main(int argc, char **argv) =20 /* init tcg before creating CPUs and to get qemu_host_page_size */ { - AccelClass *ac =3D ACCEL_GET_CLASS(current_accel()); + AccelState *accel =3D current_accel(); + AccelClass *ac =3D ACCEL_GET_CLASS(accel); =20 accel_init_interfaces(ac); + object_property_set_bool(OBJECT(accel), "one-insn-per-tb", + opt_one_insn_per_tb, &error_abort); ac->init_machine(NULL); } cpu =3D cpu_create(cpu_type); diff --git a/linux-user/main.c b/linux-user/main.c index fe03293516a..489694ad654 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -69,6 +69,7 @@ char *exec_path; char real_exec_path[PATH_MAX]; =20 int singlestep; +static bool opt_one_insn_per_tb; static const char *argv0; static const char *gdbstub; static envlist_t *envlist; @@ -411,7 +412,7 @@ static void handle_arg_reserved_va(const char *arg) =20 static void handle_arg_singlestep(const char *arg) { - singlestep =3D 1; + opt_one_insn_per_tb =3D true; } =20 static void handle_arg_strace(const char *arg) @@ -777,9 +778,12 @@ int main(int argc, char **argv, char **envp) =20 /* init tcg before creating CPUs and to get qemu_host_page_size */ { - AccelClass *ac =3D ACCEL_GET_CLASS(current_accel()); + AccelState *accel =3D current_accel(); + AccelClass *ac =3D ACCEL_GET_CLASS(accel); =20 accel_init_interfaces(ac); + object_property_set_bool(OBJECT(accel), "one-insn-per-tb", + opt_one_insn_per_tb, &error_abort); ac->init_machine(NULL); } cpu =3D cpu_create(cpu_type); diff --git a/softmmu/vl.c b/softmmu/vl.c index ea20b23e4c8..492b5fe65e6 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -182,6 +182,7 @@ static const char *log_file; static bool list_data_dirs; static const char *qtest_chrdev; static const char *qtest_log; +static bool opt_one_insn_per_tb; =20 static int has_defaults =3D 1; static int default_serial =3D 1; @@ -2220,7 +2221,19 @@ static int do_configure_accelerator(void *opaque, Qe= muOpts *opts, Error **errp) qemu_opt_foreach(opts, accelerator_set_property, accel, &error_fatal); - + /* + * If legacy -singlestep option is set, honour it for TCG and + * silently ignore for any other accelerator (which is how this + * option has always behaved). + */ + if (opt_one_insn_per_tb) { + /* + * This will always succeed for TCG, and we want to ignore + * the error from trying to set a nonexistent property + * on any other accelerator. + */ + object_property_set_bool(OBJECT(accel), "one-insn-per-tb", true, N= ULL); + } ret =3D accel_init_machine(accel, current_machine); if (ret < 0) { if (!qtest_with_kvm || ret !=3D -ENOENT) { @@ -2955,7 +2968,7 @@ void qemu_init(int argc, char **argv) qdict_put_str(machine_opts_dict, "firmware", optarg); break; case QEMU_OPTION_singlestep: - singlestep =3D 1; + opt_one_insn_per_tb =3D true; break; case QEMU_OPTION_S: autostart =3D 0; diff --git a/qemu-options.hx b/qemu-options.hx index 59bdf67a2c5..1dffd36884e 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -182,6 +182,7 @@ DEF("accel", HAS_ARG, QEMU_OPTION_accel, " igd-passthru=3Don|off (enable Xen integrated Intel gr= aphics passthrough, default=3Doff)\n" " kernel-irqchip=3Don|off|split controls accelerated ir= qchip support (default=3Don)\n" " kvm-shadow-mem=3Dsize of KVM shadow MMU in bytes\n" + " one-insn-per-tb=3Don|off (one guest instruction per T= CG translation block)\n" " split-wx=3Don|off (enable TCG split w^x mapping)\n" " tb-size=3Dn (TCG translation block cache size)\n" " dirty-ring-size=3Dn (KVM dirty ring GFN count, defaul= t 0)\n" @@ -210,6 +211,12 @@ SRST ``kvm-shadow-mem=3Dsize`` Defines the size of the KVM shadow MMU. =20 + ``one-insn-per-tb=3Don|off`` + Makes the TCG accelerator put only one guest instruction into + each translation block. This slows down emulation a lot, but + can be useful in some situations, such as when trying to analyse + the logs produced by the ``-d`` option. + ``split-wx=3Don|off`` Controls the use of split w^x mapping for the TCG code generation buffer. Some operating systems require this to be enabled, and in --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749659; cv=none; d=zohomail.com; s=zohoarc; b=USwcWyy3PoPoV7p5sVg39oYVRJ+kqWSlMBVq04MYJpa3ANSyjlZUjyDfLx4sLfvYNh5EnfLIuQ5t4H8S1YgjLNvajBuiL8630xo4fOgODIDhS5b9xbs4m+KLSugBIyoIfqg3jBLwSEaQ78xdy5pXdLk9w43jhFQINNTmUiTUfT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749659; 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=exlqhHtpNYfOagC4ag8CmHQpsGR3QrEyzrEn9wP3FGw=; b=S1BbjTaRg8ek27j6MTO3oU9oX3r4Ave5ji5iXYTFKqbCEYlH0bZDN9ES4jeChnyaTNesrvopekFJAeNyKeUCeEIFHgQbnTyjzZTU7p7BSm2A9IQ+JhlcOSAtXuw+MxyQNgdZD3H+RkGK9+fOQtzNbdL7fKtOm9BJ3r6x1Stl87A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1681749659125247.43732907221442; Mon, 17 Apr 2023 09:40:59 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-185-4Lp8O4pDP8aG-CRdO0B1dQ-1; Mon, 17 Apr 2023 12:40:51 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 105BE381497B; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E8964492B0C; Mon, 17 Apr 2023 16:40:48 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E0F9A19465BD; Mon, 17 Apr 2023 16:40:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 327D1194658C for ; Mon, 17 Apr 2023 16:40:47 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 257202166B29; Mon, 17 Apr 2023 16:40:47 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1DF332166B26 for ; Mon, 17 Apr 2023 16:40:47 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F1B66101A531 for ; Mon, 17 Apr 2023 16:40:46 +0000 (UTC) Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-373-g22Vk6QJNy-AJhJW5BWyaw-1; Mon, 17 Apr 2023 12:40:45 -0400 Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-2f917585b26so1288225f8f.0 for ; Mon, 17 Apr 2023 09:40:45 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749657; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=exlqhHtpNYfOagC4ag8CmHQpsGR3QrEyzrEn9wP3FGw=; b=N6fHxE75v3RCDks4DKw0luROw866gX933DHcW/9IMfpcYEMgNqjinZ2lv66MtAJ6tOrNfO ZJVNyOD8OdbBiW3aaZuCa4Dty3yRuBX3xlWhhGJOsNV2Tg7tASjF1e+LohvWCFoH1LmhR4 ax8iltrxCGEv8FP3LOICeypOivcXXDQ= X-MC-Unique: 4Lp8O4pDP8aG-CRdO0B1dQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: g22Vk6QJNy-AJhJW5BWyaw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749644; x=1684341644; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=exlqhHtpNYfOagC4ag8CmHQpsGR3QrEyzrEn9wP3FGw=; b=iuv277Zm6ttbdoAgKihmncZEAdDudNRINdiVhx3suQPoZbEzNRFo4e1KucInXNfkuD iT4/60zL9OeEne6GXv03V2YeuP5n4VRsHtD5Yk0fFBnFaEJ2AdYqc+ytviGKpRSQgHse fD1eGN2P1HPL8DFnROUOZnlT7HdcUxAxnSY3/ZKKBt8G/hVc5DjYGO4MpvWNyx2rBYUM CEIyddAThPZWj5YRkgW1pNZVi3Q5czCarL8TUtETeG1SFfJuOZk7vo6MfvP5FhDWnmCZ S+4b8GMrtoz82I7+/JPPvW7Xo4NTcEdXDOCAqONwpXGwPCGWJBlFR1oyppqJjQl5yM7p eplw== X-Gm-Message-State: AAQBX9dm/VIIMPJV8fMKlyg/QUFTWGWjskYsKCuMsfT8H7YLmXNdVajc 1/EfNLI3TYshMnTvfxbz5R8vgA== X-Google-Smtp-Source: AKy350bsaF1f+Lcqqll5M2lnR/askrplOHaIXPQhftt/Ll3P0i89Jz1ABcxAOo+KCtdROyNHQM/SbA== X-Received: by 2002:a5d:4cc6:0:b0:2f8:a7c0:5ce7 with SMTP id c6-20020a5d4cc6000000b002f8a7c05ce7mr5685549wrt.8.1681749644100; Mon, 17 Apr 2023 09:40:44 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 02/10] softmmu: Don't use 'singlestep' global in QMP and HMP commands Date: Mon, 17 Apr 2023 17:40:33 +0100 Message-Id: <20230417164041.684562-3-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749661409100003 Content-Type: text/plain; charset="utf-8"; x-default="true" The HMP 'singlestep' command, the QMP 'query-status' command and the HMP 'info status' command (which is just wrapping the QMP command implementation) look at the 'singlestep' global variable. Make them access the new TCG accelerator 'one-insn-per-tb' property instead. This leaves the HMP and QMP command/field names and output strings unchanged; we will clean that up later. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- softmmu/runstate-hmp-cmds.c | 18 ++++++++++++++++-- softmmu/runstate.c | 10 +++++++++- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/softmmu/runstate-hmp-cmds.c b/softmmu/runstate-hmp-cmds.c index d55a7d4db89..127521a483a 100644 --- a/softmmu/runstate-hmp-cmds.c +++ b/softmmu/runstate-hmp-cmds.c @@ -20,6 +20,7 @@ #include "qapi/error.h" #include "qapi/qapi-commands-run-state.h" #include "qapi/qmp/qdict.h" +#include "qemu/accel.h" =20 void hmp_info_status(Monitor *mon, const QDict *qdict) { @@ -43,13 +44,26 @@ void hmp_info_status(Monitor *mon, const QDict *qdict) void hmp_singlestep(Monitor *mon, const QDict *qdict) { const char *option =3D qdict_get_try_str(qdict, "option"); + AccelState *accel =3D current_accel(); + bool newval; + + if (!object_property_find(OBJECT(accel), "one-insn-per-tb")) { + monitor_printf(mon, + "This accelerator does not support setting one-insn= -per-tb\n"); + return; + } + if (!option || !strcmp(option, "on")) { - singlestep =3D 1; + newval =3D true; } else if (!strcmp(option, "off")) { - singlestep =3D 0; + newval =3D false; } else { monitor_printf(mon, "unexpected option %s\n", option); + return; } + /* If the property exists then setting it can never fail */ + object_property_set_bool(OBJECT(accel), "one-insn-per-tb", + newval, &error_abort); } =20 void hmp_watchdog_action(Monitor *mon, const QDict *qdict) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index d1e04586dbc..2f2396c819e 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -40,6 +40,7 @@ #include "qapi/error.h" #include "qapi/qapi-commands-run-state.h" #include "qapi/qapi-events-run-state.h" +#include "qemu/accel.h" #include "qemu/error-report.h" #include "qemu/job.h" #include "qemu/log.h" @@ -234,9 +235,16 @@ bool runstate_needs_reset(void) StatusInfo *qmp_query_status(Error **errp) { StatusInfo *info =3D g_malloc0(sizeof(*info)); + AccelState *accel =3D current_accel(); =20 + /* + * We ignore errors, which will happen if the accelerator + * is not TCG. "singlestep" is meaningless for other accelerators, + * so we will set the StatusInfo field to false for those. + */ + info->singlestep =3D object_property_get_bool(OBJECT(accel), + "one-insn-per-tb", NULL); info->running =3D runstate_is_running(); - info->singlestep =3D singlestep; info->status =3D current_run_state; =20 return info; --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749667; cv=none; d=zohomail.com; s=zohoarc; b=V0+GYUbMSOJ23sv3Wcw0so8p6QARuQRhPe+o9DklJzWrvaNixniGLGU9dNuhXtPInQY9y5cuysoDnc3PBTV9Lorr5vFtLXniC+cZMGLOrxN2knMqYSeQvEPDwg59eDpmukSfUDS6/TTCY2b+WDz6qLP3fpnOif6OC1wviWt7eTY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749667; 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=Gs+iC0C5OHKEybS9WeBQh25/t1gv+/9yrwaTYs2naWg=; b=dGHkXjzfqvhF1YXRNRkCW0HPEOjCES/YgTLdtGxHH3vD1m4xnqgPMotgHyRbVWnRzAsTY3jpkBc7l0zh3hs2bvlT7M6cPjlbkOutiRZvkZIpj6EFBG/ScrP+LwBPZ1lekAbi6h2Hr1h39qdx5rK9ZY5ihg7sE1r0DMOH1JTIhuQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1681749667728139.34675193779003; Mon, 17 Apr 2023 09:41:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-583-2sE8uLyTNhioJeA0YraUJw-1; Mon, 17 Apr 2023 12:41:01 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D4C731C00ADE; Mon, 17 Apr 2023 16:40:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 86720492B13; Mon, 17 Apr 2023 16:40:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 5F1D719465A3; Mon, 17 Apr 2023 16:40:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0EC77194658C for ; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E65ACC15E7F; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DF145C15BA0 for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C3ACE88B7A0 for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-168-f5rn4Sr6Mg-d8uiaf-prWg-1; Mon, 17 Apr 2023 12:40:46 -0400 Received: by mail-wm1-f52.google.com with SMTP id d8-20020a05600c3ac800b003ee6e324b19so13412991wms.1 for ; Mon, 17 Apr 2023 09:40:45 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749666; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Gs+iC0C5OHKEybS9WeBQh25/t1gv+/9yrwaTYs2naWg=; b=KC5iMfPBoxSHgPNEEKci4mZlIJSzq6yRfS+TTiu9WwxiHLGRTMTVTz8qxyyvF2y5iYAe+S B/GyzMHyD5GoRoV3WE97+GK0LKeELT21DAfr7fILQbSTdT6CakECqJ/acS6OINspg8TH4i BvzWVTexhnlP4rcyYVc3KyDWrQOG6NY= X-MC-Unique: 2sE8uLyTNhioJeA0YraUJw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: f5rn4Sr6Mg-d8uiaf-prWg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749645; x=1684341645; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gs+iC0C5OHKEybS9WeBQh25/t1gv+/9yrwaTYs2naWg=; b=dKoF2Ez8oIL+CCenAGhdgKfTExl45bvtH2IkQUqWcoCk1pF6AjfiiEa/RayQQz/2JD g3+CPJJyk/8vdEMC2+fK/S6D36oFAb3vviIzfynnDSYDDb8eFPF01Jle9wKbpGXura5X DnNuGfmSHNCyDBOgNQTmSsG7tWUdwszGoq0+zIim3Z0634q3G9kQts8GxTWb3BfGm4Fe PlJnhGxgWmxsAo8vQwAkgXfFvlUQlncpY4FueHPvgUj8so7qSTKsoJmDKXRdBqNsympW iCxbdw1gFoNfDvRGVB20xiQSIvrtERpid9jn/lcMeV+b4UE39iqLLrQj/hkstc0VQJi2 VndQ== X-Gm-Message-State: AAQBX9c/Bm17LgPwHRsVa/eXp1QmE8D+5u66Y6Rty7tUysOMc8qH1nO7 PWEG2JDFpPpGkqeGdIRYDPLL9Q== X-Google-Smtp-Source: AKy350YcOdKv2EgMDxZ+OpYwt8UDkLQkTXga+4dI5oP3Wq1CqhtxkRMnYrW2JA0x3iLdS1Cuc/S+iQ== X-Received: by 2002:a05:600c:2051:b0:3f1:6ec5:bc6e with SMTP id p17-20020a05600c205100b003f16ec5bc6emr6279173wmg.3.1681749644708; Mon, 17 Apr 2023 09:40:44 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 03/10] accel/tcg: Use one_insn_per_tb global instead of old singlestep global Date: Mon, 17 Apr 2023 17:40:34 +0100 Message-Id: <20230417164041.684562-4-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749668481100003 Content-Type: text/plain; charset="utf-8"; x-default="true" The only place left that looks at the old 'singlestep' global variable is the TCG curr_cflags() function. Replace the old global with a new 'one_insn_per_tb' which is defined in tcg-all.c and declared in accel/tcg/internal.h. This keeps it restricted to the TCG code, unlike 'singlestep' which was available to every file in the system and defined in multiple different places for softmmu vs linux-user vs bsd-user. While we're making this change, use qatomic_read() and qatomic_set() on the accesses to the new global, because TCG will read it without holding a lock. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- In discussion on v2, we talked about combining this with the 'nochain' flag so as to have a single 'tcg_cflags_global' that held the flags for the current (one_insn_per_tb, nochain) state. I have not attempted that here, because it's a little tricky: * util/log.c is built into some binaries that don't have an accelerator at all (the tools), so it can't simply call current_accel() to get the TCG accelerator * the initial value of the logging flags is set before the TCG accelerator is even created So I leave that to somebody else to have a go at if they like. --- accel/tcg/internal.h | 2 ++ include/exec/cpu-common.h | 2 -- accel/tcg/cpu-exec.c | 2 +- accel/tcg/tcg-all.c | 6 ++++-- bsd-user/main.c | 1 - linux-user/main.c | 1 - softmmu/globals.c | 1 - 7 files changed, 7 insertions(+), 8 deletions(-) diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index 96f198b28b4..7bb0fdbe149 100644 --- a/accel/tcg/internal.h +++ b/accel/tcg/internal.h @@ -67,4 +67,6 @@ static inline target_ulong log_pc(CPUState *cpu, const Tr= anslationBlock *tb) extern int64_t max_delay; extern int64_t max_advance; =20 +extern bool one_insn_per_tb; + #endif /* ACCEL_TCG_INTERNAL_H */ diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index 6feaa40ca7b..0be74f1e706 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -163,8 +163,6 @@ int cpu_memory_rw_debug(CPUState *cpu, vaddr addr, void *ptr, size_t len, bool is_write); =20 /* vl.c */ -extern int singlestep; - void list_cpus(const char *optarg); =20 #endif /* CPU_COMMON_H */ diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 8370c92c05e..bc0e1c3299a 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -159,7 +159,7 @@ uint32_t curr_cflags(CPUState *cpu) */ if (unlikely(cpu->singlestep_enabled)) { cflags |=3D CF_NO_GOTO_TB | CF_NO_GOTO_PTR | CF_SINGLE_STEP | 1; - } else if (singlestep) { + } else if (qatomic_read(&one_insn_per_tb)) { cflags |=3D CF_NO_GOTO_TB | 1; } else if (qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) { cflags |=3D CF_NO_GOTO_TB; diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index fcf361c8db6..a831f8d7c37 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -31,6 +31,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/accel.h" +#include "qemu/atomic.h" #include "qapi/qapi-builtin-visit.h" #include "qemu/units.h" #if !defined(CONFIG_USER_ONLY) @@ -110,6 +111,7 @@ static void tcg_accel_instance_init(Object *obj) } =20 bool mttcg_enabled; +bool one_insn_per_tb; =20 static int tcg_init_machine(MachineState *ms) { @@ -219,8 +221,8 @@ static void tcg_set_one_insn_per_tb(Object *obj, bool v= alue, Error **errp) { TCGState *s =3D TCG_STATE(obj); s->one_insn_per_tb =3D value; - /* For the moment, set the global also: this changes the behaviour */ - singlestep =3D value; + /* Set the global also: this changes the behaviour */ + qatomic_set(&one_insn_per_tb, value); } =20 static int tcg_gdbstub_supported_sstep_flags(void) diff --git a/bsd-user/main.c b/bsd-user/main.c index 09b84da190c..a9e5a127d38 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -49,7 +49,6 @@ #include "host-os.h" #include "target_arch_cpu.h" =20 -int singlestep; static bool opt_one_insn_per_tb; uintptr_t guest_base; bool have_guest_base; diff --git a/linux-user/main.c b/linux-user/main.c index 489694ad654..c7020b413bc 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -68,7 +68,6 @@ char *exec_path; char real_exec_path[PATH_MAX]; =20 -int singlestep; static bool opt_one_insn_per_tb; static const char *argv0; static const char *gdbstub; diff --git a/softmmu/globals.c b/softmmu/globals.c index 39678aa8c58..e83b5428d12 100644 --- a/softmmu/globals.c +++ b/softmmu/globals.c @@ -43,7 +43,6 @@ int vga_interface_type =3D VGA_NONE; bool vga_interface_created; Chardev *parallel_hds[MAX_PARALLEL_PORTS]; int win2k_install_hack; -int singlestep; int fd_bootchk =3D 1; int graphic_rotate; QEMUOptionRom option_rom[MAX_OPTION_ROMS]; --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749668; cv=none; d=zohomail.com; s=zohoarc; b=oDrkZ2HO7pifKXV7pjp/syOXdTrklRB+8AQV5HcRvNF7HLexDbq1cUoCv4ov36avgZYzzDBbvAHrjXCzYb9wijI8SviOVW4s4q5YZHFfXPgdqPs5JzU9eCvfWxnwjIqPICTp7zGytG7xrItpEdJlay1gxMA39miSQY5xs18Dfro= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749668; 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=p6Rq6d1Hv/zkHtdwcgnd6mnoTvLT3U0+uR+FS829PXk=; b=A8J3aa1tRt/UnxzTUZAcB+TVlremBxZ7dLlG1yVf+oUFBAFMMiKIXJ6EwDzOZKxlWcmySPc1I+VXelQAvr0uTW5M88qRyICuHDwKvZbXEFO/2hRzEFeCMhUbIzwFsWVxs3YEMR5nXlFZvPJAvNDaFx2AvrDWcMJjEIJ0okkgEoY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1681749668526836.3274356576427; Mon, 17 Apr 2023 09:41:08 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-636-QSk2u_nhMU64qfn7P_SL9A-1; Mon, 17 Apr 2023 12:40:57 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7FEAA185A7A2; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AC5614171BB; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 575D91946594; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 60FC419465BC for ; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 36CC540CFD3A; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E2E340B3ED8 for ; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0FA5E85D538 for ; Mon, 17 Apr 2023 16:40:49 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-eTdaZlLBPK-8m3LKOYvdpA-1; Mon, 17 Apr 2023 12:40:46 -0400 Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-2f40b891420so1711263f8f.0 for ; Mon, 17 Apr 2023 09:40:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749667; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=p6Rq6d1Hv/zkHtdwcgnd6mnoTvLT3U0+uR+FS829PXk=; b=DYQ4j/rOk3anWcT41v1Q83I1fzPRr3xkAoU/ur0Ta1uotVq9jCMNwampDDbuPAXU0vbRWN d5Q9Qe/6AT7OFQ1W2eJkTSRlzWqE1T2b5v3NmwcG9svkYs2p9kidYVxbYr+/mD6QTlqGX9 QXP96DF4DwSsnoGZ+QZq8AbLgpi82rY= X-MC-Unique: QSk2u_nhMU64qfn7P_SL9A-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: eTdaZlLBPK-8m3LKOYvdpA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749645; x=1684341645; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p6Rq6d1Hv/zkHtdwcgnd6mnoTvLT3U0+uR+FS829PXk=; b=OXWKsWc7fnoD6TPglP+jwA7cAKcUDMIurotlDjT+1hZGnBc6QRBFziZhphgRqHxj1H S+YzshkX/UL9GLvM710B7SyCEMYxPLe/D+RVKBbyogdY+NkWueM+iEf6zB0S8FA/4D85 C9MBYrPdw7RKDB7KXv78gaC8R++dcDP8nX8kqqgNDiCJp12PHEEVACfKmIAO5LdHLprT JoNOIQcN/xSgt0CMuq/bkgS65OKfejyrHmaIPdbYFMXPSkRcOSwAIXYOQ/F+kVuuLrX6 uRbs0ZugrdaFBAjuqkgmXv+hF3MR9zqj8YTTM+cDgXSr1gmhSd0LEvsnkc3BWi+Wges5 X6vQ== X-Gm-Message-State: AAQBX9e7qPAp/0d5rtjsQQLgM7Sn2nEtj/MzOXlxx4rp5j2LNUtljnhH cyDSOwVI9eLKQ+Of1xDkULqMyQ== X-Google-Smtp-Source: AKy350YsHcqybPJCRuIzB0Cyw++psKo0ZOIWDv5wU5RktE36vXAZHrbyrTNvOlhlAcBtcAwah1+ZTA== X-Received: by 2002:adf:fd44:0:b0:2f4:15f3:271e with SMTP id h4-20020adffd44000000b002f415f3271emr5854630wrs.2.1681749645250; Mon, 17 Apr 2023 09:40:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 04/10] linux-user: Add '-one-insn-per-tb' option equivalent to '-singlestep' Date: Mon, 17 Apr 2023 17:40:35 +0100 Message-Id: <20230417164041.684562-5-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749669659100007 Content-Type: text/plain; charset="utf-8"; x-default="true" The '-singlestep' option is confusing, because it doesn't actually have anything to do with single-stepping the CPU. What it does do is force TCG emulation to put one guest instruction in each TB, which can be useful in some situations. Create a new command line argument -one-insn-per-tb, so we can document that -singlestep is just a deprecated synonym for it, and eventually perhaps drop it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Warner Losh Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- docs/user/main.rst | 7 ++++++- linux-user/main.c | 9 ++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/user/main.rst b/docs/user/main.rst index 6f2ffa080f7..f9ac701f4b1 100644 --- a/docs/user/main.rst +++ b/docs/user/main.rst @@ -93,8 +93,13 @@ Debug options: ``-g port`` Wait gdb connection to port =20 +``-one-insn-per-tb`` + Run the emulation with one guest instruction per translation block. + This slows down emulation a lot, but can be useful in some situations, + such as when trying to analyse the logs produced by the ``-d`` option. + ``-singlestep`` - Run the emulation in single step mode. + This is a deprecated synonym for the ``-one-insn-per-tb`` option. =20 Environment variables: =20 diff --git a/linux-user/main.c b/linux-user/main.c index c7020b413bc..5defe5a6db8 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -409,7 +409,7 @@ static void handle_arg_reserved_va(const char *arg) reserved_va =3D val ? val - 1 : 0; } =20 -static void handle_arg_singlestep(const char *arg) +static void handle_arg_one_insn_per_tb(const char *arg) { opt_one_insn_per_tb =3D true; } @@ -500,8 +500,11 @@ static const struct qemu_argument arg_table[] =3D { "logfile", "write logs to 'logfile' (default stderr)"}, {"p", "QEMU_PAGESIZE", true, handle_arg_pagesize, "pagesize", "set the host page size to 'pagesize'"}, - {"singlestep", "QEMU_SINGLESTEP", false, handle_arg_singlestep, - "", "run in singlestep mode"}, + {"one-insn-per-tb", + "QEMU_ONE_INSN_PER_TB", false, handle_arg_one_insn_per= _tb, + "", "run with one guest instruction per emulated TB"}, + {"singlestep", "QEMU_SINGLESTEP", false, handle_arg_one_insn_per_tb, + "", "deprecated synonym for -one-insn-per-tb"}, {"strace", "QEMU_STRACE", false, handle_arg_strace, "", "log system calls"}, {"seed", "QEMU_RAND_SEED", true, handle_arg_seed, --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749663; cv=none; d=zohomail.com; s=zohoarc; b=B6BgEheFmOQvo4Dtdn48jSINVNZ4vim93b6JPOVkcG7qouVmjIGLu0yXkhIlR9cKYf1VD8NEXoK2UNWsFizPzeHqM6/JFjbsSbrkDj1QYR8mdGrsclZmmyWpI5ASw7VaEnbC3857uv59oSdk+LJFMvQUcU2yBN4kY6pl1Udo9Yo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749663; 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=9zh6XCv4IvteabEjdIcioL96syD6sHRMrwiuxQ8bgkY=; b=czFSLqAcmidDONg/1Veyn7efoXLKVCe3z4QjMUBdpXqJd2FrqdEBRWBfWNcWKLqzkB1tL7olF8gnKb64WV07EgeYTuu5/QxsQp7HjVTzI3+G1V6m6b6lB1h/XErlaivTp5898Sy8+BAYRrJpVCqCX9N+7PKtqzHPtRPm3uh8gXM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 16817496636191009.6676237328173; Mon, 17 Apr 2023 09:41:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-494-RHpYvnkfMqSlw5fCRgQq8Q-1; Mon, 17 Apr 2023 12:40:59 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0C5D738149DC; Mon, 17 Apr 2023 16:40:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id EB4E3492B0C; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id A0C4D1946A4E; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1CA7C1946594 for ; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 113F6492B10; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0947F492B03 for ; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E45B48631FF for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-307-wITpFqiUPmyN3MNvG8tUkA-1; Mon, 17 Apr 2023 12:40:47 -0400 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3f174cf526aso4881425e9.0 for ; Mon, 17 Apr 2023 09:40:46 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749662; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9zh6XCv4IvteabEjdIcioL96syD6sHRMrwiuxQ8bgkY=; b=OiU/VPhfad9g3ohQeyR2kKjHJWhabLOxKOmq0zsOFRoUCjEwpY9GUlP6FW0Mme4+9y+Z2y LqzoGnSRJyr0n70M+4PXRJJQq8g1HhADnLoc76MzISJI2yR3vrd7mX60AlYe3nnQuNN9Kn fwVTCGmNJHTHuXhc6euqBaAMn1YFiVw= X-MC-Unique: RHpYvnkfMqSlw5fCRgQq8Q-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: wITpFqiUPmyN3MNvG8tUkA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749646; x=1684341646; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9zh6XCv4IvteabEjdIcioL96syD6sHRMrwiuxQ8bgkY=; b=JyU4cpWQwIlcIEsKG30DGn8fFRJN0XUOITqaja13yViHt+nV+L4g7N4jEQuBh1UvCg Micht0sqPbInhp8yiR6HQ6EzGn4Xydt7QzDjulTSavCUWYUX075C+F3HpWKRNVx0J9Un fVLWenCPiqcpG/uLaDVAnlLhYCGxGz2tbTnjDdRAnKOHyBSAuzryW0v5u+tUrl7p1XNk K1Wk+M5J/PbZYczvXWm11i2/40Xf9eaTy9xcSpTa1kw4s7uIRXPxICNNsajky6y8upK7 42qYEGsxgjsEIxkND+cuay9tzEjJW++u5h6/RXeSGeaGCfmZqk4YhLmNJA/MVKxZ/+XH Tkpg== X-Gm-Message-State: AAQBX9drG71XC6C9zTqrxc30helcF4O0P3urjjQWIBx4FkZ05IlIMEqh ZUW70twgQu2YrysZVgVUKCOMtg== X-Google-Smtp-Source: AKy350ZSCvlul7ydxNf8i2U6Q1/TVebnnqnFUXR1MvNIelFMCOJXbNQyMsNepr0TRE9YXygbv7560A== X-Received: by 2002:adf:cc81:0:b0:2d5:39d:514f with SMTP id p1-20020adfcc81000000b002d5039d514fmr6574853wrj.65.1681749645865; Mon, 17 Apr 2023 09:40:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 05/10] bsd-user: Add '-one-insn-per-tb' option equivalent to '-singlestep' Date: Mon, 17 Apr 2023 17:40:36 +0100 Message-Id: <20230417164041.684562-6-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749664421100009 Content-Type: text/plain; charset="utf-8"; x-default="true" The '-singlestep' option is confusing, because it doesn't actually have anything to do with single-stepping the CPU. What it does do is force TCG emulation to put one guest instruction in each TB, which can be useful in some situations. Create a new command line argument -one-insn-per-tb, so we can document that -singlestep is just a deprecated synonym for it, and eventually perhaps drop it. Signed-off-by: Peter Maydell Reviewed-by: Warner Losh Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- docs/user/main.rst | 7 ++++++- bsd-user/main.c | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/user/main.rst b/docs/user/main.rst index f9ac701f4b1..f4786353965 100644 --- a/docs/user/main.rst +++ b/docs/user/main.rst @@ -247,5 +247,10 @@ Debug options: ``-p pagesize`` Act as if the host page size was 'pagesize' bytes =20 +``-one-insn-per-tb`` + Run the emulation with one guest instruction per translation block. + This slows down emulation a lot, but can be useful in some situations, + such as when trying to analyse the logs produced by the ``-d`` option. + ``-singlestep`` - Run the emulation in single step mode. + This is a deprecated synonym for the ``-one-insn-per-tb`` option. diff --git a/bsd-user/main.c b/bsd-user/main.c index a9e5a127d38..cd8b2a670f7 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -162,7 +162,8 @@ static void usage(void) "-d item1[,...] enable logging of specified items\n" " (use '-d help' for a list of log items)\n" "-D logfile write logs to 'logfile' (default stderr)\n" - "-singlestep always run in singlestep mode\n" + "-one-insn-per-tb run with one guest instruction per emulated = TB\n" + "-singlestep deprecated synonym for -one-insn-per-tb\n" "-strace log system calls\n" "-trace [[enable=3D]][,events=3D][,fi= le=3D]\n" " specify tracing options\n" @@ -385,7 +386,7 @@ int main(int argc, char **argv) (void) envlist_unsetenv(envlist, "LD_PRELOAD"); } else if (!strcmp(r, "seed")) { seed_optarg =3D optarg; - } else if (!strcmp(r, "singlestep")) { + } else if (!strcmp(r, "singlestep") || !strcmp(r, "one-insn-per-tb= ")) { opt_one_insn_per_tb =3D true; } else if (!strcmp(r, "strace")) { do_strace =3D 1; --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749667; cv=none; d=zohomail.com; s=zohoarc; b=RbobOqAjPKn559Uk/BNql5Q+DdDhwoqqmTOoQ4XbtB/jrgq1LgBRaEkcjVGeS1ZrBk5FtIYGQ2y8xKCLsOtAzhRbTHYoXG4HHYMoTrapnYrb6gnNeG5A2N39Uc0gHzw8WYmQwbyffJM0V9RaICcP1vxkOqnowXqDN0Nj0+49NS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749667; 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=5vzGB5zyqexh5lZpRKf1Wm53aoZK4fu1hbifevUF8JI=; b=oLXKx5VbXRYoRuCu7iQpPXuC/qHaYZOWLl3oNzshbh6DAdOE7VW2hTSCx6UNLSc/OSiCearrXAJNTuFpb8LBve0U0M0iA/3X5YjpagWxHR1NjnyUMeXHjB5E5gNdh9woc59ECeBz0JXdRFcc8pF7WhIpyAma+SvAoKcx1y/u+6s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1681749666982573.4390868894747; Mon, 17 Apr 2023 09:41:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-622-SiGJ8RuXMjCSbeFevytMXw-1; Mon, 17 Apr 2023 12:41:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A73063C10239; Mon, 17 Apr 2023 16:40:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5B48640C94AF; Mon, 17 Apr 2023 16:40:52 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D7F121946594; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 11EFD194658D for ; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 02BE840C83AC; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id EF25340C20FA for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D610C38149C1 for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-618-LSTfeY70OKSWk9RSFqP5Rg-1; Mon, 17 Apr 2023 12:40:47 -0400 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-3f169350f05so15375185e9.3 for ; Mon, 17 Apr 2023 09:40:47 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749666; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5vzGB5zyqexh5lZpRKf1Wm53aoZK4fu1hbifevUF8JI=; b=SW1aiImiUXqK7e5GfPy4LMTBucHfhwh4So8Qs5Iy3QmDyzax+nTLI+F0k0GzCHyZqqkxjm 2Bl9qlxBOJGdz/HpfIxE9CZ9rS2GEEAZ+FGSAwkmWR/q7l0Zz+W/OP488vENE9WhgCFn46 HyuUQ3ghiCFkEwrNzSOGqqi2weo0cms= X-MC-Unique: SiGJ8RuXMjCSbeFevytMXw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: LSTfeY70OKSWk9RSFqP5Rg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749646; x=1684341646; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5vzGB5zyqexh5lZpRKf1Wm53aoZK4fu1hbifevUF8JI=; b=R5EsePLbHwELz43EYr+I497NyDhzrnjWEx8cWZuATSmGFXNX1lSR+PFceFptLDiWdc 2jOK3r6e4v1VIHgruMwj12+pyTxqu9Ju7eva3R1mxiYPxba6Fr2mBETW7klhjG9ZGbDA WO9xN5rD0F0S+EOOi8Os7VgC7igBq8GzZcHKa0Pw4hTsev1f/xT5NFxE0utYixpL3fnh GitwAnuS1r5WFprC9GGvi99Y7uBiRKU2ghqBl1kAF1u//5+qE87Geg1RiY4RiBUD5MNi pU2stWhH+HRwilcMrUvDFJ62aKTpxRBidpqy/Sd7za/7OXno+9KCHa8YkmRwvpwtALtI jBNw== X-Gm-Message-State: AAQBX9e5ggqQ9XoIO9iiQcYMlYfNf0lh5fpmxkGIRxQB7UScciizCd67 b+JqZQRvsUoc0P1BdpTcG8YCXg== X-Google-Smtp-Source: AKy350be5jSZOQJOPH1m5UhDLscM+4m4hCk+ImxYip+UD6KYG3cBBVCI95RQqpqvPkJntWCrP5DIPw== X-Received: by 2002:adf:e688:0:b0:2f4:62cc:922b with SMTP id r8-20020adfe688000000b002f462cc922bmr6648536wrm.16.1681749646377; Mon, 17 Apr 2023 09:40:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 06/10] Document that -singlestep command line option is deprecated Date: Mon, 17 Apr 2023 17:40:37 +0100 Message-Id: <20230417164041.684562-7-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749668463100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Document that the -singlestep command line option is now deprecated, as it is replaced by either the TCG accelerator property 'one-insn-per-tb' for system emulation or the new '-one-insn-per-tb' option for usermode emulation, and remove the only use of the deprecated syntax from a README. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- docs/about/deprecated.rst | 16 ++++++++++++++++ qemu-options.hx | 5 +++-- tcg/tci/README | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 1ca9dc33d61..3c62671dac1 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -111,6 +111,22 @@ Use ``-machine acpi=3Doff`` instead. The HAXM project has been retired (see https://github.com/intel/haxm#statu= s). Use "whpx" (on Windows) or "hvf" (on macOS) instead. =20 +``-singlestep`` (since 8.1) +''''''''''''''''''''''''''' + +The ``-singlestep`` option has been turned into an accelerator property, +and given a name that better reflects what it actually does. +Use ``-accel tcg,one-insn-per-tb=3Don`` instead. + +User-mode emulator command line arguments +----------------------------------------- + +``-singlestep`` (since 8.1) +''''''''''''''''''''''''''' + +The ``-singlestep`` option has been given a name that better reflects +what it actually does. For both linux-user and bsd-user, use the +new ``-one-insn-per-tb`` option instead. =20 QEMU Machine Protocol (QMP) commands ------------------------------------ diff --git a/qemu-options.hx b/qemu-options.hx index 1dffd36884e..6a59e997497 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -4159,10 +4159,11 @@ SRST ERST =20 DEF("singlestep", 0, QEMU_OPTION_singlestep, \ - "-singlestep always run in singlestep mode\n", QEMU_ARCH_ALL) + "-singlestep deprecated synonym for -accel tcg,one-insn-per-tb=3Do= n\n", QEMU_ARCH_ALL) SRST ``-singlestep`` - Run the emulation in single step mode. + This is a deprecated synonym for the TCG accelerator property + ``one-insn-per-tb``. ERST =20 DEF("preconfig", 0, QEMU_OPTION_preconfig, \ diff --git a/tcg/tci/README b/tcg/tci/README index f72a40a395a..4a8b5b54018 100644 --- a/tcg/tci/README +++ b/tcg/tci/README @@ -49,7 +49,7 @@ The only difference from running QEMU with TCI to running= without TCI should be speed. Especially during development of TCI, it was very useful to compare runs with and without TCI. Create /tmp/qemu.log by =20 - qemu-system-i386 -d in_asm,op_opt,cpu -D /tmp/qemu.log -singlestep + qemu-system-i386 -d in_asm,op_opt,cpu -D /tmp/qemu.log -accel tcg,= one-insn-per-tb=3Don =20 once with interpreter and once without interpreter and compare the resulti= ng qemu.log files. This is also useful to see the effects of additional --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749661; cv=none; d=zohomail.com; s=zohoarc; b=OMZ+cb681w2OWJQeIsCyBtsCSiBWDFEBSdXEBcs16XHIbPSHtlUr0bfc6Ka7ebf+9u0NxTRXZGQS+Yyhbf8ZNyYOATvwxPytn/8qzHm8cFDf6vufBg4z3rp9zFWZgIlScItL6giOTkbe+QHJ8sj7D570t9oVGIXIQgZAUJv/7uM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749661; 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=IUG+bykQ/Oriq02A76XvnJLKzQfmPW2xVt1eESF/Lno=; b=YtZb0AtX7ERwt24X4OqtIzrg4I7qF5DovOwF1KmS81NPjG1qvh3zhQOBSxl4Z/ejGTU4VRheSTqc7uuyA7lfLMoHnsMMr9+uCQxvGHUY3HvIaLZOVe14N1iA7je90AWwqsGwSnceO2MMuuYs9Hne2HIPCFhMSlYy44vAHL9nnWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1681749661046386.5658030462687; Mon, 17 Apr 2023 09:41:01 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-513-WyR2ZEryNTySIU0itK4BHg-1; Mon, 17 Apr 2023 12:40:58 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B812210334A5; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A3A7340C6E6F; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 80449194658C; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 7539F194658D for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 5C621492B0F; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast07.extmail.prod.ext.rdu2.redhat.com [10.11.55.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 54F26492B03 for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3C1083C0F691 for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-272-QgyqCFd8OGasrLIbwPma5Q-1; Mon, 17 Apr 2023 12:40:48 -0400 Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-2f87c5b4635so1471303f8f.1 for ; Mon, 17 Apr 2023 09:40:48 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749659; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=IUG+bykQ/Oriq02A76XvnJLKzQfmPW2xVt1eESF/Lno=; b=NYnyh/k8IE4vtpJksPGsOuj4D1isvr4SjpReWL2nnvqAnQWnGNWByUVoi/5Vm4z41d1bOB gF9ZDFtICMS711Waz0bvZgDweYuZ6fhJqAsuY9DrxTvUD8q4xl5Qfuno9dRAujeDuVWMDw OOZY1vaGSvH4gu7UbKhKYnxpfNsHL2k= X-MC-Unique: WyR2ZEryNTySIU0itK4BHg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: QgyqCFd8OGasrLIbwPma5Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749647; x=1684341647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IUG+bykQ/Oriq02A76XvnJLKzQfmPW2xVt1eESF/Lno=; b=Qu+fmdnn9fNj3fbONRQWNk56m0nKNgJ1rfLxmwxtFQywZe0Qvxn2hkkzLVr6Rngt6R HU0iYTcwOa0kci1CoGOKxF2UcRKLuZdomxQmX+mHYDd2QZgDfQ5kvdH/VAgk7jKLvOqS ahm4+VnU4def6AeFj2UDGiHXqZGIIhc2Uo52A/qm7pgb0M4MmZRwlsLvYosx5K9Aw4yY ry+qElleFeHLQRA64mJ7KfBWm/nQte7Oq/Ti4J4n9SUGpRWzxpt67I+TdYSJtMLK86d1 AliYhDSv4Oz5aymyx5xNqwjsn0xA3kwT/gr1bMiV0NcHxhRSZVcUvpeNNwNfrhWVYh8t yOFw== X-Gm-Message-State: AAQBX9eVTBR+neZAJOfRrKrus7y4iBxROClNAYADp4RyM7foOe3UVQv4 0UJ9IzjqqOy9/G06srJRWGC3Bg== X-Google-Smtp-Source: AKy350YAWEuYJA63NMcwEdiyAIDv16VSQZ7H+ckeTJfQm0aiDW9OojY7QjUU821LYLRmiaiI0PaWgw== X-Received: by 2002:adf:f40e:0:b0:2f4:cf53:c961 with SMTP id g14-20020adff40e000000b002f4cf53c961mr5470660wro.54.1681749646915; Mon, 17 Apr 2023 09:40:46 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 07/10] accel/tcg: Report one-insn-per-tb in 'info jit', not 'info status' Date: Mon, 17 Apr 2023 17:40:38 +0100 Message-Id: <20230417164041.684562-8-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749662430100005 Content-Type: text/plain; charset="utf-8"; x-default="true" Currently we report whether the TCG accelerator is in 'one-insn-per-tb' mode in the 'info status' output. This is a pretty minor piece of TCG specific information, and we want to deprecate the 'singlestep' field of the associated QMP command. Move the 'one-insn-per-tb' reporting to 'info jit'. We don't need a deprecate-and-drop period for this because the HMP interface has no stability guarantees. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- The new 'accelerator settings' subsection of the output currently only has one item, but it would be a place to put other stuff, eg if we wanted to mention whether split-wx is enabled. --- accel/tcg/monitor.c | 14 ++++++++++++++ softmmu/runstate-hmp-cmds.c | 5 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c index 1450e160e95..92fce580f11 100644 --- a/accel/tcg/monitor.c +++ b/accel/tcg/monitor.c @@ -7,6 +7,7 @@ */ =20 #include "qemu/osdep.h" +#include "qemu/accel.h" #include "qapi/error.h" #include "qapi/type-helpers.h" #include "qapi/qapi-commands-machine.h" @@ -36,6 +37,18 @@ static void dump_drift_info(GString *buf) } } =20 +static void dump_accel_info(GString *buf) +{ + AccelState *accel =3D current_accel(); + bool one_insn_per_tb =3D object_property_get_bool(OBJECT(accel), + "one-insn-per-tb", + &error_fatal); + + g_string_append_printf(buf, "Accelerator settings:\n"); + g_string_append_printf(buf, "one-insn-per-tb: %s\n\n", + one_insn_per_tb ? "on" : "off"); +} + HumanReadableText *qmp_x_query_jit(Error **errp) { g_autoptr(GString) buf =3D g_string_new(""); @@ -45,6 +58,7 @@ HumanReadableText *qmp_x_query_jit(Error **errp) return NULL; } =20 + dump_accel_info(buf); dump_exec_info(buf); dump_drift_info(buf); =20 diff --git a/softmmu/runstate-hmp-cmds.c b/softmmu/runstate-hmp-cmds.c index 127521a483a..a477838dc5a 100644 --- a/softmmu/runstate-hmp-cmds.c +++ b/softmmu/runstate-hmp-cmds.c @@ -28,9 +28,8 @@ void hmp_info_status(Monitor *mon, const QDict *qdict) =20 info =3D qmp_query_status(NULL); =20 - monitor_printf(mon, "VM status: %s%s", - info->running ? "running" : "paused", - info->singlestep ? " (single step mode)" : ""); + monitor_printf(mon, "VM status: %s", + info->running ? "running" : "paused"); =20 if (!info->running && info->status !=3D RUN_STATE_PAUSED) { monitor_printf(mon, " (%s)", RunState_str(info->status)); --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749662; cv=none; d=zohomail.com; s=zohoarc; b=DJgKUxGIKxLEt8HQwkedOOqP2KnIp4M8vK0AR4NA7k34daEKNXDtir/dhsGe/+4Z2Jz6q4xct4rN5V4rYnVaUknsrCCho405W1gwNd8sZzADXYP+29Zx1oknXZsWh1XRT89+gM9IP17ZTFU3muVaK6c9mjO+FGwQ+8qSQgDS/UM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749662; 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=XdrcDkwMacIqQO2KUO210mgRUqyMuFKPIP+LZZZwEDs=; b=hyC6CvqhXhb0gxSaYt3q8a+L2QeTeU/MO2nmjsePos0v48Y5UTsu+NJLIheSVnGO2+6ShnRP2SF9cITK2ERd0MLE7ibK3TNKXN2A8Sb/nPXJkvDwwSaRVmmELoBiOiV4yt8b+MP3g4sgfXFCQ9+ZnzIqLPpuW6Ic9ZvUABeLlUo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1681749662907546.0756004766682; Mon, 17 Apr 2023 09:41:02 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-149-BDSFuX4GMJCdjZprBMahpg-1; Mon, 17 Apr 2023 12:40:59 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4198A3C1024E; Mon, 17 Apr 2023 16:40:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D2B751FF; Mon, 17 Apr 2023 16:40:53 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1E765194658D; Mon, 17 Apr 2023 16:40:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E1454194658C for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B7112492B10; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF7D3492B0F for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 961AA85A5B1 for ; Mon, 17 Apr 2023 16:40:50 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-595-Lemr1kyINVu6daztPWDyAQ-1; Mon, 17 Apr 2023 12:40:49 -0400 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-3f0a0c4e1ebso17180145e9.3 for ; Mon, 17 Apr 2023 09:40:48 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749661; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=XdrcDkwMacIqQO2KUO210mgRUqyMuFKPIP+LZZZwEDs=; b=TtMeGRphKuHuNGuLHIDaKAznuHPwGQ84LlNtNkTWdqQMRGsV4VCIJSHkKY74ItjzKSa5/1 EtDXh1cRaSRbDynHBKbqo166u2whne5HzmNB/8+Ki9KXct+WZW/UfLFmUhrJTfu3AdPDhp EFjvVH9AIehQCx+QxSVy5F+gUweZTt8= X-MC-Unique: BDSFuX4GMJCdjZprBMahpg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: Lemr1kyINVu6daztPWDyAQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749647; x=1684341647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XdrcDkwMacIqQO2KUO210mgRUqyMuFKPIP+LZZZwEDs=; b=OzeuCkW1jjAhrGUDVq4Xhfkfob8c+ccyH9WRMTUCABXZ9/t+IxOOfsMUxd/EfoEZnV UfYy0LkksXSrFhBpbny+VkR4PPOVZkjuhFA8kEaQs/ikhXfjoTiv90f9Os1kl/XwkslX QqzJR6Ndgy8AZK63G1MxMYCZZ9IUXbEbapxehbltaDfw3lk4RpKc/5YNSjZWhUdr4jec r1L+eOB6f+l3bN9QGZI3e2l850syKjWhBKfbX+mFCLq5rsuGGLNLdwbS6aSdg1MHNt6r Od2CAPTnrkxXKBXLrRF7nM8cmSGWF8oaqMl8AZ7oAQJB1uSCPlA284P5dj8XEzg/ufJK Wyxg== X-Gm-Message-State: AAQBX9frGLgW19sI/Fx/d2RmMgyQttuMhkNoW/hYVRZcd/36tW/d5mdB fEGcJc7Wtk5A5Hj8JC+jnOc5LA== X-Google-Smtp-Source: AKy350bIUQ2PccjuA47BsiSgfjOr0WnlJLusJ50iYjJOtaOkCJgkSw5b5Xk+IJmVZxTT8HzFD4AYrQ== X-Received: by 2002:adf:f547:0:b0:2fb:1d3a:93ff with SMTP id j7-20020adff547000000b002fb1d3a93ffmr2053433wrp.61.1681749647507; Mon, 17 Apr 2023 09:40:47 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 08/10] hmp: Add 'one-insn-per-tb' command equivalent to 'singlestep' Date: Mon, 17 Apr 2023 17:40:39 +0100 Message-Id: <20230417164041.684562-9-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749663698100007 Content-Type: text/plain; charset="utf-8"; x-default="true" The 'singlestep' HMP command is confusing, because it doesn't actually have anything to do with single-stepping the CPU. What it does do is force TCG emulation to put one guest instruction in each TB, which can be useful in some situations. Create a new HMP command 'one-insn-per-tb', so we can document that 'singlestep' is just a deprecated synonym for it, and eventually perhaps drop it. We aren't obliged to do deprecate-and-drop for HMP commands, but it's easy enough to do so, so we do. Signed-off-by: Peter Maydell Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- docs/about/deprecated.rst | 9 +++++++++ include/monitor/hmp.h | 2 +- softmmu/runstate-hmp-cmds.c | 2 +- tests/qtest/test-hmp.c | 1 + hmp-commands.hx | 25 +++++++++++++++++++++---- 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 3c62671dac1..6f5e689aa45 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -199,6 +199,15 @@ accepted incorrect commands will return an error. User= s should make sure that all arguments passed to ``device_add`` are consistent with the documented property types. =20 +Human Monitor Protocol (HMP) commands +------------------------------------- + +``singlestep`` (since 8.1) +'''''''''''''''''''''''''' + +The ``singlestep`` command has been replaced by the ``one-insn-per-tb`` +command, which has the same behaviour but a less misleading name. + Host Architectures ------------------ =20 diff --git a/include/monitor/hmp.h b/include/monitor/hmp.h index fdb69b7f9ca..13f9a2dedb8 100644 --- a/include/monitor/hmp.h +++ b/include/monitor/hmp.h @@ -158,7 +158,7 @@ void hmp_info_vcpu_dirty_limit(Monitor *mon, const QDic= t *qdict); void hmp_human_readable_text_helper(Monitor *mon, HumanReadableText *(*qmp_handler)(Erro= r **)); void hmp_info_stats(Monitor *mon, const QDict *qdict); -void hmp_singlestep(Monitor *mon, const QDict *qdict); +void hmp_one_insn_per_tb(Monitor *mon, const QDict *qdict); void hmp_watchdog_action(Monitor *mon, const QDict *qdict); void hmp_pcie_aer_inject_error(Monitor *mon, const QDict *qdict); void hmp_info_capture(Monitor *mon, const QDict *qdict); diff --git a/softmmu/runstate-hmp-cmds.c b/softmmu/runstate-hmp-cmds.c index a477838dc5a..2df670f0c06 100644 --- a/softmmu/runstate-hmp-cmds.c +++ b/softmmu/runstate-hmp-cmds.c @@ -40,7 +40,7 @@ void hmp_info_status(Monitor *mon, const QDict *qdict) qapi_free_StatusInfo(info); } =20 -void hmp_singlestep(Monitor *mon, const QDict *qdict) +void hmp_one_insn_per_tb(Monitor *mon, const QDict *qdict) { const char *option =3D qdict_get_try_str(qdict, "option"); AccelState *accel =3D current_accel(); diff --git a/tests/qtest/test-hmp.c b/tests/qtest/test-hmp.c index b4a920df898..6704be239be 100644 --- a/tests/qtest/test-hmp.c +++ b/tests/qtest/test-hmp.c @@ -56,6 +56,7 @@ static const char *hmp_cmds[] =3D { "o /w 0 0x1234", "object_add memory-backend-ram,id=3Dmem1,size=3D256M", "object_del mem1", + "one-insn-per-tb on", "pmemsave 0 4096 \"/dev/null\"", "p $pc + 8", "qom-list /", diff --git a/hmp-commands.hx b/hmp-commands.hx index bb85ee1d267..9afbb54a515 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -378,18 +378,35 @@ SRST only *tag* as parameter. ERST =20 + { + .name =3D "one-insn-per-tb", + .args_type =3D "option:s?", + .params =3D "[on|off]", + .help =3D "run emulation with one guest instruction per tran= slation block", + .cmd =3D hmp_one_insn_per_tb, + }, + +SRST +``one-insn-per-tb [off]`` + Run the emulation with one guest instruction per translation block. + This slows down emulation a lot, but can be useful in some situations, + such as when trying to analyse the logs produced by the ``-d`` option. + This only has an effect when using TCG, not with KVM or other accelerato= rs. + + If called with option off, the emulation returns to normal mode. +ERST + { .name =3D "singlestep", .args_type =3D "option:s?", .params =3D "[on|off]", - .help =3D "run emulation in singlestep mode or switch to nor= mal mode", - .cmd =3D hmp_singlestep, + .help =3D "deprecated synonym for one-insn-per-tb", + .cmd =3D hmp_one_insn_per_tb, }, =20 SRST ``singlestep [off]`` - Run the emulation in single step mode. - If called with option off, the emulation returns to normal mode. + This is a deprecated synonym for the one-insn-per-tb command. ERST =20 { --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749671; cv=none; d=zohomail.com; s=zohoarc; b=OgjS89FTxS7fpurc3pwZ9pPgLA2kJmMetl+lb7VqZdMhxQh9UG1oHtm5+VuE/s2RLT0EGMlVy0g5g0cSqbJARhWHCZt+QiqTtXbLj14hQ3QUnwMd0H98/9k4+dDkebxHjTDvO9Bny+8P4aju5VDKzld2P/rr7O6kVxcAeqsAt2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749671; 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=9/0TyOdhBrDuhL5XsvOLjbBITyKIzOif+YMbpV7tsp0=; b=I4PRh2aJHz/nb1kyA28ljQKS9pdAtghGjA/t4GwQIgHlCo1pQhwPauYvWPsjzLXu37+G2ZZzNkndrh1G9igOSV942zEddPe4kAb7RJmrCi+vmxUEp3srbHelVJymQ07ahnrUz4wnXbUOnd76Lw9p5IkxqcNn/TOc2i+ewNs4ExA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1681749671692277.3371982092581; Mon, 17 Apr 2023 09:41:11 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-127-B0s9A8VVNjqGiqjhH-eXXg-1; Mon, 17 Apr 2023 12:41:03 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 04E471C0A58C; Mon, 17 Apr 2023 16:40:57 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E61E62166B2A; Mon, 17 Apr 2023 16:40:56 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AD7FE194658D; Mon, 17 Apr 2023 16:40:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2F03B194658C for ; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 24A5B492B03; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D1CD492B0F for ; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 03C5838149BD for ; Mon, 17 Apr 2023 16:40:51 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-20-WL8K160COXyuSQ6mcEIeKA-2; Mon, 17 Apr 2023 12:40:49 -0400 Received: by mail-wm1-f43.google.com with SMTP id m39-20020a05600c3b2700b003f170e75bd3so1668694wms.1 for ; Mon, 17 Apr 2023 09:40:48 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749670; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9/0TyOdhBrDuhL5XsvOLjbBITyKIzOif+YMbpV7tsp0=; b=HDZgnFctzYXZjlXPspOmqT8Bem44KK9rinIxlOCIcg1sZUOCWql1F3fm+it4gy/HG5IjOG LbnUsubz5hlSlmh21fzWJ5U5pjSentcl2mfrHfWVi0gSiP0g2q193s6rN/T3ct5Rsz71zA w3Ikmt8pXW8ZuuhDfN9iFGNObuTn2cY= X-MC-Unique: B0s9A8VVNjqGiqjhH-eXXg-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: WL8K160COXyuSQ6mcEIeKA-2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749648; x=1684341648; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9/0TyOdhBrDuhL5XsvOLjbBITyKIzOif+YMbpV7tsp0=; b=F1geArWQMd3P2mc3qJZ7CS6L58U2fRhUrkRIOLeea4746rocmXNmyBANccYRVUOCNA sPCv0UTBxm5W3gp/pFXFCmgax/Ad9M5QxtasBKVNa1Ryeml7AVi9yn+fwIGA6qwI8pkF pCe0S6qXYtvL2q+bkxGNdGWrmw9q0JTOXkAxZc3rH3IRTczqYGm4G+lWmyxJ4k5bM47y 6rG+T5ar26+PlJECzcMXrT4IwjTfPGIUHmIfrbkeKzOAKKNy5C9t8gWiLfiiyV1uZzXY lfuocmOsP+ut46H38Si0c0mHlcSPHM+84HCEhDoC0b1nkkKMCDaztyXGlhcFcHID7TEE E8nQ== X-Gm-Message-State: AAQBX9fR2B0DgGzAR4cB9V8hGRn7pzn9+egstllqgv7afkkJ2Jypp5tA JV3gfpXud5zp+xy+EUoAVncMvw== X-Google-Smtp-Source: AKy350YiOQ+PocfvZd1X28ZO3eJ7OxJR9fyuE53JmkIhzFNnB76Rc4qEB2sSjVvdQ3ETfd2IZl4wtA== X-Received: by 2002:a05:600c:2288:b0:3eb:29fe:f911 with SMTP id 8-20020a05600c228800b003eb29fef911mr10891445wmf.13.1681749648121; Mon, 17 Apr 2023 09:40:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 09/10] qapi/run-state.json: Fix missing newline at end of file Date: Mon, 17 Apr 2023 17:40:40 +0100 Message-Id: <20230417164041.684562-10-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749672334100001 Content-Type: text/plain; charset="utf-8"; x-default="true" The run-state.json file is missing a trailing newline; add it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- Noticed this because my editor wanted to add the newline when I touched the file for the following patch... --- qapi/run-state.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qapi/run-state.json b/qapi/run-state.json index 419c188dd1a..9d34afa39e0 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -663,4 +663,4 @@ # Since: 7.2 ## { 'enum': 'NotifyVmexitOption', - 'data': [ 'run', 'internal-error', 'disable' ] } \ No newline at end of file + 'data': [ 'run', 'internal-error', 'disable' ] } --=20 2.34.1 From nobody Mon May 20 00:56:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1681749663; cv=none; d=zohomail.com; s=zohoarc; b=HmJaiMgUPsW7fyHwKS9VaVFVv1re+P7d6P7mnarc726pePNWzBTPo3iNce8QWJQBFPTPz0VfD7DG6f39OhxJAJrRMBBl9v2uHBmcah1S9UqB60x4gBRc+cGybDdNcngIC5gWv8v4xTXpH2Y4a0a2aoWA/cVG7m6W17LJjUseMQE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681749663; 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=4B6l8UECJ90CPUbM7Klpck4y118EN0eBNxzC139Z/3k=; b=bY7HQOuVD66zEJn8zmIMk4A0u4OVRjtcVIe0rjkPJdo8aHp/UD/YleX5P7WQaZyZjI216g7acYSRVwlH1OINsjLkazorA4NaQFxwwXvAdkV/q4vs/tc2L0UWyfgX+hE2iR75XP2JAjFpMIjblRRq9Nvjqs5VOYAnKrr5KqQOec4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1681749663616739.2035875524475; Mon, 17 Apr 2023 09:41:03 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-86-3gOCnqXhOCe8xTI47ChJag-1; Mon, 17 Apr 2023 12:41:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4C0503815F65; Mon, 17 Apr 2023 16:40:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 37EBE40C6E70; Mon, 17 Apr 2023 16:40:55 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 03FFE19465B1; Mon, 17 Apr 2023 16:40:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 019F5194658C for ; Mon, 17 Apr 2023 16:40:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E9ED740C6E6E; Mon, 17 Apr 2023 16:40:53 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E1B8640C94A9 for ; Mon, 17 Apr 2023 16:40:53 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C78AF88F4DE for ; Mon, 17 Apr 2023 16:40:53 +0000 (UTC) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-417-n0ZJgt0LNYevaXn1BoBYhQ-2; Mon, 17 Apr 2023 12:40:49 -0400 Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-2fa0ce30ac2so909844f8f.3 for ; Mon, 17 Apr 2023 09:40:49 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id q17-20020a5d61d1000000b002faaa9a1721sm2595103wrv.58.2023.04.17.09.40.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Apr 2023 09:40:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681749662; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=4B6l8UECJ90CPUbM7Klpck4y118EN0eBNxzC139Z/3k=; b=ZhUD3DXOeXEo4gy4MORfGMuEfhVWSKCB1C5QBkKgkRham6ag1sGAXhMIY20MKatpNWNdWc ox3U7XAipvISNLPt3Xjbapgp195isrSe5z3NG8uX06nYjcFV7gsIkfr1/tJCXGZLKoK7zL lmuyw/ps/BA6rHHXgCaXwxU8qnWHTTM= X-MC-Unique: 3gOCnqXhOCe8xTI47ChJag-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: n0ZJgt0LNYevaXn1BoBYhQ-2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681749648; x=1684341648; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4B6l8UECJ90CPUbM7Klpck4y118EN0eBNxzC139Z/3k=; b=DQFWMuG9qRQIibDGBAQIOLgoALpH6xuk37ny8r9fmlu72y/1lT/Hcvu9zloL2EVE09 b43KX3Np5X6Qqwvs32XJYbCLae1ElvSqiwCyWAZkjGi58IU/BzkFxo9lK8m3xlUSvtWK mSn4+H/Cw7PVWHByDEatobXeZ/PBYJtArTWiKpxeIYSyeoZ3tQZNMsh0xUZGOI3epzp4 lTLgycIqMiXoIsKw51WedOyAcPFEAZzTjDWWRz5yJrsT4K9WsGz+i7vrxOr0Re2kJjpV RfOhyBeyP0ASN6LZwi0HLHWDoO/AF4qY5etgZlbIO4pvA794EtO6G2CfRrS47MJ/CWaO xkIA== X-Gm-Message-State: AAQBX9ckWRM/0UltjeFTMWVDCXvPjI9p9ppgvnxens0EBTVtoVF8pDfe PBwHDdT/T9ICK3+ger2Q1Xr4nvXFc7EXpsAysg8= X-Google-Smtp-Source: AKy350Y37xr+bENfG9mOJznO1VgNCOjSvPo81D7ySH5JUZ1yLVtZYYOQPqeNic6Qh4lbPgIEhCt7OQ== X-Received: by 2002:adf:f4cb:0:b0:2f5:aadb:4642 with SMTP id h11-20020adff4cb000000b002f5aadb4642mr6412555wrp.41.1681749648681; Mon, 17 Apr 2023 09:40:48 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH v3 10/10] hmp: Deprecate 'singlestep' member of StatusInfo Date: Mon, 17 Apr 2023 17:40:41 +0100 Message-Id: <20230417164041.684562-11-peter.maydell@linaro.org> In-Reply-To: <20230417164041.684562-1-peter.maydell@linaro.org> References: <20230417164041.684562-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libvir-list@redhat.com, Kyle Evans , Richard Henderson , Markus Armbruster , Laurent Vivier , Eric Blake , Warner Losh Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linaro.org Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1681749665643100011 Content-Type: text/plain; charset="utf-8"; x-default="true" The 'singlestep' member of StatusInfo has never done what the QMP documentation claims it does. What it actually reports is whether TCG is working in "one guest instruction per translation block" mode. We no longer need this field for the HMP 'info status' command, as we've moved that information to 'info jit'. It seems unlikely that anybody is monitoring the state of this obscure TCG setting via QMP, especially since QMP provides no means for changing the setting. So simply deprecate the field, without providing any replacement. Until we do eventually delete the member, correct the misstatements in the QAPI documentation about it. If we do find that there are users for this, then the most likely way we would provide replacement access to the information would be to put the accelerator QOM object at a well-known path such as /machine/accel, which could then be used with the existing qom-set and qom-get commands. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- For v3: because we're only deprecating the existing member, not trying to provide a replacement with a new name, we don't need to update the iotests that use the command. (We will when we eventually drop the deprecated member.) --- docs/about/deprecated.rst | 14 ++++++++++++++ qapi/run-state.json | 14 +++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 6f5e689aa45..d5eda0f566c 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -199,6 +199,20 @@ accepted incorrect commands will return an error. User= s should make sure that all arguments passed to ``device_add`` are consistent with the documented property types. =20 +``StatusInfo`` member ``singlestep`` (since 8.1) +'''''''''''''''''''''''''''''''''''''''''''''''' + +The ``singlestep`` member of the ``StatusInfo`` returned from the +``query-status`` command is deprecated. This member has a confusing +name and it never did what the documentation claimed or what its name +suggests. We do not believe that anybody is actually using the +information provided in this member. + +The information it reports is whether the TCG JIT is in "one +instruction per translated block" mode (which can be set on the +command line or via the HMP, but not via QMP). The information remains +available via the HMP 'info jit' command. + Human Monitor Protocol (HMP) commands ------------------------------------- =20 diff --git a/qapi/run-state.json b/qapi/run-state.json index 9d34afa39e0..daf03a6fe9c 100644 --- a/qapi/run-state.json +++ b/qapi/run-state.json @@ -104,16 +104,24 @@ # # @running: true if all VCPUs are runnable, false if not runnable # -# @singlestep: true if VCPUs are in single-step mode +# @singlestep: true if using TCG with one guest instruction +# per translation block # # @status: the virtual machine @RunState # +# Features: +# @deprecated: Member 'singlestep' is deprecated (with no replacement). +# # Since: 0.14 # -# Notes: @singlestep is enabled through the GDB stub +# Notes: @singlestep is enabled on the command line with +# '-accel tcg,one-insn-per-tb=3Don', or with the HMP +# 'one-insn-per-tb' command. ## { 'struct': 'StatusInfo', - 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} } + 'data': {'running': 'bool', + 'singlestep': { 'type': 'bool', 'features': [ 'deprecated' ]}, + 'status': 'RunState'} } =20 ## # @query-status: --=20 2.34.1