littlekernel / lk

LK embedded kernel
MIT License
3.11k stars 611 forks source link

[virtio][9p] Add VirtIO 9p device driver #399

Closed mob5566 closed 3 months ago

mob5566 commented 6 months ago

Hi @travisg,

As we discussed in #398, I uploaded the commits to support VirtIO 9p devices. I tested it with arm platform and it worked just fine. I let it attach the lk/ directory as the shared dir and read the LICENSE file. Please see the log bellow:

initializing apps
starting app inetsrv
starting internet servers
starting app shell
entering main console loop
] v9p_tests
0x80013c08: 2f 2a 0a 20 2a 20 43 6f 70 79 72 69 67 68 74 20 |/*. * Copyright
0x80013c18: 28 63 29 20 32 30 30 38 2d 32 30 31 35 20 54 72 |(c) 2008-2015 Tr
0x80013c28: 61 76 69 73 20 47 65 69 73 65 6c 62 72 65 63 68 |avis Geiselbrech
0x80013c38: 74 0a 20 2a 0a 20 2a 20 50 65 72 6d 69 73 73 69 |t. *. * Permissi
0x80013c48: 6f 6e 20 69 73 20 68 65 72 65 62 79 20 67 72 61 |on is hereby gra
0x80013c58: 6e 74 65 64 2c 20 66 72 65 65 20 6f 66 20 63 68 |nted, free of ch
0x80013c68: 61 72 67 65 2c 20 74 6f 20 61 6e 79 20 70 65 72 |arge, to any per
0x80013c78: 73 6f 6e 20 6f 62 74 61 69 6e 69 6e 67 0a 20 2a |son obtaining. *
0x80013c88: 20 61 20 63 6f 70 79 20 6f 66 20 74 68 69 73 20 | a copy of this
0x80013c98: 73 6f 66 74 77 61 72 65 20 61 6e 64 20 61 73 73 |software and ass
...

I will continue the file system integration with the 9p driver based on lib/fs. Please let me know if you have any questions!

Thank you for your helps.

mob5566 commented 5 months ago

Hi @travisg,

I just want to make sure that you didn't miss the PRs. Please let me know if you have any ideas.

travisg commented 5 months ago

KK! will take a look shortly.

travisg commented 3 months ago

sorry for taking a long time, kept putting it off, but it's a good starter. The use of the bio device is a bit fishy, but i think in general moving this to some sort of actual fs, albeit limited, would work well.

mob5566 commented 3 months ago

Really appreciated the effort and time. 🙏

I will keep working on integrating the virtual 9P with the fs library to make it support fs operations.

travisg commented 2 months ago

Sounds good. I'm actually working on right now revamping the virtio bits to work over PCI as well, so it may impact some of the driver. I'll try to keep it minimum, but the interface to the virtio bus bits may change a bit as it gets more abstracted.