Page MenuHomeFreeBSD

bhyve: Move more amd64-specific code under amd64/
ClosedPublic

Authored by markj on Jun 14 2023, 9:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 18, 2:57 PM
Unknown Object (File)
Wed, May 15, 12:40 AM
Unknown Object (File)
Apr 9 2024, 4:37 AM
Unknown Object (File)
Mar 9 2024, 7:33 PM
Unknown Object (File)
Dec 23 2023, 2:17 AM
Unknown Object (File)
Dec 11 2023, 3:08 AM
Unknown Object (File)
Nov 13 2023, 10:29 AM
Unknown Object (File)
Nov 11 2023, 10:13 AM
Subscribers

Details

Summary

mptable and the e820 are both rather amd64-specific and can be moved
easily.

In the case of e820, move the registration with qemu_fwcfg into e820.c,
as it simplifies bhyverun.c a bit and I can't see any downsides.

No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jun 14 2023, 9:52 PM
jhb added inline comments.
usr.sbin/bhyve/bhyverun.c
93

Should the header move into amd64/?

This revision is now accepted and ready to land.Jun 14 2023, 11:29 PM
usr.sbin/bhyve/bhyverun.c
93

Hmm, looks like you fixed this in a later commit, so maybe that fix needs to move to this commit instead?

corvink added inline comments.
usr.sbin/bhyve/Makefile
17–18

Nit: Unnecessary change.

usr.sbin/bhyve/bhyverun.c
93

The header file is moved in this commit. So, this commit needs to use amd64/e820.h. Otherwise, this commit won't compile.

Rebase, handle review feedback.

This revision now requires review to proceed.Jun 15 2023, 10:13 PM
This revision is now accepted and ready to land.Jun 16 2023, 5:32 AM
usr.sbin/bhyve/bhyverun.c
1353

This might be slightly confusing if someone passes -Y to non-x86 bhyve and gets a usage message. We could arguably just ignore -Y on non-x86 since it is a disable flag. In any case this likely needs a more comprehensive rework and as a step to making progress on arm64 bhyve I think it's acceptable for now.

usr.sbin/bhyve/bhyverun.c
1353

Yes, this certainly needs more work. Right now I'm just trying to minimize the userspace diff to the arm64 port so that rebasing/landing it will be marginally easier. This particular problem will be handled by splitting some of the getopt handling into a separate file.

(I have a number of more changes along these lines, I'm going to hold off on committing them until I'm mostly done.)