1. 28 7月, 2009 1 次提交
    • G
      kill drives_table · 751c6a17
      Gerd Hoffmann 提交于
      First step cleaning up the drives handling.  This one does nothing but
      removing drives_table[], still it became seriously big.
      
      drive_get_index() is gone and is replaced by drives_get() which hands
      out DriveInfo pointers instead of a table index.  This needs adaption in
      *tons* of places all over.
      
      The drives are now maintained as linked list.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      751c6a17
  2. 27 7月, 2009 2 次提交
    • G
      qdev: bus walker + qdev_device_add() · 8ffb1bcf
      Gerd Hoffmann 提交于
      This patch implements a parser and qdev tree walker for bus paths and
      adds qdev_device_add on top of this.
      
      A bus path can be:
        (1) full path, i.e. /i440FX-pcihost/pci.0/lsi/scsi.0
        (2) bus name, i.e. "scsi.0".  Best used together with id= to make
            sure this is unique.
        (3) relative path starting with a bus name, i.e. "pci.0/lsi/scsi.0"
      
      For the (common) case of a single child bus being attached to a device
      it is enougth to specify the device only, i.e. "pci.0/lsi" will be
      accepted too.
      
      qdev_device_add() adds devices and accepts bus= parameters to find the
      bus the device should be attached to.  Without bus= being specified it
      takes the first bus it finds where the device can be attached to (i.e.
      first pci bus for pci devices, ...).
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      8ffb1bcf
    • G
      qdev: create default bus names. · d271de9f
      Gerd Hoffmann 提交于
      Create a default bus name if none is passed to qbus_create().
      
      If the parent device has DeviceState->id set it will be used to create
      the bus name,. i.e. -device lsi,id=foo will give you a scsi bus named
      "foo.0".
      
      If there is no id BusInfo->name (lowercased) will be used instead, i.e.
      -device lsi will give you a scsi bus named "scsi.0".
      
      A scsi adapter with two scsi busses would have "scsi.0" and "scsi.1" or
      "$id.0" and "$id.1" busses.  The numbers of the child busses are per
      device, i.e. when adding two lsi adapters both will have a "*.0" child
      bus.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      d271de9f
  3. 17 7月, 2009 7 次提交
  4. 10 7月, 2009 1 次提交
  5. 09 7月, 2009 2 次提交
    • G
      qdev: remove DeviceType · 042f84d0
      Gerd Hoffmann 提交于
      The only purpose DeviceType serves is creating a linked list of
      DeviceInfo structs.  This removes DeviceType and add a next field to
      DeviceInfo instead, so the DeviceInfo structs can be changed that way.
      Elimitates a pointless extra level of indirection.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      042f84d0
    • G
      qdev: replace bus_type enum with bus_info struct. · 10c4c98a
      Gerd Hoffmann 提交于
      BusInfo is filled with name and size (pretty much like I did for
      DeviceInfo as well).  There is also a function pointer to print
      bus-specific device information to the monitor.  sysbus is hooked
      up there, I've also added a print function for PCI.
      
      Device creation is slightly modified as well:  The device type search
      loop now also checks the bus type while scanning the list instead of
      complaining thereafter in case of a mismatch.  This effectively gives
      each bus a private namespace for device names.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      10c4c98a
  6. 11 6月, 2009 1 次提交
  7. 10 6月, 2009 1 次提交
  8. 09 6月, 2009 3 次提交
  9. 06 6月, 2009 1 次提交
  10. 05 6月, 2009 2 次提交
  11. 04 6月, 2009 1 次提交
  12. 26 5月, 2009 1 次提交
  13. 23 5月, 2009 1 次提交
    • P
      Add common BusState · 02e2da45
      Paul Brook 提交于
      Implement and use a common device bus state.  The main side-effect is
      that creating a bus and attaching it to a parent device are no longer
      separate operations.  For legacy code we allow a NULL parent, but that
      should go away eventually.
      
      Also tweak creation code to veriry theat a device in on the right bus.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      02e2da45
  14. 17 5月, 2009 1 次提交
  15. 15 5月, 2009 4 次提交