1. 21 7月, 2009 1 次提交
  2. 17 7月, 2009 5 次提交
    • B
      Suppress a Sparse warning · a9ff9df1
      Blue Swirl 提交于
      Move the export to a file used by both qdev.c and sysbus.c.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      a9ff9df1
    • G
      qdev: add user-specified identifier to devices. · ccb63de3
      Gerd Hoffmann 提交于
      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: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ccb63de3
    • G
      qdev: add no_user, alias and desc · 3320e56e
      Gerd Hoffmann 提交于
      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: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      3320e56e
    • G
      qdev/compat: compat property infrastructure. · b6b61144
      Gerd Hoffmann 提交于
      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: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b6b61144
    • G
      qdev: rework device properties. · ee6847d1
      Gerd Hoffmann 提交于
      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: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      ee6847d1
  3. 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
  4. 11 6月, 2009 1 次提交
  5. 05 6月, 2009 2 次提交
  6. 04 6月, 2009 1 次提交
  7. 26 5月, 2009 1 次提交
  8. 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
  9. 17 5月, 2009 1 次提交
  10. 15 5月, 2009 4 次提交