1. 04 2月, 2010 1 次提交
  2. 20 1月, 2010 1 次提交
    • A
      virtio-console: qdev conversion, new virtio-serial-bus · 98b19252
      Amit Shah 提交于
      This commit converts the virtio-console device to create a new
      virtio-serial bus that can host console and generic serial ports. The
      file hosting this code is now called virtio-serial-bus.c.
      
      The virtio console is now a very simple qdev device that sits on the
      virtio-serial-bus and communicates between the bus and qemu's chardevs.
      
      This commit also includes a few changes to the virtio backing code for
      pci and s390 to spawn the virtio-serial bus.
      
      As a result of the qdev conversion, we get rid of a lot of legacy code.
      The old-style way of instantiating a virtio console using
      
          -virtioconsole ...
      
      is maintained, but the new, preferred way is to use
      
          -device virtio-serial -device virtconsole,chardev=...
      
      With this commit, multiple devices as well as multiple ports with a
      single device can be supported.
      
      For multiple ports support, each port gets an IO vq pair. Since the
      guest needs to know in advance how many vqs a particular device will
      need, we have to set this number as a property of the virtio-serial
      device and also as a config option.
      
      In addition, we also spawn a pair of control IO vqs. This is an internal
      channel meant for guest-host communication for things like port
      open/close, sending port properties over to the guest, etc.
      
      This commit is a part of a series of other commits to get the full
      implementation of multiport support. Future commits will add other
      support as well as ride on the savevm version that we bump up here.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      98b19252
  3. 12 12月, 2009 1 次提交
  4. 04 12月, 2009 1 次提交
  5. 03 12月, 2009 1 次提交
  6. 13 11月, 2009 1 次提交
  7. 30 10月, 2009 1 次提交
    • G
      usb core: use qdev for -usbdevice · 0958b4cc
      Gerd Hoffmann 提交于
      This patchs adds infrastructure to handle -usbdevice via qdev callbacks.
      USBDeviceInfo gets a name field (for the -usbdevice driver name) and a
      callback for -usbdevice parameter parsing.
      
      The new usbdevice_create() function walks the qdev driver list and looks
      for a usb driver with a matching name.  When a parameter parsing
      callback is present it is called, otherwise the device is created via
      usb_create_simple().
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0958b4cc
  8. 28 10月, 2009 3 次提交
  9. 15 10月, 2009 1 次提交
  10. 07 10月, 2009 4 次提交
  11. 05 10月, 2009 7 次提交
  12. 26 9月, 2009 1 次提交
    • M
      Fix coding style issue · 3df04ac3
      Mark McLoughlin 提交于
      Replace:
      
        if (-1 == foo())
      
      with:
      
        if (foo() == -1)
      
      While this coding style is not in direct contravention of our currently
      ratified CODING_STYLE treaty, it could be argued that the Article 3 of
      the European Convention on Human Rights (prohibiting torture and "inhuman
      or degrading treatment") reads on the matter.
      
      [This commit message was brought to you without humour, as is evidenced
      by the absence of any emoticons]
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      3df04ac3
  13. 12 9月, 2009 1 次提交
    • B
      Fix sys-queue.h conflict for good · 72cf2d4f
      Blue Swirl 提交于
      Problem: Our file sys-queue.h is a copy of the BSD file, but there are
      some additions and it's not entirely compatible. Because of that, there have
      been conflicts with system headers on BSD systems. Some hacks have been
      introduced in the commits 15cc9235,
      f40d7537,
      96555a96 and
      3990d09a but the fixes were fragile.
      
      Solution: Avoid the conflict entirely by renaming the functions and the
      file. Revert the previous hacks.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      72cf2d4f
  14. 10 9月, 2009 4 次提交
  15. 28 8月, 2009 2 次提交
  16. 11 8月, 2009 4 次提交
  17. 30 7月, 2009 2 次提交
  18. 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
  19. 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
  20. 17 7月, 2009 1 次提交