You need to sign in or sign up before continuing.
  • J
    qemu: Process DEVICE_DELETED event in a separate thread · 47f424c2
    Jiri Denemark 提交于
    Currently, we don not acquire any job when removing a device after
    DEVICE_DELETED event was received from QEMU. This means that if there is
    another API running at the time DEVICE_DELETED is delivered and the API
    acquired a job, we may happily change the definition of the domain the
    API is working with whenever it unlocks the domain object (e.g., to talk
    with its monitor). That said, we have to acquire a job before finishing
    device removal to make things safe. However, doing so in the main event
    loop would cause a deadlock so we need to move most of the event handler
    into a separate thread.
    
    Another good reason for both acquiring a job and handling the event in a
    separate thread is that we currently remove a device backend immediately
    after removing its frontend while we should only remove the backend once
    we already received DEVICE_DELETED event. That is, we will have to talk
    to QEMU monitor from the event handler.
    Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
    47f424c2
qemu_domain.h 13.8 KB