13 Oct, 2019
1 commit
-
Fixes test module build.
Reported-by: Jan Kiszka
Signed-off-by: Michael S. Tsirkin
11 Oct, 2019
1 commit
-
fix test module build.
Signed-off-by: Michael S. Tsirkin
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
04 Jun, 2019
1 commit
-
Pull virtio fixes from Michael Tsirkin:
"Several fixes, some of them for CVEs"* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
vhost: scsi: add weight support
vhost: vsock: add weight support
vhost_net: fix possible infinite loop
vhost: introduce vhost_exceeds_weight()
virtio: Fix indentation of VIRTIO_MMIO
virtio: add unlikely() to WARN_ON_ONCE()
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
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
21 May, 2019
1 commit
-
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
13 May, 2019
1 commit
-
BUG_ON(x) should raise an error if x is true, but assert(x) raises an
error if x is false. Remove this bogus definition of BUG_ON(), which
isn't used anyway.Signed-off-by: Jonathan Neuschäfer
Signed-off-by: Michael S. Tsirkin
20 Dec, 2018
1 commit
-
Fixes: d38499530e5 ("fs: decouple READ and WRITE from the block layer ops")
Signed-off-by: Michael S. Tsirkin
27 Jul, 2018
2 commits
-
Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()")
Signed-off-by: Michael S. Tsirkin -
Fixes: 55e49dc43a8 ("virtio_ring: switch to dma_XX barriers for rpmsg")
Signed-off-by: Michael S. Tsirkin
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
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
20 Mar, 2018
1 commit
-
Fixes after recent use of kvmalloc
Signed-off-by: Michael S. Tsirkin
09 Feb, 2018
1 commit
-
Pull virtio/vhost updates from Michael Tsirkin:
"virtio, vhost: fixes, cleanups, featuresThis 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
01 Feb, 2018
1 commit
-
Code cleanup change - moving from malloc & memset to calloc.
Signed-off-by: Peter Malone
Signed-off-by: Michael S. Tsirkin
31 Jan, 2018
2 commits
-
last kicked event index must be updated unconditionally:
even if we don't need to kick, we do not want to re-check
the same entry for events.Reported-by: Cornelia Huck
Signed-off-by: Michael S. Tsirkin
Reviewed-by: Jens Freimann -
last kicked event index must be updated unconditionally:
even if we don't need to kick, we do not want to re-check
the same entry for events.Signed-off-by: Michael S. Tsirkin
Acked-by: Cornelia Huck
Acked-by: Jason Wang
30 Jan, 2018
4 commits
-
Offset 128 overlaps the last word of the redzone.
Use 132 which is always beyond that.Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller -
This is to make ptr_ring test build again.
Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller -
Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller -
We don't rely on lockless guarantees, but it
seems cleaner than inverting __ptr_ring_peek.Signed-off-by: Michael S. Tsirkin
Signed-off-by: David S. Miller
16 Dec, 2017
1 commit
-
Pull virtio regression fixes from Michael Tsirkin:
"Fixes two issues in the latest kernel"* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
virtio_mmio: fix devm cleanup
ptr_ring: fix up after recent ptr_ring changes
08 Dec, 2017
1 commit
-
Add more stubs to make it build.
Fixes: 81fbfe8a ("ptr_ring: use kmalloc_array()")
Signed-off-by: Michael S. Tsirkin
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
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
09 May, 2017
3 commits
-
trivial fix to spelling mistake in an error message.
Signed-off-by: Colin Ian King
Signed-off-by: Michael S. Tsirkin
Acked-by: Jason Wang -
Use the param flag for that.
Signed-off-by: Michael S. Tsirkin
-
Add a new flag for passing test-specific parameters.
Signed-off-by: Michael S. Tsirkin
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 -
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
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 -
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
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 -
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
31 Oct, 2016
3 commits
-
Updating the event index has a memory barrier and causes more work
on the other side to actually signal the event. It is unnecessary
if a new buffer has already appeared on the ring, so poll once before
doing the update.The effect of this on the 0.9 ring implementation is pretty much
invisible, but on the new-style ring it provides a consistent 3%
performance improvement.Signed-off-by: Paolo Bonzini
Signed-off-by: Michael S. Tsirkin -
Provide new primitives used_empty/avail_empty and
build poll_avail/poll_used on top of it.Signed-off-by: Paolo Bonzini
Signed-off-by: Michael S. Tsirkin -
By using -flto and -fwhole-program, all functions from the ring implementation
can be treated as static and possibly inlined. Force this to happen through
the GCC flatten attribute.Signed-off-by: Paolo Bonzini
Signed-off-by: Michael S. Tsirkin
15 Aug, 2016
2 commits
-
Fixes build after recent IOMMU-related changes,
mustly by adding more stubs.Signed-off-by: Michael S. Tsirkin
-
Recent changes to ptr_ring broke the ringtest
which lacks a likely() stub. Fix it up.Fixes: 982fb490c298896d15e9323a882f34a57c11ff56
("ptr_ring: support zero length ring")
Signed-off-by: Michael S. Tsirkin