qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] ce32bf: qapi: Belatedly document modular code


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] ce32bf: qapi: Belatedly document modular code generation
Date: Mon, 18 Feb 2019 08:19:34 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ce32bf8586851866aa5902c3fa32ebd35d0188bd
      
https://github.com/qemu/qemu/commit/ce32bf8586851866aa5902c3fa32ebd35d0188bd
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  qapi: Belatedly document modular code generation

We generate code for built-ins and sub-modules into separate files
since commit cdb6610ae42 and 252dc3105fc (v2.12.0).  Both commits
neglected to update documentation.  Do that now.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 83a22d89b0d96cba0b2b6d843a443e3400322e0b
      
https://github.com/qemu/qemu/commit/83a22d89b0d96cba0b2b6d843a443e3400322e0b
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M docs/devel/qapi-code-gen.txt

  Log Message:
  -----------
  qapi: Fix up documentation for recent commit a95291007b2

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: dcac64711ea906e844ae60a5927e5580f7252c1e
      
https://github.com/qemu/qemu/commit/dcac64711ea906e844ae60a5927e5580f7252c1e
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M scripts/qapi/commands.py
    M scripts/qapi/common.py
    M scripts/qapi/events.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M tests/qapi-schema/comments.out
    M tests/qapi-schema/doc-bad-section.out
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/empty.out
    M tests/qapi-schema/event-case.out
    M tests/qapi-schema/ident-with-escape.out
    M tests/qapi-schema/include-relpath.out
    M tests/qapi-schema/include-repetition.out
    M tests/qapi-schema/include-simple.out
    M tests/qapi-schema/indented-expr.out
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  qapi: Clean up modular built-in code generation a bit

