02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

02 Aug, 2016

1 commit


07 Jul, 2013

1 commit

  • Currently, vhost-net and vhost-scsi are sharing the vhost core code.
    However, vhost-scsi shares the code by including the vhost.c file
    directly.

    Making vhost a separate module makes it is easier to share code with
    other vhost devices.

    Signed-off-by: Asias He
    Signed-off-by: Michael S. Tsirkin

    Asias He
     

03 May, 2013

1 commit

  • Pull virtio & lguest updates from Rusty Russell:
    "Lots of virtio work which wasn't quite ready for last merge window.

    Plus I dived into lguest again, reworking the pagetable code so we can
    move the switcher page: our fixmaps sometimes take more than 2MB now..."

    Ugh. Annoying conflicts with the tcm_vhost -> vhost_scsi rename.
    Hopefully correctly resolved.

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (57 commits)
    caif_virtio: Remove bouncing email addresses
    lguest: improve code readability in lg_cpu_start.
    virtio-net: fill only rx queues which are being used
    lguest: map Switcher below fixmap.
    lguest: cache last cpu we ran on.
    lguest: map Switcher text whenever we allocate a new pagetable.
    lguest: don't share Switcher PTE pages between guests.
    lguest: expost switcher_pages array (as lg_switcher_pages).
    lguest: extract shadow PTE walking / allocating.
    lguest: make check_gpte et. al return bool.
    lguest: assume Switcher text is a single page.
    lguest: rename switcher_page to switcher_pages.
    lguest: remove RESERVE_MEM constant.
    lguest: check vaddr not pgd for Switcher protection.
    lguest: prepare to make SWITCHER_ADDR a variable.
    virtio: console: replace EMFILE with EBUSY for already-open port
    virtio-scsi: reset virtqueue affinity when doing cpu hotplug
    virtio-scsi: introduce multiqueue support
    virtio-scsi: push vq lock/unlock into virtscsi_vq_done
    virtio-scsi: pass struct virtio_scsi to virtqueue completion function
    ...

    Linus Torvalds
     

02 May, 2013

2 commits


20 Mar, 2013

1 commit

  • Getting use of virtio rings correct is tricky, and a recent patch saw
    an implementation of in-kernel rings (as separate from userspace).

    This abstracts the business of dealing with the virtio ring layout
    from the access (userspace or direct); to do this, we use function
    pointers, which gcc inlines correctly.

    Signed-off-by: Rusty Russell
    Acked-by: Michael S. Tsirkin

    Rusty Russell
     

30 Jul, 2012

1 commit

  • 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:

    http://git.kernel.org/?p=virt/kvm/nab/qemu-kvm.git;a=shortlog;h=refs/heads/vhost-scsi

    --

    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: Michael S. Tsirkin
    Cc: Stefan Hajnoczi
    Cc: Anthony Liguori
    Cc: Zhi Yong Wu
    Cc: Paolo Bonzini
    Cc: Christoph Hellwig
    Cc: Hannes Reinecke
    Cc: Jens Axboe
    Signed-off-by: Nicholas Bellinger

    Nicholas Bellinger
     

15 Jan, 2010

1 commit

  • 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
    etc.

    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
    utilization.

    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 ,
    David L Stevens ,
    Chris Wright )

    Acked-by: Rusty Russell
    Acked-by: Arnd Bergmann
    Acked-by: "Paul E. McKenney"
    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin