[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/2] target-i386: automatically raise cpuid level to
From: |
Radim Krčmář |
Subject: |
[Qemu-devel] [PATCH 2/2] target-i386: automatically raise cpuid level to 0xd |
Date: |
Thu, 18 Jun 2015 17:24:24 +0200 |
We already bump to level 7 if features there are requested, so do the
same for 0xD.
Signed-off-by: Radim Krčmář <address@hidden>
---
If we want this behavior, we should not do it by writing a case for
every level.
target-i386/cpu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index d392cf46f517..7a32ead690d2 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2796,6 +2796,10 @@ static void x86_cpu_realizefn(DeviceState *dev, Error
**errp)
env->cpuid_level = 7;
}
+ if (env->features[FEAT_XSAVE] && env->cpuid_level < 0xd) {
+ env->cpuid_level = 0xd;
+ }
+
/* On AMD CPUs, some CPUID[8000_0001].EDX bits must match the bits on
* CPUID[1].EDX.
*/
--
2.4.4
[Qemu-devel] [PATCH 1/2] target-i386: emulate CPUID level of real hardware, Radim Krčmář, 2015/06/18