13 Oct, 2019

1 commit


11 Oct, 2019

1 commit


19 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this work is licensed under the terms of the gnu gpl version 2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 48 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Enrico Weigelt
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190604081204.624030236@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

04 Jun, 2019

1 commit


31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    licensed under gpl version 2 only

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 3 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Armijn Hemel
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.838202816@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

27 May, 2019

1 commit

  • The condition to test is unlikely() to be true. Add the hint.

    Signed-off-by: Igor Stoppa
    Cc: "Michael S. Tsirkin"
    Cc: Jason Wang
    Cc: Virtualization@lists.linux-foundation.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Michael S. Tsirkin

    Igor Stoppa
     

21 May, 2019

1 commit


13 May, 2019

1 commit


20 Dec, 2018

1 commit


27 Jul, 2018

2 commits


29 Jun, 2018

1 commit

  • This was introduced more than a decade ago when sg chaining was
    added, but we never really caught anything with it. The scatterlist
    entry size can be critical, since drivers allocate it, so remove
    the magic member. Recently it's been triggering allocation stalls
    and failures in NVMe.

    Tested-by: Jordan Glover
    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Jens Axboe
     

07 May, 2018

1 commit

  • This was used by the ide, scsi and networking code in the past to
    determine if they should bounce payloads. Now that the dma mapping
    always have to support dma to all physical memory (thanks to swiotlb
    for non-iommu systems) there is no need to this crude hack any more.

    Signed-off-by: Christoph Hellwig
    Acked-by: Palmer Dabbelt (for riscv)
    Reviewed-by: Jens Axboe

    Christoph Hellwig
     

20 Mar, 2018

1 commit


09 Feb, 2018

1 commit

  • Pull virtio/vhost updates from Michael Tsirkin:
    "virtio, vhost: fixes, cleanups, features

    This includes the disk/cache memory stats for for the virtio balloon,
    as well as multiple fixes and cleanups"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    vhost: don't hold onto file pointer for VHOST_SET_LOG_FD
    vhost: don't hold onto file pointer for VHOST_SET_VRING_ERR
    vhost: don't hold onto file pointer for VHOST_SET_VRING_CALL
    ringtest: ring.c malloc & memset to calloc
    virtio_vop: don't kfree device on register failure
    virtio_pci: don't kfree device on register failure
    virtio: split device_register into device_initialize and device_add
    vhost: remove unused lock check flag in vhost_dev_cleanup()
    vhost: Remove the unused variable.
    virtio_blk: print capacity at probe time
    virtio: make VIRTIO a menuconfig to ease disabling it all
    virtio/ringtest: virtio_ring: fix up need_event math
    virtio/ringtest: fix up need_event math
    virtio: virtio_mmio: make of_device_ids const.
    firmware: Use PTR_ERR_OR_ZERO()
    virtio-mmio: Use PTR_ERR_OR_ZERO()
    vhost/scsi: Improve a size determination in four functions
    virtio_balloon: include disk/file caches memory statistics

    Linus Torvalds
     

01 Feb, 2018

1 commit


31 Jan, 2018

2 commits


30 Jan, 2018

4 commits


16 Dec, 2017

1 commit


08 Dec, 2017

1 commit


10 Nov, 2017

