119 |
critical_features_mask = |
critical_features_mask = |
120 |
CPUID_CMOV | CPUID_CX8 | |
CPUID_CMOV | CPUID_CX8 | |
121 |
CPUID_FXSR | CPUID_MMX | CPUID_SSE | |
CPUID_FXSR | CPUID_MMX | CPUID_SSE | |
122 |
CPUID_SSE2; |
CPUID_SSE2 | CPUID_SEP; |
123 |
if (!is_cpuid_supported()) { |
if (!is_cpuid_supported()) { |
124 |
features = 0; |
features = 0; |
125 |
} else { |
} else { |
126 |
cpuid(1, eax, ebx, ecx, edx); |
cpuid(1, eax, ebx, ecx, edx); |
127 |
features = edx; |
features = edx; |
128 |
} |
} |
129 |
|
#ifdef __x86_64__ |
130 |
|
/* NOTE: on x86_64 CPUs, SYSENTER is not supported in |
131 |
|
compatibility mode, so in order to have the best performances |
132 |
|
it is better not to use it */ |
133 |
|
features &= ~CPUID_SEP; |
134 |
|
#endif |
135 |
env->cpuid_features = (env->cpuid_features & ~critical_features_mask) | |
env->cpuid_features = (env->cpuid_features & ~critical_features_mask) | |
136 |
(features & critical_features_mask); |
(features & critical_features_mask); |
137 |
/* XXX: we could update more of the target CPUID state so that the |
/* XXX: we could update more of the target CPUID state so that the |