1. 21 3月, 2014 1 次提交
    • E
      qemu: create object for qemu monitor events · 8059afca
      Eric Blake 提交于
      Create qemu monitor events as a distinct class to normal domain
      events, because they will be filtered differently.  For ease of
      review, the logic for filtering by event name is saved for a later
      patch.
      
      * src/conf/domain_event.c (virDomainQemuMonitorEventClass): New
      class.
      (virDomainEventsOnceInit): Register it.
      (virDomainQemuMonitorEventDispose, virDomainQemuMonitorEventNew)
      (virDomainQemuMonitorEventDispatchFunc)
      (virDomainQemuMonitorEventStateRegisterID): New functions.
      * src/conf/domain_event.h (virDomainQemuMonitorEventNew)
      (virDomainQemuMonitorEventStateRegisterID): New prototypes.
      * src/libvirt_private.syms (conf/domain_conf.h): Export them.
      8059afca
  2. 13 2月, 2014 2 次提交
    • E
      event: pass reason for PM events · 6831c1d3
      Eric Blake 提交于
      Commit 57ddcc23 (v0.9.11) introduced the pmwakeup event, with
      an optional 'reason' field reserved for possible future expansion.
      But it failed to wire the field through RPC, so even if we do
      add a reason in the future, we will be unable to get it back
      to the user.
      
      Worse, commit 7ba5defb (v1.0.0) repeated the same mistake with
      the pmsuspend_disk event.
      
      As long as we are adding new RPC calls, we might as well fix
      the events to actually match the signature so that we don't have
      to add yet another RPC in the future if we do decide to start
      using the reason field.
      
      * src/remote/remote_protocol.x
      (remote_domain_event_callback_pmwakeup_msg)
      (remote_domain_event_callback_pmsuspend_msg)
      (remote_domain_event_callback_pmsuspend_disk_msg): Add reason
      field.
      * daemon/remote.c (remoteRelayDomainEventPMWakeup)
      (remoteRelayDomainEventPMSuspend)
      (remoteRelayDomainEventPMSuspendDisk): Pass reason to client.
      * src/conf/domain_event.h (virDomainEventPMWakeupNewFromDom)
      (virDomainEventPMSuspendNewFromDom)
      (virDomainEventPMSuspendDiskNewFromDom): Require additional
      parameter.
      * src/conf/domain_event.c (virDomainEventPMClass): New class.
      (virDomainEventPMDispose): New function.
      (virDomainEventPMWakeupNew*, virDomainEventPMSuspendNew*)
      (virDomainEventPMSuspendDiskNew*)
      (virDomainEventDispatchDefaultFunc): Use new class.
      * src/remote/remote_driver.c (remoteDomainBuildEvent*PM*): Pass
      reason through.
      * src/remote_protocol-structs: Regenerate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      6831c1d3
    • E
      event: prepare client to track domain callbackID · caaf6ba1
      Eric Blake 提交于
      We want to convert over to server-side events, even for older
      APIs.  To do that, the client side of the remote driver wants
      to distinguish between legacy virConnectDomainEventRegister and
      normal virConnectDomainEventRegisterAny, while knowing the
      client callbackID and the server's serverID for both types of
      registration.  The client also needs to probe whether the
      server supports server-side filtering.  However, for ease of
      review, we don't actually use the new RPCs until a later patch.
      
      * src/conf/object_event_private.h (virObjectEventStateCallbackID):
      Add parameter.
      * src/conf/object_event.c (virObjectEventCallbackListAddID)
      (virObjectEventStateRegisterID): Separate legacy from callbackID.
      (virObjectEventStateCallbackID): Pass through parameter.
      (virObjectEventCallbackLookup): Let legacy and global domain
      lifecycle events share a common remoteID.
      * src/conf/network_event.c (virNetworkEventStateRegisterID):
      Update caller.
      * src/conf/domain_event.c (virDomainEventStateRegister)
      (virDomainEventStateRegisterID, virDomainEventStateDeregister):
      Likewise.
      (virDomainEventStateRegisterClient)
      (virDomainEventStateCallbackID): Implement new functions.
      * src/conf/domain_event.h (virDomainEventStateRegisterClient)
      (virDomainEventStateCallbackID): New prototypes.
      * src/remote/remote_driver.c (private_data): Add field.
      (doRemoteOpen): Probe server feature.
      (remoteConnectDomainEventRegister)
      (remoteConnectDomainEventRegisterAny): Use new function.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      caaf6ba1
  3. 05 2月, 2014 1 次提交
    • E
      event: move event filtering to daemon (regression fix) · 11f20e43
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1058839
      
      Commit f9f56340 for CVE-2014-0028 almost had the right idea - we
      need to check the ACL rules to filter which events to send.  But
      it overlooked one thing: the event dispatch queue is running in
      the main loop thread, and therefore does not normally have a
      current virIdentityPtr.  But filter checks can be based on current
      identity, so when libvirtd.conf contains access_drivers=["polkit"],
      we ended up rejecting access for EVERY event due to failure to
      look up the current identity, even if it should have been allowed.
      
      Furthermore, even for events that are triggered by API calls, it
      is important to remember that the point of events is that they can
      be copied across multiple connections, which may have separate
      identities and permissions.  So even if events were dispatched
      from a context where we have an identity, we must change to the
      correct identity of the connection that will be receiving the
      event, rather than basing a decision on the context that triggered
      the event, when deciding whether to filter an event to a
      particular connection.
      
      If there were an easy way to get from virConnectPtr to the
      appropriate virIdentityPtr, then object_event.c could adjust the
      identity prior to checking whether to dispatch an event.  But
      setting up that back-reference is a bit invasive.  Instead, it
      is easier to delay the filtering check until lower down the
      stack, at the point where we have direct access to the RPC
      client object that owns an identity.  As such, this patch ends
      up reverting a large portion of the framework of commit f9f56340.
      We also have to teach 'make check' to special-case the fact that
      the event registration filtering is done at the point of dispatch,
      rather than the point of registration.  Note that even though we
      don't actually use virConnectDomainEventRegisterCheckACL (because
      the RegisterAny variant is sufficient), we still generate the
      function for the purposes of documenting that the filtering
      takes place.
      
      Also note that I did not entirely delete the notion of a filter
      from object_event.c; I still plan on using that for my upcoming
      patch series for qemu monitor events in libvirt-qemu.so.  In
      other words, while this patch changes ACL filtering to live in
      remote.c and therefore we have no current client of the filtering
      in object_event.c, the notion of filtering in object_event.c is
      still useful down the road.
      
      * src/check-aclrules.pl: Exempt event registration from having to
      pass checkACL filter down call stack.
      * daemon/remote.c (remoteRelayDomainEventCheckACL)
      (remoteRelayNetworkEventCheckACL): New functions.
      (remoteRelay*Event*): Use new functions.
      * src/conf/domain_event.h (virDomainEventStateRegister)
      (virDomainEventStateRegisterID): Drop unused parameter.
      * src/conf/network_event.h (virNetworkEventStateRegisterID):
      Likewise.
      * src/conf/domain_event.c (virDomainEventFilter): Delete unused
      function.
      * src/conf/network_event.c (virNetworkEventFilter): Likewise.
      * src/libxl/libxl_driver.c: Adjust caller.
      * src/lxc/lxc_driver.c: Likewise.
      * src/network/bridge_driver.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/uml/uml_driver.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      11f20e43
  4. 16 1月, 2014 1 次提交
    • E
      event: filter global events by domain:getattr ACL [CVE-2014-0028] · f9f56340
      Eric Blake 提交于
      Ever since ACL filtering was added in commit 76397360 (v1.1.1), a
      user could still use event registration to obtain access to a
      domain that they could not normally access via virDomainLookup*
      or virConnectListAllDomains and friends.  We already have the
      framework in the RPC generator for creating the filter, and
      previous cleanup patches got us to the point that we can now
      wire the filter through the entire object event stack.
      
      Furthermore, whether or not domain:getattr is honored, use of
      global events is a form of obtaining a list of networks, which
      is covered by connect:search_domains added in a93cd08f (v1.1.0).
      Ideally, we'd have a way to enforce connect:search_domains when
      doing global registrations while omitting that check on a
      per-domain registration.  But this patch just unconditionally
      requires connect:search_domains, even when no list could be
      obtained, based on the following observations:
      1. Administrators are unlikely to grant domain:getattr for one
      or all domains while still denying connect:search_domains - a
      user that is able to manage domains will want to be able to
      manage them efficiently, but efficient management includes being
      able to list the domains they can access.  The idea of denying
      connect:search_domains while still granting access to individual
      domains is therefore not adding any real security, but just
      serves as a layer of obscurity to annoy the end user.
      2. In the current implementation, domain events are filtered
      on the client; the server has no idea if a domain filter was
      requested, and must therefore assume that all domain event
      requests are global.  Even if we fix the RPC protocol to
      allow for server-side filtering for newer client/server combos,
      making the connect:serach_domains ACL check conditional on
      whether the domain argument was NULL won't benefit older clients.
      Therefore, we choose to document that connect:search_domains
      is a pre-requisite to any domain event management.
      
      Network events need the same treatment, with the obvious
      change of using connect:search_networks and network:getattr.
      
      * src/access/viraccessperm.h
      (VIR_ACCESS_PERM_CONNECT_SEARCH_DOMAINS)
      (VIR_ACCESS_PERM_CONNECT_SEARCH_NETWORKS): Document additional
      effect of the permission.
      * src/conf/domain_event.h (virDomainEventStateRegister)
      (virDomainEventStateRegisterID): Add new parameter.
      * src/conf/network_event.h (virNetworkEventStateRegisterID):
      Likewise.
      * src/conf/object_event_private.h (virObjectEventStateRegisterID):
      Likewise.
      * src/conf/object_event.c (_virObjectEventCallback): Track a filter.
      (virObjectEventDispatchMatchCallback): Use filter.
      (virObjectEventCallbackListAddID): Register filter.
      * src/conf/domain_event.c (virDomainEventFilter): New function.
      (virDomainEventStateRegister, virDomainEventStateRegisterID):
      Adjust callers.
      * src/conf/network_event.c (virNetworkEventFilter): New function.
      (virNetworkEventStateRegisterID): Adjust caller.
      * src/remote/remote_protocol.x
      (REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER)
      (REMOTE_PROC_CONNECT_DOMAIN_EVENT_REGISTER_ANY)
      (REMOTE_PROC_CONNECT_NETWORK_EVENT_REGISTER_ANY): Generate a
      filter, and require connect:search_domains instead of weaker
      connect:read.
      * src/test/test_driver.c (testConnectDomainEventRegister)
      (testConnectDomainEventRegisterAny)
      (testConnectNetworkEventRegisterAny): Update callers.
      * src/remote/remote_driver.c (remoteConnectDomainEventRegister)
      (remoteConnectDomainEventRegisterAny): Likewise.
      * src/xen/xen_driver.c (xenUnifiedConnectDomainEventRegister)
      (xenUnifiedConnectDomainEventRegisterAny): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc): Likewise.
      * src/libxl/libxl_driver.c (libxlConnectDomainEventRegister)
      (libxlConnectDomainEventRegisterAny): Likewise.
      * src/qemu/qemu_driver.c (qemuConnectDomainEventRegister)
      (qemuConnectDomainEventRegisterAny): Likewise.
      * src/uml/uml_driver.c (umlConnectDomainEventRegister)
      (umlConnectDomainEventRegisterAny): Likewise.
      * src/network/bridge_driver.c
      (networkConnectNetworkEventRegisterAny): Likewise.
      * src/lxc/lxc_driver.c (lxcConnectDomainEventRegister)
      (lxcConnectDomainEventRegisterAny): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      f9f56340
  5. 14 12月, 2013 1 次提交
  6. 11 12月, 2013 1 次提交
  7. 10 12月, 2013 12 次提交
  8. 18 7月, 2013 1 次提交
  9. 15 10月, 2012 1 次提交
    • M
      Add support for SUSPEND_DISK event · 7ba5defb
      Martin Kletzander 提交于
      This patch adds support for SUSPEND_DISK event; both lifecycle and
      separated.  The support is added for QEMU, machines are changed to
      PMSUSPENDED, but as QEMU sends SHUTDOWN afterwards, the state changes
      to shut-off.  This and much more needs to be done in order for libvirt
      to work with transient devices, wake-ups etc.  This patch is not
      aiming for that functionality.
      7ba5defb
  10. 21 9月, 2012 1 次提交
  11. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  12. 14 7月, 2012 1 次提交
    • D
      Define public API for receiving guest memory balloon events · 7ed6d7dd
      Daniel P. Berrange 提交于
      When the guest changes its memory balloon applications may want
      to know what the new value is, without having to periodically
      poll on XML / domain info. Introduce a "balloon change" event
      to let apps see this
      
      * include/libvirt/libvirt.h.in: Define the
        virConnectDomainEventBalloonChangeCallback callback
        and VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE constant
      * python/libvirt-override-virConnect.py,
        python/libvirt-override.c: Wire up helpers for new event
      * daemon/remote.c: Helper for serializing balloon event
      * examples/domain-events/events-c/event-test.c,
        examples/domain-events/events-python/event-test.py: Add
        example of balloon event usage
      * src/conf/domain_event.c, src/conf/domain_event.h: Handling
        of balloon events
      * src/remote/remote_driver.c: Add handler of balloon events
      * src/remote/remote_protocol.x: Define wire protocol for
        balloon events
      * src/remote_protocol-structs: Likewise.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      7ed6d7dd
  13. 22 5月, 2012 1 次提交
    • D
      Fix potential events deadlock when unref'ing virConnectPtr · 2cb0899e
      Daniel P. Berrange 提交于
      When the last reference to a virConnectPtr is released by
      libvirtd, it was possible for a deadlock to occur in the
      virDomainEventState functions. The virDomainEventStatePtr
      holds a reference on virConnectPtr for each registered
      callback. When removing a callback, the virUnrefConnect
      function is run. If this causes the last reference on the
      virConnectPtr to be released, then virReleaseConnect can
      be run, which in turns calls qemudClose. This function has
      a call to virDomainEventStateDeregisterConn which is intended
      to remove all callbacks associated with the virConnectPtr
      instance. This will try to grab a lock on virDomainEventState
      but this lock is already held. Deadlock ensues
      
      Thread 1 (Thread 0x7fcbb526a840 (LWP 23185)):
      
      Since each callback associated with a virConnectPtr holds a
      reference on virConnectPtr, it is impossible for the qemudClose
      method to be invoked while any callbacks are still registered.
      Thus the call to virDomainEventStateDeregisterConn must in fact
      be a no-op. Thus it is possible to just remove all trace of
      virDomainEventStateDeregisterConn and avoid the deadlock.
      
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Delete virDomainEventStateDeregisterConn
      * src/libxl/libxl_driver.c, src/lxc/lxc_driver.c,
        src/qemu/qemu_driver.c, src/uml/uml_driver.c: Remove
        calls to virDomainEventStateDeregisterConn
      2cb0899e
  14. 23 3月, 2012 3 次提交
    • O
      Add support for the suspend event · 487c0633
      Osier Yang 提交于
      This patch introduces a new event type for the QMP event
      SUSPEND:
      
          VIR_DOMAIN_EVENT_ID_PMSUSPEND
      
      The event doesn't take any data, but considering there might
      be reason for wakeup in future, the callback definition is:
      
      typedef void
      (*virConnectDomainEventSuspendCallback)(virConnectPtr conn,
                                              virDomainPtr dom,
                                              int reason,
                                              void *opaque);
      
      "reason" is unused currently, always passes "0".
      487c0633
    • O
      Add support for the wakeup event · 57ddcc23
      Osier Yang 提交于
      This patch introduces a new event type for the QMP event
      WAKEUP:
      
          VIR_DOMAIN_EVENT_ID_PMWAKEUP
      
      The event doesn't take any data, but considering there might
      be reason for wakeup in future, the callback definition is:
      
      typedef void
      (*virConnectDomainEventWakeupCallback)(virConnectPtr conn,
                                             virDomainPtr dom,
                                             int reason,
                                             void *opaque);
      
      "reason" is unused currently, always passes "0".
      57ddcc23
    • O
      Add support for event tray moved of removable disks · a26a1969
      Osier Yang 提交于
      This patch introduces a new event type for the QMP event
      DEVICE_TRAY_MOVED, which occurs when the tray of a removable
      disk is moved (i.e opened or closed):
      
          VIR_DOMAIN_EVENT_ID_TRAY_CHANGE
      
      The event's data includes the device alias and the reason
      for tray status' changing, which indicates why the tray
      status was changed. Thus the callback definition for the event
      is:
      
      enum {
          VIR_DOMAIN_EVENT_TRAY_CHANGE_OPEN = 0,
          VIR_DOMAIN_EVENT_TRAY_CHANGE_CLOSE,
      
      \#ifdef VIR_ENUM_SENTINELS
          VIR_DOMAIN_EVENT_TRAY_CHANGE_LAST
      \#endif
      } virDomainEventTrayChangeReason;
      
      typedef void
      (*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
                                                 virDomainPtr dom,
                                                 const char *devAlias,
                                                 int reason,
                                                 void *opaque);
      a26a1969
  15. 19 12月, 2011 6 次提交
    • D
      Only add the timer when a callback is registered · 707781fe
      Daniel P. Berrange 提交于
      The lifetime of the virDomainEventState object is tied to
      the lifetime of the driver, which in stateless drivers is
      tied to the lifetime of the virConnectPtr.
      
      If we add & remove a timer when allocating/freeing the
      virDomainEventState object, we can get a situation where
      the timer still triggers once after virDomainEventState
      has been freed. The timeout callback can't keep a ref
      on the event state though, since that would be a circular
      reference.
      
      The trick is to only register the timer when a callback
      is registered with the event state & remove the timer
      when the callback is unregistered.
      
      The demo for the bug is to run
      
        while true ; do date ; ../tools/virsh -q -c test:///default 'shutdown test; undefine test; dominfo test' ; done
      
      prior to this fix, it will frequently hang and / or
      crash, or corrupt memory
      707781fe
    • D
      Hide use of timers for domain event dispatch · 34ad1353
      Daniel P. Berrange 提交于
      Currently all drivers using domain events need to provide a callback
      for handling a timer to dispatch events in a clean stack. There is
      no technical reason for dispatch to go via driver specific code. It
      could trivially be dispatched directly from the domain event code,
      thus removing tedious boilerplate code from all drivers
      
      Also fix the libxl & xen drivers to pass 'true' when creating the
      virDomainEventState, since they run inside the daemon & thus always
      expect events to be present.
      
      * src/conf/domain_event.c, src/conf/domain_event.h: Internalize
        dispatch of events from timer callback
      * src/libxl/libxl_driver.c, src/lxc/lxc_driver.c,
        src/qemu/qemu_domain.c, src/qemu/qemu_driver.c,
        src/remote/remote_driver.c, src/test/test_driver.c,
        src/uml/uml_driver.c, src/vbox/vbox_tmpl.c,
        src/xen/xen_driver.c: Remove all timer dispatch functions
      34ad1353
    • D
      Remove decl of all APIs related to domain event callbacks & queues · 2c2d5337
      Daniel P. Berrange 提交于
      The virDomainEventCallbackList and virDomainEventQueue APIs are
      now solely helpers used internally by virDomainEventState APIs.
      Remove their decls from domain_event.h since no driver code should
      need to use them any more.
      
      * src/conf/domain_event.c: Make virDomainEventCallbackList and
        virDomainEventQueue APIs static & remove some unused APIs
      * src/conf/domain_event.h, src/libvirt_private.syms: Remove
        virDomainEventCallbackList and virDomainEventQueue APIs
      2c2d5337
    • D
      Remove all domain event structs from header · 06eb22df
      Daniel P. Berrange 提交于
      No caller of the domain events APIs should need to poke at the
      struct internals. Thus they should all be removed from the
      header file
      
      * src/conf/domain_event.h: Remove struct definitions
      * src/conf/domain_event.c: Add struct definitions
      06eb22df
    • D
      Add APIs to allow management of callbacks purely with virDomainEventState · 4f5326c3
      Daniel P. Berrange 提交于
      While virDomainEventState has APIs for managing removal of callbacks,
      while locked, adding callbacks in the first place requires direct
      access to the virDomainEventCallbackList structure. This is not
      threadsafe since it is bypassing the virDomainEventState locks
      
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Add APIs for managing callbacks
        via virDomainEventState.
      4f5326c3
    • D
      Return count of callbacks when registering callbacks · d09f6ba5
      Daniel P. Berrange 提交于
      When registering a callback for a particular event some callers
      need to know how many callbacks already exist for that event.
      While it is possible to ask for a count, this is not free from
      race conditions when threaded. Thus the API for registering
      callbacks should return the count of callbacks. Also rename
      virDomainEventStateDeregisterAny to virDomainEventStateDeregisterID
      
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Return count of callbacks when
        registering callbacks
      * src/libxl/libxl_driver.c, src/libxl/libxl_driver.c,
        src/qemu/qemu_driver.c, src/remote/remote_driver.c,
        src/remote/remote_driver.c, src/uml/uml_driver.c,
        src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Update
        for change in APIs
      d09f6ba5
  16. 25 10月, 2011 1 次提交
    • M
      startupPolicy: Emit event on disk source dropping · baf2ff7e
      Michal Privoznik 提交于
      If a disk source gets dropped because it is not accessible,
      mgmt application might want to be informed about this. Therefore
      we need to emit an event. The event presented in this patch
      is however a bit superset of what written above. The reason is simple:
      an intention to be easily expanded, e.g. on 'user ejected disk
      in guest' events. Therefore, callback gets source string and disk alias
      (which should be unique among a domain) and reason (an integer);
      baf2ff7e
  17. 13 10月, 2011 1 次提交
    • M
      events: Propose a separate lock for event queue · d81eee40
      Michal Privoznik 提交于
      Currently, push & pop from event queue (both server & client side)
      rely on lock from higher levels, e.g. on driver lock (qemu),
      private_data (remote), ...; This alone is not sufficient as not
      every function that interacts with this queue can/does lock,
      esp. in client where we have a different approach, "passing
      the buck".
      
      Therefore we need a separate lock just to protect event queue.
      
      For more info see:
      https://bugzilla.redhat.com/show_bug.cgi?id=743817
      d81eee40
  18. 22 7月, 2011 1 次提交
    • A
      Asynchronous event for BlockJob completion · d489b046
      Adam Litke 提交于
      When an operation started by virDomainBlockPull completes (either with
      success or with failure), raise an event to indicate the final status.
      This API allow users to avoid polling on virDomainGetBlockJobInfo if
      they would prefer to use an event mechanism.
      
      * daemon/remote.c: Dispatch events to client
      * include/libvirt/libvirt.h.in: Define event ID and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle the new event
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block_stream completion and emit a libvirt block pull event
      * src/remote/remote_driver.c: Receive and dispatch events to application
      * src/remote/remote_protocol.x: Wire protocol definition for the event
      * src/remote_protocol-structs: structure definitions for protocol verification
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event
        from QEMU monitor
      d489b046
  19. 24 6月, 2011 1 次提交
  20. 21 6月, 2011 1 次提交
    • C
      Promote virEvent*Handle/Timeout to public API · 6094ad7b
      Cole Robinson 提交于
      Since we virEventRegisterDefaultImpl is now a public API, callers need
      a way to invoke the default registered Handle and Timeout functions. We
      already have general functions for these internally, so promote
      them to the public API.
      
      v2:
          Actually add APIs to libvirt.h
      6094ad7b
  21. 15 6月, 2011 1 次提交
    • A
      Asynchronous event for BlockPull completion · 12cd77a0
      Adam Litke 提交于
      When an operation started by virDomainBlockPullAll completes (either with
      success or with failure), raise an event to indicate the final status.  This
      allows an API user to avoid polling on virDomainBlockPullInfo if they would
      prefer to use the event mechanism.
      
      * daemon/remote.c: Dispatch events to client
      * include/libvirt/libvirt.h.in: Define event ID and callback signature
      * src/conf/domain_event.c, src/conf/domain_event.h,
        src/libvirt_private.syms: Extend API to handle the new event
      * src/qemu/qemu_driver.c: Connect to the QEMU monitor event
        for block_stream completion and emit a libvirt block pull event
      * src/remote/remote_driver.c: Receive and dispatch events to application
      * src/remote/remote_protocol.x: Wire protocol definition for the event
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c: Watch for BLOCK_STREAM_COMPLETED event
        from QEMU monitor
      Signed-off-by: NAdam Litke <agl@us.ibm.com>
      12cd77a0