diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-06-17 21:49:00 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-06-17 21:49:00 +0300 |
| commit | d44ade05aa21468bd30652bc4492891b854a400a (patch) | |
| tree | e146ae0c13621fc867f739bc84f98f8ce0875915 /tools/virtio | |
| parent | 3dc0df03396a3329c644b29b421892a32ecb9387 (diff) | |
| parent | 8cb2c9285e4ce9154f45fb15633ebd45dfd8d9cf (diff) | |
| download | linux-d44ade05aa21468bd30652bc4492891b854a400a.tar.xz | |
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio updates from Michael Tsirkin:
- new virtio CAN driver
- support for LoongArch architecture in fw_cfg
- support for firmware notifications in vdpa/octeon_ep
- support for VFs in virtio core
- fixes, cleanups all over the place, notably:
- vhost: fix vhost_get_avail_idx for a non empty ring
fixing an significant old perf regression
- READ_ONCE() annotations mean virtio ring is now
free of KCSAN warnings
* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (37 commits)
can: virtio: Fix comment in UAPI header
can: virtio: Add virtio CAN driver
virtio: add num_vf callback to virtio_bus
fw_cfg: Add support for LoongArch architecture
vdpa/octeon_ep: fix IRQ-to-ring mapping in interrupt handler
vdpa/octeon_ep: Add vDPA device event handling for firmware notifications
vdpa/octeon_ep: Use 4 bytes for mailbox signature
vdpa/octeon_ep: Fix PF->VF mailbox data address calculation
vhost_task_create: kill unnecessary .exit_signal initialization
vhost: remove unnecessary module_init/exit functions
vdpa/mlx5: Use kvzalloc_flex() for MTT command memory
vdpa_sim_net: switch to dynamic root device
vdpa_sim_blk: switch to dynamic root device
virtio-mem: Destroy mutex before freeing virtio_mem
virtio-balloon: Destroy mutex before freeing virtio_balloon
tools/virtio: fix build for kmalloc_obj API and missing stubs
virtio_ring: Add READ_ONCE annotations for device-writable fields
vduse: fix compat handling for VDUSE_IOTLB_GET_FD/VDUSE_VQ_GET_INFO
tools/virtio: check mmap return value in vringh_test
vhost/net: complete zerocopy ubufs only once
...
Diffstat (limited to 'tools/virtio')
| -rw-r--r-- | tools/virtio/linux/dma-mapping.h | 2 | ||||
| -rw-r--r-- | tools/virtio/linux/err.h | 1 | ||||
| -rw-r--r-- | tools/virtio/linux/kernel.h | 6 | ||||
| -rw-r--r-- | tools/virtio/vringh_test.c | 5 |
4 files changed, 14 insertions, 0 deletions
diff --git a/tools/virtio/linux/dma-mapping.h b/tools/virtio/linux/dma-mapping.h index fddfa2fbb276..8d1a16cb20db 100644 --- a/tools/virtio/linux/dma-mapping.h +++ b/tools/virtio/linux/dma-mapping.h @@ -60,4 +60,6 @@ enum dma_data_direction { */ #define DMA_MAPPING_ERROR (~(dma_addr_t)0) +#define DMA_ATTR_CPU_CACHE_CLEAN (1UL << 11) + #endif diff --git a/tools/virtio/linux/err.h b/tools/virtio/linux/err.h index 0943c644a701..b7b4cb516dc9 100644 --- a/tools/virtio/linux/err.h +++ b/tools/virtio/linux/err.h @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0 */ #ifndef ERR_H #define ERR_H +#include <linux/kernel.h> #define MAX_ERRNO 4095 #define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) diff --git a/tools/virtio/linux/kernel.h b/tools/virtio/linux/kernel.h index 416d02703f61..104abf9d1aee 100644 --- a/tools/virtio/linux/kernel.h +++ b/tools/virtio/linux/kernel.h @@ -65,6 +65,12 @@ static inline void *kmalloc_array(unsigned n, size_t s, gfp_t gfp) return kmalloc(n * s, gfp); } +#define kmalloc_obj(VAR_OR_TYPE, ...) \ + ((typeof(VAR_OR_TYPE) *)kmalloc(sizeof(typeof(VAR_OR_TYPE)), 0)) + +#define kmalloc_objs(VAR_OR_TYPE, COUNT, ...) \ + ((typeof(VAR_OR_TYPE) *)kmalloc(sizeof(typeof(VAR_OR_TYPE)) * (COUNT), 0)) + static inline void *kzalloc(size_t s, gfp_t gfp) { void *p = kmalloc(s, gfp); diff --git a/tools/virtio/vringh_test.c b/tools/virtio/vringh_test.c index b9591223437a..5ea6d29bc992 100644 --- a/tools/virtio/vringh_test.c +++ b/tools/virtio/vringh_test.c @@ -159,7 +159,12 @@ static int parallel_test(u64 features, /* Parent and child use separate addresses, to check our mapping logic! */ host_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + if (host_map == MAP_FAILED) + err(1, "mmap host_map"); + guest_map = mmap(NULL, mapsize, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + if (guest_map == MAP_FAILED) + err(1, "mmap guest_map"); pipe_ret = pipe(to_guest); assert(!pipe_ret); |
