nuta / kerla

A new operating system kernel with Linux binary compatibility written in Rust.
Other
3.33k stars 89 forks source link

Implement Virtio Block Driver #74

Open bayedieng opened 2 years ago

bayedieng commented 2 years ago

See #48

bayedieng commented 2 years ago

Hey @nuta, I began working on the virtio-blk driver and added an additional device param in the run-qemu script for the virtio-blk-pci device. I noticed that when building and running the kernel a virtio-net.pcap file is automatically generated. I would like to do the same for a vdisk file but not sure how.

nuta commented 2 years ago

You can use QEMU's tracing to figure out what's going on in the host's emulation:

$ make run QEMU_ARGS="--trace 'virtio_*'"

Tip: I usually use my own QEMU build to insert printf and enable hidden DEBUG macros (an example in FAT emulation) when I debug my device drivers.

bayedieng commented 2 years ago

Thanks, got it.