machyve / xhyve

xhyve, a lightweight OS X virtualization solution
Other
6.44k stars 356 forks source link

Add ASL compiler support (ACPI) #199

Open shchuko opened 4 years ago

shchuko commented 4 years ago

Closes #198

There's no pre-installed iasl compiler under macOS (unlike freebsd). This series of changes adds iasl compiler support. I've found that ACPICA tools can be built under macOS, so its iasl compiler can be given to xhyve to build ACPI Tables. Backward compatibility is saved.

Changes overview:

adaugherity commented 2 years ago

So, I decided to try this out, and got in way deeper than intended, and have some findings. Disclaimer: speaking as a fellow user -- I am not an xhyve developer.

This seems like a good addition, although I'm unclear when it would be needed and how to fully make use of it. Does this let you add new ACPI tables or modify the built-in ones without recompiling? If so, please add an explanation to the man page.

Speaking of which, the man page should be updated to list this option. I'll point out that -a is already used for something different in bhyve, so might it be wise to pick a different option? Personally, I would leave a compiled in default path (e.g. /usr/local/bin/iasl); it could be easily overridden by building with -DBHYVE_ASL_COMPILER=...). Then the path could be optional, i.e. xhyve [ -a [ /path/to/iasl ] ].

Some minor issues: