Skip to content

Implement virtio-net driver and place it in the container

Finally! We have the virtio-net device driver hoisted into the TubLocal. Currently, it is difficult to test this driver without the rest of the network stack, but logs from Pika do validate that the virtio-net driver is being configured correctly (the logging output should show the obtained mac address).

A few other relevant changes with this MR:

  • PCIE_BUS is first locked in the init for apic. This is due to a lingering bug on multicore Pika where the page table mappings for the PCIE_BUS get corrupted when switching cores
  • The page table in TubLocal is now kept behind a lock. This is because the net driver needs the page table to get the physical address of buffers when communicating with the device. However, the container also uses the page table when allocating a kstack. To safely proceed with both use cases, we need a lock on the page table.
  • I have added a new function for PCIeBus that finds a device by both class and vendor. This is to ensure we fetch a network device class from the virtio vendor

Merge request reports

Loading