1. 11 7月, 2016 24 次提交
  2. 07 7月, 2016 10 次提交
  3. 06 7月, 2016 6 次提交
    • P
      Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20160706-1' into staging · 0c56c6ab
      Peter Maydell 提交于
      spice and qxl bugfixes.
      
      # gpg: Signature made Wed 06 Jul 2016 10:44:10 BST
      # gpg:                using RSA key 0x4CB6D8EED3E87138
      # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
      # gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
      # gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
      # Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138
      
      * remotes/spice/tags/pull-spice-20160706-1:
        virgl: pass whole GL scanout dimensions
        spice: use the right head for multi-monitor
        virgl: count the calls to gl_block
        spice: avoid .set_mm_time on >= 0.12.6
        qxl: fix surface migration
        qxl: store memory region and offset instead of pointer for guest slots
        qxl: factor out qxl_get_check_slot_offset
        qxl: handle no updates in interface_update_area_complete
        qxl: use uint64_t for vram size
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      0c56c6ab
    • P
      Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2016-07-06' into staging · 975b1c3a
      Peter Maydell 提交于
      QAPI patches for 2016-07-06
      
      # gpg: Signature made Wed 06 Jul 2016 10:00:51 BST
      # gpg:                using RSA key 0x3870B400EB918653
      # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
      # gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"
      # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653
      
      * remotes/armbru/tags/pull-qapi-2016-07-06:
        replay: Use new QAPI cloning
        sockets: Use new QAPI cloning
        qapi: Add new clone visitor
        qapi: Add new visit_complete() function
        tests: Factor out common code in qapi output tests
        tests: Clean up test-string-output-visitor
        qmp-output-visitor: Favor new visit_free() function
        string-output-visitor: Favor new visit_free() function
        qmp-input-visitor: Favor new visit_free() function
        string-input-visitor: Favor new visit_free() function
        opts-visitor: Favor new visit_free() function
        qapi: Add new visit_free() function
        qapi: Add parameter to visit_end_*
        qemu-img: Don't leak errors when outputting JSON
        qapi: Improve use of qmp/types.h
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      975b1c3a
    • P
      Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging · fc5d0a2b
      Peter Maydell 提交于
      QOM infrastructure fixes and device conversions
      
      * Documentation fix
      
      # gpg: Signature made Wed 06 Jul 2016 08:26:49 BST
      # gpg:                using RSA key 0xFA2ED12D3E7E013F
      # gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
      # gpg:                 aka "Andreas Färber <afaerber@suse.com>"
      # Primary key fingerprint: 174F 0347 1BCC 221A 6175  6F96 FA2E D12D 3E7E 013F
      
      * remotes/afaerber/tags/qom-devices-for-peter:
        qom: Fix comment typo
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fc5d0a2b
    • E
      replay: Use new QAPI cloning · b6954712
      Eric Blake 提交于
      Rather than rolling our own clone via an expensive conversion
      in and back out of QObject, use the new clone visitor.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1465490926-28625-16-git-send-email-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      b6954712
    • E
      sockets: Use new QAPI cloning · 37f9e0a2
      Eric Blake 提交于
      Rather than rolling our own clone via an expensive conversion
      in and back out of QObject, use the new clone visitor.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1465490926-28625-15-git-send-email-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      37f9e0a2
    • E
      qapi: Add new clone visitor · a15fcc3c
      Eric Blake 提交于
      We have a couple places in the code base that want to deep-clone
      one QAPI object into another, and they were resorting to serializing
      the struct out to QObject then reparsing it.  A much more efficient
      version can be done by adding a new clone visitor.
      
      Since cloning is still relatively uncommon, expose the use of the
      new visitor via a QAPI_CLONE() macro that takes care of type-punning
      the underlying function pointer, rather than generating lots of
      unused functions for types that won't be cloned.  And yes, we're
      relying on the compiler treating all pointers equally, even though
      a strict C program cannot portably do so - but we're not the first
      one in the qemu code base to expect it to work (hello, glib!).
      
      The choice of adding a fourth visitor type deserves some explanation.
      On the surface, the clone visitor is mostly an input visitor (it
      takes arbitrary input - in this case, another QAPI object - and
      creates a new QAPI object during the course of the visit).  But
      ever since commit da72ab0 consolidated enum visits based on the
      visitor type, using VISITOR_INPUT would cause us to run
      visit_type_str(), even though for cloning there is nothing to do
      (we just copy the enum value across, without regards to its mapping
      to strings).   Also, since our input happens to be a QAPI object,
      we can also satisfy the internal checks for VISITOR_OUTPUT.  So in
      the end, I settled with a new VISITOR_CLONE, and chose its value
      such that many internal checks can use 'v->type & mask', sticking
      to 'v->type == value' where the difference matters.
      
      Note that we can only clone objects (including alternates) and lists,
      not built-ins or enums.  The visitor core hides integer width from
      the actual visitor (since commit 04e070d2), and as long as that's the
      case, we can't clone top-level integers.  Then again, those can
      always be cloned by direct copy, since they are not objects with
      deep pointers, so it's no real loss.  And restricting cloning to
      just objects and lists is cleaner than restricting it to non-integers.
      As such, I documented that the clone visitor is for direct use only
      by code internal to QAPI, and should not be used on incomplete objects
      (other than a hack to work around the fact that we allow NULL in place
      of "" in visit_type_str() in other output visitors).  Note that as
      written, the clone visitor will never fail on a complete object.
      
      Scalars (including enums) not at the root of the clone copy just fine
      with no additional effort while visiting the scalar, by virtue of a
      g_memdup() each time we push another struct onto the stack.  Cloning
      a string requires deduplication of a pointer, which means it can also
      provide the guarantee of an input visitor of never producing NULL
      even when still accepting NULL in place of "" the way the QMP output
      visitor does.
      
      Cloning an 'any' type could be possible by incrementing the QObject
      refcnt, but it's not obvious whether that is better than implementing
      a QObject deep clone.  So for now, we document it as unsupported,
      and intentionally omit the .type_any() callback to let a developer
      know their usage needs implementation.
      
      Add testsuite coverage for several different clone situations, to
      ensure that the code is working.  I also tested that valgrind was
      happy with the test.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1465490926-28625-14-git-send-email-eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      a15fcc3c