libstore: Add apple-virt to system features when available#9187
Merged
Ericson2314 merged 2 commits intoNixOS:masterfrom Oct 20, 2023
Merged
Conversation
apple-virt to system features when available
12 tasks
Ericson2314
reviewed
Oct 19, 2023
Member
Ericson2314
left a comment
There was a problem hiding this comment.
Code looks good, would be very nice to have this feature!
Just needs change log and docs (I think we've been forgetting about these since the checklist went away...)
I'm sure that we'll adjust the implementation over time, but this at least discerns between an apple silicon bare metal machine and a tart VM.
65c6ac3 to
bb645c5
Compare
Ericson2314
approved these changes
Oct 20, 2023
|
Backport failed for Please cherry-pick the changes locally. git fetch origin 2.18-maintenance
git worktree add -d .worktree/backport-9187-to-2.18-maintenance origin/2.18-maintenance
cd .worktree/backport-9187-to-2.18-maintenance
git checkout -b backport-9187-to-2.18-maintenance
ancref=$(git merge-base e58566a057692bbfbd30a6639248adfcf81df108 bb645c5d02025158c8dbb0c2a60e7cba8251f062)
git cherry-pick -x $ancref..bb645c5d02025158c8dbb0c2a60e7cba8251f062 |
|
|
||
| - `apple-virt` | ||
|
|
||
| Included on darwin if virtualization is available. |
Contributor
There was a problem hiding this comment.
Suggested change
| Included on darwin if virtualization is available. | |
| Included on Darwin if virtualization is available. |
roberth
added a commit
that referenced
this pull request
Nov 16, 2023
[2.18-maintenance] Backport #9187 apple-virt
3 tasks
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/getting-nixos-to-work-macos-m1-2-3-aarch64-darwin/39510/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm sure that we'll adjust the implementation over time, but this at least discerns between an apple silicon bare metal machine and a tart VM.
I haven't named the system feature after a specific technology except "apple", because the way this is checked does not seem specific to hvf or avf, as far as I know.
Motivation
VMs often don't support nested virtualization. When macOS itself is virtualized, most likely it does not support hardware virtualization for its guests.
Context
system-features#7619Priorities
Add 👍 to pull requests you find important.