-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic check for bhyve support. #153
Conversation
Are these flags the same for AMD processors? |
No, iirc AMD has RVI. |
But I don't have an AMD processor to confirm, so I didn't add that to this commit. |
But...this says |
Let's wait on confirmation from an AMD user. |
Do we have to check for EPT and UG or does EPT imply UG? (What is UG even?) |
They are not exclusive, |
The FreeBSD handbook does not mention UEFI support, so another thing to keep in mind is that UEFI is dependent on Speaking strictly in regards to the Xeon line of processors, only the 5500 series CPUs lack the
A fairly recent desktop Intel CPU with both
An older 5500 series Xeon with the
|
(For the email watchers, I updated my previous post because My AMD findings:There is no "RVI" CPU flag to indicate "Rapid Virtualization Indexing" support, also known as Extended Page Tables in the Intel realm of CPU features. Instead AMD CPUs also use The other technology, which is most akin to VT-x in the Intel realm, is AMD-V. AMD-V is indicated by the You can read more about it here. There does not seem to be an Thanks to NYC*BUG's dmesgd repository I was able to find
Here is output from an AMD CPU with AMD-V
So the long winded conclusion I have drawn from this is it might be better to grep for Thoughts? |
However, let's still just warn, let's not stop the user from using iohyve, just in case. |
I'm not sure I agree. I think POPCNT and EPT should be required. If they can't support those extensions, it won't work for them anyways. UG is only if they want multiple cpu. It's not a requirement for 1, so I don't think we should rely on that. I misread with VT-x. EPT is on that line. So I will change this soon to look for POPCNT or EPT. |
So essentially we are back to the original plan. |
Not really. Adding checks for those two with an exit I think is the right move. If they don't support those extensions, they couldn't use iohyve anyways. We saved them a setup essentially.
— |
Be sure to put changes in the |
Roger Roger.
— |
Don't call me Roger |
Hahaha even as a joke EP 1 misses!
— |
This is my take on how this should be implemented. This is in response to: pr1ntf/iohyve#153 This checks to see if the necessary CPU features are available to run bhyve, limits Intel guests if lacking the UG feature, and exits if EPT/RVI missing.
I've implemented this, didn't know how to edit the PR directly. womp 🐙 |
@pr1ntf I do not see what you changed from @skarekrow's original PR (except a leading comment) which does not address AMD CPUs or Intel CPUs missing This does not allow for AMD CPUs to be used even when they have the proper CPU features. AMD CPUs do no have the In addition to if ! $( cat /var/run/dmesg.boot | grep 'POPCNT' ) ; then
if [ -n "$( cat /var/run/dmesg.boot | grep 'CPU:' | grep 'Intel' )" ] && [ -z "$( cat /var/run/dmesg.boot | grep 'VT-x:' | grep 'UG' )" ]; then
echo "Missing UG feature on Intel CPU"
<insert handling> James Lodge did an excellent job documenting the limited feature set of the Intel 5500 CPUs in his blog post here. |
Yeah.....keen observation. Jumped the gun. I thought he had already added your suggestions. Got lost in babble. What was in there I just yanked out. I guess now would be the time to google how to submit changes to another person's PR. |
414fa74 adapts @skarekrow's work. |
@pr1ntf here is the simplified process I did to maintain the history of @skarekrow commit. If you go to Graphs and then Network it will demonstrate this.
Because you have write access to the repo, the work flow is going to be a little different. This article from Jennifer Mack goes through the process. |
Opened #164 as my changes can not integrate with this one due to a lack of write access. |
Closing in favor of #164 |
Addendum to Skarekrow's #153 CPU feature check
Not guaranteed, but a bit better then nothing.
Closes #152