1. 25 9月, 2015 1 次提交
  2. 24 9月, 2015 1 次提交
  3. 21 9月, 2015 1 次提交
    • M
      qapi: New QMP command query-qmp-schema for QMP introspection · 39a18158
      Markus Armbruster 提交于
      qapi/introspect.json defines the introspection schema.  It's designed
      for QMP introspection, but should do for similar uses, such as QGA.
      
      The introspection schema does not reflect all the rules and
      restrictions that apply to QAPI schemata.  A valid QAPI schema has an
      introspection value conforming to the introspection schema, but the
      converse is not true.
      
      Introspection lowers away a number of schema details, and makes
      implicit things explicit:
      
      * The built-in types are declared with their JSON type.
      
        All integer types are mapped to 'int', because how many bits we use
        internally is an implementation detail.  It could be pressed into
        external interface service as very approximate range information,
        but that's a bad idea.  If we need range information, we better do
        it properly.
      
      * Implicit type definitions are made explicit, and given
        auto-generated names:
      
        - Array types, named by appending "List" to the name of their
          element type, like in generated C.
      
        - The enumeration types implicitly defined by simple union types,
          named by appending "Kind" to the name of their simple union type,
          like in generated C.
      
        - Types that don't occur in generated C.  Their names start with ':'
          so they don't clash with the user's names.
      
      * All type references are by name.
      
      * The struct and union types are generalized into an object type.
      
      * Base types are flattened.
      
      * Commands take a single argument and return a single result.
      
        Dictionary argument or list result is an implicit type definition.
      
        The empty object type is used when a command takes no arguments or
        produces no results.
      
        The argument is always of object type, but the introspection schema
        doesn't reflect that.
      
        The 'gen': false directive is omitted as implementation detail.
      
        The 'success-response' directive is omitted as well for now, even
        though it's not an implementation detail, because it's not used by
        QMP.
      
      * Events carry a single data value.
      
        Implicit type definition and empty object type use, just like for
        commands.
      
        The value is of object type, but the introspection schema doesn't
        reflect that.
      
      * Types not used by commands or events are omitted.
      
        Indirect use counts as use.
      
      * Optional members have a default, which can only be null right now
      
        Instead of a mandatory "optional" flag, we have an optional default.
        No default means mandatory, default null means optional without
        default value.  Non-null is available for optional with default
        (possible future extension).
      
      * Clients should *not* look up types by name, because type names are
        not ABI.  Look up the command or event you're interested in, then
        follow the references.
      
        TODO Should we hide the type names to eliminate the temptation?
      
      New generator scripts/qapi-introspect.py computes an introspection
      value for its input, and generates a C variable holding it.
      
      It can generate awfully long lines.  Marked TODO.
      
      A new test-qmp-input-visitor test case feeds its result for both
      tests/qapi-schema/qapi-schema-test.json and qapi-schema.json to a
      QmpInputVisitor to verify it actually conforms to the schema.
      
      New QMP command query-qmp-schema takes its return value from that
      variable.  Its reply is some 85KiBytes for me right now.
      
      If this turns out to be too much, we have a couple of options:
      
      * We can use shorter names in the JSON.  Not the QMP style.
      
      * Optionally return the sub-schema for commands and events given as
        arguments.
      
        Right now qmp_query_schema() sends the string literal computed by
        qmp-introspect.py.  To compute sub-schema at run time, we'd have to
        duplicate parts of qapi-introspect.py in C.  Unattractive.
      
      * Let clients cache the output of query-qmp-schema.
      
        It changes only on QEMU upgrades, i.e. rarely.  Provide a command
        query-qmp-schema-hash.  Clients can have a cache indexed by hash,
        and re-query the schema only when they don't have it cached.  Even
        simpler: put the hash in the QMP greeting.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      39a18158
  4. 16 9月, 2015 1 次提交
  5. 15 9月, 2015 2 次提交
    • D
      qom: allow QOM to be linked into tools binaries · 0c7012e0
      Daniel P. Berrange 提交于
      The qom objects are currently added to common-obj-y
      which is only linked into the system emulators. The
      later crypto patches will depend on QOM infrastructure
      and will also be used from tools binaries. Thus the QOM
      objects are moved into a new qom-obj-y variable which
      can be referenced when linking tools, system emulators
      and tests.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0c7012e0
    • D
      crypto: move crypto objects out of libqemuutil.la · fb37726d
      Daniel P. Berrange 提交于
      Future patches will be adding more crypto related APIs which
      rely on QOM infrastructure. This creates a problem, because
      QOM relies on library constructors to register objects. When
      you have a file in a static .a library though which is only
      referenced by a constructor the linker is dumb and will drop
      that file when linking to the final executable :-( The only
      workaround for this is to link the .a library to the executable
      using the -Wl,--whole-archive flag, but this creates its own
      set of problems because QEMU is relying on lazy linking for
      libqemuutil.a. Using --whole-archive majorly increases the
      size of final executables as they now contain a bunch of
      object code they don't actually use.
      
      The least bad option is to thus not include the crypto objects
      in libqemuutil.la, and instead define a crypto-obj-y variable
      that is referenced directly by all the executables that need
      this code (tools + softmmu, but not qemu-ga). We avoid pulling
      entire of crypto-obj-y into the userspace emulators as that
      would force them to link to gnutls too, which is not required.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      fb37726d
  6. 02 9月, 2015 5 次提交
  7. 28 7月, 2015 1 次提交
  8. 24 6月, 2015 2 次提交
  9. 17 6月, 2015 1 次提交
  10. 12 6月, 2015 1 次提交
  11. 03 6月, 2015 1 次提交
  12. 15 5月, 2015 2 次提交
  13. 05 5月, 2015 2 次提交
  14. 02 4月, 2015 1 次提交
  15. 18 3月, 2015 1 次提交
  16. 10 3月, 2015 1 次提交
  17. 28 2月, 2015 2 次提交
    • M
      Makefile: don't silence mak file test with V=1 · 12ccfec9
      Michael S. Tsirkin 提交于
      V=1 should show what's going on, it's not nice
      to silence things unconditionally.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <1424332114-13440-1-git-send-email-mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      12ccfec9
    • V
      Makefile: fix up parallel building under MSYS+MinGW · 23cab7b7
      Vasily Efimov 提交于
      This patch enables parallel building of QEMU in MSYS+MinGW environment.
      Currently an attempt to build QEMU in parallel fails on generation of
      version.lo (and version.o too).
      
      The cause of the failure is that when listing prerequisites "Makefile"
      references "config-host.h" by absolute path in some rules and by relative
      path in others. Make cannot figure out that these references points to the
      same file which leads to the race: the generation of "version.*" which
      requires "$(BUILD_DIR)/config-host.h" is launched in parallel with the
      generation of "config-host.h" needed by other "Makefile" targets.
      
      This patch removes "$(BUILD_DIR)/" prefix from corresponding prerequisite
      of "version.*". There is no other prerequisites "$(BUILD_DIR)/config-host.h"
      found.
      
      Also note that not every version of MSYS is able to build QEMU in parallel,
      see: "http://sourceforge.net/p/mingw/bugs/1950/". The suggested version is
      1.0.17.
      Signed-off-by: NVasily Efimov <real@ispras.ru>
      Message-Id: <1424264377-5992-1-git-send-email-real@ispras.ru>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      23cab7b7
  18. 15 1月, 2015 1 次提交
  19. 26 9月, 2014 1 次提交
    • S
      trace: install trace-events file · 89ae5831
      Stefan Hajnoczi 提交于
      Install the ./trace-events file into the data directory.  This file
      contains the list of trace events that were built into QEMU at
      compile-time.
      
      The file is a handy reference for the set of trace events that the QEMU
      binary was built with.  It is also needed by the simpletrace.py tool
      that parses binary trace data either emitted from QEMU when built with
      --enable-trace-backend=simple or by the SystemTap simpletrace script
      that QEMU provides.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 1411486175-3017-1-git-send-email-stefanha@redhat.com
      89ae5831
  20. 12 8月, 2014 4 次提交
  21. 09 8月, 2014 1 次提交
  22. 08 7月, 2014 1 次提交
  23. 27 6月, 2014 1 次提交
  24. 25 6月, 2014 1 次提交
  25. 23 6月, 2014 3 次提交
  26. 09 6月, 2014 1 次提交
    • L
      trace: Multi-backend tracing · 5b808275
      Lluís Vilanova 提交于
      Adds support to compile QEMU with multiple tracing backends at the same time.
      
      For example, you can compile QEMU with:
      
        $ ./configure --enable-trace-backends=ftrace,dtrace
      
      Where 'ftrace' can be handy for having an in-flight record of events, and 'dtrace' can be later used to extract more information from the system.
      
      This patch allows having both available without recompiling QEMU.
      Signed-off-by: NLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      5b808275