Page MenuHomeFreeBSD

vmrun.sh: Add arm64 support
ClosedPublic

Authored by markj on Apr 24 2024, 10:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 7, 7:22 PM
Unknown Object (File)
Wed, Nov 6, 12:11 AM
Unknown Object (File)
Mon, Nov 4, 6:11 AM
Unknown Object (File)
Sun, Oct 27, 7:35 PM
Unknown Object (File)
Sun, Oct 20, 5:11 AM
Unknown Object (File)
Wed, Oct 16, 11:25 AM
Unknown Object (File)
Oct 15 2024, 1:50 AM
Unknown Object (File)
Oct 13 2024, 4:26 AM
Subscribers

Details

Summary

For now, we enumerate disk devices before network devices. This is to
work around an interaction between u-boot and bhyve's BAR registration
code, reported here: https://lists.freebsd.org/archives/freebsd-virtualization/2024-April/002103.html

The console and bootrom are specified slightly differently versus amd64,
and a few of vmrun.sh's command-line options are amd64-only.

Diff Detail

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

Event Timeline

corvink added inline comments.
share/examples/bhyve/vmrun.sh
368

Windows could have some issues when the LPC bridge isn't connect to slot 31. iirc, sometimes mouse and keyboard aren't working properly in the VNC viewer. Additionally, some Intel GPU driver are using a fixed PCI address of 31 to access the LPC bridge (those GPU driver are reading the DEVID, VID of the LPC to verify they are running on the correct chipset).

This revision is now accepted and ready to land.Apr 26 2024, 7:06 AM
share/examples/bhyve/vmrun.sh
368

Do you mean that we should change the slot number to 31 in a follow-up patch in order to make vmrun useful for running windows guests? Is that sufficient.

My change here doesn't modify the number, or I'm missing something.

share/examples/bhyve/vmrun.sh
368

Yeah, if we like to change it, we should add a follow up commit.

Not sure if vmrun is able to run windows guests at all?

Moving lpc to slot 31 always on amd64 as a followup commit seems sensible, but probably not as part of this commit. It will further reduce some of the amd64 vs arm64 differences I think. Would probably make most sense to add the lpc after the EFI frame buffer. Ideally we would also warn if nextslot is too big.

share/examples/bhyve/vmrun.sh
373

At the risk of getting somewhat silly, I would maybe have renamed efiargs to fwargs or the like and put the -o bootrom= in fwargs. Maybe I will refactor some of that later though after yours. The efiargs is really a bit clumsy as it should be adding most of its settings to devargs IMO.

share/examples/bhyve/vmrun.sh
368

I've never tried it. vm-bhyve is a better choice for windows guests, I'd guess.

Looking at the bhyve invocation on the wiki page, it *should* be possible to use vmrun.sh, but I'll need to take some time to try it.

373

Yeah, I'm not sure I see the purpose of having distinct efiargs and devargs. I'll leave it for now though.

This revision was automatically updated to reflect the committed changes.