We neglect to call .visit_module() for the special module we use for
built-ins.  Harmless, but clean it up anyway.  The
tests/qapi-schema/*.out now show the built-in module as 'module None'.

Subclasses of QAPISchemaModularCVisitor need to ._add_module() this
special module to enable code generation for built-ins.  When this
hasn't been done, QAPISchemaModularCVisitor.visit_module() does
nothing for the special module.  That looks like built-ins could
accidentally be generated into the wrong module when a subclass
neglects to call ._add_module().  Can't happen, because built-ins are
all visited before any other module.  But that's non-obvious.  Switch
off code generation explicitly.

Rename QAPISchemaModularCVisitor._begin_module() to
._begin_user_module().

New QAPISchemaModularCVisitor._is_builtin_module(), for clarity.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: c2e196a9b41235a308fb6d1c516aa91ba0a807c8
      
https://github.com/qemu/qemu/commit/c2e196a9b41235a308fb6d1c516aa91ba0a807c8
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M scripts/qapi/common.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py

  Log Message:
  -----------
  qapi: Prepare for system modules other than 'builtin'

The next commit wants to generate qapi-emit-events.{c.h}.  To enable
that, extend QAPISchemaModularCVisitor to support additional "system
modules", i.e. modules that don't correspond to a (user-defined) QAPI
schema module.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 5d75648b56e6e400eafaa1c2c8616ffc5ae6148e
      
https://github.com/qemu/qemu/commit/5d75648b56e6e400eafaa1c2c8616ffc5ae6148e
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M .gitignore
    M Makefile
    M Makefile.objs
    M docs/devel/qapi-code-gen.txt
    M monitor.c
    M scripts/qapi/events.py
    M stubs/monitor.c
    M tests/test-qmp-event.c
    M ui/vnc.c

  Log Message:
  -----------
  qapi: Generate QAPIEvent stuff into separate files

Having to include qapi-events.h just for QAPIEvent is suboptimal, but
quite tolerable now.  It'll become problematic when we have events
conditional on the target, because then qapi-events.h won't be usable
from target-independent code anymore.  Avoid that by generating it
into separate files.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: c19099f637d650ae1d1a1fa4cce85f9689e315b6
      
https://github.com/qemu/qemu/commit/c19099f637d650ae1d1a1fa4cce85f9689e315b6
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M Makefile.objs
    M Makefile.target
    M tests/test-qobject-input-visitor.c

  Log Message:
  -----------
  build-sys: move qmp-introspect per target

The following patches are going to introduce per-target #ifdef in the
schemas.

The introspection data is statically generated once, and must thus be
built per-target to reflect target-specific configuration.

Drop "do_test_visitor_in_qmp_introspect(&qmp_schema_qlit)" since the
schema is no longer in a common object. It is covered by the per-target
query-qmp-schema test instead.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 88554a200590008a5846461d82b8c7967f74139f
      
https://github.com/qemu/qemu/commit/88554a200590008a5846461d82b8c7967f74139f
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M Makefile
    M Makefile.objs
    M Makefile.target
    M qapi/Makefile.objs

  Log Message:
  -----------
  build: Deal with all of QAPI's .o in qapi/Makefile.objs

Adding QAPI's .o to util-obj-y, common-obj-y and obj-y is spread over
three places: Makefile.objs takes care of target-independent generated
code, Makefile.target of target-dependent generated code, and
qapi/Makefile.objs of (target-independent) hand-written code.

Do everything in qapi/Makefile.objs.

Suggested-by: Paolo Bonzini <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 61eb9e80d5ac9d51d3bfbe4e6ca234f57e747d2b
      
https://github.com/qemu/qemu/commit/61eb9e80d5ac9d51d3bfbe4e6ca234f57e747d2b
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M qapi/Makefile.objs
    M qapi/qapi-schema.json
    A qapi/target.json

  Log Message:
  -----------
  qapi: New module target.json

We can't add appropriate target-specific conditionals to misc.json,
because that would make all of misc.json unusable in
target-independent code.  To keep misc.json target-independent, we
need to split off target-dependent target.json.

This commit doesn't actually split off anything, it merely creates the
empty module.  The next few patches will move stuff from misc.json
there.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: a6c7040fb09d44b0efb3094f1a988b43830c4c9e
      
https://github.com/qemu/qemu/commit/a6c7040fb09d44b0efb3094f1a988b43830c4c9e
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M hw/timer/mc146818rtc.c
    M monitor.c
    M qapi/misc.json
    M qapi/target.json
    M target/i386/sev_i386.h

  Log Message:
  -----------
  qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386

Move rtc-reset-reinjection and SEV in target.json and make them
conditional on TARGET_I386.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 0e2f4530c12912faa8286ac299467602c086dad5
      
https://github.com/qemu/qemu/commit/0e2f4530c12912faa8286ac299467602c086dad5
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M hw/s390x/s390-skeys.c
    M include/sysemu/arch_init.h
    M monitor.c
    M qapi/misc.json
    M qapi/target.json
    M qmp.c
    M stubs/Makefile.objs
    R stubs/arch-query-cpu-model-baseline.c
    R stubs/arch-query-cpu-model-comparison.c
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  qapi: make s390 commands depend on TARGET_S390X

Signed-off-by: Marc-André Lureau <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 46e58d1b85c3eab097ad8e943c18b2d5623b0563
      
https://github.com/qemu/qemu/commit/46e58d1b85c3eab097ad8e943c18b2d5623b0563
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M qapi/target.json

  Log Message:
  -----------
  target.json: add a note about query-cpu* not being s390x-specific

Signed-off-by: Marc-André Lureau <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 84c6499eb156f828af06563f43fe8a456d8bf56a
      
https://github.com/qemu/qemu/commit/84c6499eb156f828af06563f43fe8a456d8bf56a
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M monitor.c
    M qapi/misc.json
    M qapi/target.json
    M target/arm/monitor.c

  Log Message:
  -----------
  qapi: make query-gic-capabilities depend on TARGET_ARM

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 96f75b59b6595c305c79181d7a1b6423aec5de06
      
https://github.com/qemu/qemu/commit/96f75b59b6595c305c79181d7a1b6423aec5de06
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M include/sysemu/arch_init.h
    M monitor.c
    M qapi/misc.json
    M qapi/target.json
    M qmp.c
    M stubs/Makefile.objs
    R stubs/arch-query-cpu-model-expansion.c
    M target/i386/cpu.c
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  qapi: make query-cpu-model-expansion depend on s390 or x86

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 25a9d6ca63e9f1cbc984bc7b2c1336daf562da70
      
https://github.com/qemu/qemu/commit/25a9d6ca63e9f1cbc984bc7b2c1336daf562da70
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M include/sysemu/arch_init.h
    M monitor.c
    M qapi/misc.json
    M qapi/target.json
    M qmp.c
    M stubs/Makefile.objs
    R stubs/arch-query-cpu-def.c
    M target/arm/helper.c
    M target/i386/cpu.c
    M target/ppc/translate_init.inc.c
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  qapi: make query-cpu-definitions depend on specific targets

It depends on TARGET_PPC || TARGET_ARM || TARGET_I386 || TARGET_S390X.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Acked-by: Cornelia Huck <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 0b69f6f72ce47a37a749b056b6d5ec64c61f11e8
      
https://github.com/qemu/qemu/commit/0b69f6f72ce47a37a749b056b6d5ec64c61f11e8
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M include/qapi/qmp/dispatch.h
    M qapi/qmp-registry.c

  Log Message:
  -----------
  qapi: remove qmp_unregister_command()

This command is no longer needed, the schema has compile-time
configuration conditions.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: 093e3679517f910cc99f35b2259469472c6df9b8
      
https://github.com/qemu/qemu/commit/093e3679517f910cc99f35b2259469472c6df9b8
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M scripts/qapi/events.py

  Log Message:
  -----------
  Revert "qapi-events: add 'if' condition to implicit event enum"

This reverts commit 7bd263490590ee6fcf34ecb6203437e22f6e5a9c.

The commit applied the events' conditions to the members of enum
QAPIEvent.  Awkward, because it renders QAPIEvent unusable in
target-independent code as soon as we make an event target-dependent.
Reverting this has the following effects:

* ui/vnc.c can remain target independent.

* monitor_qapi_event_conf[] doesn't have to muck around with #ifdef.

* query-events again doesn't reflect conditionals.  I'm going to
  deprecate it in favor of query-qmp-schema.

Another option would be to split target-dependent parts off enum
QAPIEvent into a target-dependent enum.  Doesn't seem worthwhile right
now.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 9d7b70864af66a6ce04abafd4a06915cbfab16e2
      
https://github.com/qemu/qemu/commit/9d7b70864af66a6ce04abafd4a06915cbfab16e2
  Author: Markus Armbruster <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M monitor.c
    M qapi/misc.json
    M qemu-deprecated.texi

  Log Message:
  -----------
  qmp: Deprecate query-events in favor of query-qmp-schema

query-events doesn't reflect compile-time configuration.  Instead of
fixing that, deprecate the command in favor of query-qmp-schema.

Libvirt prefers query-qmp-schema as of commit 22d7222ec0 "qemu: caps:
Don't call 'query-events' when we probe events from QMP schema".
It'll be in the next release.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>


  Commit: 183e4281a30962729b760dfe8bed5aab27238b0c
      
https://github.com/qemu/qemu/commit/183e4281a30962729b760dfe8bed5aab27238b0c
  Author: Marc-André Lureau <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M hw/ppc/spapr_rtc.c
    M hw/timer/mc146818rtc.c
    M qapi/misc.json
    M qapi/target.json

  Log Message:
  -----------
  qapi: move RTC_CHANGE to the target schema

A few targets don't emit RTC_CHANGE, we could restrict the event to
the tagets that do emit it.

Note: There is a lot more of events & commands that we could restrict
to capable targets, with the cost of some additional complexity, but
the benefit of added correctness and better introspection.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>


  Commit: a0430dd8abb8a2f31c5ee919daab2e3d76353c04
      
https://github.com/qemu/qemu/commit/a0430dd8abb8a2f31c5ee919daab2e3d76353c04
  Author: Peter Maydell <address@hidden>
  Date:   2019-02-18 (Mon, 18 Feb 2019)

  Changed paths:
    M .gitignore
    M Makefile
    M Makefile.objs
    M Makefile.target
    M docs/devel/qapi-code-gen.txt
    M hw/ppc/spapr_rtc.c
    M hw/s390x/s390-skeys.c
    M hw/timer/mc146818rtc.c
    M include/qapi/qmp/dispatch.h
    M include/sysemu/arch_init.h
    M monitor.c
    M qapi/Makefile.objs
    M qapi/misc.json
    M qapi/qapi-schema.json
    M qapi/qmp-registry.c
    A qapi/target.json
    M qemu-deprecated.texi
    M qmp.c
    M scripts/qapi/commands.py
    M scripts/qapi/common.py
    M scripts/qapi/events.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M stubs/Makefile.objs
    R stubs/arch-query-cpu-def.c
    R stubs/arch-query-cpu-model-baseline.c
    R stubs/arch-query-cpu-model-comparison.c
    R stubs/arch-query-cpu-model-expansion.c
    M stubs/monitor.c
    M target/arm/helper.c
    M target/arm/monitor.c
    M target/i386/cpu.c
    M target/i386/sev_i386.h
    M target/ppc/translate_init.inc.c
    M target/s390x/cpu_models.c
    M tests/qapi-schema/comments.out
    M tests/qapi-schema/doc-bad-section.out
    M tests/qapi-schema/doc-good.out
    M tests/qapi-schema/empty.out
    M tests/qapi-schema/event-case.out
    M tests/qapi-schema/ident-with-escape.out
    M tests/qapi-schema/include-relpath.out
    M tests/qapi-schema/include-repetition.out
    M tests/qapi-schema/include-simple.out
    M tests/qapi-schema/indented-expr.out
    M tests/qapi-schema/qapi-schema-test.out
    M tests/test-qmp-event.c
    M tests/test-qobject-input-visitor.c
    M ui/vnc.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-02-18' into 
staging

QAPI patches for 2019-02-18

# gpg: Signature made Mon 18 Feb 2019 13:44:30 GMT
# gpg:                using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>" [full]
# gpg:                 aka "Markus Armbruster <address@hidden>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2019-02-18:
  qapi: move RTC_CHANGE to the target schema
  qmp: Deprecate query-events in favor of query-qmp-schema
  Revert "qapi-events: add 'if' condition to implicit event enum"
  qapi: remove qmp_unregister_command()
  qapi: make query-cpu-definitions depend on specific targets
  qapi: make query-cpu-model-expansion depend on s390 or x86
  qapi: make query-gic-capabilities depend on TARGET_ARM
  target.json: add a note about query-cpu* not being s390x-specific
  qapi: make s390 commands depend on TARGET_S390X
  qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386
  qapi: New module target.json
  build: Deal with all of QAPI's .o in qapi/Makefile.objs
  build-sys: move qmp-introspect per target
  qapi: Generate QAPIEvent stuff into separate files
  qapi: Prepare for system modules other than 'builtin'
  qapi: Clean up modular built-in code generation a bit
  qapi: Fix up documentation for recent commit a95291007b2
  qapi: Belatedly document modular code generation

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/1c5d9d8f111b...a0430dd8abb8



reply via email to

[Prev in Thread] Current Thread [Next in Thread]