summaryrefslogtreecommitdiffstats
path: root/tools/virtio
Commit message (Collapse)AuthorAgeFilesLines
* tools/virtio: remove smp_read_barrier_depends()Davidlohr Bueso2022-12-281-7/+10
| | | | | | | | | | | | | This gets rid of the last references to smp_read_barrier_depends() which for the kernel side was removed in v5.9. The serialization required for Alpha is done inside READ_ONCE() instead of having users deal with it. Simply use a full barrier, the architecture does not have rmb in the first place. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Message-Id: <20221128034347.990-3-dave@stgolabs.net> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
* tools/virtio: remove stray charactersDavidlohr Bueso2022-12-281-10/+10
| | | | | | | | | __read_once_size() is not a macro, remove those '/'s. Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Message-Id: <20221128034347.990-2-dave@stgolabs.net> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
* tools/virtio: Variable type completionwangjianli2022-12-281-1/+1
| | | | | | | | Replace "unsigned" with "unsigned int" Signed-off-by: wangjianli <wangjianli@cdjrlc.com> Message-Id: <20221113070742.48271-1-wangjianli@cdjrlc.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools: Delete the unneeded semicolon after curly bracesShaomin Deng2022-12-281-1/+1
| | | | | | | | Unneeded semicolon after curly braces, so delete it. Signed-off-by: Shaomin Deng <dengshaomin@cdjrlc.com> Message-Id: <20221105155151.12155-1-dengshaomin@cdjrlc.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: initialize spinlocks in vring_test.cRicardo Cañuelo2022-12-281-0/+2
| | | | | | | | | | | The virtio_device vqs_list spinlocks must be initialized before use to prevent functions that manipulate the device virtualqueues, such as vring_new_virtqueue(), from blocking indefinitely. Signed-off-by: Ricardo Cañuelo <ricardo.canuelo@collabora.com> Message-Id: <20221012062949.1526176-1-ricardo.canuelo@collabora.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
* virtio_test: fixup for vq resetXuan Zhuo2022-09-272-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix virtio test compilation failure caused by vq reset. ../../drivers/virtio/virtio_ring.c: In function ‘vring_create_virtqueue_packed’: ../../drivers/virtio/virtio_ring.c:1999:8: error: ‘struct virtqueue’ has no member named ‘reset’ 1999 | vq->vq.reset = false; | ^ ../../drivers/virtio/virtio_ring.c: In function ‘__vring_new_virtqueue’: ../../drivers/virtio/virtio_ring.c:2493:8: error: ‘struct virtqueue’ has no member named ‘reset’ 2493 | vq->vq.reset = false; | ^ ../../drivers/virtio/virtio_ring.c: In function ‘virtqueue_resize’: ../../drivers/virtio/virtio_ring.c:2587:18: error: ‘struct virtqueue’ has no member named ‘num_max’ 2587 | if (num > vq->vq.num_max) | ^ ../../drivers/virtio/virtio_ring.c:2596:11: error: ‘struct virtio_device’ has no member named ‘config’ 2596 | if (!vdev->config->disable_vq_and_reset) | ^~ ../../drivers/virtio/virtio_ring.c:2599:11: error: ‘struct virtio_device’ has no member named ‘config’ 2599 | if (!vdev->config->enable_vq_after_reset) | ^~ ../../drivers/virtio/virtio_ring.c:2602:12: error: ‘struct virtio_device’ has no member named ‘config’ 2602 | err = vdev->config->disable_vq_and_reset(_vq); | ^~ ../../drivers/virtio/virtio_ring.c:2614:10: error: ‘struct virtio_device’ has no member named ‘config’ 2614 | if (vdev->config->enable_vq_after_reset(_vq)) | ^~ make: *** [<builtin>: virtio_ring.o] Error 1 Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Message-Id: <20220830110549.103168-1-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: fix buildStefano Garzarella2022-08-112-1/+2
| | | | | | | | | | | | | | Fix the build caused by the following changes: - phys_addr_t is now defined in tools/include/linux/types.h - dev_warn_once() is used in drivers/virtio/virtio_ring.c - linux/uio.h included by vringh.h use INT_MAX defined in limits.h Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20220705072249.7867-1-sgarzare@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Acked-by: Jason Wang <jasowang@redhat.com>
* virtio_ring: split: stop __vring_new_virtqueue as export symbolXuan Zhuo2022-08-111-2/+2
| | | | | | | | | | | | | | There is currently only one place to reference __vring_new_virtqueue() directly from the outside of virtio core. And here vring_new_virtqueue() can be used instead. Subsequent patches will modify __vring_new_virtqueue, so stop it as an export symbol for now. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20220801063902.129329-8-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: compile with -pthreadMichael S. Tsirkin2022-03-281-1/+2
| | | | | | | | | | When using pthreads, one has to compile and link with -lpthread, otherwise e.g. glibc is not guaranteed to be reentrant. This replaces -lpthread. Reported-by: Matthew Wilcox <willy@infradead.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: fix after premapped buf supportMichael S. Tsirkin2022-03-281-2/+2
| | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: handle fallout from folio workMichael S. Tsirkin2022-03-061-0/+3
| | | | | | just add a stub Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: fix virtio_test executionStefano Garzarella2022-03-061-0/+1
| | | | | | | | | | | | virtio_test hangs on __vring_new_virtqueue() because `vqs_list_lock` is not initialized. Let's initialize it in vdev_info_init(). Signed-off-by: Stefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/r/20220118150631.167015-1-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
* tools/virtio: fix buildMichael S. Tsirkin2021-08-113-1/+60
| | | | | | | We use a spinlock now so add a stub. Ignore bogus uninitialized variable warnings. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: add barrier for aarch64Peng Fan2020-12-181-0/+10
| | | | | | | | Add barrier for aarch64 for cross compiling, and most are from Linux Kernel. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20201209084205.24062-4-peng.fan@oss.nxp.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: add krealloc_arrayPeng Fan2020-12-181-2/+11
| | | | | | | | | | | krealloc_array is used in drivers/vhost/vringh.c, add it to avoid build failure. Drop WARN_ON_ONCE, because duplicated with the one in bug.h Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20201209084205.24062-3-peng.fan@oss.nxp.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: include asm/bug.hPeng Fan2020-12-181-0/+2
| | | | | | | | | WARN_ON is used in drivers/vhost/vringh.c, to avoid build failure, need include asm/bug.h Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20201209084205.24062-2-peng.fan@oss.nxp.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds2020-08-111-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull virtio updates from Michael Tsirkin: - IRQ bypass support for vdpa and IFC - MLX5 vdpa driver - Endianness fixes for virtio drivers - Misc other fixes * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (71 commits) vdpa/mlx5: fix up endian-ness for mtu vdpa: Fix pointer math bug in vdpasim_get_config() vdpa/mlx5: Fix pointer math in mlx5_vdpa_get_config() vdpa/mlx5: fix memory allocation failure checks vdpa/mlx5: Fix uninitialised variable in core/mr.c vdpa_sim: init iommu lock virtio_config: fix up warnings on parisc vdpa/mlx5: Add VDPA driver for supported mlx5 devices vdpa/mlx5: Add shared memory registration code vdpa/mlx5: Add support library for mlx5 VDPA implementation vdpa/mlx5: Add hardware descriptive header file vdpa: Modify get_vq_state() to return error code net/vdpa: Use struct for set/get vq state vdpa: remove hard coded virtq num vdpasim: support batch updating vhost-vdpa: support IOTLB batching hints vhost-vdpa: support get/set backend features vhost: generialize backend features setting/getting vhost-vdpa: refine ioctl pre-processing vDPA: dont change vq irq after DRIVER_OK ...
| * virtio: virtio_has_iommu_quirk -> virtio_has_dma_quirkMichael S. Tsirkin2020-08-031-2/+2
| | | | | | | | | | | | | | | | Now that the corresponding feature bit has been renamed, rename the quirk too - it's about special ways to do DMA, not necessarily about the IOMMU. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORMMichael S. Tsirkin2020-08-031-1/+1
| | | | | | | | | | | | | | | | Rename the bit to match latest virtio spec. Add a compat macro to avoid breaking existing userspace. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com>
* | compiler: Remove uninitialized_var() macroKees Cook2020-07-161-2/+0
|/ | | | | | | | | | | | | | | | | | | | | | | | Using uninitialized_var() is dangerous as it papers over real bugs[1] (or can in the future), and suppresses unrelated compiler warnings (e.g. "unused variable"). If the compiler thinks it is uninitialized, either simply initialize the variable or make compiler changes. As recommended[2] by[3] Linus[4], remove the macro. With the recent change to disable -Wmaybe-uninitialized in v5.7 in commit 78a5255ffb6a ("Stop the ad-hoc games with -Wno-maybe-initialized"), this is likely the best time to make this treewide change. [1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/ [2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/ [3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/ [4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/ Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Reviewed-by: Bart van Assche <bvanassche@acm.org> Reviewed-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Tested-by: Nathan Chancellor <natechancellor@gmail.com> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org>
* tools/virtio: Use tools/include/list.h instead of stubsEugenio Pérez2020-06-224-9/+6
| | | | | | | | It should not make any significant difference but reduce stub code. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Link: https://lore.kernel.org/r/20200418102217.32327-9-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: Reset index in virtio_test --reset.Eugenio Pérez2020-06-221-2/+24
| | | | | | | | This way behavior for vhost is more like a VM. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Link: https://lore.kernel.org/r/20200418102217.32327-8-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: Extract virtqueue initialization in vq_resetEugenio Pérez2020-06-221-7/+14
| | | | | | | | So we can reset after that in the main loop. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Link: https://lore.kernel.org/r/20200418102217.32327-7-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: Use __vring_new_virtqueue in virtio_test.cEugenio Pérez2020-06-221-4/+3
| | | | | | | | As updated in ("2a2d1382fe9d virtio: Add improved queue allocation API") Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Link: https://lore.kernel.org/r/20200418102217.32327-6-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: Add --resetEugenio Pérez2020-06-221-4/+37
| | | | | | | | | Currently, it only removes and add backend, but it will reset vq position in future commits. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Link: https://lore.kernel.org/r/20200418102217.32327-5-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: Add --batch=random optionEugenio Pérez2020-06-221-4/+14
| | | | | | | | So we can test with non-deterministic batches in flight. Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Link: https://lore.kernel.org/r/20200418102217.32327-4-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: Add --batch optionEugenio Pérez2020-06-221-10/+37
| | | | | | | | | | This allow to test vhost having >1 buffers in flight Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Link: https://lore.kernel.org/r/20200401183118.8334-5-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Link: https://lore.kernel.org/r/20200418102217.32327-3-eperezma@redhat.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: make asm/barrier.h self containedMichael S. Tsirkin2020-04-171-0/+1
| | | | | | We are using abort() so let's include stdlib.h Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: define aligned attributeMichael S. Tsirkin2020-04-171-0/+1
| | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio/test: fix up after IOTLB changesMichael S. Tsirkin2020-04-162-2/+3
| | | | | | | | | | | | Allow building vringh without IOTLB (that's the case for userspace builds, will be useful for CAIF/VOD down the road too). Update for API tweaks. Don't include vringh with userspace builds. Cc: Jason Wang <jasowang@redhat.com> Cc: Eugenio Pérez <eperezma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
* Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds2020-04-081-1/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull virtio updates from Michael Tsirkin: - Some bug fixes - The new vdpa subsystem with two first drivers * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio-balloon: Revert "virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM" vdpa: move to drivers/vdpa virtio: Intel IFC VF driver for VDPA vdpasim: vDPA device simulator vhost: introduce vDPA-based backend virtio: introduce a vDPA based transport vDPA: introduce vDPA bus vringh: IOTLB support vhost: factor out IOTLB vhost: allow per device message handler vhost: refine vhost and vringh kconfig virtio-balloon: Switch back to OOM handler for VIRTIO_BALLOON_F_DEFLATE_ON_OOM virtio-net: Introduce hash report feature virtio-net: Introduce RSS receive steering feature virtio-net: Introduce extended RSC feature tools/virtio: option to build an out of tree module
| * tools/virtio: option to build an out of tree moduleMichael S. Tsirkin2020-03-231-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Handy for testing with distro kernels. Warn that the resulting module is completely unsupported, and isn't intended for production use. Usage: make oot # builds vhost_test.ko, vhost.ko make oot-clean # cleans out files created Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | .gitignore: add SPDX License IdentifierMasahiro Yamada2020-03-251-0/+1
|/ | | | | | | Add SPDX License Identifier to all .gitignore files. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tools/virtio: xen stubMichael S. Tsirkin2019-10-131-0/+6
| | | | | | | Fixes test module build. Reported-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: more stubsMichael S. Tsirkin2019-10-112-0/+2
| | | | | | fix test module build. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 482Thomas Gleixner2019-06-194-4/+4
| | | | | | | | | | | | | | | | | | | 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 <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Enrico Weigelt <info@metux.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081204.624030236@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds2019-06-031-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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()
| * virtio: add unlikely() to WARN_ON_ONCE()Igor Stoppa2019-05-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | The condition to test is unlikely() to be true. Add the hint. Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com> Cc: "Michael S. Tsirkin" <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Cc: Virtualization@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 165Thomas Gleixner2019-05-303-9/+3
|/ | | | | | | | | | | | | | | | | | | | | 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 <tglx@linutronix.de> Reviewed-by: Armijn Hemel <armijn@tjaldur.nl> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070033.838202816@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-211-0/+1
| | | | | | | | | | | | | | 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 <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tools/virtio/ringtest: Remove bogus definition of BUG_ON()Jonathan Neuschäfer2019-05-121-1/+0
| | | | | | | | | 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 <j.neuschaefer@gmx.net> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* virtio: fix test build after uio.h changeMichael S. Tsirkin2018-12-191-0/+4
| | | | | Fixes: d38499530e5 ("fs: decouple READ and WRITE from the block layer ops") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: add kmalloc_array stubMichael S. Tsirkin2018-07-271-0/+5
| | | | | Fixes: 6da2ec56059 ("treewide: kmalloc() -> kmalloc_array()") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* tools/virtio: add dma barrier stubsMichael S. Tsirkin2018-07-271-2/+2
| | | | | Fixes: 55e49dc43a8 ("virtio_ring: switch to dma_XX barriers for rpmsg") Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* sg: remove ->sg_magic memberJens Axboe2018-06-291-18/+0
| | | | | | | | | | | | 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 <Golden_Miller83@protonmail.ch> Acked-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
* PCI: remove PCI_DMA_BUS_IS_PHYSChristoph Hellwig2018-05-071-2/+0
| | | | | | | | | | | 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 <hch@lst.de> Acked-by: Palmer Dabbelt <palmer@sifive.com> (for riscv) Reviewed-by: Jens Axboe <axboe@kernel.dk>
* ptr_ring: fix buildMichael S. Tsirkin2018-03-201-0/+5
| | | | | | Fixes after recent use of kvmalloc Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhostLinus Torvalds2018-02-082-23/+31
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * ringtest: ring.c malloc & memset to callocPeter Malone2018-02-011-4/+2
| | | | | | | | | | | | | | Code cleanup change - moving from malloc & memset to calloc. Signed-off-by: Peter Malone <peter.malone@gmail.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * virtio/ringtest: virtio_ring: fix up need_event mathMichael S. Tsirkin2018-01-311-10/+14
| | | | | | | | | | | | | | | | | | | | 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 <cohuck@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Jens Freimann <jfreimann@redhat.com>