mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
kvm: report OSXSAVE in cpuid only if xsave is supported
Fixes #10625 PiperOrigin-RevId: 652665585
This commit is contained in:
@@ -234,7 +234,9 @@ func updateGlobalOnce(fd int) error {
|
||||
// explicitly set OSXSAVE, since this does not come in the feature
|
||||
// entries, but can be provided when the relevant CR4 bit is set.
|
||||
s := &cpuidSupported
|
||||
cpuid.X86FeatureOSXSAVE.Set(s)
|
||||
if cpuid.HostFeatureSet().UseXsave() {
|
||||
cpuid.X86FeatureOSXSAVE.Set(s)
|
||||
}
|
||||
// Explicitly disable nested virtualization. Since we don't provide
|
||||
// any virtualization APIs, there is no need to enable this feature.
|
||||
cpuid.X86FeatureVMX.Unset(s)
|
||||
|
||||
Reference in New Issue
Block a user