All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Mario Fleischmann <mario.fleischmann@lauterbach.com>
Cc: qemu-devel@nongnu.org,  alex.bennee@linaro.org,
	 philmd@linaro.org, christian.boenig@lauterbach.com
Subject: Re: [PATCH v2 00/20] Add Multi-Core Debug (MCD) API support
Date: Tue, 20 May 2025 09:35:36 +0200	[thread overview]
Message-ID: <87iklvd99z.fsf@pond.sub.org> (raw)
In-Reply-To: <20250430052741.21145-1-mario.fleischmann@lauterbach.com> (Mario Fleischmann's message of "Wed, 30 Apr 2025 07:27:21 +0200")

Mario Fleischmann <mario.fleischmann@lauterbach.com> writes:

> This patch series introduces support for the Multi-Core Debug (MCD) API, a
> commonly used debug interface by emulators. The MCD API, defined through a
> header file, consists of 54 functions for implementing debug and trace.
> However, since it is a header-file-only interface, MCD does not specify a
> communication protocol.
>
> To keep the overhead of a communication protocol on top of MCD minimal,
> we follow a remote procedure call approach by using QAPI as an interface
> definition and transport infrastructure. This way, we can use qapi-gen to
> take care of generating the infrastructure to dispatch MCD functions and
> to (un)marshal their arguments and results. Furthermore, qapi-doc and qtest
> provide good integration into QEMU's documentation and test frameworks.
>
> In v1 of this patch series, the MCD protocol was directly integrated in QMP
> and the QMP monitor was responsible for dispatching MCD's server stub. This
> introduced a dependency between QEMU's machine protocol and the MCD debug
> protocol which is not to be expected. For this reason, v2 introduces a MCD
> monitor which uses as much of the QMP monitor's framework as possible but
> keeps the two protocols separate from each other.
> Similarly, MCD's test suite uses as much of the qtest framework as is useful
> for sending JSON commands to the QEMU under test but adds new code where
> required to prevent dependencies to QMP.
>
> To enable MCD, configure QEMU with `--enable-mcd`.
>
> To start the MCD monitor, run QEMU with the `-mcd` option:
> qemu-system-<arch> [options] -qmp tcp::1235,server=on,wait=off
>
> To run the MCD test suite independently, start `mcd-test`:
> V=1 QTEST_QEMU_BINARY="./qemu-system-<arch> [options]" tests/qtest/mcd-test
>
> To connect from a MCD client, a client stub corresponding to this
> patch series can be found at https://gitlab.com/lauterbach/mcdrefsrv

I'm okay with the general approach.

[...]

>  MAINTAINERS                   |    9 +
>  docs/interop/index.rst        |    1 +
>  docs/interop/mcd.rst          |   65 +
>  gdbstub/gdbstub.c             |   15 +-
>  include/exec/gdbstub.h        |   18 +-
>  include/exec/mcdstub.h        |   18 +
>  mcd/mcd_api.h                 | 3963 +++++++++++++++++++++++++++++++++
>  mcd/mcd_monitor.c             |   90 +
>  mcd/mcd_qapi.c                |  505 +++++
>  mcd/mcd_qapi.h                |   81 +
>  mcd/mcd_server.c              | 2274 +++++++++++++++++++
>  mcd/mcd_stub.c                |  988 ++++++++
>  mcd/meson.build               |   60 +
>  meson.build                   |    5 +
>  meson_options.txt             |    3 +
>  qapi/mcd.json                 | 2366 ++++++++++++++++++++

The schema is too big for me to review in detail.  I understand it's
designed to mirror mcd/mcd_api.h closely, so review would be limited to
checking the way you mirror is sane.  I doubt that would be a good use
of my time, but if you'd like advice on any non-trivial parts, just ask.

Some formatting nits caught my eye.  docs/devel/qapi-code-gen.rst
section "Documentation markup":

    For legibility, wrap text paragraphs so every line is at most 70
    characters long.

    Separate sentences with two spaces.

I recommend to read the entire section.

[...]



  parent reply	other threads:[~2025-05-20  7:36 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-30  5:27 [PATCH v2 00/20] Add Multi-Core Debug (MCD) API support Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 01/20] mcd: Introduce Multi-Core Debug (MCD) API Mario Fleischmann
2025-04-30  8:19   ` Daniel P. Berrangé
2025-04-30 12:47     ` Mario Fleischmann
2025-04-30 12:55       ` Daniel P. Berrangé
2025-04-30 15:22         ` Mario Fleischmann
2025-04-30 16:00           ` Daniel P. Berrangé
2025-04-30  5:27 ` [PATCH v2 02/20] meson: Add --enable-mcd option Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 03/20] mcd: Introduce MCD server Mario Fleischmann
2025-05-15  9:46   ` Daniel P. Berrangé
2025-04-30  5:27 ` [PATCH v2 04/20] qapi: Introduce MCD schema Mario Fleischmann
2025-05-08 11:07   ` Markus Armbruster
2025-05-20  7:10     ` Markus Armbruster
2025-04-30  5:27 ` [PATCH v2 05/20] mcd: Introduce MCD server stub Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 06/20] qtest: Introduce MCD test suite Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 07/20] mcd: Implement target initialization API Mario Fleischmann
2025-05-08 12:03   ` Markus Armbruster
2025-05-14 13:59     ` Mario Fleischmann
2025-05-15  9:33       ` Markus Armbruster
2025-05-15 13:02   ` Markus Armbruster
2025-05-19 16:52     ` Mario Fleischmann
2025-05-20  7:13       ` Markus Armbruster
2025-04-30  5:27 ` [PATCH v2 08/20] mcd: Implement server connection API Mario Fleischmann
2025-05-15  9:58   ` Daniel P. Berrangé
2025-05-19 16:54     ` Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 09/20] mcd: Implement target system query Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 10/20] mcd: Implement core connection control Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 11/20] mcd: Implement memory space query Mario Fleischmann
2025-05-19  9:41   ` Manos Pitsidianakis
2025-05-19 18:24     ` Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 12/20] gdbstub: Expose GDBRegisterState Mario Fleischmann
2025-05-19  8:41   ` Manos Pitsidianakis
2025-05-19 18:26     ` Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 13/20] mcd: Implement register query Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 14/20] mcd: Implement runstate control Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 15/20] mcd test: Implement core state query Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 16/20] gdbstub: Expose gdb_write_register Mario Fleischmann
2025-05-19  8:38   ` Manos Pitsidianakis
2025-04-30  5:27 ` [PATCH v2 17/20] mcd: Implement register/memory access Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 18/20] mcd: Implement single stepping Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 19/20] mcd: Implement trigger control Mario Fleischmann
2025-04-30  5:27 ` [PATCH v2 20/20] mcd: Implement reset control Mario Fleischmann
2025-05-08 11:37 ` [PATCH v2 00/20] Add Multi-Core Debug (MCD) API support Markus Armbruster
2025-05-14 14:05   ` Mario Fleischmann
2025-05-20  7:35 ` Markus Armbruster [this message]
2025-05-20 14:16   ` Mario Fleischmann
2025-07-24  5:28 ` 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=87iklvd99z.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=christian.boenig@lauterbach.com \
    --cc=mario.fleischmann@lauterbach.com \
    --cc=philmd@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.