Commit ee09844
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 f60c093 commit ee09844
3 files changed
Lines changed: 1551 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1026 | 1026 | | |
1027 | 1027 | | |
1028 | 1028 | | |
1029 | | - | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
1030 | 1035 | | |
1031 | 1036 | | |
1032 | 1037 | | |
| |||
| 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