[PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt

Paolo Bonzini posted 4 patches 11 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20230518101804.992085-1-pbonzini@redhat.com
Maintainers: "Dr. David Alan Gilbert" <dave@treblig.org>, Markus Armbruster <armbru@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
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(-)
[PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt
Posted by Paolo Bonzini 11 months, 3 weeks ago
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
Re: [PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt
Posted by Markus Armbruster 11 months, 2 weeks ago
Copying the HMP maintainer for another pair of eyes.
Re: [PATCH 0/4] monitor/hmp: cleanup monitor_event() and suspend_cnt
Posted by Markus Armbruster 11 months, 2 weeks ago
Markus Armbruster <armbru@redhat.com> writes:

> Copying the HMP maintainer for another pair of eyes.

Crossed Paolo's PR, so nevermind.