1. 28 7月, 2009 37 次提交
  2. 27 7月, 2009 3 次提交
    • G
      qdev: add -device command line option. · bd3c948d
      Gerd Hoffmann 提交于
      The -device switch is the users frontend to the qdev_device_add function
      added by the previous patch.
      
      Also adds a linked list where command line options can be saved.
      Use it for the new -device and for the -usbdevice and -bt switches.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      bd3c948d
    • 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