1. 26 1月, 2016 34 次提交
  2. 19 1月, 2016 6 次提交
    • P
      Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' into staging · 3db34bf6
      Peter Maydell 提交于
      QOM infrastructure fixes and device conversions
      
      * Dynamic class properties
      * Property iterator cleanup
      * Device hot-unplug ID race fix
      
      # gpg: Signature made Mon 18 Jan 2016 17:27:01 GMT using RSA key ID 3E7E013F
      # gpg: Good signature from "Andreas Färber <afaerber@suse.de>"
      # gpg:                 aka "Andreas Färber <afaerber@suse.com>"
      
      * remotes/afaerber/tags/qom-devices-for-peter:
        MAINTAINERS: Fix sPAPR entry heading
        qdev: Free QemuOpts when the QOM path goes away
        qom: Change object property iterator API contract
        qom: Allow properties to be registered against classes
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      3db34bf6
    • A
      MAINTAINERS: Fix sPAPR entry heading · 300b115c
      Andreas Färber 提交于
      get_maintainers.pl does not handle parenthesis in maintenance areas well
      in connection with list emails (here: qemu-ppc@nongnu.org).
      
      Resolve a recurring CC issue breaking git-send-email by reverting part
      of commit 085eb217 ("Add David Gibson
      for sPAPR in MAINTAINERS file").
      
      Cc: David Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      300b115c
    • P
      qdev: Free QemuOpts when the QOM path goes away · abed886e
      Paolo Bonzini 提交于
      Otherwise there is a race where the DEVICE_DELETED event has been sent but
      attempts to reuse the ID will fail.
      
      Note that similar races exist for other QemuOpts, which this patch
      does not attempt to fix.
      
      For example, if the device is a block device, then unplugging it also
      deletes its backend.  However, this backend's get deleted in
      drive_info_del(), which is only called when properties are
      destroyed.  Just like device_finalize(), drive_info_del() is called
      some time after DEVICE_DELETED is sent.  A separate patch series has
      been sent to plug this other bug.  Character devices also have yet to
      be fixed.
      Reported-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      abed886e
    • D
      qom: Change object property iterator API contract · 7746abd8
      Daniel P. Berrange 提交于
      Currently the ObjectProperty iterator API works as follows:
      
        ObjectPropertyIterator *iter;
      
        iter = object_property_iter_init(obj);
        while ((prop = object_property_iter_next(iter))) {
           ...
        }
        object_property_iter_free(iter);
      
      This has the benefit that the ObjectPropertyIterator struct
      can be opaque, but has the downside that callers need to
      explicitly call a free function. It is also not in keeping
      with iterator style used elsewhere in QEMU/GLib2.
      
      This patch changes the API to use stack allocation instead:
      
        ObjectPropertyIterator iter;
      
        object_property_iter_init(&iter, obj);
        while ((prop = object_property_iter_next(&iter))) {
           ...
        }
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      [AF: Fused ObjectPropertyIterator struct with typedef]
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      7746abd8
    • D
      qom: Allow properties to be registered against classes · 16bf7f52
      Daniel P. Berrange 提交于
      When there are many instances of a given class, registering
      properties against the instance is wasteful of resources. The
      majority of objects have a statically defined list of possible
      properties, so most of the properties are easily registerable
      against the class. Only those properties which are conditionally
      registered at runtime need be recorded against the klass.
      
      Registering properties against classes also makes it possible
      to provide static introspection of QOM - currently introspection
      is only possible after creating an instance of a class, which
      severely limits its usefulness.
      
      This impl only supports simple scalar properties. It does not
      attempt to allow child object / link object properties against
      the class. There are ways to support those too, but it would
      make this patch more complicated, so it is left as an exercise
      for the future.
      
      There is no equivalent to object_property_del() provided, since
      classes must be immutable once they are defined.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      16bf7f52
    • P
      hw/arm: Clean up includes · 12b16722
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1449505425-32022-4-git-send-email-peter.maydell@linaro.org
      12b16722