From nobody Sun Feb 8 17:47:46 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1503471403103713.9452450007772; Tue, 22 Aug 2017 23:56:43 -0700 (PDT) Received: from localhost ([::1]:42154 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkPai-0005pF-HL for importer@patchew.org; Wed, 23 Aug 2017 02:56:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkPW4-0002Ds-T0 for qemu-devel@nongnu.org; Wed, 23 Aug 2017 02:51:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkPW4-0007We-7a for qemu-devel@nongnu.org; Wed, 23 Aug 2017 02:51:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36026) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dkPW4-0007WM-1C for qemu-devel@nongnu.org; Wed, 23 Aug 2017 02:51:52 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F33698124A; Wed, 23 Aug 2017 06:51:50 +0000 (UTC) Received: from pxdev.xzpeter.org.com (dhcp-14-103.nay.redhat.com [10.66.14.103]) by smtp.corp.redhat.com (Postfix) with ESMTP id 62AE584FD8; Wed, 23 Aug 2017 06:51:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F33698124A Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=peterx@redhat.com From: Peter Xu To: qemu-devel@nongnu.org Date: Wed, 23 Aug 2017 14:51:08 +0800 Message-Id: <1503471071-2233-6-git-send-email-peterx@redhat.com> In-Reply-To: <1503471071-2233-1-git-send-email-peterx@redhat.com> References: <1503471071-2233-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 23 Aug 2017 06:51:51 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v2 5/8] hmp: support "without_bql" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Fam Zheng , Juan Quintela , Markus Armbruster , peterx@redhat.com, mdroth@linux.vnet.ibm.com, Paolo Bonzini , "Dr . David Alan Gilbert" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Introducing new option "without_bql" for HMP commands. It works just like QMP "without-bql", but for HMP commands. Signed-off-by: Peter Xu --- monitor.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/monitor.c b/monitor.c index 3d4ecff..c26c797 100644 --- a/monitor.c +++ b/monitor.c @@ -125,6 +125,8 @@ typedef struct mon_cmd_t { const char *args_type; const char *params; const char *help; + /* Whether this command can be run without taking BQL? */ + bool without_bql; void (*cmd)(Monitor *mon, const QDict *qdict); /* @sub_table is a list of 2nd level of commands. If it does not exist, * cmd should be used. If it exists, sub_table[?].cmd should be @@ -3154,6 +3156,14 @@ static void handle_hmp_command(Monitor *mon, const c= har *cmdline) return; } =20 + if (cmd->without_bql) { + /* + * This is similar to QMP's "without-bql". See comments in + * do_qmp_dispatch(). + */ + take_bql =3D false; + } + if (take_bql) { qemu_mutex_lock_iothread(); } --=20 2.7.4