1. 16 Jul, 2009 4 commits
    • Gerd Hoffmann's avatar
      qdev: add user-specified identifier to devices. · ccb63de3
      Gerd Hoffmann authored
      
      
      Add id field to DeviceState.  Make "info qtree" print it.
      
      This helps users and management apps identifying devices in monitor
      output, which is especially useful with otherwise identical devices
      such as two virtio disks.
      
      This patch doesn't add a way to set the id, followup patches will do.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      ccb63de3
    • Gerd Hoffmann's avatar
      qdev: add no_user, alias and desc · 3320e56e
      Gerd Hoffmann authored
      
      
      no_user: prevent users from adding certain devices.
      desc: description of the device.
      alias: to allow user friendly shortcuts on the command line, i.e.
        -device usbmouse  instead of  -device "QEMU USB Mouse"  or
        -device lsi       instead of  -device lsi53c895a
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      3320e56e
    • Gerd Hoffmann's avatar
      qdev/compat: compat property infrastructure. · b6b61144
      Gerd Hoffmann authored
      
      
      This add support for switching devices into a compatibility mode
      using device properties.  Machine types can have a list of properties
      for specific devices attached to allow the easy creation of machine
      types compatible to older qemu versions.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      b6b61144
    • Gerd Hoffmann's avatar
      qdev: rework device properties. · ee6847d1
      Gerd Hoffmann authored
      
      
      This patch is a major overhaul of the device properties.  The properties
      are saved directly in the device state struct now, the linked list of
      property values is gone.
      
      Advantages:
        * We don't have to maintain the list with the property values.
        * The value in the property list and the value actually used by
          the device can't go out of sync any more (used to happen for
          the pci.devfn == -1 case) because there is only one place where
          the value is stored.
        * A record describing the property is required now, you can't set
          random properties any more.
      
      There are bus-specific and device-specific properties.  The former
      should be used for properties common to all bus drivers.  Typical
      use case is bus addressing, i.e. pci.devfn and i2c.address.
      
      Properties have a PropertyInfo struct attached with name, size and
      function pointers to parse and print properties.  A few common property
      types have PropertyInfos defined in qdev-properties.c.  Drivers are free
      to implement their own very special property parsers if needed.
      
      Properties can have default values.  If unset they are zero-filled.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
      ee6847d1
  2. 09 Jul, 2009 2 commits
    • Gerd Hoffmann's avatar
      qdev: remove DeviceType · 042f84d0
      Gerd Hoffmann authored
      
      
      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: default avatarGerd Hoffmann <kraxel@redhat.com>
      042f84d0
    • Gerd Hoffmann's avatar
      qdev: replace bus_type enum with bus_info struct. · 10c4c98a
      Gerd Hoffmann authored
      
      
      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: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarPaul Brook <paul@codesourcery.com>
      10c4c98a
  3. 11 Jun, 2009 1 commit
  4. 05 Jun, 2009 2 commits
  5. 04 Jun, 2009 1 commit
  6. 26 May, 2009 1 commit
  7. 22 May, 2009 1 commit
    • Paul Brook's avatar
      Add common BusState · 02e2da45
      Paul Brook authored
      
      
      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: default avatarPaul Brook <paul@codesourcery.com>
      02e2da45
  8. 17 May, 2009 1 commit
  9. 14 May, 2009 4 commits