Re: Port FreeBSD to QEMU MicroVM for GSoC 2025

From: Pranav Tyagi <pranav.tyagi03_at_gmail.com>
Date: Mon, 03 Mar 2025 04:02:49 UTC
On Thu, Feb 27, 2025 at 2:40 PM Tom Jones <thj@freebsd.org> wrote:
>
>
>
> On Tue, Feb 25, 2025, at 17:50, Pranav Tyagi wrote:
> > Hi,
> >
> > I am interested in contributing to FreeBSD MicroVM for GSoC 2025 and
> > would like to focus on writing or improving a device driver. I have
> > some experience in kernel development and have built a few drivers,
> > but I am still learning and want to take on a task that is both
> > impactful and aligned with my skill level.
> >
> > Could you provide insights on:
> > What device drivers are currently missing or need improvement for
> > FreeBSD MicroVM?
> > Are there specific VirtIO drivers that would be valuable to implement
> > or optimize (e.g., virtio-rng, virtio-blk)?
> > Would extending an existing driver (like virtio-blk) be more useful
> > than writing a new one?
> >
> > Additionally, since you are interested in co-mentoring this project,
> > could you suggest the right people who might be interested in
> > mentoring throughout GSoC? Your guidance would be invaluable in
> > shaping a well-structured proposal.
> >
> > I would appreciate your thoughts and guidance.
>
> Hi Pranav,
>
> Thanks for your interest in this project.
>
> I suspect the issues with the current port are due to clocking, rather than explicit device drivers I think the first part of this project would be of testing followed by debugging.
>
> Once we can reliably boot on microvm I am happy for the project to go in a few directions and I would like to plan these in as "stretch goals" in the case that the debugging isn't too difficult.
>
> - Proof of Concept Integration into the freebsd build system as a test tool
> - Proof of Concept implementation of a microvm or like interface for bhyve
>
> I have a ton of other ideas of how we could use microvm support. I see microvm as a potential tool to greatly increase the testability of FreeBSD, it might not be a project with a lot of driver output, but it should be a great project for learning and talking about operating system development.
>
> - Tom

Hi Tom,

Thanks for your response and insights on the FreeBSD MicroVM project.
I’m very interested in debugging the current boot issues and exploring
further directions. Based on our discussion and my review of the boot
logs, I’d like to focus on identifying the failure points and
addressing possible clocking or hardware integration issues.

I have a few follow-up questions to help structure the debugging process:

Are there specific clocking issues known in FreeBSD’s MicroVM port,
and would testing with alternative time sources (TSC, HPET, ACPI) be
useful?
Should I attempt booting with alternative kernel configurations (e.g.,
disabling SMP, ACPI, or modifying timecounter settings)?

I plan to explore debugging methods such as the serial console and
QEMU’s GDB stub. Let me know if you have any recommendations or
additional areas I should focus on.

Looking forward to your thoughts.

Regards
Pranav Tyagi