1. 18 Sep, 2019 1 commit
    • Stefan Hajnoczi's avatar
      virtio-fs: add virtiofs filesystem · a62a8ef9
      Stefan Hajnoczi authored
      
      
      Add a basic file system module for virtio-fs.  This does not yet contain
      shared data support between host and guest or metadata coherency speedups.
      However it is already significantly faster than virtio-9p.
      
      Design Overview
      ===============
      
      With the goal of designing something with better performance and local file
      system semantics, a bunch of ideas were proposed.
      
       - Use fuse protocol (instead of 9p) for communication between guest and
         host.  Guest kernel will be fuse client and a fuse server will run on
         host to serve the requests.
      
       - For data access inside guest, mmap portion of file in QEMU address space
         and guest accesses this memory using dax.  That way guest page cache is
         bypassed and there is only one copy of data (on host).  This will also
         enable mmap(MAP_SHARED) between guests.
      
       - For metadata coherency, there is a shared memory region which contains
         version number associated with metadata and any guest changing metadata
         updates version number and other guests refresh metadata on next access.
         This is yet to be implemented.
      
      How virtio-fs differs from existing approaches
      ==============================================
      
      The unique idea behind virtio-fs is to take advantage of the co-location of
      the virtual machine and hypervisor to avoid communication (vmexits).
      
      DAX allows file contents to be accessed without communication with the
      hypervisor.  The shared memory region for metadata avoids communication in
      the common case where metadata is unchanged.
      
      By replacing expensive communication with cheaper shared memory accesses,
      we expect to achieve better performance than approaches based on network
      file system protocols.  In addition, this also makes it easier to achieve
      local file system semantics (coherency).
      
      These techniques are not applicable to network file system protocols since
      the communications channel is bypassed by taking advantage of shared memory
      on a local machine.  This is why we decided to build virtio-fs rather than
      focus on 9P or NFS.
      
      Caching Modes
      =============
      
      Like virtio-9p, different caching modes are supported which determine the
      coherency level as well.  The “cache=FOO” and “writeback” options control
      the level of coherence between the guest and host filesystems.
      
       - cache=none
         metadata, data and pathname lookup are not cached in guest.  They are
         always fetched from host and any changes are immediately pushed to host.
      
       - cache=always
         metadata, data and pathname lookup are cached in guest and never expire.
      
       - cache=auto
         metadata and pathname lookup cache expires after a configured amount of
         time (default is 1 second).  Data is cached while the file is open
         (close to open consistency).
      
       - writeback/no_writeback
         These options control the writeback strategy.  If writeback is disabled,
         then normal writes will immediately be synchronized with the host fs.
         If writeback is enabled, then writes may be cached in the guest until
         the file is closed or an fsync(2) performed.  This option has no effect
         on mmap-ed writes or writes going through the DAX mechanism.
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      a62a8ef9
  2. 05 Jul, 2019 1 commit
  3. 06 Jun, 2019 1 commit
  4. 15 Dec, 2016 1 commit
    • Gonglei's avatar
      crypto: add virtio-crypto driver · dbaf0624
      Gonglei authored
      This patch introduces virtio-crypto driver for Linux Kernel.
      
      The virtio crypto device is a virtual cryptography device
      as well as a kind of virtual hardware accelerator for
      virtual machines. The encryption anddecryption requests
      are placed in the data queue and are ultimately handled by
      thebackend crypto accelerators. The second queue is the
      control queue used to create or destroy sessions for
      symmetric algorithms and will control some advanced features
      in the future. The virtio crypto device provides the following
      cryptoservices: CIPHER, MAC, HASH, and AEAD.
      
      For more information about virtio-crypto device, please see:
        http://qemu-project.org/Features/VirtioCrypto
      
      
      
      CC: Michael S. Tsirkin <mst@redhat.com>
      CC: Cornelia Huck <cornelia.huck@de.ibm.com>
      CC: Stefan Hajnoczi <stefanha@redhat.com>
      CC: Herbert Xu <herbert@gondor.apana.org.au>
      CC: Halil Pasic <pasic@linux.vnet.ibm.com>
      CC: David S. Miller <davem@davemloft.net>
      CC: Zeng Xin <xin.zeng@intel.com>
      Signed-off-by: default avatarGonglei <arei.gonglei@huawei.com>
      Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      dbaf0624
  5. 01 Aug, 2016 1 commit
  6. 09 Dec, 2015 1 commit
  7. 03 Dec, 2015 1 commit
  8. 03 Jun, 2015 1 commit
    • Dave Airlie's avatar
      Add virtio gpu driver. · dc5698e8
      Dave Airlie authored
      
      
      This patch adds a kms driver for the virtio gpu.  The xorg modesetting
      driver can handle the device just fine, the framebuffer for fbcon is
      there too.
      
      Qemu patches for the host side are under review currently.
      
      The pci version of the device comes in two variants: with and without
      vga compatibility.  The former has a extra memory bar for the vga
      framebuffer, the later is a pure virtio device.  The only concern for
      this driver is that in the virtio-vga case we have to kick out the
      firmware framebuffer.
      
      Initial revision has only 2d support, 3d (virgl) support requires
      some more work on the qemu side and will be added later.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      dc5698e8
  9. 29 Mar, 2015 1 commit
  10. 20 Mar, 2013 1 commit
    • Erwan Yvin's avatar
      caif_virtio: Introduce caif over virtio · 0d2e1a29
      Erwan Yvin authored
      
      
      Add the CAIF Virtio shared memory driver for talking
      to a modem.
      
      This CAIF Link layer communicates to the modem over
      shared memory. It is implemented as a virtio_driver.
      The underlying virtio device is managed by the remoteproc
      framework. The Virtio queue is used for transmitting data
      to the modem, and the new vringh is used for receiving data.
      
      Genalloc is used for managing the shared memory used for TX
      data. The default dma-alloc-coherent allocator can only
      allocate whole pages, and this wastes too much shared memory.
      
      Flow control is implemented by stopping the TX-queues if the
      virtio queues go full or we run out of memory. Queued are
      reopened when queues are below the watermark.
      
      NAPI is used in RX path, and a dedicated tasklet is used
      for releasing TX buffers.
      
      Signed-off-by: default avatarErwan Yvin <erwan.yvin@stericsson.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (minor fixes)
      0d2e1a29
  11. 18 Dec, 2012 1 commit
  12. 13 Oct, 2012 1 commit
  13. 30 Jul, 2012 1 commit
  14. 19 Feb, 2012 1 commit
  15. 08 Feb, 2012 1 commit
    • Ohad Ben-Cohen's avatar
      rpmsg: add virtio-based remote processor messaging bus · bcabbcca
      Ohad Ben-Cohen authored
      
      
      Add a virtio-based inter-processor communication bus, which enables
      kernel drivers to communicate with entities, running on remote
      processors, over shared memory using a simple messaging protocol.
      
      Every pair of AMP processors share two vrings, which are used to send
      and receive the messages over shared memory.
      
      The header of every message sent on the rpmsg bus contains src and dst
      addresses, which make it possible to multiplex several rpmsg channels on
      the same vring.
      
      Every rpmsg channel is a device on this bus. When a channel is added,
      and an appropriate rpmsg driver is found and probed, it is also assigned
      a local rpmsg address, which is then bound to the driver's callback.
      
      When inbound messages carry the local address of a bound driver,
      its callback is invoked by the bus.
      
      This patch provides a kernel interface only; user space interfaces
      will be later exposed by kernel users of this rpmsg bus.
      
      Designed with Brian Swetland <swetland@google.com>.
      
      Signed-off-by: default avatarOhad Ben-Cohen <ohad@wizery.com>
      Acked-by: Rusty Russell <rusty@rustcorp.com.au> (virtio_ids.h)
      Cc: Brian Swetland <swetland@google.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg KH <greg@kroah.com>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      bcabbcca
  16. 30 May, 2011 1 commit
  17. 23 Sep, 2009 1 commit