1. 11 5月, 2015 8 次提交
    • E
      json-parser: Accept 'null' in QMP · e549e716
      Eric Blake 提交于
      We document that in QMP, the client may send any json-value
      for the optional "id" key, and then return that same value
      on reply (both success and failures, insofar as the failure
      happened after parsing the id).  [Note that the output may
      not be identical to the input, as whitespace may change and
      since we may reorder keys within a json-object, but that this
      still constitutes the same json-value].  However, we were not
      handling the JSON literal null, which counts as a json-value
      per RFC 7159.
      
      Also, down the road, given the QAPI schema of {'*foo':'str'} or
      {'*foo':'ComplexType'}, we could decide to allow the QMP client
      to pass { "foo":null } instead of the current representation of
      { } where omitting the key is the only way to get at the default
      NULL value.  Such a change might be useful for argument
      introspection (if a type in older qemu lacks 'foo' altogether,
      then an explicit "foo":null probe will force an easily
      distinguished error message for whether the optional "foo" key
      is even understood in newer qemu).  And if we add default values
      to optional arguments, allowing an explicit null would be
      required for getting a NULL value associated with an optional
      string that has a non-null default.  But all that can come at a
      later day.
      
      The 'check-unit' testsuite is enhanced to test that parsing
      produces the same object as explicitly requesting a reference
      to the special qnull object.  In addition, I tested with:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -qmp stdio -nodefaults
      {"QMP": {"version": {"qemu": {"micro": 91, "minor": 2, "major": 2}, "package": ""}, "capabilities": []}}
      {"execute":"qmp_capabilities","id":null}
      {"return": {}, "id": null}
      {"id":{"a":null,"b":[1,null]},"execute":"quit"}
      {"return": {}, "id": {"a": null, "b": [1, null]}}
      {"timestamp": {"seconds": 1427742379, "microseconds": 423128}, "event": "SHUTDOWN"}
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      e549e716
    • M
      qobject: Add a special null QObject · 481b002c
      Markus Armbruster 提交于
      I'm going to fix the JSON parser to recognize null.  The obvious
      representation of JSON null as (QObject *)NULL doesn't work, because
      the parser already uses it as an error value.  Perhaps we should
      change it to free NULL for null, but that's more than I can do right
      now.  Create a special null QObject instead.
      
      The existing QDict, QList, and QString all represent something that
      is a pointer in C and could therefore be associated with NULL.  But
      right now, all three of these sub-types are always non-null once
      created, so the new null sentinel object is intentionally unrelated
      to them.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      481b002c
    • M
      qobject: Clean up around qtype_code · a7c31816
      Markus Armbruster 提交于
      QTYPE_NONE is a sentinel value.  No QObject has this type code.
      Document it properly.
      
      Fix dump_qobject() to abort() on QTYPE_NONE, just like for any other
      invalid type code.
      
      Fix to_json() to abort() on all invalid type codes, not just
      QTYPE_MAX.
      
      Clean up Property member qtype's type: it's a qtype_code.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      a7c31816
    • E
      QJSON: Use OBJECT_CHECK · 4cf2d837
      Eduardo Habkost 提交于
      The QJSON code used casts to (QJSON*) directly, instead of OBJECT_CHECK.
      There were even some functions using object_dynamic_cast() calls
      followed by assert(), which is exactly what OBJECT_CHECK does (by
      calling object_dynamic_cast_assert()).
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      4cf2d837
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · b951cda2
      Peter Maydell 提交于
      - build bugfix from Fam and new configure check from Emilio
      - two improvements to "info mtere" from Gerd
      - KVM support for memory transaction attributes
      - one more small step towards unlocked MMIO dispatch
      - one piece of the qemu-nbd errno fixes
      - trivial-ish patches from Denis and Thomas
      
      # gpg: Signature made Fri May  8 13:47:29 2015 BST using RSA key ID 78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>"
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>"
      # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
      # gpg:          It is not certain that the signature belongs to the owner.
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream:
        qemu-nbd: only send a limited number of errno codes on the wire
        rules.mak: Force CFLAGS for all objects in DSO
        configure: require __thread support
        exec: move rcu_read_lock/unlock to address_space_translate callers
        kvm: add support for memory transaction attributes
        mtree: also print disabled regions
        mtree: tag & indent a bit better
        apic_common: improve readability of apic_reset_common
        kvm: Silence warning from valgrind
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b951cda2
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20150508-1' into staging · ec62ad1e
      Peter Maydell 提交于
      gtk: add ui_info support, cleanups + fixes.
      
      # gpg: Signature made Fri May  8 12:47:04 2015 BST using RSA key ID D3E87138
      # 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>"
      
      * remotes/kraxel/tags/pull-gtk-20150508-1:
        gtk: update mouse position in mouse_set()
        gtk: create gtk.h
        gtk: add ui_info support
        console: add dpy_ui_info_supported
        console: delayed ui_info guest notification
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      ec62ad1e
    • P
      Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20150508-1' into staging · 4ae740cc
      Peter Maydell 提交于
      usb: qomify, bugfixes for xhci & uhci.
      
      # gpg: Signature made Fri May  8 12:39:28 2015 BST using RSA key ID D3E87138
      # 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>"
      
      * remotes/kraxel/tags/pull-usb-20150508-1:
        uhci: controller is halted after reset
        usb: usb-serial QOMify
        usb: usb-redir QOMify
        usb: usb-wacom-tablet QOMify
        usb: usb-uas QOMify
        usb: usb-storage QOMify
        usb: usb-ccid QOMify
        usb: usb-net QOMify
        usb-mtp: fix segmentation fault
        usb: usb-mtp QOMify
        usb: usb-hub QOMify
        usb: usb-hid QOMify
        usb: usb-bt QOMify
        usb: usb-audio QOMify
        uhci: QOMify
        xhci: fix events for setup trb.
        Revert "xhci: generate a Transfer Event for each Transfer TRB with the IOC bit set"
        xhci: set timer to retry xfers
        usb: fix usb-net segfault
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      4ae740cc
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20150508' into staging · fc85cf4a
      Peter Maydell 提交于
      Assorted s390x patches:
      - updates for virtio-ccw and s390-virtio, making them more similar
        to virtio-pci
      - improvements regarding per-vcpu interrupts and migration
      
      # gpg: Signature made Fri May  8 09:45:09 2015 BST using RSA key ID C6F02FAF
      # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>"
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
      
      * remotes/cohuck/tags/s390x-20150508:
        s390x/kvm: migrate vcpu interrupt state
        s390x: move fpu regs into a subsection of the vmstate
        s390x/kvm: use ioctl KVM_S390_IRQ for vcpu interrupts
        virtio-ccw: implement ->device_plugged
        virtio-ccw: change realization sequence
        s390-virtio: clear {used,avail}_event_idx on reset as well
        s390-virtio: use common features
        s390-virtio: Accommodate guests using virtqueues too early
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      fc85cf4a
  2. 08 5月, 2015 32 次提交