Skip to content

Commits

Permalink
qdev-free
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Jan 25, 2013

  1. qom: remove object_delete

    This is now unused.  Document the initial reference count of an object
    and when it will be freed/finalized.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    703946c View commit details
    Browse the repository at this point in the history
  2. cpu: do not use object_delete

    CPUs are never added to the composition tree, so delete is achieved
    simply by removing the last references to them.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    a57ba43 View commit details
    Browse the repository at this point in the history
  3. qdev: drop extra references at creation time

    qdev_free and qbus_free have to do unparent+unref, because nobody else
    drops the initial reference (the one included by object_initialize)
    before them.
    
    For device_init_func and do_device_add, this is trivially correct,
    since the DeviceState goes out of scope.
    
    For qdev_create, qdev_try_create and qbus_init, it is a bit more tricky.
    What we are doing here is just assuming that the caller knows what it's
    doing, and won't call qdev_free/qbus_free while the device is still there.
    This is a pretty reasonable assumption and (behind the scenes) is also
    what GObject/GTK does.  GTK actually has a "floating reference" that
    goes away as soon as the caller does gtk_container_add or something
    like that, but in the end qbus_init and qdev_try_create are already
    adding the new object to its qdev parent!  So in the end the two solutions
    are the same.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    c40d125 View commit details
    Browse the repository at this point in the history
  4. qdev: inline object_delete into qbus_free/qdev_free

    We want object_delete to disappear, and we will do this one class at a
    time.  Inline it for the qdev case, which we will tackle first.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    64cc850 View commit details
    Browse the repository at this point in the history
  5. qdev: add reference for the bus while it is referred to by the Device…

    …State
    
    Now that the unparent callbacks are complete, we can correctly account
    more missing references.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    9535cd1 View commit details
    Browse the repository at this point in the history
  6. qdev: move unrealization of devices from finalize to unparent

    Similarly, a bus holds a reference back to the device, and this will
    prevent the device from going away as soon as this reference is counted
    properly.  To avoid this, move the unrealization of devices to the
    unparent callback.  This includes recursively unparenting all the buses
    and (after the previous patch) the devices on those buses, which ensures
    that the web of references completely disappears for all devices that
    reside (in the qdev tree) below the one being unplugged.
    
    After this patch, the qdev tree and the bus<->child relationship is
    defined as "A is above B, iff unplugging A will automatically unplug B".
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    a76f056 View commit details
    Browse the repository at this point in the history
  7. qdev: move deletion of children from finalize to unparent

    A device will never be finalized as long as it has a reference from
    other devices that sit on its buses.  To ensure that the references
    go away, deassociate a bus from its children in the unparent callback
    for the bus.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    0e48f0d View commit details
    Browse the repository at this point in the history
  8. qdev: add reference count to a device for the BusChild

    Each device has a reference through the BusChild.  This reference
    was not accounted for, add it now.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    35d1d6b View commit details
    Browse the repository at this point in the history
  9. qom: document reference counting of link properties

    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    a768192 View commit details
    Browse the repository at this point in the history
  10. qom: preserve object while unparenting it

    Avoid that the object disappears after it's deleted from the QOM
    composition tree, in case that was the only reference to it.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    8e69493 View commit details
    Browse the repository at this point in the history
  11. pci: use qbus_create in pci_bus_new

    Remove knowledge of QOM innards.  The common part of pci_bus_new and
    pci_bus_new_inplace is moved to a new function pci_bus_init.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    a9c020b View commit details
    Browse the repository at this point in the history
  12. qdev: change first argument of qbus_create_inplace to void *

    Make it clear that no BUS() macro is needed in the callers (in fact it
    wouldn't work because the object has not been initialized yet with the
    right class).
    
    Suggested-by: Andreas Faerber <afaerber@suse.de>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    5863f64 View commit details
    Browse the repository at this point in the history
  13. qdev: remove duplication between qbus_create and qbus_create_inplace

    Move the common part to qbus_realize.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 25, 2013
    Copy the full SHA
    75b836e View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2013

  1. Merge remote-tracking branch 'bonzini/scsi-next' into staging

    # By Paolo Bonzini (1) and Peter Lieven (1)
    # Via Paolo Bonzini
    * bonzini/scsi-next:
      iscsi: add support for iovectors
      iscsi: do not leak acb->buf when commands are aborted
    Anthony Liguori committed Jan 24, 2013
    Copy the full SHA
    11c2991 View commit details
    Browse the repository at this point in the history
  2. Revert "serial: fix retry logic"

    This reverts commit 67c5322:
    
        I'm not sure if the retry logic has ever worked when not using FIFO mode.  I
        found this while writing a test case although code inspection confirms it is
        definitely broken.
    
        The TSR retry logic will never actually happen because it is guarded by an
        'if (s->tsr_rety > 0)' but this is the only place that can ever make the
        variable greater than zero.  That effectively makes the retry logic an 'if (0)
    
        I believe this is a typo and the intention was >= 0.  Once this is fixed thoug
        I see double transmits with my test case.  This is because in the non FIFO
        case, serial_xmit may get invoked while LSR.THRE is still high because the
        character was processed but the retransmit timer was still active.
    
        We can handle this by simply checking for LSR.THRE and returning early.  It's
        possible that the FIFO paths also need some attention.
    
        Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
        Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    
    Even if the previous logic was never worked, new logic breaks stuff -
    namely,
    
     qemu -enable-kvm -nographic -kernel /boot/vmlinuz-$(uname -r) -append console=ttyS0 -serial pty
    
    the above command will cause the virtual machine to stuck at startup
    using 100% CPU till one connects to the pty and sends any char to it.
    
    Note this is rather typical invocation for various headless virtual
    machines by libvirt.
    
    So revert this change for now, till a better solution will be found.
    
    Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Michael Tokarev authored and Anthony Liguori committed Jan 24, 2013
    Copy the full SHA
    b37a2e4 View commit details
    Browse the repository at this point in the history
  3. iscsi: add support for iovectors

    This patch adds support for directly passing the iovec
    array from QEMUIOVector if libiscsi supports it (1.8.0
    or newer).
    
    Signed-off-by: Peter Lieven <pl@kamp.de>
    [Preserve the improvements from commit 4cc841b, iscsi: partly
     avoid iovec linearization in iscsi_aio_writev, 2012-11-19 - Paolo]
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    plieven authored and bonzini committed Jan 24, 2013
    Copy the full SHA
    7371d56 View commit details
    Browse the repository at this point in the history
  4. iscsi: do not leak acb->buf when commands are aborted

    acb->buf is freed in the WRITE(16) callback, but this may not
    get called at all when commands are aborted.  Add another
    free in the ABORT TASK callback, which requires setting acb->buf
    to NULL everywhere.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 24, 2013
    Copy the full SHA
    4790b03 View commit details
    Browse the repository at this point in the history
  5. target-cris: Fix typo in D_LOG() macro

    It's __VA_ARGS__. Fixes the build with CRIS_[OP_]HELPER_DEBUG defined.
    
    Broken since r6338 / 93fcfe3 (Convert
    references to logfile/loglevel to use qemu_log*() macros).
    
    Cc: Eduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
    afaerber authored and edgarigl committed Jan 24, 2013
    Copy the full SHA
    3f668b6 View commit details
    Browse the repository at this point in the history
  6. trivial: etraxfs_eth: Eliminate checkpatch errors

    This is a trivial patch to harmonize the coding style on
    hw/etraxfs_eth.c. This is in preparation to split off the bitbang mdio
    code into a separate file.
    
    Cc: Peter Maydell <peter.maydell@linaro.org>
    Cc: Paul Brook <paul@codesourcery.com>
    Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
    Cc: Anthony Liguori <aliguori@us.ibm.com>
    Cc: Andreas Färber <afaerber@suse.de>
    Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
    Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
    glikely authored and edgarigl committed Jan 24, 2013
    Copy the full SHA
    9fc7577 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2013

  1. Merge remote-tracking branch 'bonzini/scsi-next' into staging

    # By Peter Lieven (3) and others
    # Via Paolo Bonzini
    * bonzini/scsi-next:
      scsi: Drop useless null test in scsi_unit_attention()
      lsi: use qbus_reset_all to reset SCSI bus
      scsi: fix segfault with 0-byte disk
      iscsi: add support for iSCSI NOPs [v2]
      iscsi: partly avoid iovec linearization in iscsi_aio_writev
      iscsi: add iscsi_create support
    Anthony Liguori committed Jan 23, 2013
    Copy the full SHA
    177f7fc View commit details
    Browse the repository at this point in the history
  2. Merge remote-tracking branch 'kraxel/usb.77' into staging

    # By Gerd Hoffmann
    # Via Gerd Hoffmann
    * kraxel/usb.77:
      usb: add usb-bot device (scsi bulk-only transport).
      ohci: add missing break
      Revert "usb-storage: Drop useless null test in usb_msd_handle_data()"
    Anthony Liguori committed Jan 23, 2013
    Copy the full SHA
    36ba580 View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'spice/spice.v68' into staging

    # By Alon Levy
    # Via Gerd Hoffmann
    * spice/spice.v68:
      qxl: change rom size to 8192
      qxl: stop using non revision 4 rom fields for revision < 4
    Anthony Liguori committed Jan 23, 2013
    Copy the full SHA
    a29a6b7 View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2013

  1. scsi: Drop useless null test in scsi_unit_attention()

    req was created by scsi_req_alloc(), which initializes req->dev to a
    value it dereferences.  req->dev isn't changed anywhere else.
    Therefore, req->dev can't be null.
    
    Drop the useless null test; it spooks Coverity.
    
    Signed-off-by: Markus Armbruster <armbru@redhat.com>
    Markus Armbruster authored and bonzini committed Jan 22, 2013
    Copy the full SHA
    0bf8264 View commit details
    Browse the repository at this point in the history
  2. lsi: use qbus_reset_all to reset SCSI bus

    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 22, 2013
    Copy the full SHA
    032f010 View commit details
    Browse the repository at this point in the history
  3. scsi: fix segfault with 0-byte disk

    When a 0-sized disk is found, READ CAPACITY will return a
    LUN NOT READY error.  However, because it returns -1 instead
    of zero, the HBA will call scsi_req_continue.  This will
    typically cause a segmentation fault or an assertion failure.
    
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    bonzini committed Jan 22, 2013
    Copy the full SHA
    0369f06 View commit details
    Browse the repository at this point in the history
  4. iscsi: add support for iSCSI NOPs [v2]

    This patch will send NOP-Out PDUs every 5 seconds to the iSCSI target.
    If a consecutive number of NOP-In replies fail a reconnect is initiated.
    iSCSI NOPs help to ensure that the connection to the target is still operational.
    This should not, but in reality may be the case even if the TCP connection is still
    alive if there are bugs in either the target or the initiator implementation.
    
    v2:
     - track the NOPs inside libiscsi so libiscsi can reset the counter
       in case it initiates a reconnect.
    
    Signed-off-by: Peter Lieven <pl@kamp.de>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    plieven authored and bonzini committed Jan 22, 2013
    Copy the full SHA
    5b5d34e View commit details
    Browse the repository at this point in the history
  5. iscsi: partly avoid iovec linearization in iscsi_aio_writev

    libiscsi expects all write16 data in a linear buffer. If the
    iovec only contains one buffer we can skip the linearization
    step as well as the additional malloc/free and pass the
    buffer directly.
    
    Reported-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
    Signed-off-by: Peter Lieven <pl@kamp.de>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    plieven authored and bonzini committed Jan 22, 2013
    Copy the full SHA
    4cc841b View commit details
    Browse the repository at this point in the history
  6. iscsi: add iscsi_create support

    This patch adds support for bdrv_create. This allows e.g.
    to use qemu-img to convert from any supported device to
    an iscsi backed storage as destination.
    
    Signed-off-by: Peter Lieven <pl@kamp.de>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    plieven authored and bonzini committed Jan 22, 2013
    Copy the full SHA
    de8864e View commit details
    Browse the repository at this point in the history
  7. usb: add usb-bot device (scsi bulk-only transport).

    Basically the same as usb-storage, but without automatic scsi
    device setup.  Also features support for up to 16 LUNs.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    kraxel committed Jan 22, 2013
    Copy the full SHA
    3470733 View commit details
    Browse the repository at this point in the history
  8. ohci: add missing break

    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    kraxel committed Jan 22, 2013
    Copy the full SHA
    7fa96d7 View commit details
    Browse the repository at this point in the history
  9. qxl: change rom size to 8192

    This is a simpler solution to 869981, where migration breaks since qxl's
    rom bar size has changed. Instead of ignoring fields in QXLRom, which is what has
    actually changed, we remove some of the modes, a mechanism already
    accounted for by the guest. The modes left allow for portrait and
    landscape only modes, corresponding to orientations 0 and 1.
    Orientations 2 and 3 are dropped.
    
    Added assert so that rom size will fit the future QXLRom increases via
    spice-protocol changes.
    
    This patch has been tested with 6.1.0.10015. With the newer 6.1.0.10016
    there are problems with both "(flipped)" modes prior to the patch, and
    the patch loses the ability to set "Portrait" modes. But this is a
    separate bug to be fixed in the driver, and besides the patch doesn't
    affect the new arbitrary mode setting functionality.
    
    Signed-off-by: Alon Levy <alevy@redhat.com>
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Alon Levy authored and kraxel committed Jan 22, 2013
    Copy the full SHA
    038c187 View commit details
    Browse the repository at this point in the history
  10. Revert "usb-storage: Drop useless null test in usb_msd_handle_data()"

    This reverts commit a1cbfd5.
    
    Test isn't useless.  scsi_req_enqueue() may finish the request (will
    actually happen for requests which don't trigger any I/O such as
    INQUIRY), then call usb_msd_command_complete() which in turn will
    set s->req to NULL after unref'ing it.
    
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    kraxel committed Jan 22, 2013
    Copy the full SHA
    f4c0e50 View commit details
    Browse the repository at this point in the history
  11. qxl: stop using non revision 4 rom fields for revision < 4

    Signed-off-by: Alon Levy <alevy@redhat.com>
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Alon Levy authored and kraxel committed Jan 22, 2013
    Copy the full SHA
    e0ac609 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2013

  1. sysbus: Drop sysbus_from_qdev() cast macro

    Replace by SYS_BUS_DEVICE() QOM cast macro using a scripted conversion.
    Avoids the old macro creeping into new code.
    
    Resolve a Coding Style warning in openpic code.
    
    Signed-off-by: Andreas Färber <afaerber@suse.de>
    Cc: Anthony Liguori <anthony@codemonkey.ws>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    afaerber authored and Anthony Liguori committed Jan 21, 2013
    Copy the full SHA
    1356b98 View commit details
    Browse the repository at this point in the history
  2. vnc: fix possible uninitialized removals

    Some VncState values are not initialized before the Websocket handshake.
    If it fails QEMU segfaults during the cleanup. To prevent this behavior
    intialization checks are added.
    
    Signed-off-by: Tim Hardeck <thardeck@suse.de>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    thardeck authored and Anthony Liguori committed Jan 21, 2013
    Copy the full SHA
    6fd8e79 View commit details
    Browse the repository at this point in the history
Older