1. 19 1月, 2017 1 次提交
    • J
      vhost_net: device IOTLB support · c471ad0e
      Jason Wang 提交于
      This patches implements Device IOTLB support for vhost kernel. This is
      done through:
      
      1) switch to use dma helpers when map/unmap vrings from vhost codes
      2) introduce a set of VhostOps to:
         - setting up device IOTLB request callback
         - processing device IOTLB request
         - processing device IOTLB invalidation
      2) kernel support for Device IOTLB API:
      
      - allow vhost-net to query the IOMMU IOTLB entry through eventfd
      - enable the ability for qemu to update a specified mapping of vhost
      - through ioctl.
      - enable the ability to invalidate a specified range of iova for the
        device IOTLB of vhost through ioctl. In x86/intel_iommu case this is
        triggered through iommu memory region notifier from device IOTLB
        invalidation descriptor processing routine.
      
      With all the above, kernel vhost_net can co-operate with userspace
      IOMMU. For vhost-user, the support could be easily done on top by
      implementing the VhostOps.
      
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      c471ad0e
  2. 10 1月, 2017 1 次提交
  3. 18 11月, 2016 1 次提交
  4. 15 11月, 2016 3 次提交
  5. 31 10月, 2016 2 次提交
  6. 10 9月, 2016 1 次提交
    • J
      vhost: don't set vring call if no vector · 96a3d98d
      Jason Wang 提交于
      We used to set vring call fd unconditionally even if guest driver does
      not use MSIX for this vritqueue at all. This will cause lots of
      unnecessary userspace access and other checks for drivers does not use
      interrupt at all (e.g virtio-net pmd). So check and clean vring call
      fd if guest does not use any vector for this virtqueue at
      all.
      
      Perf diffs (on rx) shows lots of cpus wasted on vhost_signal() were saved:
      
      #
          28.12%  -27.82%  [vhost]           [k] vhost_signal
          14.44%   -1.69%  [kernel.vmlinux]  [k] copy_user_generic_string
           7.05%   +1.53%  [kernel.vmlinux]  [k] __free_page_frag
           6.51%   +5.53%  [vhost]           [k] vhost_get_vq_desc
      ...
      
      Pktgen tests shows 15.8% improvement on rx pps and 6.5% on tx pps.
      
      Before: RX 2.08Mpps TX 1.35Mpps
      After:  RX 2.41Mpps TX 1.44Mpps
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      96a3d98d
  7. 29 7月, 2016 12 次提交
  8. 07 7月, 2016 1 次提交
  9. 24 6月, 2016 2 次提交
  10. 07 6月, 2016 1 次提交
  11. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  12. 23 2月, 2016 1 次提交
  13. 18 2月, 2016 1 次提交
  14. 16 2月, 2016 3 次提交
  15. 29 1月, 2016 1 次提交
  16. 26 11月, 2015 1 次提交
  17. 12 11月, 2015 1 次提交
  18. 22 10月, 2015 6 次提交