1. 20 Jun, 2016 13 commits
  2. 23 May, 2016 1 commit
  3. 17 Mar, 2016 1 commit
  4. 03 Feb, 2016 1 commit
  5. 15 Jan, 2016 1 commit
    • Fam Zheng's avatar
      nbd: Split nbd.c · 798bfe00
      Fam Zheng authored
      We have NBD server code and client code, all mixed in a file. Now split
      them into separate files under nbd/, and update MAINTAINERS.
      
      filter_nbd for iotest 083 is updated to keep the log filtered out.
      Signed-off-by: 's avatarFam Zheng <famz@redhat.com>
      Message-Id: <1452760863-25350-3-git-send-email-famz@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      798bfe00
  6. 18 Dec, 2015 1 commit
    • Daniel P. Berrange's avatar
      io: add abstract QIOChannel classes · 666a3af9
      Daniel P. Berrange authored
      Start the new generic I/O channel framework by defining a
      QIOChannel abstract base class. This is designed to feel
      similar to GLib's GIOChannel, but with the addition of
      support for using iovecs, qemu error reporting, file
      descriptor passing, coroutine integration and use of
      the QOM framework for easier sub-classing.
      
      The intention is that anywhere in QEMU that almost
      anywhere that deals with sockets will use this new I/O
      infrastructure, so that it becomes trivial to then layer
      in support for TLS encryption. This will at least include
      the VNC server, char device backend and migration code.
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      666a3af9
  7. 05 Nov, 2015 1 commit
  8. 24 Oct, 2015 1 commit
  9. 20 Oct, 2015 1 commit
    • Daniel P. Berrange's avatar
      coroutine: move into libqemuutil.a library · 10817bf0
      Daniel P. Berrange authored
      The coroutine files are currently referenced by the block-obj-y
      variable. The coroutine functionality though is already used by
      more than just the block code. eg migration code uses coroutine
      yield. In the future the I/O channel code will also use the
      coroutine yield functionality. Since the coroutine code is nicely
      self-contained it can be easily built as part of the libqemuutil.a
      library, making it widely available.
      
      The headers are also moved into include/qemu, instead of the
      include/block directory, since they are now part of the util
      codebase, and the impl was never in the block/ directory
      either.
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      10817bf0
  10. 23 Sep, 2015 1 commit
  11. 21 Sep, 2015 1 commit
    • Markus Armbruster's avatar
      qapi: New QMP command query-qmp-schema for QMP introspection · 39a18158
      Markus Armbruster authored
      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: 's avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      39a18158
  12. 15 Sep, 2015 2 commits
    • Daniel P. Berrange's avatar
      qom: allow QOM to be linked into tools binaries · 0c7012e0
      Daniel P. Berrange authored
      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: 's avatarDaniel P. Berrange <berrange@redhat.com>
      0c7012e0
    • Daniel P. Berrange's avatar
      crypto: move crypto objects out of libqemuutil.la · fb37726d
      Daniel P. Berrange authored
      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: 's avatarDaniel P. Berrange <berrange@redhat.com>
      fb37726d
  13. 07 Jul, 2015 1 commit
    • Daniel P. Berrange's avatar
      crypto: introduce new module for computing hash digests · ddbb0d09
      Daniel P. Berrange authored
      Introduce a new crypto/ directory that will (eventually) contain
      all the cryptographic related code. This initially defines a
      wrapper for initializing gnutls and for computing hashes with
      gnutls. The former ensures that gnutls is guaranteed to be
      initialized exactly once in QEMU regardless of CLI args. The
      block quorum code currently fails to initialize gnutls so it
      only works by luck, if VNC server TLS is not requested. The
      hash APIs avoids the need to litter the rest of the code with
      preprocessor checks and simplifies callers by allocating the
      correct amount of memory for the requested hash.
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1435770638-25715-2-git-send-email-berrange@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      ddbb0d09
  14. 03 Jun, 2015 1 commit
  15. 05 Feb, 2015 1 commit
    • Alexander Graf's avatar
      QJSON: Add JSON writer · 190c882c
      Alexander Graf authored
      To support programmatic JSON assembly while keeping the code that generates it
      readable, this patch introduces a simple JSON writer. It emits JSON serially
      into a buffer in memory.
      
      The nice thing about this writer is its simplicity and low memory overhead.
      Unlike the QMP JSON writer, this one does not need to spawn QObjects for every
      element it wants to represent.
      
      This is a prerequisite for the migration stream format description generator.
      Signed-off-by: 's avatarAlexander Graf <agraf@suse.de>
      Signed-off-by: 's avatarAmit Shah <amit.shah@redhat.com>
      Signed-off-by: 's avatarJuan Quintela <quintela@redhat.com>
      190c882c
  16. 16 Dec, 2014 1 commit
    • Dr. David Alan Gilbert's avatar
      Start migrating migration code into a migration directory · 60fe637b
      Dr. David Alan Gilbert authored
      The migration code now occupies a fair chunk of the top level .c
      files, it seems time to give it it's own directory.
      
      I've not touched:
         arch_init.c - that's mostly RAM migration but has a few random other
                       bits
         savevm.c    - because it's built target specific
      
      This is purely a code move; no code has changed.
         - it fails checkpatch because of old violations, it feels safer
           to keep this as purely a move and fix those at some mythical future
           date.
      
      The xbzrle and vmstate tests are now only run for softmmu builds
      since they require files in the migrate/ directory which is only built
      for softmmu.
      Signed-off-by: 's avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: 's avatarAmit Shah <amit.shah@redhat.com>
      60fe637b
  17. 14 Oct, 2014 2 commits
  18. 04 Oct, 2014 1 commit
  19. 12 Aug, 2014 1 commit
  20. 08 Aug, 2014 1 commit
  21. 23 Jun, 2014 1 commit
    • Wenchao Xia's avatar
      qapi script: add event support · 21cd70df
      Wenchao Xia authored
      qapi-event.py will parse the schema and generate qapi-event.c, then
      the API in qapi-event.c can be used to handle events in qemu code.
      All API have prefix "qapi_event".
      
      The script mainly includes two parts: generate API for each event
      define, generate an enum type for all defined events.
      
      Since in some cases the real emit behavior may change, for example,
      qemu-img would not send a event, a callback layer is used to
      control the behavior. As a result, the stubs at compile time
      can be saved, the binding of block layer code and monitor code
      will become looser.
      Signed-off-by: 's avatarWenchao Xia <wenchaoqemu@gmail.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Signed-off-by: 's avatarLuiz Capitulino <lcapitulino@redhat.com>
      21cd70df
  22. 09 May, 2014 1 commit
    • Michael Tokarev's avatar
      libcacard: remove libcacard-specific CFLAGS and LIBS from global vars · 9d171bd9
      Michael Tokarev authored
      Currently all what's needed for single file libcacard/vcard_emul_nss.c
      (libnss cflags) and hw/usb/ccid-card-emulated.c (libcacard includes)
      together with the libs is added to global QEMU_CFLAGS and libs_softmmu.
      
      Use the cflags only where really used (for two mentioned files), and
      libs only where needed.
      
      While at it, rename variables to better reflect reality: libcacard_*
      is really nss_*.
      
      This needs a bit more tweaking: $(NSS_LIBS) should not contain $glib_libs
      (ditto for _cflags).  But in order to fix it, some more preparations
      should be made first.  So add a FIXME comment.
      Signed-off-by: 's avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      9d171bd9
  23. 08 May, 2014 1 commit
  24. 13 Mar, 2014 1 commit
    • Stefan Hajnoczi's avatar
      iothread: add I/O thread object · be8d8537
      Stefan Hajnoczi authored
      This is a stand-in for Michael Roth's QContext.  I expect this to be
      replaced once QContext is completed.
      
      The IOThread object is an AioContext event loop thread.  This patch adds
      the concept of multiple event loop threads, allowing users to define
      them.
      
      When SMP guests run on SMP hosts it makes sense to instantiate multiple
      IOThreads.  This spreads event loop processing across multiple cores.
      Note that additional patches are required to actually bind a device to
      an IOThread.
      
      [Andreas Färber <afaerber@suse.de> pointed out that the embedded parent
      object instance should be called "parent_obj" and have a newline
      afterwards.  This patch has been changed to reflect this.
      -- Stefan]
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
      be8d8537
  25. 04 Mar, 2014 1 commit
  26. 20 Feb, 2014 1 commit