qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt
Date: Thu, 18 May 2023 12:18:00 +0200	[thread overview]
Message-ID: <20230518101804.992085-1-pbonzini@redhat.com> (raw)

monitor_event() is not using monitor_suspend() and monitor_resume()
even though that is the desired outcome of moving out of and back into
the monitor with Ctrl-a c.

While cleaning this up, make the locking of several fields in struct
Monitor less esoteric, i.e. protect them just with mon_lock.  This gets
rid of one of the last two cases where qatomic_mb_read()/qatomic_mb_set()
pair is used to achieve a semblance of sequential consistency.

Paolo

Paolo Bonzini (4):
  monitor: use QEMU_LOCK_GUARD a bit more
  monitor: allow calling monitor_resume under mon_lock
  monitor: add more *_locked() functions
  monitor: do not use mb_read/mb_set for suspend_cnt

 include/monitor/monitor.h     |  3 +++
 monitor/hmp.c                 | 41 ++++++++++++++++-------------------
 monitor/monitor-internal.h    |  3 +--
 monitor/monitor.c             | 39 ++++++++++++++++++---------------
 tests/qemu-iotests/051.out    |  4 ++--
 tests/qemu-iotests/051.pc.out | 20 ++++++++---------
 6 files changed, 57 insertions(+), 53 deletions(-)

-- 
2.40.1



             reply	other threads:[~2023-05-18 10:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 10:18 Paolo Bonzini [this message]
2023-05-18 10:18 ` [PATCH 1/4] monitor: use QEMU_LOCK_GUARD a bit more Paolo Bonzini
2023-05-18 13:18   ` Richard Henderson
2023-05-25 15:06   ` Markus Armbruster
2023-05-18 10:18 ` [PATCH 2/4] monitor: allow calling monitor_resume under mon_lock Paolo Bonzini
2023-05-25 15:08   ` Markus Armbruster
2023-05-18 10:18 ` [PATCH 3/4] monitor: add more *_locked() functions Paolo Bonzini
2023-05-18 13:18   ` Richard Henderson
2023-05-25 15:13   ` Markus Armbruster
2023-05-18 10:18 ` [PATCH 4/4] monitor: do not use mb_read/mb_set for suspend_cnt Paolo Bonzini
2023-05-25 15:14 ` [PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt Markus Armbruster
2023-05-25 18:13   ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230518101804.992085-1-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).