aboutsummaryrefslogtreecommitdiff
path: root/kqemu.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-10 19:53:43 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-10 19:53:43 +0000
commit0de6bb73fd213db5a9d703e10c284c5c0321d82e (patch)
treeb524494f03d975b71f30573e5ef23f5ac33c0cbf /kqemu.c
parent3d7374c5dab5670891e34d6f5752d6c3e23259dc (diff)
downloadqemu-0de6bb73fd213db5a9d703e10c284c5c0321d82e.zip
qemu-0de6bb73fd213db5a9d703e10c284c5c0321d82e.tar.gz
qemu-0de6bb73fd213db5a9d703e10c284c5c0321d82e.tar.bz2
monitor/mwait workaround
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2045 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'kqemu.c')
-rw-r--r--kqemu.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kqemu.c b/kqemu.c
index 61983d0..b7a93b0 100644
--- a/kqemu.c
+++ b/kqemu.c
@@ -119,7 +119,7 @@ static int is_cpuid_supported(void)
static void kqemu_update_cpuid(CPUState *env)
{
- int critical_features_mask, features;
+ int critical_features_mask, features, ext_features, ext_features_mask;
uint32_t eax, ebx, ecx, edx;
/* the following features are kept identical on the host and
@@ -130,11 +130,14 @@ static void kqemu_update_cpuid(CPUState *env)
CPUID_CMOV | CPUID_CX8 |
CPUID_FXSR | CPUID_MMX | CPUID_SSE |
CPUID_SSE2 | CPUID_SEP;
+ ext_features_mask = CPUID_EXT_SSE3 | CPUID_EXT_MONITOR;
if (!is_cpuid_supported()) {
features = 0;
+ ext_features = 0;
} else {
cpuid(1, eax, ebx, ecx, edx);
features = edx;
+ ext_features = ecx;
}
#ifdef __x86_64__
/* NOTE: on x86_64 CPUs, SYSENTER is not supported in
@@ -144,6 +147,8 @@ static void kqemu_update_cpuid(CPUState *env)
#endif
env->cpuid_features = (env->cpuid_features & ~critical_features_mask) |
(features & critical_features_mask);
+ env->cpuid_ext_features = (env->cpuid_ext_features & ~ext_features_mask) |
+ (ext_features & ext_features_mask);
/* XXX: we could update more of the target CPUID state so that the
non accelerated code sees exactly the same CPU features as the
accelerated code */