Skip to content
Snippets Groups Projects
  1. May 23, 2016
  2. Mar 17, 2016
  3. Feb 03, 2016
  4. Jan 15, 2016
    • 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: default avatarFam Zheng <famz@redhat.com>
      Message-Id: <1452760863-25350-3-git-send-email-famz@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      798bfe00
  5. Dec 18, 2015
    • Daniel P. Berrangé's avatar
      io: add abstract QIOChannel classes · 666a3af9
      Daniel P. Berrangé 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: default avatarDaniel P. Berrange <berrange@redhat.com>
      666a3af9
  6. Nov 05, 2015
  7. Oct 24, 2015
  8. Oct 20, 2015
    • Daniel P. Berrangé's avatar
      coroutine: move into libqemuutil.a library · 10817bf0
      Daniel P. Berrangé 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: default avatarDaniel P. Berrange <berrange@redhat.com>
      10817bf0
  9. Sep 23, 2015
  10. Sep 21, 2015
    • 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: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      39a18158
  11. Sep 15, 2015
    • Daniel P. Berrangé's avatar
      qom: allow QOM to be linked into tools binaries · 0c7012e0
      Daniel P. Berrangé 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: default avatarDaniel P. Berrange <berrange@redhat.com>
      0c7012e0
    • Daniel P. Berrangé's avatar
      crypto: move crypto objects out of libqemuutil.la · fb37726d
      Daniel P. Berrangé 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: default avatarDaniel P. Berrange <berrange@redhat.com>
      fb37726d
  12. Jul 07, 2015
    • Daniel P. Berrangé's avatar
      crypto: introduce new module for computing hash digests · ddbb0d09
      Daniel P. Berrangé 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: default avatarDaniel P. Berrange <berrange@redhat.com>
      Message-Id: <1435770638-25715-2-git-send-email-berrange@redhat.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      ddbb0d09
  13. Jun 03, 2015
  14. Feb 05, 2015
    • 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: default avatarAlexander Graf <agraf@suse.de>
      Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
      Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
      190c882c
  15. Dec 16, 2014
    • 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: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
      Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
      60fe637b
  16. Oct 14, 2014
  17. Oct 04, 2014
  18. Aug 12, 2014
  19. Aug 08, 2014
  20. Jun 23, 2014
    • 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: default avatarWenchao Xia <wenchaoqemu@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarLuiz Capitulino <lcapitulino@redhat.com>
      21cd70df
  21. May 09, 2014
    • 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: default avatarMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      9d171bd9
  22. May 08, 2014
  23. Mar 13, 2014
    • 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: default avatarStefan Hajnoczi <stefanha@redhat.com>
      be8d8537
  24. Mar 04, 2014
  25. Feb 20, 2014
  26. Jan 22, 2014
  27. Jan 13, 2014
  28. Sep 09, 2013
    • Tomoki Sekiyama's avatar
      qemu-ga: Add Windows VSS provider and requester as DLL · b39297ae
      Tomoki Sekiyama authored
      
      Adds VSS provider and requester as a qga-vss.dll, which is loaded by
      Windows VSS service as well as by qemu-ga.
      
      "provider.cpp" implements a basic stub of a software VSS provider.
      Currently, this module only relays a frozen event from VSS service to the
      agent, and thaw event from the agent to VSS service, to block VSS process
      to keep the system frozen while snapshots are taken at the host.
      
      To register the provider to the guest system as COM+ application, the type
      library (.tlb) for qga-vss.dll is required. To build it from COM IDL (.idl),
      VisualC++, MIDL and stdole2.tlb in Windows SDK are required. This patch also
      adds pre-compiled .tlb file in the repository in order to enable
      cross-compile qemu-ga.exe for Windows with VSS support.
      
      "requester.cpp" provides the VSS requester to kick the VSS snapshot process.
      Qemu-ga.exe works without the DLL, although fsfreeze features are disabled.
      
      These functions are only supported in Windows 2003 or later. In older
      systems, fsfreeze features are disabled.
      
      In several versions of Windows which don't support attribute
      VSS_VOLSNAP_ATTR_NO_AUTORECOVERY, DoSnapshotSet fails with error
      VSS_E_OBJECT_NOT_FOUND. In this patch, we just ignore this error.
      To solve this fundamentally, we need a framework to handle mount writable
      snapshot on guests, which is required by VSS auto-recovery feature
      (cleanup phase after a snapshot is taken).
      
      Signed-off-by: default avatarTomoki Sekiyama <tomoki.sekiyama@hds.com>
      Signed-off-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      b39297ae
  29. Aug 12, 2013
  30. Jul 23, 2013
  31. Jun 06, 2013
  32. May 06, 2013
    • Eduardo Habkost's avatar
      target-i386: Add "feature-words" property to X86CPU · 8e8aba50
      Eduardo Habkost authored
      
      This property will be useful for libvirt, as libvirt already has logic
      based on low-level feature bits (not feature names), so it will be
      really easy to convert the current libvirt logic to something using the
      "feature-words" property.
      
      The property will have two main use cases:
       - Checking host capabilities, by checking the features of the "host"
         CPU model
       - Checking which features are enabled on each CPU model
      
      Example output:
      
        $ ./QMP/qmp --path=/tmp/m \
          qom-get --path=/machine/icc-bridge/icc/child[0] \
                  --property=feature-words
        item[0].cpuid-register: EDX
        item[0].cpuid-input-eax: 2147483658
        item[0].features: 0
        item[1].cpuid-register: EAX
        item[1].cpuid-input-eax: 1073741825
        item[1].features: 0
        item[2].cpuid-register: EDX
        item[2].cpuid-input-eax: 3221225473
        item[2].features: 0
        item[3].cpuid-register: ECX
        item[3].cpuid-input-eax: 2147483649
        item[3].features: 101
        item[4].cpuid-register: EDX
        item[4].cpuid-input-eax: 2147483649
        item[4].features: 563346425
        item[5].cpuid-register: EBX
        item[5].cpuid-input-eax: 7
        item[5].features: 0
        item[5].cpuid-input-ecx: 0
        item[6].cpuid-register: ECX
        item[6].cpuid-input-eax: 1
        item[6].features: 2155880449
        item[7].cpuid-register: EDX
        item[7].cpuid-input-eax: 1
        item[7].features: 126614521
      
      Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: default avatarEric Blake <eblake@redhat.com>
      Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
      8e8aba50
  33. Apr 24, 2013
  34. Apr 15, 2013
    • Paolo Bonzini's avatar
      tpm: reorganize headers and split hardware part · bdee56f5
      Paolo Bonzini authored
      
      The TPM subsystem does not have a full front-end/back-end separation.
      The sole available backend, tpm_passthrough, depends on the data
      structures of the sole available frontend, tpm_tis.
      
      However, we can at least try to split the user interface (tpm.c) from the
      implementation (hw/tpm).  The patches makes tpm.c not include tpm_int.h,
      which is shared between tpm_tis.c and tpm_passthrough.c; instead it
      moves more stuff to tpm_backend.h.
      
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      bdee56f5
  35. Apr 08, 2013
    • Peter Maydell's avatar
      configure: Don't fall back to gthread coroutine backend · 7c2acc70
      Peter Maydell authored
      
      The gthread coroutine backend is broken and does not produce a working
      QEMU; it is only useful for some very limited debugging situations.
      Clean up the backend selection logic in configure so that it now runs
      "if on windows use windows; else prefer ucontext; else sigaltstack".
      
      To do this we refactor the configure code to separate out "test
      whether we have a working ucontext", "pick a default if user didn't
      specify" and "validate that user didn't specify something invalid",
      rather than having all three of these run together. We also simplify
      the Makefile logic so it just links in the backend the configure
      script selects.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1365419487-19867-3-git-send-email-peter.maydell@linaro.org
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      7c2acc70
  36. Mar 12, 2013
    • Stefan Berger's avatar
      Support for TPM command line options · d1a0cf73
      Stefan Berger authored
      
      This patch adds support for TPM command line options.
      The command line options supported here are
      
      ./qemu-... -tpmdev passthrough,path=<path to TPM device>,id=<id>
                 -device tpm-tis,tpmdev=<id>,id=<other id>
      
      and
      
      ./qemu-... -tpmdev help
      
      where the latter works similar to -soundhw help and shows a list of
      available TPM backends (for example 'passthrough').
      
      Using the type parameter, the backend is chosen, i.e., 'passthrough' for the
      passthrough driver. The interpretation of the other parameters along
      with determining whether enough parameters were provided is pushed into
      the backend driver, which needs to implement the interface function
      'create' and return a TPMDriverOpts structure if the VM can be started or
      'NULL' if not enough or bad parameters were provided.
      
      Monitor support for 'info tpm' has been added. It for example prints the
      following:
      
      (qemu) info tpm
      TPM devices:
       tpm0: model=tpm-tis
        \ tpm0: type=passthrough,path=/dev/tpm0,cancel-path=/sys/devices/pnp0/00:09/cancel
      
      Signed-off-by: default avatarStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: default avatarCorey Bryant <coreyb@linux.vnet.ibm.com>
      Reviewed-by: default avatarJoel Schopp <jschopp@linux.vnet.ibm.com>
      Message-id: 1361987275-26289-2-git-send-email-stefanb@linux.vnet.ibm.com
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      d1a0cf73
Loading