[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c in core/HMP/QMP/misc |
Date: |
Mon, 17 Jun 2019 10:53:59 +0200 |
User-agent: |
Mutt/1.11.3 (2019-02-01) |
Am 15.06.2019 um 22:31 hat Markus Armbruster geschrieben:
> Kevin Wolf <address@hidden> writes:
>
> > Am 14.06.2019 um 11:06 hat Markus Armbruster geschrieben:
> >> Kevin Wolf <address@hidden> writes:
> >>
> >> > monitor.c mixes a lot of different things in a single file: The core
> >> > monitor infrastructure, HMP infrastrcture, QMP infrastructure, and the
> >> > implementation of several HMP and QMP commands. Almost worse, struct
> >> > Monitor mixes state for HMP, for QMP, and state actually shared between
> >> > all monitors. monitor.c must be linked with a system emulator and even
> >> > requires per-target compilation because some of the commands it
> >> > implements access system emulator state.
> >> >
> >> > The reason why I care about this is that I'm working on a protoype for a
> >> > storage daemon, which wants to use QMP (but probably not HMP) and
> >> > obviously doesn't have any system emulator state. So I'm interested in
> >> > some core monitor parts that can be linked to non-system-emulator tools.
> >> >
> >> > This series first creates separate structs MonitorQMP and MonitorHMP
> >> > which inherit from Monitor, and then moves the associated infrastructure
> >> > code into separate source files.
> >> >
> >> > While the split is probably not perfect, I think it's an improvement of
> >> > the current state even for QEMU proper, and it's good enough so I can
> >> > link my storage daemon against just monitor/core.o and monitor/qmp.o and
> >> > get a useless QMP monitor that parses the JSON input and rejects
> >> > everything as an unknown command.
> >> >
> >> > Next I'll try to teach it a subset of QMP commands that can actually be
> >> > supported in a tool, but while there will be a few follow-up patches to
> >> > achieve this, I don't expect that this work will bring up much that
> >> > needs to be changed in the splitting process done in this series.
> >>
> >> I think I can address the remaining rather minor issues without a
> >> respin. Please let me know if you disagree with any of my remarks.
> >
> > Feel free to make the changes you suggested, possibly with the exception
> > of the #includes in monitor-internal.h where I think you're only
> > partially right (see my reply there).
> >
> > Please also consider fixing the commit message typo I pointed out for
> > patch 15.
>
> Done. Result in my public repository https://repo.or.cz/qemu/armbru.git
> tag pull-monitor-2019-06-15, just in case you want to run your eyes over
> it. Incremental diff appended.
I didn't actually apply the patch or checkout your branch, but at least
from reading the diff it looks okay.
Kevin
- Re: [Qemu-block] [Qemu-devel] [PATCH v3 15/15] vl: Deprecate -mon pretty=... for HMP monitors, (continued)
[Qemu-block] [PATCH v3 11/15] monitor: Split out monitor/hmp.c, Kevin Wolf, 2019/06/13
Re: [Qemu-block] [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c in core/HMP/QMP/misc, no-reply, 2019/06/13
Re: [Qemu-block] [Qemu-devel] [PATCH v3 00/15] monitor: Split monitor.c in core/HMP/QMP/misc, Markus Armbruster, 2019/06/14