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)
Tue, Oct 21, 4:44 PM
Unknown Object (File)
Sat, Oct 18, 10:59 PM
Unknown Object (File)
Sat, Oct 11, 5:41 PM
Unknown Object (File)
Sat, Oct 11, 5:41 PM
Unknown Object (File)
Sat, Oct 11, 5:41 PM
Unknown Object (File)
Sat, Oct 11, 5:41 PM
Unknown Object (File)
Sat, Oct 11, 9:00 AM
Unknown Object (File)
Tue, Sep 30, 3:53 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 52095
Build 48986: arc lint + arc unit

Event Timeline

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

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
97

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
22–23

Nit: Unnecessary change.

usr.sbin/bhyve/bhyverun.c
97

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
1352

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
1352

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.)