Page MenuHomeFreeBSD

bhyvectl: Add an arm64 port

Authored by markj on Apr 24 2024, 10:29 PM.
Referenced Files
Unknown Object (File)
Sat, Jul 20, 2:20 PM
Unknown Object (File)
Wed, Jun 26, 2:36 AM
Unknown Object (File)
Jun 16 2024, 7:19 PM
Unknown Object (File)
Jun 7 2024, 2:57 PM
Unknown Object (File)
May 5 2024, 10:00 PM
Unknown Object (File)
May 5 2024, 1:59 AM
Unknown Object (File)
May 2 2024, 3:37 AM
Unknown Object (File)
May 1 2024, 1:38 PM



Right now this implementation doesn't provide any MD functionality, but
is enough for one to perform basic VM management tasks on arm64. In
particular, one can use it to destroy VMs and force a reboot.

As in bhyve, the approach is to move MD logic into a bhyvectl_machdep.c.
Each copy of this file has the ability to register command line options,
add flags to the usage message, and implement functionality via

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline

Can this patch be split into multiple smaller ones to make it easier for review?

Can this patch be split into multiple smaller ones to make it easier for review?

Most of the patch is simply moving code from one file to the other. I looked for ways to split it up but don't really see one. I could add arm64 in a separate patch at least, do you think it's enough? How else would you propose splitting up the patch?

First of all, looks good. Splitting the commit is just a suggestion!

A single commit makes it hard to see which code was simply moved and which was modified. So, ideally one commit makes some changes and another one just moves code. In this case, one commit making changes to bhyvectl, one commit moving code to amd64/bhyvectl and one commit adding arm64 might make sense.

Btw. this commit includes some format changes which have a similar issue. They make it hard to see the "real" change. For that reason, I'm mostly try to avoid fixing style issues or I'm adding a separate commit for fixing style.

I'm not sure there's a useful way to split this up into multiple commits. Maybe one to do the amd64 split and a second to add arm64. (In particular, we may soon get a RISC-V port so having "add arm64" as a standalone commit might be nice for RISC-V to pull from.)

89 ↗(On Diff #137633)

Do you want to add a OPT_LAST here and then add a static assert that OPT_LAST < OPT_START_MD?

143 ↗(On Diff #137633)

Maybe leave it called usage to minimize diffs?

markj marked 2 inline comments as done.

Apply suggestions from jhb.

Before pushing, I'll split this into two commits, one moving MD code into amd64/ and the other adding the arm64 bits.

This revision is now accepted and ready to land.Apr 30 2024, 10:01 PM