Merge pull request #16500 from p-linnane/add-virtualized-check

hardware/cpu: add `virtualized?` check
This commit is contained in:
Patrick Linnane 2024-01-18 17:29:18 -08:00 committed by GitHub
commit 0ef5c28833
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,10 @@ module Hardware
sysctl_bool("hw.optional.arm64")
end
def virtualized?
sysctl_bool("kern.hv_vmm_present")
end
private
def arm_family

View File

@ -156,6 +156,10 @@ module Hardware
[1].pack("I") == [1].pack("N")
end
def virtualized?
false
end
def features
[]
end