Commit 6b6cb7a
Dorinda Bassey
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
934 | 939 | | |
935 | 940 | | |
936 | 941 | | |
| |||
0 commit comments