Skip to content

Commit 6b6cb7a

Browse files
author
Dorinda Bassey
committed
libkrunfw: Add virtio-CAN driver support
Add virtio CAN driver patch v13 from upstream kernel mailing list to enable vhost-user CAN device support in libkrun. The driver implements a complete CAN bus interface over Virtio transport, supporting both CAN Classic and CAN-FD. Changes: - Add patch 0027-can-virtio-Add-virtio-CAN-driver.patch (v13 from lore.kernel.org/virtualization) - Enable CAN kernel configs Fixes: - Kernel 6.12 compatibility fix for can_priv structure access: change can.fd.data_bittiming to can.data_bittiming (struct layout changed in kernel 6.13+) - Fix FORTIFY_SOURCE panic in virtio_can_start_xmit: set can_tx_msg->tx_out.length before memcpy() to satisfy __counted_by_le() buffer bounds checking. The driver has been tested with rust-vmm vhost-device-can backend. Upstream patch authors: - Matias Ezequiel Vara Larsen <mvaralar@redhat.com> - Harald Mommer <harald.mommer@oss.qualcomm.com> - Mikhail Golubev-Ciuchea <mikhail.golubev-ciuchea@oss.qualcomm.com> Signed-off-by: Dorinda Bassey <dbassey@redhat.com>
1 parent 463f717 commit 6b6cb7a

2 files changed

Lines changed: 1545 additions & 1 deletion

File tree

config-libkrunfw_x86_64

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,12 @@ CONFIG_NET_FLOW_LIMIT=y
930930
# end of Networking options
931931

932932
# CONFIG_HAMRADIO is not set
933-
# CONFIG_CAN is not set
933+
CONFIG_CAN=y
934+
CONFIG_CAN_RAW=y
935+
CONFIG_CAN_BCM=y
936+
CONFIG_CAN_GW=y
937+
CONFIG_CAN_VCAN=y
938+
CONFIG_CAN_VIRTIO_CAN=y
934939
# CONFIG_BT is not set
935940
# CONFIG_AF_RXRPC is not set
936941
# CONFIG_AF_KCM is not set

0 commit comments

Comments
 (0)