1. 29 10月, 2015 2 次提交
    • M
      virtio: drop virtqueue_map_sg · 3945ecf1
      Michael S. Tsirkin 提交于
      Deprecated in favor of virtqueue_map.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      
      3945ecf1
    • M
      virtio: introduce virtio_map · 8059feee
      Michael S. Tsirkin 提交于
      virtio_map_sg currently fails if one of the entries it's mapping is
      contigious in GPA but not HVA address space.  Introduce virtio_map which
      handles this by splitting sg entries.
      
      This new API generally turns out to be a good idea since it's harder to
      misuse: at least in one case the existing one was used incorrectly.
      
      This will still fail if there's no space left in the sg, but luckily max
      queue size in use is currently 256, while max sg size is 1024, so we
      should be OK even is all entries happen to cross a single DIMM boundary.
      
      Won't work well with very small DIMM sizes, unfortunately:
      e.g. this will fail with 4K DIMMs where a single
      request might span a large number of DIMMs.
      
      Let's hope these are uncommon - at least we are not breaking things.
      
      Note: virtio-scsi calls virtio_map_sg on data loaded from network, and
      validates input, asserting on failure.  Copy the validating code here -
      it will be dropped from virtio-scsi in a follow-up patch.
      Reported-by: NIgor Mammedov <imammedo@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      
      8059feee
  2. 01 10月, 2015 1 次提交
  3. 10 9月, 2015 1 次提交
  4. 05 8月, 2015 1 次提交
  5. 27 7月, 2015 3 次提交
  6. 11 6月, 2015 5 次提交
  7. 04 6月, 2015 1 次提交
  8. 01 6月, 2015 1 次提交
  9. 31 5月, 2015 5 次提交
  10. 29 5月, 2015 1 次提交
  11. 28 4月, 2015 2 次提交
  12. 26 2月, 2015 3 次提交
  13. 10 12月, 2014 1 次提交
  14. 30 9月, 2014 1 次提交
  15. 30 6月, 2014 3 次提交
  16. 10 12月, 2013 4 次提交
  17. 12 8月, 2013 1 次提交
  18. 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
  19. 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
  20. 04 5月, 2013 1 次提交