1. 12 Feb, 2017 1 commit
  2. 02 Aug, 2016 1 commit
  3. 01 Aug, 2016 2 commits
  4. 09 Dec, 2015 1 commit
  5. 03 Dec, 2015 1 commit
  6. 01 Jun, 2015 1 commit
    • Greg Kurz's avatar
      vhost: cross-endian support for legacy devices · 2751c988
      Greg Kurz authored
      This patch brings cross-endian support to vhost when used to implement
      legacy virtio devices. Since it is a relatively rare situation, the
      feature availability is controlled by a kernel config option (not set
      by default).
      The vq->is_le boolean field is added to cache the endianness to be
      used for ring accesses. It defaults to native endian, as expected
      by legacy virtio devices. When the ring gets active, we force little
      endian if the device is modern. When the ring is deactivated, we
      revert to the native endian default.
      If cross-endian was compiled in, a vq->user_be boolean field is added
      so that userspace may request a specific endianness. This field is
      used to override the default when activating the ring of a legacy
      device. It has no effect on modern devices.
      Signed-off-by: default avatarGreg Kurz <gkurz@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
  7. 07 Jul, 2013 1 commit
  8. 02 May, 2013 1 commit
  9. 20 Mar, 2013 1 commit
  10. 21 Jan, 2013 1 commit
  11. 29 Jul, 2012 1 commit
    • Nicholas Bellinger's avatar
      tcm_vhost: Initial merge for vhost level target fabric driver · 057cbf49
      Nicholas Bellinger authored
      This patch adds the initial code for tcm_vhost, a Vhost level TCM
      fabric driver for virtio SCSI initiators into KVM guest.
      This code is currently up and running on v3.5-rc2 host+guest
      from target-pending/for-next-merge.
      Using tcm_vhost requires Zhi's -> Stefan -> nab's qemu vhost-scsi tree here:
      Changelog v4 -> v5:
        Expose ABI version via VHOST_SCSI_GET_ABI_VERSION + use Rev 0 as
        starting point for v3.6-rc code (Stefan + ALiguori + nab)
        Convert vhost_scsi_handle_vq() to vq_err() (nab + MST)
        Minor style fixes from checkpatch (nab)
      Changelog v3 -> v4:
        Rename vhost_vring_target -> vhost_scsi_target (mst + nab)
        Use TRANSPORT_IQN_LEN in vhost_scsi_target->vhost_wwpn[] def (nab)
        Move back to drivers/vhost/, and just use drivers/vhost/Kconfig.tcm (mst)
        Move TCM_VHOST related ioctl defines from include/linux/vhost.h ->
        drivers/vhost/tcm_vhost.h as requested by MST (nab)
        Move Kbuild.tcm include from drivers/staging -> drivers/vhost/, and
        just use 'if STAGING' around 'source drivers/vhost/Kbuild.tcm'
      Changelog v2 -> v3:
        Unlock on error in tcm_vhost_drop_nexus() (DanC)
        Fix strlen() doesn't count the terminator (DanC)
        Call kfree() on an error path (DanC)
        Convert tcm_vhost_write_pending to use target_execute_cmd (hch + nab)
        Fix another strlen() off by one in tcm_vhost_make_tport (DanC)
        Add option under drivers/staging/Kconfig, and move to drivers/vhost/tcm/
        as requested by MST (nab)
      Changelog v1 -> v2:
        Fix tv_cmd completion -> release SGL memory leak (nab)
        Fix sparse warnings for static variable usage ((Fengguang Wu)
        Fix sparse warnings for min() typing + printk format specs (Fengguang Wu)
        Convert to cmwq submission for I/O dispatch (nab + hch)
      Changelog v0 -> v1:
        Merge into single source + header file, and move to drivers/vhost/
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      Cc: Anthony Liguori <aliguori@us.ibm.com>
      Cc: Zhi Yong Wu <wuzhy@cn.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  12. 18 Feb, 2010 1 commit
  13. 21 Jan, 2010 1 commit
  14. 15 Jan, 2010 1 commit
    • Michael S. Tsirkin's avatar
      vhost_net: a kernel-level virtio server · 3a4d5c94
      Michael S. Tsirkin authored
      What it is: vhost net is a character device that can be used to reduce
      the number of system calls involved in virtio networking.
      Existing virtio net code is used in the guest without modification.
      There's similarity with vringfd, with some differences and reduced scope
      - uses eventfd for signalling
      - structures can be moved around in memory at any time (good for
        migration, bug work-arounds in userspace)
      - write logging is supported (good for migration)
      - support memory table and not just an offset (needed for kvm)
      common virtio related code has been put in a separate file vhost.c and
      can be made into a separate module if/when more backends appear.  I used
      Rusty's lguest.c as the source for developing this part : this supplied
      me with witty comments I wouldn't be able to write myself.
      What it is not: vhost net is not a bus, and not a generic new system
      call. No assumptions are made on how guest performs hypercalls.
      Userspace hypervisors are supported as well as kvm.
      How it works: Basically, we connect virtio frontend (configured by
      userspace) to a backend. The backend could be a network device, or a tap
      device.  Backend is also configured by userspace, including vlan/mac
      Status: This works for me, and I haven't see any crashes.
      Compared to userspace, people reported improved latency (as I save up to
      4 system calls per packet), as well as better bandwidth and CPU
      Features that I plan to look at in the future:
      - mergeable buffers
      - zero copy
      - scalability tuning: figure out the best threading model to use
      Note on RCU usage (this is also documented in vhost.h, near
      private_pointer which is the value protected by this variant of RCU):
      what is happening is that the rcu_dereference() is being used in a
      workqueue item.  The role of rcu_read_lock() is taken on by the start of
      execution of the workqueue item, of rcu_read_unlock() by the end of
      execution of the workqueue item, and of synchronize_rcu() by
      flush_workqueue()/flush_work(). In the future we might need to apply
      some gcc attribute or sparse annotation to the function passed to
      INIT_WORK(). Paul's ack below is for this RCU usage.
      (Includes fixes by Alan Cox <alan@linux.intel.com>,
      David L Stevens <dlstevens@us.ibm.com>,
      Chris Wright <chrisw@redhat.com>)
      Acked-by: default avatarRusty Russell <rusty@rustcorp.com.au>
      Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
      Acked-by: default avatar"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>