History

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

Linus Torvalds committed 4 months ago

Commit d44ade02 parents 3dc0df0 8cb2c9235 files · +1686 −180Browse files

Showing the changes to include/uapi (2 of 35 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/virtio_can.h +78 −0
  2. include/uapi/linux/virtio_console.h +1 −1
include/uapi/linux/virtio_can.h+78−0
@@ -0,0 +1,78 @@
1/* SPDX-License-Identifier: BSD-3-Clause */
2/*
3 * Copyright (C) 2021-2023 OpenSynergy GmbH
4 * Copyright Red Hat, Inc. 2025
5 */
6#ifndef _LINUX_VIRTIO_VIRTIO_CAN_H
7#define _LINUX_VIRTIO_VIRTIO_CAN_H
8
9#include <linux/types.h>
10#include <linux/virtio_types.h>
11#include <linux/virtio_ids.h>
12#include <linux/virtio_config.h>
13
14/* Feature bit numbers */
15#define VIRTIO_CAN_F_CAN_CLASSIC 0
16#define VIRTIO_CAN_F_CAN_FD 1
17#define VIRTIO_CAN_F_RTR_FRAMES 2
18#define VIRTIO_CAN_F_LATE_TX_ACK 3
19
20/* CAN Result Types */
21#define VIRTIO_CAN_RESULT_OK 0
22#define VIRTIO_CAN_RESULT_NOT_OK 1
23
24/* CAN flags to determine type of CAN Id */
25#define VIRTIO_CAN_FLAGS_EXTENDED 0x8000
26#define VIRTIO_CAN_FLAGS_FD 0x4000
27#define VIRTIO_CAN_FLAGS_RTR 0x2000
28
29#define VIRTIO_CAN_MAX_DLEN 64 /* this is like CANFD_MAX_DLEN */
30
31struct virtio_can_config {
32#define VIRTIO_CAN_S_CTRL_BUSOFF (1u << 0) /* Controller BusOff */
33 /* CAN controller status */
34 __le16 status;
35};
36
37/* TX queue message types */
38struct virtio_can_tx_out {
39#define VIRTIO_CAN_TX 0x0001
40 __le16 msg_type;
41 __le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
42 __u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
43 __u8 padding;
44 __le16 reserved_xl_priority; /* May be needed for CAN XL priority */
45 __le32 flags;
46 __le32 can_id;
47 __u8 sdu[] __counted_by_le(length);
48};
49
50struct virtio_can_tx_in {
51 __u8 result;
52};
53
54/* RX queue message types */
55struct virtio_can_rx {
56#define VIRTIO_CAN_RX 0x0101
57 __le16 msg_type;
58 __le16 length; /* 0..8 CC, 0..64 CAN-FD, 0..2048 CAN-XL, 12 bits */
59 __u8 reserved_classic_dlc; /* If CAN classic length = 8 then DLC can be 8..15 */
60 __u8 padding;
61 __le16 reserved_xl_priority; /* May be needed for CAN XL priority */
62 __le32 flags;
63 __le32 can_id;
64 __u8 sdu[] __counted_by_le(length);
65};
66
67/* Control queue message types */
68struct virtio_can_control_out {
69#define VIRTIO_CAN_SET_CTRL_MODE_START 0x0201
70#define VIRTIO_CAN_SET_CTRL_MODE_STOP 0x0202
71 __le16 msg_type;
72};
73
74struct virtio_can_control_in {
75 __u8 result;
76};
77
78#endif /* #ifndef _LINUX_VIRTIO_VIRTIO_CAN_H */
include/uapi/linux/virtio_console.h+1−1
@@ -44,7 +44,7 @@ · 43 unmodified lines
44#define VIRTIO_CONSOLE_BAD_ID (~(__u32)0)44#define VIRTIO_CONSOLE_BAD_ID (~(__u32)0)
45 45
46struct virtio_console_config {46struct virtio_console_config {
47 /* colums of the screens */47 /* columns of the screens */
48 __virtio16 cols;48 __virtio16 cols;
49 /* rows of the screens */49 /* rows of the screens */
50 __virtio16 rows;50 __virtio16 rows;