1. 10 12月, 2013 2 次提交
    • A
      virtio: Start converting VirtioDevice to QOM realize · 1d244b42
      Andreas Färber 提交于
      Temporarily allow either VirtioDeviceClass::init or
      VirtioDeviceClass::realize.
      
      Introduce VirtioDeviceClass::unrealize for symmetry.
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1d244b42
    • P
      virtio-bus: cleanup plug/unplug interface · 5e96f5d2
      Paolo Bonzini 提交于
      Right now we have these pairs:
      
      - virtio_bus_plug_device/virtio_bus_destroy_device.  The first
        takes a VirtIODevice, the second takes a VirtioBusState
      
      - device_plugged/device_unplug callbacks in the VirtioBusClass
        (here it's just the naming that is inconsistent)
      
      - virtio_bus_destroy_device is not called by anyone (and since
        it calls qdev_free, it would be called by the proxies---but
        then the callback is useless since the proxies can do whatever
        they want before calling virtio_bus_destroy_device)
      
      And there is a k->init but no k->exit, hence virtio_device_exit is
      overwritten by subclasses (except virtio-9p).  This cleans it up by:
      
      - renaming the device_unplug callback to device_unplugged
      
      - renaming virtio_bus_plug_device to virtio_bus_device_plugged,
        matching the callback name
      
      - renaming virtio_bus_destroy_device to virtio_bus_device_unplugged,
        removing the qdev_free, making it take a VirtIODevice and calling it
        from virtio_device_exit
      
      - adding a k->exit callback
      
      virtio_device_exit is still overwritten, the next patches will fix that.
      
      Cc: qemu-stable@nongnu.org
      Acked-by: NAndreas Faerber <afaerber@suse.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5e96f5d2
  2. 12 8月, 2013 1 次提交
  3. 19 7月, 2013 2 次提交
    • P
      virtio: Support transports which can specify the vring alignment · 6ce69d1c
      Peter Maydell 提交于
      Support virtio transports which can specify the vring alignment
      (ie where the guest communicates this to the host) by providing
      a new virtio_queue_set_align() function. (The default alignment
      remains as before.)
      
      Transports which wish to make use of this must set the
      has_variable_vring_alignment field in their VirtioBusClass
      struct to true; they can then change the alignment via
      virtio_queue_set_align().
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
      6ce69d1c
    • P
      virtio: Add support for guest setting of queue size · e63c0ba1
      Peter Maydell 提交于
      The MMIO virtio transport spec allows the guest to tell the host how
      large the queue size is. Add virtio_queue_set_num() function which
      implements this in the QEMU common virtio support code.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1373977512-28932-4-git-send-email-peter.maydell@linaro.org
      e63c0ba1
  4. 16 7月, 2013 1 次提交
    • M
      virtio-net: add feature bit for any header s/g · 488f069b
      Michael S. Tsirkin 提交于
      Old qemu versions required that 1st s/g entry is the header.
      
      Since QEMU 1.5, patchset titled "virtio-net: iovec handling cleanup"
      removed this limitation but a feature bit is needed so guests know it's
      safe to lay out header differently.
      
      This patch applies on top and adds such a feature bit to QEMU.
      It is set by default for virtio-net.
      virtio net header inline with the data is beneficial
      for latency and small packet bandwidth - guest driver
      code utilizing this feature has been acked but missed 3.11
      by a narrow margin, it's pending for 3.12.
      
      This feature bit is cleared by default when compatibility with old
      machine types is requested.
      
      Other performance-sensitive devices (blk and scsi)
      don't yet support arbitrary s/g layouts, so
      we only set this bit for virtio-net for now.
      There are plans to allow arbitrary layouts there, but
      no code has been posted yet.
      
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Reviewed-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      488f069b
  5. 04 5月, 2013 1 次提交
  6. 25 4月, 2013 5 次提交
  7. 19 4月, 2013 1 次提交
  8. 17 4月, 2013 1 次提交
  9. 09 4月, 2013 1 次提交
    • P
      hw: move headers to include/ · 0d09e41a
      Paolo Bonzini 提交于
      Many of these should be cleaned up with proper qdev-/QOM-ification.
      Right now there are many catch-all headers in include/hw/ARCH depending
      on cpu.h, and this makes it necessary to compile these files per-target.
      However, fixing this does not belong in these patches.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0d09e41a
  10. 19 3月, 2013 1 次提交
  11. 01 3月, 2013 3 次提交
  12. 08 2月, 2013 1 次提交
  13. 02 2月, 2013 2 次提交
  14. 22 1月, 2013 1 次提交
  15. 08 1月, 2013 2 次提交
  16. 20 12月, 2012 1 次提交
  17. 19 12月, 2012 3 次提交
  18. 30 11月, 2012 1 次提交
  19. 16 11月, 2012 1 次提交
  20. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  21. 28 9月, 2012 1 次提交
    • A
      virtio: Introduce virtqueue_get_avail_bytes() · 0d8d7690
      Amit Shah 提交于
      The current virtqueue_avail_bytes() is oddly named, and checks if a
      particular number of bytes are available in a vq.  A better API is to
      fetch the number of bytes available in the vq, and let the caller do
      what's interesting with the numbers.
      
      Introduce virtqueue_get_avail_bytes(), which returns the number of bytes
      for buffers marked for both, in as well as out.  virtqueue_avail_bytes()
      is made a wrapper over this new function.
      Signed-off-by: NAmit Shah <amit.shah@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      0d8d7690
  22. 07 8月, 2012 1 次提交
  23. 17 7月, 2012 1 次提交
  24. 12 7月, 2012 2 次提交
  25. 22 5月, 2012 1 次提交
  26. 19 4月, 2012 1 次提交
  27. 22 2月, 2012 1 次提交