summaryrefslogtreecommitdiffhomepage
path: root/pkg/cpuid/cpuid.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-09-01 17:34:32 +0000
committergVisor bot <gvisor-bot@google.com>2021-09-01 17:34:32 +0000
commite9f7a7d140dbf6abe79f0fbf09ef949c58f1d1ba (patch)
treefdc903d8844ab2d8c53577e5296886376a9a033c /pkg/cpuid/cpuid.go
parent13c25b397080603e6cd8c9f55c7852a985ddd816 (diff)
parent810ea0957517bcfc459627aeb10a3594340c895b (diff)
Merge release-20210823.0-35-g810ea0957 (automated)
Diffstat (limited to 'pkg/cpuid/cpuid.go')
-rw-r--r--pkg/cpuid/cpuid.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/cpuid/cpuid.go b/pkg/cpuid/cpuid.go
index 69eeb7528..4d5e062a8 100644
--- a/pkg/cpuid/cpuid.go
+++ b/pkg/cpuid/cpuid.go
@@ -37,6 +37,14 @@ package cpuid
// arch/arm64/include/uapi/asm/hwcap.h
type Feature int
+// HostFeatureSet returns a FeatureSet that matches that of the host machine.
+// Callers must not mutate the returned FeatureSet.
+func HostFeatureSet() *FeatureSet {
+ return hostFeatureSet
+}
+
+var hostFeatureSet = getHostFeatureSet()
+
// ErrIncompatible is returned by FeatureSet.HostCompatible if fs is not a
// subset of the host feature set.
type ErrIncompatible struct {