1 commit

  • MFENCE appears to be way slower than a locked instruction - let's use
    LOCK ADD unconditionally, as we always did on old 32-bit.

    Performance testing results:

    perf stat -r 10 -- ./virtio_ring_0_9 --sleep --host-affinity 0 --guest-affinity 0
    Before:
    0.922565990 seconds time elapsed ( +- 1.15% )
    After:
    0.578667024 seconds time elapsed ( +- 1.21% )

    i.e. about ~60% faster.

    Just poking at SP would be the most natural, but if we then read the
    value from SP, we get a false dependency which will slow us down.

    This was noted in this article:

    http://shipilev.net/blog/2014/on-the-fence-with-dependencies/

    And is easy to reproduce by sticking a barrier in a small non-inline
    function.

    So let's use a negative offset - which avoids this problem since we
    build with the red zone disabled.

    For userspace, use an address just below the redzone.

    The one difference between LOCK ADD and MFENCE is that LOCK ADD does
    not affect CLFLUSH, previous patches converted all uses of CLFLUSH to
    call mb(), such that changes to smp_mb() won't affect it.

    Update mb/rmb/wmb() on 32-bit to use the negative offset, too, for
    consistency.

    As a follow-up, it might be worth considering switching users
    of CLFLUSH to another API (e.g. clflush_mb()?) - we will
    then be able to convert mb() to smp_mb() again.

    Also arguably, GCC should switch to use LOCK ADD for __sync_synchronize().
    This might be worth pursuing separately.

    Suggested-by: Andy Lutomirski
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Peter Zijlstra
    Acked-by: Thomas Gleixner
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: qemu-devel@nongnu.org
    Cc: virtualization@lists.linux-foundation.org
    Link: http://lkml.kernel.org/r/1509118355-4890-1-git-send-email-mst@redhat.com
    Signed-off-by: Ingo Molnar

    Michael S. Tsirkin
     

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
     

09 May, 2017

3 commits


03 May, 2017

2 commits

  • Previous commit ("virtio: add context flag to find vqs")
    added a new 'context' flag to vring_new_virtqueue(), but the
    corresponding API in tools/virtio/ is not updated causing
    build errors due to conflicting declarations.

    Bring code in tools/virtio in sync with that in kernel.

    I have used 'false' for the value of the new boolean 'context'
    flag as that seems to be the best way to preserve existing
    behavior.

    Tested with:

    $ make -C tools/virtio clean all ARCH=x86

    Signed-off-by: Sekhar Nori
    Signed-off-by: Michael S. Tsirkin

    Sekhar Nori
     
  • There is an || vs && typo so the assert can never be triggered.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Michael S. Tsirkin
    Acked-by: Jason Wang

    Dan Carpenter
     

20 Jan, 2017

2 commits

  • Make ringtest work on s390 too.

    Signed-off-by: Halil Pasic
    Acked-by: Sascha Silbe
    Signed-off-by: Cornelia Huck

    Halil Pasic
     
  • Since ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work
    without /dev/cpu") run-on-all.sh uses seq 0 $HOST_AFFINITY as the list
    of ids of the CPUs to run the command on (assuming ids of online CPUs
    are consecutive and start from 0), where $HOST_AFFINITY is the highest
    CPU id in the system previously determined using lscpu. This can fail
    on systems with offline CPUs.

    Instead let's use lscpu to determine the list of online CPUs.

    Signed-off-by: Halil Pasic
    Fixes: ef1b144d ("tools/virtio/ringtest: fix run-on-all.sh to work without
    /dev/cpu")
    Reviewed-by: Sascha Silbe
    Signed-off-by: Cornelia Huck

    Halil Pasic
     

16 Dec, 2016

2 commits

  • As a step towards killing off ACCESS_ONCE, use {READ,WRITE}_ONCE() for the
    virtio tools uaccess primitives, pulling these in from .

    With this done, we can kill off the now-unused ACCESS_ONCE() definition.

    Signed-off-by: Mark Rutland
    Cc: Jason Wang
    Cc: Michael S. Tsirkin
    Cc: linux-kernel@vger.kernel.org
    Cc: virtualization@lists.linux-foundation.org
    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Cornelia Huck
    Reviewed-by: Jason Wang

    Mark Rutland
     
  • The virtio tools implementation of READ_ONCE() has a single parameter called
    'var', but erroneously refers to 'val' for its cast, and thus won't work unless
    there's a variable of the correct type that happens to be called 'var'.

    Fix this with s/var/val/, making READ_ONCE() work as expected regardless.

    Fixes: a7c490333df3cff5 ("tools/virtio: use virt_xxx barriers")
    Signed-off-by: Mark Rutland
    Cc: Jason Wang
    Cc: Michael S. Tsirkin
    Cc: linux-kernel@vger.kernel.org
    Cc: virtualization@lists.linux-foundation.org
    Signed-off-by: Michael S. Tsirkin
    Reviewed-by: Cornelia Huck
    Reviewed-by: Jason Wang

    Mark Rutland
     

31 Oct, 2016

3 commits


15 Aug, 2016

2 commits