qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 013e11: qdev: remove duplication between qbus


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 013e11: qdev: remove duplication between qbus_create and q...
Date: Fri, 01 Feb 2013 17:30:24 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 013e118247d0f1894f329ad31b8f8a9e279555f3
      
https://github.com/qemu/qemu/commit/013e118247d0f1894f329ad31b8f8a9e279555f3
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev.c

  Log Message:
  -----------
  qdev: remove duplication between qbus_create and qbus_create_inplace

Move the common part to qbus_realize.

Acked-by: Andreas Färber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6
      
https://github.com/qemu/qemu/commit/39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev-core.h
    M hw/qdev.c

  Log Message:
  -----------
  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 <address@hidden>
Acked-by: Andreas F=E4rber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 4fec6404465fdb1f09670b1451605c7cbf87c01e
      
https://github.com/qemu/qemu/commit/4fec6404465fdb1f09670b1451605c7cbf87c01e
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/pci/pci.c

  Log Message:
  -----------
  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.

Acked-by: Andreas Färber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 52e636cdd8528b8f72f43b653356ac177524912b
      
https://github.com/qemu/qemu/commit/52e636cdd8528b8f72f43b653356ac177524912b
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M qom/object.c

  Log Message:
  -----------
  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.

Acked-by: Andreas Färber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 6c232d2ffb7cf60e9fdf5dc17c5d5f7fe6d1ca64
      
https://github.com/qemu/qemu/commit/6c232d2ffb7cf60e9fdf5dc17c5d5f7fe6d1ca64
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M include/qom/object.h

  Log Message:
  -----------
  qom: document reference counting of link properties

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 9d127820ebbdc76592e3922cbbe803533455f9a2
      
https://github.com/qemu/qemu/commit/9d127820ebbdc76592e3922cbbe803533455f9a2
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev.c

  Log Message:
  -----------
  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.

Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 6853d27a1253cd29c43d08b0624e7938a48d52a7
      
https://github.com/qemu/qemu/commit/6853d27a1253cd29c43d08b0624e7938a48d52a7
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev.c

  Log Message:
  -----------
  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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 06f7f2bb562826101468f387b4a34971b16e9aee
      
https://github.com/qemu/qemu/commit/06f7f2bb562826101468f387b4a34971b16e9aee
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev.c

  Log Message:
  -----------
  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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 62d7ba669dbd5b4c92664eea453d28448ab9cb4b
      
https://github.com/qemu/qemu/commit/62d7ba669dbd5b4c92664eea453d28448ab9cb4b
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev.c

  Log Message:
  -----------
  qdev: add reference for the bus while it is referred to by the DeviceState

Now that the unparent callbacks are complete, we can correctly account
more missing references.

Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: dc7389b79a15082fa4824bd3de966499f3b8cb2a
      
https://github.com/qemu/qemu/commit/dc7389b79a15082fa4824bd3de966499f3b8cb2a
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev.c

  Log Message:
  -----------
  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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: b09995aef1d4a5879000a196a82e37b0511c8e03
      
https://github.com/qemu/qemu/commit/b09995aef1d4a5879000a196a82e37b0511c8e03
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M hw/qdev-monitor.c
    M hw/qdev.c
    M vl.c

  Log Message:
  -----------
  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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 5c099537a646370d85f9a0f6bc18371ceeeb14dc
      
https://github.com/qemu/qemu/commit/5c099537a646370d85f9a0f6bc18371ceeeb14dc
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M linux-user/syscall.c
    M target-i386/helper.c
    M target-ppc/translate_init.c
    M target-sparc/cpu.c

  Log Message:
  -----------
  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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: b76facc35b0153cee5a8972f8a3c70694a7e3913
      
https://github.com/qemu/qemu/commit/b76facc35b0153cee5a8972f8a3c70694a7e3913
  Author: Paolo Bonzini <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M include/qom/object.h
    M qom/object.c

  Log Message:
  -----------
  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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: 02cd809099322d6bdbd3fb232e9dd1018b125866
      
https://github.com/qemu/qemu/commit/02cd809099322d6bdbd3fb232e9dd1018b125866
  Author: Anthony Liguori <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M net/tap.c

  Log Message:
  -----------
  tap: unbreak -netdev tap,fd=X

The multiqueue patch series broke -netdev tap,fd=X which manifests
as libvirt not being able to start a guest.  This was because it
passed NULL for the netdev name which results in an anonymous netdev
device regardless of what the user specified.

Cc: Jason Wang <address@hidden>
Cc: Bruce Rogers <address@hidden>
Reported-by: Bruce Rogers <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>


  Commit: abd8d4a4d6dfea7ddea72f095f993e1de941614e
      
https://github.com/qemu/qemu/commit/abd8d4a4d6dfea7ddea72f095f993e1de941614e
  Author: Anthony Liguori <address@hidden>
  Date:   2013-02-01 (Fri, 01 Feb 2013)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Update version for 1.4.0-rc0

Signed-off-by: Anthony Liguori <address@hidden>


Compare: https://github.com/qemu/qemu/compare/d5286af5ef27...abd8d4a4d6df

reply via email to

[Prev in Thread] Current Thread [Next in Thread]