• 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: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • 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: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • 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: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • 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: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
    Blue Swirl authored
     
    Browse Code »

  • destroy_nic() requires that NICInfo::private by a PCIDevice pointer,
    but then goes on to require that the same pointer matches
    VLANClientState::opaque.
    
    That is no longer the case for virtio-net since qdev and wasn't
    previously the case for rtl8139, ne2k_pci or eepro100.
    
    Make the situation a lot more clear by maintaining a VLANClientState
    pointer in NICInfo.
    
    Signed-off-by: Mark McLoughlin <markmc@redhat.com>
    Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
    Mark McLoughlin authored
     
    Browse Code »
  • 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: Gerd Hoffmann <kraxel@redhat.com>
    Gerd Hoffmann authored
     
    Browse Code »
  • 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: Gerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: Paul Brook <paul@codesourcery.com>
    Gerd Hoffmann authored
     
    Browse Code »








  • 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: Paul Brook <paul@codesourcery.com>
    Paul Brook authored
     
    Browse File »