mbox series

[0/5] qapi: Restrict machine (and migration) specific commands

Message ID 20201002133923.1716645-1-philmd@redhat.com (mailing list archive)
Headers show
Series qapi: Restrict machine (and migration) specific commands | expand

Message

Philippe Mathieu-Daudé Oct. 2, 2020, 1:39 p.m. UTC
Reduce the machine code pulled into qemu-storage-daemon.

Philippe Mathieu-Daudé (5):
  qapi: Restrict 'inject-nmi' command to machine code
  qapi: Restrict 'system wakeup/reset/powerdown' commands to
    machine.json
  qapi: Restrict '(p)memsave' command to machine code
  qapi: Restrict 'query-kvm' command to machine code
  qapi: Restrict Xen migration commands to migration.json

 qapi/machine.json      | 168 +++++++++++++++++++++++++++++++++
 qapi/migration.json    |  41 ++++++++
 qapi/misc.json         | 209 -----------------------------------------
 accel/stubs/xen-stub.c |   2 +-
 hw/i386/xen/xen-hvm.c  |   2 +-
 migration/savevm.c     |   1 -
 softmmu/cpus.c         |   1 +
 ui/gtk.c               |   1 +
 ui/cocoa.m             |   1 +
 9 files changed, 214 insertions(+), 212 deletions(-)

Comments

Markus Armbruster Oct. 5, 2020, 8:01 a.m. UTC | #1
Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Reduce the machine code pulled into qemu-storage-daemon.

I'm leaving review to Eduardo and Marcel for PATCH 1-4, and to David and
Juan for PATCH 5.  David already ACKed.

Can do the pull request.
Paolo Bonzini Oct. 5, 2020, 8:46 a.m. UTC | #2
On 05/10/20 10:01, Markus Armbruster wrote:
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> Reduce the machine code pulled into qemu-storage-daemon.
> I'm leaving review to Eduardo and Marcel for PATCH 1-4, and to David and
> Juan for PATCH 5.  David already ACKed.
> 
> Can do the pull request.
> 

If it counts, :) for patch 1-4:

Acked-by: Paolo Bonzini <pbonzini@redhat.com>

Generally these patches to remove code from user-mode emulators
fall into the "if it builds it's fine" bucket, since I assume
we want the "misc" subschema to be as small as possible.

Paolo
Markus Armbruster Oct. 5, 2020, 10:55 a.m. UTC | #3
Paolo Bonzini <pbonzini@redhat.com> writes:

> On 05/10/20 10:01, Markus Armbruster wrote:
>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>> 
>>> Reduce the machine code pulled into qemu-storage-daemon.
>> I'm leaving review to Eduardo and Marcel for PATCH 1-4, and to David and
>> Juan for PATCH 5.  David already ACKed.
>> 
>> Can do the pull request.
>> 
>
> If it counts, :) for patch 1-4:
>
> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
>
> Generally these patches to remove code from user-mode emulators
> fall into the "if it builds it's fine" bucket, since I assume
> we want the "misc" subschema to be as small as possible.

Moving stuff out of qapi/misc.json is good as long as the new home makes
sense.  So, if it builds *and* the maintainers of the new home think it
makes sense to have it there, it's fine.

I don't think we should aim for eliminating every last bit of unused
generated code from every program.  We should aim for a sensible split
into sub-modules.  Unused generated code in a program can be a sign for
a less than sensible split.