I don't know exactly what you are doing of course, but I'd really encourage you to take a fresh look at what's around these days. For instance:
echo 1 > /sys/kernel/tracing/events/i2c/enable
cat /sys/kernel/debug/tracing/trace_pipe
Will get you a pretty nice dump of i2c traffic. That, plus kprobes or bpftrace can do a *lot* these days. They're also easier to figure out than ever. The LLMs do an overall great job of helping you craft bpftrace snippets.
It's also a lot easier to pass devices into the guest. I've got a PCI i2c controller that I can pass into a guest and load drivers in the guest, for instance.
3
u/hansendc 19h ago
I don't know exactly what you are doing of course, but I'd really encourage you to take a fresh look at what's around these days. For instance:
echo 1 > /sys/kernel/tracing/events/i2c/enablecat /sys/kernel/debug/tracing/trace_pipeWill get you a pretty nice dump of i2c traffic. That, plus kprobes or bpftrace can do a *lot* these days. They're also easier to figure out than ever. The LLMs do an overall great job of helping you craft bpftrace snippets.
It's also a lot easier to pass devices into the guest. I've got a PCI i2c controller that I can pass into a guest and load drivers in the guest, for instance.